Last modified: 2010-05-15 16:03:17 UTC
rebuildrecentchanges.php fails with an error on SQL syntax. Shell input/output below. Found in 1.13alpha (r32654). /var/www/w/maintenance# php rebuildrecentchanges.php Loading from page and revision tables... $wgRCMaxAge=31104000 (360 days) Updating links and size differences... A database query syntax error has occurred. The last attempted database query was: "UPDATE `bw_recentchanges` SET rc_last_oldid=72650,rc_new=0,rc_type=0,rc_old_len=,rc_new_len=198 WHERE rc_cur_id=712 AND rc_this_oldid=103803" from within function "". MySQL returned error "1064: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'rc_new_len=198 WHERE rc_cur_id=712 AND rc_this_oldid=103803' at line 1 (localhost)"
that only happens when $lastSize is empty; this is supposed to be filled in based on the value of rev_len which is fetched by the previous query. If for any reason (like old database contents lacking rev_len values), the value is not numeric, the above error takes place. A work around was applied with r32656.