dbDelta fails for capital prefixed tables
|Reported by:||netweblogic||Owned by:||nacin|
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)
comment:1 @kurtpayne — 4 years ago
- Cc kpayne@… added
- Keywords dev-feedback added
- Version changed from 3.3.1 to 1.5
comment:10 @nacin — 3 years ago
- Owner set to nacin
- Resolution set to fixed
- Status changed from new to closed