Closed Rayvenhaus closed 6 years ago
Hi,
thank you for reporting this! Looking at your MySQL version, I assume it as STRICT_MODE or NO_ZERO_DATE / NO_ZERO_IN_DATE enabled (by default). But I don't see any reason not to change the default values to something within the valid range.
Best Regards, Salvoxia
I'd appreciate it if you could test that change an report back with the result :)
Test which changes? I made the changes locally to my system and I was able to install the software without a hitch. Do you want me to register those changes here?
The changes in the commit that referenced this issue above (or see this link: https://github.com/evekb/evedev-kb/commit/6bab8e12cceae9dbbfd9971e617a1f569f62fab9). If these changes are identical to your local changes, I'll assume they'll work and close this issue.
There are 7 files that contain the invalid default setting and your changes only cover 5 of them. Please see below:
Creating table kb3_apilog...Error: Invalid default value for 'log_timestamp' Creating table kb3_comments...Error: Invalid default value for 'posttime' Creating table kb3_contracts...Error: Invalid default value for 'ctr_started' Creating table kb3_inv_detail...Error: Invalid default value for 'ind_timestamp' Creating table kb3_kills...Error: Invalid default value for 'kll_timestamp' Creating table kb3_log...Error: Invalid default value for 'log_timestamp' Creating table kb3_mails...Error: Invalid default value for 'kll_timestamp'
2 packages/database/kb3_comments/table.xml 4 packages/database/kb3_contracts/table.xml 2 packages/database/kb3_inv_detail/table.xml 2 packages/database/kb3_log/table.xml 2 packages/database/kb3_mails/table.xml
Looks like you're still missing apilog and kills. However, the change you made to the 5 match what I did here locally.
This is now live with R4.2.34.0
Receiving the following error in a fresh setup on the following system: Ubuntu 16.04 MySQL version: 5.7.19-0ubuntu0.16.04.1 - (Ubuntu) Apache/2.4.18 (Ubuntu) Database client version: libmysql - mysqlnd 5.0.12-dev - 20150407 PHP extension: mysqli PHP version: 7.0.18-0ubuntu0.16.04.1
Install Step 4:
Creating table kb3_alliances...done Creating table kb3_api_keys...done Creating table kb3_apicache...done Creating table kb3_apilog...Error: Invalid default value for 'log_timestamp' Creating table kb3_comments...Error: Invalid default value for 'posttime' Creating table kb3_config...done Creating table kb3_constellations...done Creating table kb3_contract_details...done Creating table kb3_contracts...Error: Invalid default value for 'ctr_started' Creating table kb3_corps...done Creating table kb3_dgmattributetypes...done Creating table kb3_dgmeffects...done Creating table kb3_dgmtypeattributes...done Creating table kb3_dgmtypeeffects...done Creating table kb3_eveunits...done Creating table kb3_inv_all...done Creating table kb3_inv_crp...done Creating table kb3_inv_detail...Error: Invalid default value for 'ind_timestamp' Creating table kb3_invtraits...done Creating table kb3_invtypes...done Creating table kb3_item_locations...done Creating table kb3_item_price...done Creating table kb3_item_types...done Creating table kb3_items_destroyed...done Creating table kb3_items_dropped...done Creating table kb3_kills...Error: Invalid default value for 'kll_timestamp' Creating table kb3_log...Error: Invalid default value for 'log_timestamp' Creating table kb3_mails...Error: Invalid default value for 'kll_timestamp' Creating table kb3_mapdenormalize...done Creating table kb3_moons...done Creating table kb3_navigation...done Creating table kb3_pilots...done Creating table kb3_races...done Creating table kb3_regions...done Creating table kb3_roles...done Creating table kb3_ship_classes...done Creating table kb3_ships...done Creating table kb3_standings...done Creating table kb3_sum_alliance...done Creating table kb3_sum_corp...done Creating table kb3_sum_pilot...done Creating table kb3_system_jumps...done Creating table kb3_systems...done Creating table kb3_titles...done Creating table kb3_titles_roles...done Creating table kb3_user...done Creating table kb3_user_extra...done Creating table kb3_user_roles...done Creating table kb3_user_titles...done Creating table kb3_zkbfetch...done
As you can see, the database does not like the DEFAULT settings in the table.xml files where the default setting for a DATETIMESTAMP is:
DATETIME NOT NULL DEFAULT '0000-00-00 00:00:00'
This prevents the tables in question from being created and stops the installation process. Manually attemptingh to create the table results in this error:
MySQL said: Documentation
1067 - Invalid default value for 'log_timestamp'
The DATETIME type is used for values that contain both date and time parts. MySQL retrieves and displays DATETIME values in 'YYYY-MM-DD HH:MM:SS' format. The supported range is '1000-01-01 00:00:00' to '9999-12-31 23:59:59'.
which means that the supplied value in the xml file of 000-00-00 00:00:00 is invalid.
Editing the xml files in quesstion and changing the DEFAULT from DATETIME NOT NULL DEFAULT '0000-00-00 00:00:00'
to
DATETIME NOT NULL DEFAULT '1000-01-01 00:00:00'
allows the tables to be created with one exception. kb3_comments uses a ield called posttime which has this in the table.xml file:
posttime
timestamp NOT NULL default '0000-00-00 00:00:00',and the range for TIMESTAMP values is '1970-01-01 00:00:01.000000' to '2038-01-19 03:14:07.999999'.
Changing to
posttime
timestamp NOT NULL default '1970-01-01 00:00:01',alows that table to be created