Hi,

I like the potentials of the modules, as its something I need on a new site I'm starting to develop, but have run into the following issue when enabling the module on my WInXP/Apache2.2/PHP4.4.4/Mysql5.0 test machine.

The following error displays when enabling the module, on a clean driupal install with just the ecommerce module & this one:

user warning: BLOB/TEXT column 'description' can't have a default value query: CREATE TABLE ec_live_variation ( vid INT(10) UNSIGNED NOT NULL AUTO_INCREMENT, name VARCHAR(255) NOT NULL, description TEXT DEFAULT '', listtype TINYINT(3) UNSIGNED NOT NULL DEFAULT 1, showprice BOOL DEFAULT 1, weight TINYINT(4) UNSIGNED NOT NULL DEFAULT 0, image VARCHAR(255) DEFAULT '', ptype VARCHAR(255) DEFAULT '', PRIMARY KEY (vid), INDEX (weight, name(20)) ) TYPE=MyISAM /*!40100 DEFAULT CHARACTER SET utf8 */; in D:\Data\www\dev\drupal-4.7.x\includes\database.mysql.inc on line 121.

I found if you change the 'ec_live_subproducts.install' file, so any instance of a 'TEXT' and 'LONGTEXT' fields are altered from say:

description         TEXT                         DEFAULT '',

to:

description         TEXT,

...then the code executes correctly.

I'm not sure if its beacuse of my version of MySQL but it seems to be the 'ec_live_variation' and 'ec_live_product' tables that make use of these fields. You may be able to alter the SQL to set the fields as NULL, but these were automatically set to null when the 'DEFAULT' attribute was removed.

Comments

brmassa’s picture

Assigned: Unassigned » brmassa
Status: Active » Closed (fixed)

Phil,

on my system, no bugs. but its fixed anyway. wil be on the next release.
thanks for this "bug huntting".

best regards,

massa

gxk9933’s picture

1、find my.ini in your mysql directory
2、change “sql-mode="STRICT_TRANS_TABLES,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION"”
to “#sql-mode="STRICT_TRANS_TABLES,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION"”
3、restart your mysql server
4、you can see my blog
http://www.sharkuo.com/BLOB-TEXT-column-cannot-have-a-default-value-query