[mythtv-commits] Ticket #11480: SQL syntax errors prevents listing of ROMs

MythTV noreply at mythtv.org
Mon Apr 8 16:54:13 UTC 2013


#11480: SQL syntax errors prevents listing of ROMs
-------------------------------------+-------------------------------------
 Reporter:  contactme@…              |           Type:  Bug Report -
   Status:  new                      |  General
Milestone:  unknown                  |       Priority:  major
  Version:  0.26                     |      Component:  Plugin - MythGame
 Keywords:  mythgames MySQL syntax   |       Severity:  medium
  error                              |  Ticket locked:  0
-------------------------------------+-------------------------------------
 When setting up a new emulator, I run in the following problem.

 When searching for ROMs the following error shows up:
 {{{
 DB Error (MSqlQuery):
 Query was:
 INSERT INTO gamemetadata (system, romname, gamename, genre, year,
 gametype, rompath, country, crc_value, diskcount, display, plot,
 publisher, version, fanart, boxart, screenshot) VALUES (?, ?, ?, ?, ?, ?,
 ?, ?, ?, '1', '1', ?, ?, ?, ?, ?, ?)
 Bindings were:
 :BOXART=NULL, :COUNTRY="Unbekannt", :CRC32="98bd4147", :FANART=NULL,
 :GAMENAME="Mario Kart 64", :GAMETYPE="N64", :GENRE="Unbekannt N64",
 :PLOT="Unbekannt", :PUBLISHER="Unbekannt", :ROMNAME="Mario Kart 64.v64",
 :ROMPATH="/mnt/data/mythtv/games/emulators/n64/roms", :SCREENSHOT=NULL,
 :SYSTEM="Mupen64plus", :VERSION="0", :YEAR="19xx"
 Driver error was [2/1048]:
 QMYSQL3: Unable to execute statement
 Database error was:
 Column 'fanart' cannot be null
 2013-04-08 17:58:06.611280 N  MythGame:GAMEHANDLER: Update gametype N64
 }}}


 Furthermore a SQL synthax error pops up when listing the games
 (Media->Games->All Games->Mupen64plus). It looks like this error breaks
 mythgame. At least no games show up:
 {{{
 2013-04-08 18:22:16.141371 E  Error preparing query: select distinct  from
 gamemetadata where system in ('Mupen64plus') and trim(system)=:SYSTEM and
 display = 1  order by ;
 2013-04-08 18:22:16.141389 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 'from
 gamemetadata where system in ('Mupen64plus') and trim(system)=? and
 displa' at line 1
 }}}

 The database is populated:

 {{{
 +-------+-------------+------------------------------------------------------------------+--------------------------------------------------------------+---------------+------+-----------+----------+-------------------------------------------+------------+--------+-----------+--------+----------+-----------+-----------+-----------+---------+---------+---------+
 | intid | system      | romname
 | gamename                                                     | genre
 | year | publisher | favorite | rompath
 | screenshot | fanart | plot      | boxart | gametype | diskcount |
 country   | crc_value | inetref | display | version |
 +-------+-------------+------------------------------------------------------------------+--------------------------------------------------------------+---------------+------+-----------+----------+-------------------------------------------+------------+--------+-----------+--------+----------+-----------+-----------+-----------+---------+---------+---------+
 |   137 | Mupen64plus | Mario Kart 64.v64
 | Mario Kart 64                                                | Unbekannt
 N64 | 19xx | Unbekannt |     NULL |
 /mnt/data/mythtv/games/emulators/n64/roms |            |        |
 Unbekannt |        | N64      |         1 | Unbekannt | 98bd4147  | NULL
 |       1 | 0       |
 +-------+-------------+------------------------------------------------------------------+--------------------------------------------------------------+---------------+------+-----------+----------+-------------------------------------------+------------+--------+-----------+--------+----------+-----------+-----------+-----------+---------+---------+---------+
 }}}


 Anny suggestions how to fix this?

 Cheers,
 Bjoern

-- 
Ticket URL: <http://code.mythtv.org/trac/ticket/11480>
MythTV <http://code.mythtv.org/trac>
MythTV Media Center


More information about the mythtv-commits mailing list