I just upgraded my installation from 4.4 to 4.5.1 and got these errors when trying to administer the image module:
pg_query(): query failed: ERROR: invalid input syntax for integer
They were all for the menu table. On investigation, i found this in database/updates.inc:
if ($GLOBALS['db_type'] == 'mysql') {
$ret[] = update_sql("ALTER TABLE {menu} ADD description varchar(255) DEFAULT '' NOT NULL");
}
else {
$ret[] = update_sql("ALTER TABLE {menu} ADD description smallint");
$ret[] = update_sql("ALTER TABLE {menu} ALTER COLUMN description SET DEFAULT '0'");
$ret[] = update_sql("UPDATE {menu} SET description = '0'");
$ret[] = update_sql("ALTER TABLE {menu} ALTER COLUMN description SET NOT NULL");
}
WTH??? How is a smallint on other databases equivalent to varchar on mysql? Attached is a patch to fix the updates.inc file.
| Comment | File | Size | Author |
|---|---|---|---|
| #2 | updates.inc-4.5.diff | 1 KB | Cvbge |
| updates.inc_2.patch | 956 bytes | Anonymous (not verified) |
Comments
Comment #1
gordon commentedshould be marked as patch
Comment #2
Cvbge commentedTrue, updated patch for latest 4-5 (although now it's a bit late for 4.5...)
Comment #3
Cvbge commentedThe patch also applies to 4-6 and HEAD, please apply.
Comment #4
dries commentedCommitted to DRUPAL-4-5 and DRUPAL-4-6. Patch failed against HEAD. Setting this to 'code needs work'.
Comment #5
Cvbge commentedThe bug no longer exists in HEAD because last patch removed old updates.
Comment #6
(not verified) commentedComment #7
(not verified) commentedComment #8
(not verified) commentedComment #9
(not verified) commented