Last modified: 2009-06-17 11:50:49 UTC
On alswiki, I am getting a database error when trying to save a filter containing a umlaut or a regex: lcase(added_lines) contains "fööbar" | lcase(added_lines) rlike "foo[^ ]bar" Error message is: A database query syntax error has occurred. This may indicate a bug in the software. The last attempted database query was: (SQL query hidden) from within function "AbuseFilterViewEdit::show". MySQL returned error "1054: Unknown column 'af_global' in 'field list' (10.0.6.21)".
Suddenly applies for all filters there, not just for those containing an umlaut or regex. Error occurs not always, but in, let's say, 9 of 10 attempts.
Looks like a schema change has slipped through the cracks here. Could this be related to Tim's running schema changes earlier today?
I've looked at the error logs and I can find the error on alswiki, from lots and lots of different servers. It's a bit strange, the code isn't supposed to be updated on those servers.
The same problem occurs on nl-wikipedia. We cannot commit any changes to filters.
The error on nl-wikipedia: Error in function "AbuseFilterViewEdit::show”. MySQL returned “1054: Unknown column 'af_global' in 'field list' (10.0.6.23) Best regards, Mark Wesbeek
Did a live hack on Wikimedia to fix. I suggest implementing a permanent fix along the lines of using an explicit field list for any INSERT queries instead of trusting the DB. Also you shouldn't be selecting data from a slave and then saving it back to the master, that could lead to some nasty unintended reversions if there's any replication lag.
I've sorted this out in r52048.