Page MenuHomePhabricator

Sqlite updater does not add indexes properly: "table user_tmp has 15 columns but 14 values were supplied"
Open, NormalPublic

Description

This came up on irc. u42p was attempting to convert his db from mysql -> sqlite, but the conversion script didn't convert the indexes is right. Running update.php got a lot of errors like:

A database query syntax error has occurred.
The last attempted database query was:
"INSERT OR IGNORE INTO user_tmp SELECT * FROM user
"
from within function "DatabaseBase::sourceFile( /srv/http/w/maintenance/sqlite/archives/initial-indexes.sql )".
Database returned error "1: table user_tmp has 15 columns but 14 values were supplied"


Expected behaviour: If you run the updater on an up-to date sqlite schema but with indexes missing, the updater should add the indexes

Actual behaviour. Due to initial-indexes.sql copying over tables, but still expecting columns like user_options which have been dropped, sql errors occur.


Version: 1.21.x
Severity: major

Details

Reference
bz46492

Event Timeline

bzimport raised the priority of this task from to Normal.Nov 22 2014, 1:14 AM
bzimport added a project: MediaWiki-Rdbms.
bzimport set Reference to bz46492.
bzimport added a subscriber: Unknown Object (MLST).
Bawolff created this task.Mar 23 2013, 7:40 PM
Dereckson moved this task from Backlog to Schema needed on the SQLite board.May 20 2017, 10:18 AM