Last modified: 2014-03-31 09:49:28 UTC

Wikimedia Bugzilla is closed!

Wikimedia migrated from Bugzilla to Phabricator. Bug reports are handled in Wikimedia Phabricator.
This static website is read-only and for historical purposes. It is not possible to log in and except for displaying bug reports and their history, links might be broken. See T45847, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 43847 - mysql 5.5 / ansi sql incompatibility
mysql 5.5 / ansi sql incompatibility
Status: RESOLVED WONTFIX
Product: MediaWiki extensions
Classification: Unclassified
ArticleFeedback (Other open bugs)
master
All All
: High major (vote)
: ---
Assigned To: Matthias Mullie
wikimedia[unmaintained]
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2013-01-11 00:47 UTC by Asher Feldman
Modified: 2014-03-31 09:49 UTC (History)
6 users (show)

See Also:
Web browser: ---
Mobile Platform: ---
Assignee Huggle Beta Tester: ---


Attachments

Description Asher Feldman 2013-01-11 00:47:34 UTC
This issue is a blocker on upgrading mysql on the cluster.

MySQL >= 5.5 does not allow: 

SET "unsigned int col that = 0" + (-1) - it results in the following error:

Error 'BIGINT UNSIGNED value is out of range in '(`enwiki`.`article_feedback_revisions`.`afr_total` + -(1))'' on query. Default database: 'enwiki'. Query: 'UPDATE /* ApiArticleFeedback::insertRevisionRating  */  `article_feedback_revisions` SET afr_total = afr_total + -1,afr_count = afr_count + 0 WHERE afr_page_id = '28184' AND afr_rating_id = '2' AND afr_revision = '531863378''

The row value at the time was:

mysql:root@localhost [enwiki]> select * from article_feedback_revisions WHERE afr_page_id = '28184' AND afr_rating_id = '2' AND afr_revision = '531863378';
+-------------+--------------+---------------+-----------+-----------+
| afr_page_id | afr_revision | afr_rating_id | afr_total | afr_count |
+-------------+--------------+---------------+-----------+-----------+
|       28184 |    531863378 |             2 |         0 |         1 |
+-------------+--------------+---------------+-----------+-----------+

If SQL_MODE is set to 'NO_UNSIGNED_SUBTRACTION' the behavior is more compatible with prior versions of mysql, however:

SET "unsigned int col that = 0" + (-1)

is still illegal, though:

SET "unsigned int col that = 0" - 1

becomes legal.
Comment 1 Matthias Mullie 2013-01-14 16:03:52 UTC
https://gerrit.wikimedia.org/r/#/c/43833/
Comment 2 Alex Monk 2013-02-17 22:14:21 UTC
Merged by Asher on the 15th.
Comment 3 Patrick Reilly 2013-02-19 22:15:00 UTC
logmsgbot: !log preilly synchronized php-1.21wmf9/extensions/ArticleFeedback  'fix mysql 5.5 / ansi sql incompatibility'
[2:11pm] morebots: Logged the message, Master
[2:11pm] Krenair_ joined the chat room.
[2:11pm] AaronSchulz: preilly: \o/
Comment 4 Peter Youngmeisterarius 2013-02-28 00:35:24 UTC
hi,

there is another issues that popped up on this today. specifically, afr_count decrimented instead of incrementing. see below error. could you please take a look at this? it's breaking replication on mariadb slaves still, including db1047 which is used for research purposes.

thanks!

Error 'BIGINT UNSIGNED value is out of range in '(`enwiki`.`article_feedback_revisions`.`afr_total` + -(5))'' on query. Default database: 'enwiki'. Query: 'UPDATE /* ApiArticleFeedback::insertRevisionRating 199.254.110.29 */  `article_feedback_revisions` SET afr_total = GREATEST( afr_total + -5, 0 ),afr_count = afr_count + -1 WHERE afr_page_id = '321080' AND afr_rating_id = '1' AND afr_revision = '540378393''
Comment 5 Matthias Mullie 2013-02-28 14:25:35 UTC
New patch at: https://gerrit.wikimedia.org/r/#/c/51356/

Even though the GREATEST will make sure no negative value was going to be inserted in the unsigned columns, it is not even possible to subtract a value resulting in a negative value from a signed value.
Another patch will now cast the column's value to signed, to ensure the subtraction does not fail, then the greatest will make sure no negative value is stored.
Comment 6 Andre Klapper 2014-02-26 11:39:55 UTC
The extension homepage at [[mw:Extension:ArticleFeedback]] says 
"This extension has been archived. This extension has not been maintained in some time, and no longer supports recent releases of MediaWiki.
The following other choices are still available: [[mw:Extension:ArticleFeedbackv5]]"

Furthermore, ArticleFeedback (version 4 or earlier) was removed from all Wikimedia wikis in https://gerrit.wikimedia.org/r/#/c/98074/

It is currently unlikely that there will be any further active development of ArticleFeedback (version 4 or earlier).
Closing this report as WONTFIX to reflect reality.
Please feel free to reopen this report in the future if anyone takes the responsibility for active development of ArticleFeedback (version 4 or earlier) again.

Thank you for reporting this bug and we are sorry it could not be fixed.
Comment 7 Gerrit Notification Bot 2014-03-31 09:49:28 UTC
Change 51356 abandoned by Matthias Mullie:
Bug 43847 - mysql 5.5 / ansi sql incompatibility

Reason:
AFT is unmaintained, these patches are not going to get reviewed

https://gerrit.wikimedia.org/r/51356

Note You need to log in before you can comment on or make changes to this bug.


Navigation
Links