Page MenuHomePhabricator

Field 'ar_page' doesn't have a default value
Open, Needs TriagePublic


When deleting a page with MySQL strict mode enabled:

INSERT  INTO `bw_archive` (ar_namespace,ar_title,ar_comment,ar_user,ar_user_text,ar_timestamp,ar_minor_edit,ar_rev_id,ar_parent_id,ar_text_id,ar_text,ar_flags,ar_len,ar_page_id,ar_deleted,ar_sha1,ar_content_model,ar_content_format) SELECT  page_namespace,page_title,rev_comment,rev_user,rev_user_text,rev_timestamp,rev_minor_edit,rev_id,rev_parent_id,rev_text_id,'','',rev_len,page_id,rev_deleted,rev_sha1,rev_content_model,rev_content_format FROM `bw_page`,`bw_revision`   WHERE page_id = '4436660' AND (page_id = rev_page) 
Toiminto (funktio): WikiPage::doDeleteArticleReal

Error: 1364 Field 'ar_page' doesn't have a default value (

Event Timeline

Nikerabbit raised the priority of this task from to Needs Triage.
Nikerabbit updated the task description. (Show Details)
Nikerabbit added a project: Wikimedia-Rdbms.
Nikerabbit added a subscriber: Nikerabbit.
Restricted Application added subscribers: StudiesWorld, Aklapper. · View Herald TranscriptDec 15 2015, 7:29 AM

This seems to be another case of missing updater. In this case it was changed during a release it seems:

Doing the update manually:

update bw_archive set ar_page_id = ar_page where ar_page != 0;
alter table bw_archive drop ar_page;
Reedy moved this task from Unsorted to Change on the Schema-change board.Feb 24 2020, 6:14 AM