Anope IRC Services

Anope Support => 2.0.x/1.9.x Support => Topic started by: Kaj on May 29, 2017, 12:51:40 PM

Title: Problem with mysql 5.7 when using m_irc2sql module
Post by: Kaj on May 29, 2017, 12:51:40 PM
Hello,

I've noticed a problem when I tried to load the m_irc2sql module. After starting the services, everything works fine but the stats-tables (anope_chan and anope_user) stayed empty. If I started the application in debug mode I've notices a lot of errors like:

Quote
[May 29 09:10:35.933274 2017] m_irc2sql: Error executing query INSERT INTO `anope_chan` (channel, topic, topicauthor, topictime, modes) VALUES ('#Games','','','0','') ON DUPLICATE KEY UPDATE channel=VALUES(channel), topic=VALUES(topic),topicauthor=VALUES(topicauthor), topictime=VALUES(topictime), modes=VALUES(modes): Incorrect datetime value: '0' for column 'topictime' at row 1

After some research I've concluded that this was due to changes since mysql version 5.7 - where sqlmode STRICT_TRANS_TABLES was introduced and enabled by default:

Quote
From MySQL 5.7.4 through 5.7.7, STRICT_TRANS_TABLES includes the effect of the ERROR_FOR_DIVISION_BY_ZERO, NO_ZERO_DATE, and NO_ZERO_IN_DATE modes

After disabling this mode, the module works fine - so I am happy but I thought it would be nice to report it. Because it would even be better that this would ever get fixed in Anope itself rather than disabling this mode in mysql.

Kind regards,

Kaj


Title: Re: Problem with mysql 5.7 when using m_irc2sql module
Post by: Jens Voss on May 29, 2017, 01:03:21 PM
Hello Kaj,

thank you for reporting. I will look into it.

Kind regards
Jens

PS: we also have a bugtracker at https://bugs.anope.org :-)