Closed (fixed)
Project:
Drush
Component:
Core Commands
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
14 Feb 2011 at 05:44 UTC
Updated:
26 Mar 2011 at 09:07 UTC
Jump to comment: Most recent file
This is a bug that was recently fixed in update.php:
http://drupal.org/node/767408
with an accepted patch: http://drupal.org/files/issues/fix-semaphore-upgrade-errors.patch
However, the bug still persists in drush updatedb.
The same patch needs to be applied to drush/commands/core/drupal/update_6.inc, otherwise a number of errors occur when upgrading from 5.x using drush updatedb the first time on a fresh D6.16+ install.
Attached is a tested patch that fixes the issue for me (sorry - not from CVS, so probably won't apply cleanly).
Patch simply adds following code to the end of function update_fix_d6_requirements()
// Create the semaphore table now -- the menu system after 6.15 depends on
// this table, and menu code runs in updates prior to the table being
// created in its original update function, system_update_6054().
$schema['semaphore'] = array(
'fields' => array(
'name' => array(
'type' => 'varchar',
'length' => 255,
'not null' => TRUE,
'default' => ''),
'value' => array(
'type' => 'varchar',
'length' => 255,
'not null' => TRUE,
'default' => ''),
'expire' => array(
'type' => 'float',
'size' => 'big',
'not null' => TRUE),
),
'indexes' => array('expire' => array('expire')),
'primary key' => array('name'),
);
db_create_table($ret, 'semaphore', $schema['semaphore']);
| Comment | File | Size | Author |
|---|---|---|---|
| #3 | 1060816.patch | 1.41 KB | gdl |
| #2 | drush-fix-semaphore-upgrade-errors-2.patch | 1.18 KB | jfall |
| fix_drush_semaphore_upgrade_errors.patch | 1.14 KB | jfall |
Comments
Comment #1
jfall commentedNot quite...
this fixed the issue and created a clearer upgrade, but updatedb tries to create the semaphore table on every subsequent run, yielding a table already exists error. Will look further... any advice would be welcome here.
Comment #2
jfall commentedOK - clever me.
Added create outside of conditional so it was being run every update.
Fixed. Attached updated patch.
Comment #3
gdl commentedjfall's patch in #2 is working for me.
I took the liberty of generating a version of the patch in what I believe is the proper CVS format, from today's HEAD.
Thanks to jfall for the patch, and thanks for drush!
-G
Comment #4
greg.1.anderson commentedComment #5
guidot commentedPatch applies cleanly to drush 4.2. I successfully upgraded from Drupal 5.23 to 6.20.
Comment #6
moshe weitzman commentedCommitted. Needs backport. Commit 297ca0417b595462391cdea24b8ee9ab16b39553
Comment #7
msonnabaum commentedBackported to 4.x.