The current version of updates.inc does not work properly when mysqli is used. There are several places where MySQL only actions are taken but the db_type comparison does not include "mysqli".
While most, if not all, of these oversights are in functions used for upgrading from 4.5, which didn't support mysqli, it is completely legitimate for a user to upgrade Drupal and their MySQL installation at the same time, as follows... Do a mysqldump of their Drupal 4.5 install on MySQL server versioned less than 4.1. Load those SQL statements into a new server with MySQL server version >= 4.1. Put the Drupal 4.7 files on the new system, then run the update system.
Right now, the update system will fail under this scenario. Attached is a simple patch that fixes this situation by changing:
if ($GLOBALS['db_type'] == 'mysql') {
to:
if ($GLOBALS['db_type'] == 'mysql' || $GLOBALS['db_type'] == 'mysqli') {
| Comment | File | Size | Author |
|---|---|---|---|
| updates.220-221.inc | 7.88 KB | danielc |
Comments
Comment #1
gerhard killesreiter commentedNope, thanks. We prefer that people upgrade in small steps, ie 4.5 to 4.6 to 4.7.
Comment #2
danielc commentedThen rip the 4.5 code out of the 4.7 upgrade system.
Comment #3
danielc commented> We prefer that people upgrade in small steps, ie 4.5 to 4.6 to 4.7.
Why make things hard on the users? The code is there to support 4.5 -> 4.7 and it works.