Enabling the module "Mail Archive" fails to create table. Error is below:
user warning: BLOB/TEXT column 'headers' can't have a default value query: CREATE TABLE mailarchive_messages ( mid int(11) UNSIGNED AUTO_INCREMENT, sid int(11) UNSIGNED NOT NULL DEFAULT '0', status int(2) UNSIGNED NOT NULL DEFAULT '0', created int(11) UNSIGNED NOT NULL DEFAULT '0', received int(11) UNSIGNED NOT NULL DEFAULT '0', year int(4) UNSIGNED NOT NULL DEFAULT '0', month int(2) UNSIGNED NOT NULL DEFAULT '0', day int(2) UNSIGNED NOT NULL DEFAULT '0', headers text NOT NULL DEFAULT '', message_id varchar(255) NOT NULL DEFAULT '', reference varchar(255) NOT NULL DEFAULT '', in_reply_to varchar(255) NOT NULL DEFAULT '', multiple_in_reply_to int(1) NOT NULL DEFAULT '0', thread_id int(11) UNSIGNED NOT NULL DEFAULT '0', sub_thread_id varchar(255) NOT NULL DEFAULT '0', mailfrom varchar(255) NOT NULL DEFAULT '', subject varchar(255) NOT NULL DEFAULT '', body text NOT NULL DEFAULT '', attachments int(3) UNSIGNED DEFAULT '0', attachments_path varchar(255) NOT NULL DEFAULT '', PRIMARY KEY (mid), UNIQUE (sid, message_id), KEY (status), KEY (created), KEY (received), KEY (year), KEY (month), KEY (day), KEY (message_id), KEY (thread_id), KEY (sub_thread_id), KEY (subject) ) /*!40100 DEFAULT CHARACTER SET UTF8 */ in E:\websites\drupalimporter\modules\mailarchive\mailarchive.install on line 72.
I am able to create the table successfully with the following sql statement, where I have removed the default of ' ' for headers and body.
CREATE TABLE mailarchive_messages ( mid int(11) UNSIGNED AUTO_INCREMENT, sid int(11) UNSIGNED NOT NULL DEFAULT '0', status int(2) UNSIGNED NOT NULL DEFAULT '0', created int(11) UNSIGNED NOT NULL DEFAULT '0', received int(11) UNSIGNED NOT NULL DEFAULT '0', year int(4) UNSIGNED NOT NULL DEFAULT '0', month int(2) UNSIGNED NOT NULL DEFAULT '0', day int(2) UNSIGNED NOT NULL DEFAULT '0', headers text NOT NULL, message_id varchar(255) NOT NULL DEFAULT '', reference varchar(255) NOT NULL DEFAULT '', in_reply_to varchar(255) NOT NULL DEFAULT '', multiple_in_reply_to int(1) NOT NULL DEFAULT '0', thread_id int(11) UNSIGNED NOT NULL DEFAULT '0', sub_thread_id varchar(255) NOT NULL DEFAULT '0', mailfrom varchar(255) NOT NULL DEFAULT '', subject varchar(255) NOT NULL DEFAULT '', body text NOT NULL, attachments int(3) UNSIGNED DEFAULT '0', attachments_path varchar(255) NOT NULL DEFAULT '', PRIMARY KEY (mid), UNIQUE (sid, message_id), KEY (status), KEY (created), KEY (received), KEY (year), KEY (month), KEY (day), KEY (message_id), KEY (thread_id), KEY (sub_thread_id), KEY (subject) ) /*!40100 DEFAULT CHARACTER SET UTF8 */
Database: MySQL 5.1.37, using engine MyISAM
Comments
Comment #1
aaronsb commentedThis should probably component:code.
Comment #2
Shiny commentedThis may be fixed in this patch : http://drupal.org/node/851274
Comment #3
Shiny commentedComment #4
marshmn commentedAs of stable release 6.x-1.3 this bug still exists. If you try to install 6.x-1.3 on a fresh Drupal 6.19 errors as in the original post are produced.
Comment #5
marshmn commentedI've created a patch against 6.x-1.x-dev for this issue.
Comment #6
Shiny commentedcommitted, Thanks for the patch