I received the following errors on update:
The following queries were executed
imagecache module
Update #6000
* Failed: ALTER TABLE {imagecache_preset} DROP PRIMARY KEY
* Failed: DELETE FROM {sequences} WHERE name = '{imagecache_preset}_presetid'
* Failed: ALTER TABLE {imagecache_preset} CHANGE presetid `presetid` INT unsigned NOT NULL auto_increment, ADD PRIMARY KEY (presetid)
* Failed: ALTER TABLE {imagecache_action} DROP PRIMARY KEY
* Failed: DELETE FROM {sequences} WHERE name = '{imagecache_action}_actionid'
* Failed: ALTER TABLE {imagecache_action} CHANGE actionid `actionid` INT unsigned NOT NULL auto_increment, ADD PRIMARY KEY (actionid)
* Failed: ALTER TABLE {imagecache_action} ADD INDEX presetid (presetid)
* user warning: Incorrect table definition; there can be only one auto column and it must be defined as a key query: ALTER TABLE imagecache_preset DROP PRIMARY KEY in /home/site/public_html/includes/database.mysql-common.inc on line 386.
* user warning: Table 'site_main.sequences' doesn't exist query: DELETE FROM sequences WHERE name = 'imagecache_preset_presetid' in /home/site/public_html/sites/all/modules/imagecache/imagecache.install on line 293.
* user warning: Multiple primary key defined query: ALTER TABLE imagecache_preset CHANGE presetid `presetid` INT unsigned NOT NULL auto_increment, ADD PRIMARY KEY (presetid) in /home/site/public_html/includes/database.mysql-common.inc on line 520.
* user warning: Incorrect table definition; there can be only one auto column and it must be defined as a key query: ALTER TABLE imagecache_action DROP PRIMARY KEY in /home/site/public_html/includes/database.mysql-common.inc on line 386.
* user warning: Table 'site_main.sequences' doesn't exist query: DELETE FROM sequences WHERE name = 'imagecache_action_actionid' in /home/site/public_html/sites/all/modules/imagecache/imagecache.install on line 293.
* user warning: Multiple primary key defined query: ALTER TABLE imagecache_action CHANGE actionid `actionid` INT unsigned NOT NULL auto_increment, ADD PRIMARY KEY (actionid) in /home/site/public_html/includes/database.mysql-common.inc on line 520.
* user warning: Duplicate key name 'presetid' query: ALTER TABLE imagecache_action ADD INDEX presetid (presetid) in /home/site/public_html/includes/database.mysql-common.inc on line 434.
Comment | File | Size | Author |
---|---|---|---|
#23 | imagecache_354914.patch | 1.55 KB | drewish |
#20 | imagecache_354914.patch | 1.72 KB | drewish |
#19 | imagecache_354914.patch | 31 bytes | drewish |
#8 | imagecache.jpg | 91.92 KB | zet |
Comments
Comment #1
matt_c CreditAttribution: matt_c commentedI just updated and had the same errors.
Comment #2
mozzie CreditAttribution: mozzie commentedI'm using PostgreSQL, and have similar issues after downloading imageapi (imageapi-6.x-1.2.tar.gz) then imagecache and finally running update.php.
Seems to stem from "sequences" relation.
System info - D6.8, PG 8.31, PHP 5.2.5, Apache 2.2.8, Mandriva 2008.1
Logs as follows
* warning: pg_query() [function.pg-query]: Query failed: ERROR: relation "sequences" does not exist in /var/www/html/includes/database.pgsql.inc on line 139.
* user warning: query: DELETE FROM sequences WHERE name = 'imagecache_preset_presetid' in /var/www/html/sites/default/modules/imagecache/imagecache.install on line 293.
* warning: pg_query() [function.pg-query]: Query failed: ERROR: relation "sequences" does not exist in /var/www/html/includes/database.pgsql.inc on line 139.
* user warning: query: DELETE FROM sequences WHERE name = 'imagecache_action_actionid' in /var/www/html/sites/default/modules/imagecache/imagecache.install on line 293.
* warning: pg_query() [function.pg-query]: Query failed: ERROR: relation "imagecache_action_presetid_idx" already exists in /var/www/html/includes/database.pgsql.inc on line 139.
* user warning: query: CREATE INDEX imagecache_action_presetid_idx ON imagecache_action (presetid) in /var/www/html/includes/database.pgsql.inc on line 828.
The following queries were executed
imagecache module
Update #6000
* ALTER TABLE {imagecache_preset} DROP CONSTRAINT {imagecache_preset}_pkey
* Failed: DELETE FROM {sequences} WHERE name = '{imagecache_preset}_presetid'
* ALTER TABLE {imagecache_preset} RENAME presetid TO presetid_old
* ALTER TABLE {imagecache_preset} ADD COLUMN presetid serial CHECK (presetid >= 0)
* UPDATE {imagecache_preset} SET presetid = presetid_old
* ALTER TABLE {imagecache_preset} ALTER presetid SET NOT NULL
* ALTER TABLE {imagecache_preset} DROP COLUMN presetid_old
* ALTER TABLE {imagecache_preset} ADD PRIMARY KEY (presetid)
* ALTER TABLE {imagecache_action} DROP CONSTRAINT {imagecache_action}_pkey
* Failed: DELETE FROM {sequences} WHERE name = '{imagecache_action}_actionid'
* ALTER TABLE {imagecache_action} RENAME actionid TO actionid_old
* ALTER TABLE {imagecache_action} ADD COLUMN actionid serial CHECK (actionid >= 0)
* UPDATE {imagecache_action} SET actionid = actionid_old
* ALTER TABLE {imagecache_action} ALTER actionid SET NOT NULL
* ALTER TABLE {imagecache_action} DROP COLUMN actionid_old
* ALTER TABLE {imagecache_action} ADD PRIMARY KEY (actionid)
* Failed: CREATE INDEX {imagecache_action}_presetid_idx ON {imagecache_action} (presetid)
Comment #3
mikeytown2 CreditAttribution: mikeytown2 commentedComment #4
BWPanda CreditAttribution: BWPanda commentedI too had these errors...
Comment #5
pixelpreview@gmail.com CreditAttribution: pixelpreview@gmail.com commentedme too
where is the table "sequences" ? no creation of that table in .install
Comment #6
Anonymous (not verified) CreditAttribution: Anonymous commentedsame here
Comment #7
reglogge CreditAttribution: reglogge commentedsame errors here
Drupal 6.8, MySql 5.0.67, PHP 5.2.8
Comment #8
zet CreditAttribution: zet commented* user warning: Incorrect table definition; there can be only one auto column and it must be defined as a key query: ALTER TABLE imagecache_preset DROP PRIMARY KEY in /var/www/html/drupal6/includes/database.mysql-common.inc on line 386.
* user warning: Table 'topfirmeromania.sequences' doesn't exist query: DELETE FROM sequences WHERE name = 'imagecache_preset_presetid' in /var/www/html/drupal6/sites/all/modules/imagecache/imagecache.install on line 293.
* user warning: Multiple primary key defined query: ALTER TABLE imagecache_preset CHANGE presetid `presetid` INT unsigned NOT NULL auto_increment, ADD PRIMARY KEY (presetid) in /var/www/html/drupal6/includes/database.mysql-common.inc on line 520.
* user warning: Incorrect table definition; there can be only one auto column and it must be defined as a key query: ALTER TABLE imagecache_action DROP PRIMARY KEY in /var/www/html/drupal6/includes/database.mysql-common.inc on line 386.
* user warning: Table 'topfirmeromania.sequences' doesn't exist query: DELETE FROM sequences WHERE name = 'imagecache_action_actionid' in /var/www/html/drupal6/sites/all/modules/imagecache/imagecache.install on line 293.
* user warning: Multiple primary key defined query: ALTER TABLE imagecache_action CHANGE actionid `actionid` INT unsigned NOT NULL auto_increment, ADD PRIMARY KEY (actionid) in /var/www/html/drupal6/includes/database.mysql-common.inc on line 520.
* user warning: Duplicate key name 'presetid' query: ALTER TABLE imagecache_action ADD INDEX presetid (presetid) in /var/www/html/drupal6/includes/database.mysql-common.inc on line 434.
* user warning: Can't DROP 'field_logo_alt'; check that column/key exists query: ALTER TABLE content_type_firma DROP COLUMN field_logo_alt in /var/www/html/drupal6/sites/all/modules/imagefield/imagefield.install on line 242.
* user warning: Can't DROP 'field_logo_title'; check that column/key exists query: ALTER TABLE content_type_firma DROP COLUMN field_logo_title in /var/www/html/drupal6/sites/all/modules/imagefield/imagefield.install on line 243.
* user warning: Can't DROP 'field_imagine_alt'; check that column/key exists query: ALTER TABLE content_field_imagine DROP COLUMN field_imagine_alt in /var/www/html/drupal6/sites/all/modules/imagefield/imagefield.install on line 242.
* user warning: Can't DROP 'field_imagine_title'; check that column/key exists query: ALTER TABLE content_field_imagine DROP COLUMN field_imagine_title in /var/www/html/drupal6/sites/all/modules/imagefield/imagefield.install on line 243.
Comment #9
Mark Theunissen CreditAttribution: Mark Theunissen commentedSame issues here.
The problem is this update function imagecache_update_6000() is the Drupal 5 -> 6 update function! Why is it being called?
Comment #10
Mark Theunissen CreditAttribution: Mark Theunissen commentedSee the following issue where this function was added:
#304376: Update function from 5.x -> 6.x
Comment #11
prophetsearcher CreditAttribution: prophetsearcher commentedditto - mysql
tried re-updating to 5, and same issues appeared.
Comment #12
basicmagic.net CreditAttribution: basicmagic.net commentedsubscribe
Comment #13
NikLP CreditAttribution: NikLP commentedSame "Barrel o'crap" errors here too. This looks like some legacy DB code from D5 has snuck in??
Edit: After actually READING the SQL, it mostly appears that the errors will only occur if you're NOT upgrading from D5 -> D6. It looks like they are caused by a (forced) move from using the D5 sequences table (deprecated) to autoincrement fields. So, some stuff is removed, and some replaced - BUT if you're already running D6, these will always cause errors, but only when you run update.php.
At least, that is my interpretation, and because I have a headache and can't be bothered to deal with any other possible consequence of this issue, I'm going to ignore it until someone tells me I'm an idiot, and that my trousers are on fire.
That is all.
Comment #14
Tony Sharpe CreditAttribution: Tony Sharpe commentedSame here - subscribing
Comment #15
ecoluke CreditAttribution: ecoluke commentedGot the same thing, hope it's nothing serious! ;)
Comment #16
q0rban CreditAttribution: q0rban commentedI don't think we should consider this critical if it doesn't actually hurt anything. As far as I can tell, nothing nasty happened.
Comment #17
andreasreiser CreditAttribution: andreasreiser commentedSubscribe.
Comment #18
Flying Drupalist CreditAttribution: Flying Drupalist commentedSo these errors do nothing?
Comment #19
drewish CreditAttribution: drewish commentedAs people have noted if you see errors on this update it shouldn't be a problem. Updated sites ended up getting the D5->D6 upgrade run on them.
This patch just ignores the drops if there's no sequences table and only adds the module column and presetid index if there's no modules column.
Comment #20
drewish CreditAttribution: drewish commentedwrong patch..
Comment #21
q0rban CreditAttribution: q0rban commentedLooks like your patch file got corrupted somehow. It's only one line, and reads '? imagefield_install_1_0.patch'
Comment #22
q0rban CreditAttribution: q0rban commentedwoops
Comment #23
drewish CreditAttribution: drewish commentedactually here's another take on it.
Comment #24
NikLP CreditAttribution: NikLP commentedWe dun gon fixed it - shouldn't be any more problems related to that.