elliotchance / mbzdb

🎵 Port of the MusicBrainz database to run on other RDBMSs with replication (previously named MB_MySQL.)
88 stars 33 forks source link

alter table error #76

Open PiLemichel opened 7 years ago

PiLemichel commented 7 years ago

Hello, When i launch Install/Update database schematic (or the full install) i have a 2 type of error (some exemples):

DBD::mysql::db do failed: BLOB, TEXT, GEOMETRY or JSON column 'comment' can't have a default value at src/functions.pl line 95, <SQL> line 42.
SQL: 'ALTER TABLE `cover_art` ADD `comment` TEXT NOT NULL DEFAULT '''
DBD::mysql::db do failed: Invalid default value for 'created' at src/functions.pl line 95, <SQL> line 3453.
[ERROR] SQL: 'ALTER TABLE `annotation` ADD `created` TIMESTAMP    DEFAULT 0'

Did you know where that from ? Thank you.

ps: my mySql version is 5.7.18

flamino commented 5 years ago

Ever get a response to this request for help?

hectoras commented 5 years ago

I have just checked this on a fresh MariaDB install (10.0.36-MariaDB-0ubuntu0.16.04.1 with innodb_file_format=Barracuda and innodb_large_prefix=ON) with the current code from the master branch and it works as expected. I suppose it will also work on current MySQL versions.

Note you will probably need to set $g_mysql_engine = 'InnoDB ROW_FORMAT=COMPRESSED;' in settings_mysql.pl.

By the way, the script generated an incorrect / invalid SQL for you back in 2017 when creating the cover_art table, but it seems it has been corrected since after you opened this bug report. Could you please try again and post a comment if it does not work, or close this issue if it does work now?

Thank you.