https://bugzilla.wikimedia.org/show_bug.cgi?id=43847
Web browser: ---
Bug ID: 43847
Summary: mysql 5.5 / ansi sql incompatibility
Product: MediaWiki extensions
Version: master
Hardware: All
OS: All
Status: NEW
Severity: normal
Priority: Unprioritized
Component: ArticleFeedback
Assignee: [email protected]
Reporter: [email protected]
CC: [email protected]
Classification: Unclassified
Mobile Platform: ---
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.
--
You are receiving this mail because:
You are the assignee for the bug.
You are watching all bug changes.
_______________________________________________
Wikibugs-l mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/wikibugs-l