Mediawiki

From Mosuma
Jump to: navigation, search
  1. Fix the following bug
2014-01-15 16:54:02 SGT STATEMENT:  INSERT /* RecentChange::save Zhangguiyu */ INTO "recentchanges" (rc_timestamp,rc_namespace,rc_title,rc_type,rc_source,rc_minor,rc_cur_id,rc_user,rc_user_text,rc_comment,rc_this_oldid,rc_last_oldid,rc_bot,rc_ip,rc_patrolled,rc_new,rc_old_len,rc_new_len,rc_deleted,rc_logid,rc_log_type,rc_log_action,rc_params,rc_id) VALUES ('2014-01-15 08:54:02 GMT','0','Main_Page','0','mw.edit','1','1','1','Zhangguiyu','/* OS */','10108','10061','0','203.123.23.252','1','0','5757','5842','0','0',NULL,'','','16727')
2014-01-15 16:54:24 SGT ERROR:  null value in column "rc_cur_time" violates not-null constraint
2014-01-15 16:54:24 SGT STATEMENT:  INSERT /* RebuildRecentchanges::rebuildRecentChangesTablePass1  */ INTO "recentchanges" (rc_timestamp,rc_user,rc_user_text,rc_namespace,rc_title,rc_comment,rc_minor,rc_bot,rc_new,rc_cur_id,rc_this_oldid,rc_last_oldid,rc_type,rc_source,rc_deleted) SELECT  rev_timestamp,rev_user,rev_user_text,page_namespace,page_title,rev_comment,rev_minor_edit,0,page_is_new,page_id,rev_id,0, (CASE WHEN page_is_new != 0 THEN 1 ELSE 0 END) , (CASE WHEN page_is_new != 0 THEN 'mw.new' ELSE 'mw.edit' END) ,rev_deleted FROM "page","revision"  WHERE (rev_timestamp > '2013-10-16 08:54:23 GMT') AND (rev_page=page_id)  ORDER BY rev_timestamp DESC

via modifying database:

ALTER TABLE mediawiki.recentchanges ALTER COLUMN rc_cur_time DROP NOT NULL;

database log shows

2014-01-15 17:06:26 SGT STATEMENT:  alter mediawiki.recentchanges alter column  rc_cur_time drop not null;

The beauty of open-source software!