Opened 12 months ago

Closed 12 months ago

Last modified 12 months ago

#13356 closed Bug Report - General (fixed)

mysql fails

Reported by: paul Owned by: David Engel <dengel@…>
Priority: blocker Milestone: 29.2
Component: MythTV - General Version: v29.1
Severity: high Keywords:
Cc: Ticket locked: no

Description

mythdbconn.cpp tries to "SELECT COUNT(INFORMATION_SCHEMA.TABLES.TABLE_NAME) FROM INFORMATION_SCHEMA.TABLES WHERE INFORMATION_SCHEMA.TABLES.TABLE_SCHEMA = DATABASE() AND INFORMATION_SCHEMA.TABLES.TABLE_TYPE = 'BASE TABLE';"

mysql 8.0.13 fails: "ERROR 1054 (42S22): Unknown column 'INFORMATION_SCHEMA.TABLES.TABLE_NAME' in 'field list'"

mythbackend fails to start.

Changing it to simply "SELECT COUNT(TABLE_NAME) FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_SCHEMA = DATABASE() AND TABLE_TYPE = 'BASE TABLE';" would provide a fix.

Change History (5)

comment:1 Changed 12 months ago by jpilk

It's probably obvious, but the file seems to be mythtv/libs/libmythbase/mythdbcon.cpp

comment:2 Changed 12 months ago by paul

Yes; there are also two other queries that do the same thing (in DBUtil::GetTables? in dbutil.cpp and DatabaseLogger::tableExists in loggingserver.cpp)

comment:3 Changed 12 months ago by David Engel <dengel@…>

In 362f382987/mythtv:

Simplify some administrative database queries.

Some versions of MySQL reportedly have problems with the overly,
explicit, information_schema, column names.

Refs #13356

(cherry picked from commit 068d660eb1ce86bc00e0cf06643ad60a700f2588)

comment:4 Changed 12 months ago by David Engel <dengel@…>

Owner: set to David Engel <dengel@…>
Resolution: fixed
Status: newclosed

In 068d660eb/mythtv:

Simplify some administrative database queries.

Some versions of MySQL reportedly have problems with the overly,
explicit, information_schema, column names.

Fixes #13356

comment:5 Changed 12 months ago by gigem

Milestone: needs_triage29.2
Note: See TracTickets for help on using tickets.