Last modified: 2013-09-17 05:58:40 UTC

Wikimedia Bugzilla is closed!

Wikimedia migrated from Bugzilla to Phabricator. Bug reports are handled in Wikimedia Phabricator.
This static website is read-only and for historical purposes. It is not possible to log in and except for displaying bug reports and their history, links might be broken. See T56076, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 54076 - Database error when installing Flow
Database error when installing Flow
Status: RESOLVED FIXED
Product: MediaWiki extensions
Classification: Unclassified
Flow (Other open bugs)
master
All All
: Unprioritized critical (vote)
: ---
Assigned To: spage
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2013-09-12 14:27 UTC by Quim Gil
Modified: 2013-09-17 05:58 UTC (History)
2 users (show)

See Also:
Web browser: ---
Mobile Platform: ---
Assignee Huggle Beta Tester: ---


Attachments

Description Quim Gil 2013-09-12 14:27:21 UTC
I tried to install Flow in a wiki running 1.21.1 and there where critical problems when running the upgrade script. Perhaps others want to check in 1.21.2 or 1.22.*?

Running the script the first time ("espiral_b" is the name of the database, the actual server paths are being cut here just in case):

Creating flow_revision table ...
An error occurred:
A database query syntax error has occurred.
The last attempted database query was:
"CREATE UNIQUE INDEX flow_definition_unique_name ON flow_definition 
(definition_wiki, definition_name)
"
from within function "DatabaseBase::sourceFile( 
.../extensions/Flow/flow.sql )".
Database returned error "1146: Table 'espiral_b.flow_definition' doesn't 
exist (localhost)"
Backtrace:
#0 
.../includes/db/Database.php(983): 
DatabaseBase->reportQueryError('Table 'espiral_...', 1146, 'CREATE 
UNIQUE I...', 'DatabaseBase::s...', false)
#1 
.../includes/db/Database.php(3409): DatabaseBase->query('CREATE 
UNIQUE I...', 'DatabaseBase::s...')
#2 
.../includes/db/Database.php(3322): DatabaseBase->sourceStream(Resource 
id #345, false, false, 'DatabaseBase::s...', false)
#3 
.../includes/installer/DatabaseUpdater.php(639): 
DatabaseBase->sourceFile('/srv/data/web/v...')
#4 
.../includes/installer/DatabaseUpdater.php(661): 
DatabaseUpdater->applyPatch('/srv/data/web/v...', true, 'Creating 
flow_r...')
#5 [internal function]: DatabaseUpdater->addTable('flow_revision', 
'/srv/data/web/v...', true)
#6 
.../includes/installer/DatabaseUpdater.php(435): 
call_user_func_array(Array, Array)
#7 
.../includes/installer/DatabaseUpdater.php(391): 
DatabaseUpdater->runUpdates(Array, true)
#8 
.../includes/installer/DatabaseInstaller.php(274): 
DatabaseUpdater->doUpdates()
#9 
.../includes/installer/WebInstallerPage.php(552): 
DatabaseInstaller->doUpgrade()
#10 
.../includes/installer/WebInstaller.php(270): 
WebInstaller_Upgrade->execute()
#11 .../mw-config/index.php(65): 
WebInstaller->execute(Array)
#12 .../mw-config/index.php(33): 
wfInstallerMain()
#13 {main}
Purging caches...done.

Then, running the upgrade script a second time without changing anything:


Creating flow_revision table ...
An error occurred:
A database query syntax error has occurred.
The last attempted database query was:
"CREATE TABLE `espiral_bflow_definition` (
  definition_id binary(16) NOT NULL,
  definition_wiki varchar(32) binary NOT NULL,
  definition_name varchar(32) binary NOT NULL,
  definition_type varchar(32) binary NOT NULL,
  definition_options BLOB NULL, -- should instead be revisioned blob
  PRIMARY KEY (definition_id)
  ) ENGINE=InnoDB, DEFAULT CHARSET=binary
"
from within function "DatabaseBase::sourceFile( 
.../extensions/Flow/flow.sql )".
Database returned error "1050: Table 'espiral_bflow_definition' already 
exists (localhost)"
Backtrace:
#0 
.../includes/db/Database.php(983): 
DatabaseBase->reportQueryError('Table 'espiral_...', 1050, 'CREATE TABLE 
`e...', 'DatabaseBase::s...', false)
#1 
.../includes/db/Database.php(3409): DatabaseBase->query('CREATE 
TABLE `e...', 'DatabaseBase::s...')
#2 
.../includes/db/Database.php(3322): DatabaseBase->sourceStream(Resource 
id #345, false, false, 'DatabaseBase::s...', false)
#3 
.../includes/installer/DatabaseUpdater.php(639): 
DatabaseBase->sourceFile('/srv/data/web/v...')
#4 
.../includes/installer/DatabaseUpdater.php(661): 
DatabaseUpdater->applyPatch('/srv/data/web/v...', true, 'Creating 
flow_r...')
#5 [internal function]: DatabaseUpdater->addTable('flow_revision', 
'/srv/data/web/v...', true)
#6 
.../includes/installer/DatabaseUpdater.php(435): 
call_user_func_array(Array, Array)
#7 
.../includes/installer/DatabaseUpdater.php(391): 
DatabaseUpdater->runUpdates(Array, true)
#8 
.../includes/installer/DatabaseInstaller.php(274): 
DatabaseUpdater->doUpdates()
#9 
.../b/includes/installer/WebInstallerPage.php(552): 
DatabaseInstaller->doUpgrade()
#10 
.../includes/installer/WebInstaller.php(270): 
WebInstaller_Upgrade->execute()
#11 .../mw-config/index.php(65): 
WebInstaller->execute(Array)
#12 .../mw-config/index.php(33): 
wfInstallerMain()
#13 {main}
Purging caches...done.


After this the extension appears as installed in Special:Version but it's not functional.
Comment 1 Gerrit Notification Bot 2013-09-16 07:42:18 UTC
Change 84297 had a related patch set uploaded by Spage:
Add a missing /*_*/ prefix on a CREATE INDEX

https://gerrit.wikimedia.org/r/84297
Comment 2 spage 2013-09-16 07:54:36 UTC
Quim, We don't claim Flow works on 1.21, please update Extension_talk:Flow with your experiences.

It sounds like your database is using $wgDBprefix. My gerrit patch guesses at a fix, can you could try it?

You may have problems because upgrade thinks it ran the maintenance script.  If so, as well as dropping all flow tables, in mysql
  use espiral_b;
  delete from updatelog where ul_key = 'FlowInsertDefaultDefinitions' LIMIT 1;
then rerun upgrade.
Comment 3 Gerrit Notification Bot 2013-09-16 16:39:24 UTC
Change 84297 merged by EBernhardson (WMF):
Add a missing /*_*/ prefix on a CREATE INDEX

https://gerrit.wikimedia.org/r/84297
Comment 4 Quim Gil 2013-09-17 05:58:40 UTC
Tested with the last snapshot and now the installation goes fine. Or at least no error is reported during the upgrade, and the extension appears at Special:Version.

(Now I'm stuck at https://www.mediawiki.org/wiki/Extension_talk:Flow#Internal_errors_32348 but that seems to be an unrelated problem)

Note You need to log in before you can comment on or make changes to this bug.


Navigation
Links