dbDelta fails for capital prefixed tables
|Reported by:||netweblogic||Owned by:||nacin|
|Cc:||netweblogic, kpayne@…, j.conti@…, stephenh1988|
Probably a linux/Windows mysql version issue since not all sites do this, but on some instances if your tables are using capitals, mySQL will fail to recognize a create statement should be an update of a present table.
Reason is because dbDelta checks lower cased names of the table to see if it should create or update a table.
Offending line is /wp-admin/includes/upgrade.php line 1471
$cqueries[trim( strtolower($matches), '`' )] = $qry;
$cqueries[trim($matches, '`' )] = $qry;
and it works. Is there a reason why dbDelta forces a lowercase lookup for present tables on the DB?
Change History (12)
- Cc kpayne@… added
- Keywords dev-feedback added
- Version changed from 3.3.1 to 1.5
- Owner set to nacin
- Resolution set to fixed
- Status changed from new to closed