#905: fresh install sql error when mysql is configured with STRICT_ALL_TABLES
----------------------------+-----------------
Reporter: vbanos | Owner:
Type: defect | Status: new
Priority: minor | Milestone:
Component: *installation* | Version:
Keywords: sql |
----------------------------+-----------------
In a fresh invenio installation, when you try to do:
{{{
invenio/bin/inveniocfg --create-tables
}}}
and you have mysql configured with sql-mode = STRICT_ALL_TABLES (my.cnf
configuration value), the command fails with the following message:
{{{
>> Going to create and fill tables...
Testing DB connection... ok
Testing Python/MySQL/MySQLdb UTF-8 chain... ok
ERROR 1101 (42000) at line 2712: BLOB/TEXT column 'setDescription' can't
have a default value
ERROR: failed execution of /opt/invenio/bin/dbexec <
/opt/invenio/lib/sql/invenio/tabcreate.sql
}}}
If you change the sql-mode to the default, then this command is completed
successfully.
Strict sql mode is very important because the default mysql configuration
is "forgiving" to untidy sql and minor syntactic errors
(check out http://dev.mysql.com/doc/refman/5.0/en/server-sql-
mode.html#sqlmode_strict_all_tables for more information)
Using strict sql mode, you can avoid many programming errors and build
better programs.
Invenio should install correctly when mysql sql-mode=STRICT_ALL_TABLES
--
Ticket URL: <http://invenio-software.org/ticket/905>
Invenio <http://invenio-software.org>