I just cvs up'd to latest Drupal HEAD, with the brand new PDO database layer ready to go. I run a fresh install, I select either the "default" or "expert" install profile to use, and I get the following error:
Fatal error: Uncaught exception 'PDOException' with message 'CREATE TABLE {menu_router} ( `path` VARCHAR(255) NOT NULL DEFAULT '', `load_functions` TEXT NOT NULL DEFAULT '', `to_arg_functions` TEXT NOT NULL DEFAULT '', `access_callback` VARCHAR(255) NOT NULL DEFAULT '', `access_arguments` TEXT DEFAULT NULL, `page_callback` VARCHAR(255) NOT NULL DEFAULT '', `page_arguments` TEXT DEFAULT NULL, `fit` INT NOT NULL DEFAULT 0, `number_parts` SMALLINT NOT NULL DEFAULT 0, `tab_parent` VARCHAR(255) NOT NULL DEFAULT '', `tab_root` VARCHAR(255) NOT NULL DEFAULT '', `title` VARCHAR(255) NOT NULL DEFAULT '', `title_callback` VARCHAR(255) NOT NULL DEFAULT '', `title_arguments` VARCHAR(255) NOT NULL DEFAULT '', `type` INT NOT NULL DEFAULT 0, `block_callback` VARCHAR(255) NOT NULL DEFAULT '', `description` TEXT NOT NULL, `position` VARCHAR(255) NOT NULL DEFAULT '', `weight` INT NOT NULL DEFAULT 0, PRIMARY KEY (path), INDEX fit (fit), INDEX tab_parent (tab_parent) ) /*!40100 DEFAULT CHARACTER SET UTF8 */ - Array ( ) in E:\www\drupal\includes\database\database.inc on line 365
I tried copying this problem query into PhpMyAdmin, and trying to execute it (with curly table brackets removed), to see what the problem is. Result:
MySQL said:
#1101 - BLOB/TEXT column 'load_functions' can't have a default value
Hmm... first I've heard of this being a requirement in MySQL. Anyway, I went and removed every 'default' => '' from the 'text' field schema definitions in system.install. After doing this, I'm able to install core D7 without any other problems.
Patch attached.
| Comment | File | Size | Author |
|---|---|---|---|
| #4 | rm_defaults.patch.php_.txt | 1017 bytes | david strauss |
| no_default_for_text.patch | 1.73 KB | Jaza |
Comments
Comment #1
Crell commentedWhat exact version of PHP and MySQL are you running? I haven't run into this issue.
Comment #2
Crell commentedComment #3
Jaza commentedEnvironment...
PHP: 5.2.5
MySQL: 5.0.51a
OS: Windows Vista
Apache: 2.2.8
Comment #4
david straussThe patch was half-committed. New patch removes committed part.
Comment #5
damien tournoud commentedThis is a duplicate of #299292: Defaults on text fields prevent installation (HEAD installation is broken), which was committed. David, could you move your patch there?