Opened 10 years ago

Closed 10 years ago

Last modified 10 years ago

#12161 closed Bug Report - General (fixed)

mythcommflag - throwing database errors

Reported by: mythtv@… Owned by: JYA
Priority: major Milestone: 0.27.2
Component: MythTV - Mythcommflag Version: 0.27-fixes
Severity: high Keywords:
Cc: Ticket locked: no

Description

When this command is executed : mythcommflag --file $NewName? --rebuild --loglevel info --syslog local7 >> $LOGFILE 2>&1

Getting these errors thrown:

2014-05-30 11:15:50.815101 E Error preparing query: INSERT INTO recordedseek (chanid, starttime, type, mark, offset) VALUES 2014-05-30 11:15:50.815129 E Driver error was [2/1064]: QMYSQL3: Unable to prepare statement Database error was: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near at line 1

2014-05-30 11:15:50.815303 E DB Error (delta position map insert): Query was: INSERT INTO recordedseek (chanid, starttime, type, mark, offset) VALUES Driver error was [2/1064]: QMYSQL: Unable to execute query Database error was: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near at line 1

2014-05-30 11:15:50.815462 E Error preparing query: INSERT INTO recordedseek (chanid, starttime, type, mark, offset) VALUES 2014-05-30 11:15:50.815479 E Driver error was [2/1064]: QMYSQL3: Unable to prepare statement Database error was: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near at line 1

2014-05-30 11:15:50.815602 E DB Error (delta position map insert): Query was: INSERT INTO recordedseek (chanid, starttime, type, mark, offset) VALUES Driver error was [2/1064]: QMYSQL: Unable to execute query Database error was: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near at line 1

Started after last update

This version of mythcommflag : mythutil version: fixes/0.27 [v0.27.1-7-g41d04b6] Last known working version of mythcommflag :mythutil version: fixes/0.27 [v0.27-232-gf4825ca]

Attachments (5)

roku-nocommercials-2014-05-26.20.00.28.log (19.2 KB) - added by mythtv@… 10 years ago.
Log file WITHOUT error
roku-nocommercials-2014-05-26.20.00.28.2.log (19.2 KB) - added by mythtv@… 10 years ago.
Log file WITHOUT error
roku-nocommercials-2014-05-26.20.00.28.3.log (19.2 KB) - added by mythtv@… 10 years ago.
Log file WITHOUT error
roku-nocommercials-2014-05-30.10.30.39.log (58.6 KB) - added by mythtv@… 10 years ago.
Log file WITH error
roku-nocommercials-2014-05-31.09.30.45.log (49.7 KB) - added by mythtv@… 10 years ago.
Log file WITH error

Download all attachments as: .zip

Change History (13)

Changed 10 years ago by mythtv@…

Log file WITHOUT error

Changed 10 years ago by mythtv@…

Log file WITHOUT error

Changed 10 years ago by mythtv@…

Log file WITHOUT error

Changed 10 years ago by mythtv@…

Log file WITH error

Changed 10 years ago by mythtv@…

Log file WITH error

comment:1 Changed 10 years ago by mythtv@…

Apologize for uploading the first file 3 times.

comment:2 Changed 10 years ago by JYA

Owner: changed from cpinkham to JYA
Status: newaccepted

comment:3 Changed 10 years ago by JYA

please try the following patch:

diff --git a/mythtv/libs/libmyth/programinfo.cpp b/mythtv/libs/libmyth/programinfo.cpp
index 35e7ff8..8c891f0 100644
--- a/mythtv/libs/libmyth/programinfo.cpp
+++ b/mythtv/libs/libmyth/programinfo.cpp
@@ -3640,6 +3640,9 @@ void ProgramInfo::SavePositionMap(
         return;
     }
 
+    if (posMap.isEmpty())
+        return;
+
     MSqlQuery query(MSqlQuery::InitCon());
     QString comp;
 
@@ -3738,6 +3741,9 @@ void ProgramInfo::SavePositionMap(
 void ProgramInfo::SavePositionMapDelta(
     frm_pos_map_t &posMap, MarkTypes type) const
 {
+    if (posMap.isEmpty())
+        return;
+
     if (positionMapDBReplacement)
     {
         QMutexLocker locker(positionMapDBReplacement->lock);

comment:4 Changed 10 years ago by mythtv@…

Not sure how you are expecting me to take this patch.

At this time - I have not downloaded any source and done local compiles and installations.

Been using the apt-get - and pulling the fixes as they are released in : mythbuntu-0_27-precise.list

comment:5 Changed 10 years ago by JYA

you or someone else will have to compile from source...

its not complicated

comment:6 Changed 10 years ago by Jean-Yves Avenard <jyavenard@…>

Resolution: fixed
Status: acceptedclosed

In d90af2d6b09bc5197a39d1e1d09baff2aafe9a2a/mythtv:

Don't attempt to issue DB query if there's nothing to do

Prevent harmless SQL statement error messages to be logged when the position map is empty

Regression introduced in b4be8e24f9fab5b6a71f62df8e2c0403bedf4805

Fixes #12161

comment:7 Changed 10 years ago by Jean-Yves Avenard <jyavenard@…>

In 00c0814110e56ba8b8947bd332a32484bf4800e5/mythtv:

Don't attempt to issue DB query if there's nothing to do

Prevent harmless SQL statement error messages to be logged when the position map is empty

Regression introduced in b4be8e24f9fab5b6a71f62df8e2c0403bedf4805

Fixes #12161

(cherry picked from commit d90af2d6b09bc5197a39d1e1d09baff2aafe9a2a)

comment:8 Changed 10 years ago by paulh

Milestone: unknown0.27.2
Note: See TracTickets for help on using tickets.