Last modified: 2014-06-23 16:06:58 UTC
If the group MySQL key word or other reserved key words are in the values array to update a row it either is silently ignored by MySQL or causes a database error. This is due to the makeList() function not enclosing field names in back ticks(`). $this->DB->update( 'example_table', array('group' => 1), array('example_id' => 100), __METHOD__ ); Generated SQL: "UPDATE example_table SET group = 1 WHERE example_id = 100;" Solution: Field names need to be enclosed in back ticks. Suggested code change: Use the provided addIdentifierQuotes() function on field names in the makeList() function.
Certainly in MediaWiki core, I don't believe this is much of a problem. I have seen issues with the Bugzilla extension to this extent..
Yeah, I have not seen this issue occur in the Mediawiki core with any queries. I solved the issue temporarily on our wikis by putting in a drop in replacement database driver that does back ticks all field names by default.