Page MenuHomePhabricator

Error during recreation of tables
Closed, ResolvedPublic

Description

Log from update run with error

After a cleanup of the database with a

mysql> DROP DATABASE my_wiki;
mysql> CREATE DATABASE my_wiki;

and then rerun of the installer, i first got an error on SQL syntax rom maintenance/update,

$ php maintenance/update.php --conf LocalSettings.php

then on a second rerun it passed without an error or warning


Version: unspecified
Severity: normal

Attached:

Details

Reference
bz36814

Event Timeline

bzimport raised the priority of this task from to Needs Triage.Nov 22 2014, 12:22 AM
bzimport set Reference to bz36814.
bzimport added a subscriber: Unknown Object (MLST).

Comment on attachment 10591
Log from update run with error

john@loke:/var/www/repo$ php maintenance/update.php --conf LocalSettings.php
MediaWiki 1.20alpha Updater

Going to run database updates for my_wiki
Depending on the size of your database this may take a while!
Abort with control-c in the next five seconds (skip this countdown with --quick) ... 0
...have ipb_id field in ipblocks table.
...have ipb_expiry field in ipblocks table.
...already have interwiki table
...indexes seem up to 20031107 standards.
...hitcounter table already exists.
...have rc_type field in recentchanges table.
...have user_real_name field in user table.
...querycache table already exists.
...objectcache table already exists.
...categorylinks table already exists.
...have pagelinks; skipping old links table updates
...il_from OK
...have rc_ip field in recentchanges table.
...index PRIMARY already set on image table.
...have rc_id field in recentchanges table.
...have rc_patrolled field in recentchanges table.
...logging table already exists.
...have user_token field in user table.
...have wl_notificationtimestamp field in watchlist table.
...watchlist talk page rows already present.
...user table does not contain user_emailauthenticationtimestamp field.
...page table already exists.
...have log_params field in logging table.
...logging table has correct log_title encoding.
...have ar_rev_id field in archive table.
...have page_len field in page table.
...revision table does not contain inverse_timestamp field.
...have rev_text_id field in revision table.
...have rev_deleted field in revision table.
...have img_width field in image table.
...have img_metadata field in image table.
...have user_email_token field in user table.
...have ar_text_id field in archive table.
...page_namespace is already a full int (int(11)).
...ar_namespace is already a full int (int(11)).
...rc_namespace is already a full int (int(11)).
...wl_namespace is already a full int (int(11)).
...qc_namespace is already a full int (int(11)).
...log_namespace is already a full int (int(11)).
...have img_media_type field in image table.
...already have pagelinks table.
...image table does not contain img_type field.
...already have unique user_name index.
...user_groups table exists and is in current format.
...have ss_total_pages field in site_stats table.
...user_newtalk table already exists.
...transcache table already exists.
...have iw_trans field in interwiki table.
...wl_notificationtimestamp is already nullable.
...index times already set on logging table.
...have ipb_range_start field in ipblocks table.
...no page_random rows needed to be set
...have user_registration field in user table.
...templatelinks table already exists
...externallinks table already exists.
...job table already exists.
...have ss_images field in site_stats table.
...langlinks table already exists.
...querycache_info table already exists.
...filearchive table already exists.
...have ipb_anon_only field in ipblocks table.
...index rc_ns_usertext already set on recentchanges table.
...index rc_user_text already set on recentchanges table.
...have user_newpass_time field in user table.
...redirect table already exists.
...querycachetwo table already exists.
...have ipb_enable_autoblock field in ipblocks table.
...index pl_namespace on table pagelinks includes field pl_from.
...index tl_namespace on table templatelinks includes field tl_from.
...index il_to on table imagelinks includes field il_from.
...have rc_old_len field in recentchanges table.
...have user_editcount field in user table.
...page_restrictions table already exists.
...have log_id field in logging table.
...have rev_parent_id field in revision table.
...have pr_id field in page_restrictions table.
...have rev_len field in revision table.
...have rc_deleted field in recentchanges table.
...have log_deleted field in logging table.
...have ar_deleted field in archive table.
...have ipb_deleted field in ipblocks table.
...have fa_deleted field in filearchive table.
...have ar_len field in archive table.
...have ipb_block_email field in ipblocks table.
...index cl_sortkey on table categorylinks includes field cl_from.
...have oi_metadata field in oldimage table.
...index usertext_timestamp already set on archive table.
...index img_usertext_timestamp already set on image table.
...index oi_usertext_timestamp already set on oldimage table.
...have ar_page_id field in archive table.
...have img_sha1 field in image table.
...protected_titles table already exists.
...have ipb_by_text field in ipblocks table.
...page_props table already exists.
...updatelog table already exists.
...category table already exists.
Populating category table, printing progress markers. For large databases, you
may want to hit Ctrl-C and do this manually with maintenance/
populateCategory.php.
Category population complete.
Done populating category table.
...have ar_parent_id field in archive table.
...have user_last_timestamp field in user_newtalk table.
Populating rev_parent_id fields, printing progress markers. For large
databases, you may want to hit Ctrl-C and do this manually with
maintenance/populateParentId.php.
Populating rev_parent_id column
...doing rev_id from 1 to 200
rev_parent_id population complete ... 0 rows [0 changed]
...protected_titles table has correct pt_title encoding.
...have ss_active_users field in site_stats table.
...ss_active_users user count set...
...have ipb_allow_usertalk field in ipblocks table.
...pl_namespace, tl_namespace, il_to indices are already UNIQUE.
...change_tag table already exists.
...tag_summary table already exists.
...valid_tag table already exists.
...user_properties table already exists.
...log_search table already exists.
...have log_user_text field in logging table.
Populating log_user_text field, printing progress markers. For large
databases, you may want to hit Ctrl-C and do this manually with
maintenance/populateLogUsertext.php.
Nothing to do.
done.
Populating log_search table, printing progress markers. For large
databases, you may want to hit Ctrl-C and do this manually with
maintenance/populateLogSearch.php.
Nothing to do.
done.
...l10n_cache table already exists.
...external_user table already exists.
...index ls_field_val already set on log_search table.
...index change_tag_rc_tag already set on change_tag table.
...have rd_interwiki field in redirect table.
Converting tc_time from UNIX epoch to MediaWiki timestamp... done.
...eu_wiki_id already renamed to eu_local_id.
Altering all *_mime_minor fields to 100 bytes in size ... done.
...iwlinks table already exists.
...index iwl_prefix_title_from already set on iwlinks table.
...have ul_value field in updatelog table.
...have iw_api field in interwiki table.
...iwl_prefix key doesn't exist.
...iwl_prefix_from_title key doesn't exist.
...have cl_collation field in categorylinks table.
Updating categorylinks (again)...done.
...collations up-to-date.
...msg_resource table already exists.
...module_deps table already exists.
...ar_page_revid key doesn't exist.
...index ar_revid already set on archive table.
...ll_lang is up-to-date.
...user_last_timestamp is already nullable.
...index user_email already set on user table.
Modifying up_property field of table user_properties...done.
...uploadstash table already exists.
...user_former_groups table already exists.
...index type_action already set on logging table.
...batch conversion of user_options: nothing to migrate. done.
...user table does not contain user_options field.
...have rev_sha1 field in revision table.
...have ar_sha1 field in archive table.
...index page_redirect_namespace_len already set on page table.
Modifying ug_group field of table user_groups...done.
...have us_chunk_inx field in uploadstash table.
...have job_timestamp field in job table.
Modifying ufg_group field of table user_former_groups...done.
...config table already exists.
...index page_user_timestamp already set on revision table.
...have rev_content_format field in revision table.
...have rev_content_model field in revision table.
...have ar_content_format field in archive table.
...have ar_content_model field in archive table.
...have page_content_model field in page table.
Creating wb_items_per_site table...A database query syntax error has occurred.
The last attempted database query was:
"CREATE INDEX tpl_label ON wb_texts_per_lang (tpl_label); -- TODO: might not be needed
CREATE TABLE IF NOT EXISTS wb_aliases (
alias_item_id INT unsigned NOT NULL, -- Id of the item
alias_language VARBINARY(32) NOT NULL, -- Language code
alias_text VARCHAR(255) NOT NULL -- The alias text
) ENGINE=InnoDB, DEFAULT CHARSET=binary
"
from within function "DatabaseBase::sourceFile( /home/john/Workspace/WikidataRepo/sql/Wikibase.sql )".
Database 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 'CREATE TABLE IF NOT EXISTS wb_aliases (
alias_item_id INT unsign' at line 2 (localhost)"
Backtrace:
#0 /home/john/Workspace/core/includes/db/Database.php(920): DatabaseBase->reportQueryError('You have an err...', 1064, 'CREATE INDEX tp...', 'DatabaseBase::s...', false)
#1 /home/john/Workspace/core/includes/db/Database.php(3222): DatabaseBase->query('CREATE INDEX tp...', 'DatabaseBase::s...')
#2 /home/john/Workspace/core/includes/db/Database.php(3134): DatabaseBase->sourceStream(Resource id #309, false, false, 'DatabaseBase::s...')
#3 /home/john/Workspace/core/includes/installer/DatabaseUpdater.php(454): DatabaseBase->sourceFile('/home/john/Work...')
#4 /home/john/Workspace/core/includes/installer/DatabaseUpdater.php(471): DatabaseUpdater->applyPatch('/home/john/Work...', true)
#5 [internal function]: DatabaseUpdater->addTable('wb_items_per_si...', '/home/john/Work...', true)
#6 /home/john/Workspace/core/includes/installer/DatabaseUpdater.php(317): call_user_func_array(Array, Array)
#7 /home/john/Workspace/core/includes/installer/DatabaseUpdater.php(283): DatabaseUpdater->runUpdates(Array, true)
#8 /home/john/Workspace/core/maintenance/update.php(121): DatabaseUpdater->doUpdates(Array)
#9 /home/john/Workspace/core/maintenance/doMaintenance.php(105): UpdateMediaWiki->execute()
#10 /home/john/Workspace/core/maintenance/update.php(151): require_once('/home/john/Work...')
#11 {main}