Opened 15 years ago

Closed 14 years ago

#6802 closed defect (fixed)

MythMusic database creation contains invalid instructions making updates fail

Reported by: Jonathan Martens <jonathan@…> Owned by: Rob Smith
Priority: trivial Milestone: unknown
Component: Plugin - MythMusic Version: head
Severity: low Keywords:
Cc: Ticket locked: no

Description

The dbcheck.cpp file for the MythMusic plugin contains invalid statements making database upgrades fail at version 1005 as in the 1006 (and some more along the line) contain create staments with fields of type TEXT with a default value which is not supported as described in http://dev.mysql.com/doc/refman/5.1/en/blob.html:

"In most respects, you can regard a BLOB column as a VARBINARY column that can be as large as you like. Similarly, you can regard a TEXT column as a VARCHAR column. BLOB and TEXT differ from VARBINARY and VARCHAR in the following ways:

  • For indexes on BLOB and TEXT columns, you must specify an index prefix length. For CHAR and VARCHAR, a prefix length is optional. See Section 7.4.2, “Column Indexes”.
  • BLOB and TEXT columns cannot have DEFAULT values."

Please find attached a patch to fix this.

Attachments (2)

mythplugins-mythmusic-mythmusic-dbcheck_cpp.patch (1.4 KB) - added by Jonathan Martens <jonathan@…> 15 years ago.
Patch removing default value for fields with TEXT type
mythplugins-mythmusic-mythmusic-dbcheck_cpp-new.patch (1.4 KB) - added by jonathan@… 15 years ago.
Oops, the patch removed the NOT NULL specifier which is allowed, this is an updated patch (new name as it was failing to upload due to not having delete permissions to overwrite existing patch)

Download all attachments as: .zip

Change History (5)

Changed 15 years ago by Jonathan Martens <jonathan@…>

Patch removing default value for fields with TEXT type

Changed 15 years ago by jonathan@…

Oops, the patch removed the NOT NULL specifier which is allowed, this is an updated patch (new name as it was failing to upload due to not having delete permissions to overwrite existing patch)

comment:1 Changed 15 years ago by danielk

Milestone: 0.22unknown
Priority: majortrivial
Severity: mediumlow

comment:2 Changed 15 years ago by Rob Smith

Owner: changed from stuartm to Rob Smith
Status: newaccepted

comment:3 Changed 14 years ago by Rob Smith

Resolution: fixed
Status: acceptedclosed

(In [22384]) Fixes #6802, Fixes #6820, this allows the database schema updates to run on mysql database running in strict modes

Note: See TracTickets for help on using tickets.