Results 1 to 4 of 4
  1. #1
    Join Date
    Sep 2006
    Location
    San Antonio, TX, USA
    Posts
    32
    Plugin Contributions
    0

    Default 1101 BLOB/TEXT column can't have a default value

    Installation of ZenCart 1.3.6 on WinXPSP2, IIS 5.1, PHP 5.2.0, MySQL 5.0 resulted in:
    Installation In Progress...

    ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~
    1101 BLOB/TEXT column 'products_options_values' can't have a default value
    in:
    [CREATE TABLE orders_products_attributes ( orders_products_attributes_id int(11) NOT NULL auto_increment, orders_id int(11) NOT NULL default '0', orders_products_id int(11) NOT NULL default '0', products_options varchar(32) NOT NULL default '', products_options_values BLOB NOT NULL default '', options_values_price decimal(15,4) NOT NULL default '0.0000', price_prefix char(1) NOT NULL default '', product_attribute_is_free tinyint(1) NOT NULL default '0', products_attributes_weight float NOT NULL default '0', products_attributes_weight_prefix char(1) NOT NULL default '', attributes_discounted tinyint(1) NOT NULL default '1', attributes_price_base_included tinyint(1) NOT NULL default '1', attributes_price_onetime decimal(15,4) NOT NULL default '0.0000', attributes_price_factor decimal(15,4) NOT NULL default '0.0000', attributes_price_factor_offset decimal(15,4) NOT NULL default '0.0000', attributes_price_factor_onetime decimal(15,4) NOT NULL default '0.0000', attributes_price_factor_onetime_offset decimal(15,4) NOT NULL default '0.0000', attributes_qty_prices text, attributes_qty_prices_onetime text, attributes_price_words decimal(15,4) NOT NULL default '0.0000', attributes_price_words_free int(4) NOT NULL default '0', attributes_price_letters decimal(15,4) NOT NULL default '0.0000', attributes_price_letters_free int(4) NOT NULL default '0', products_options_id int(11) NOT NULL default '0', products_options_values_id int(11) NOT NULL default '0', products_prid tinytext NOT NULL, PRIMARY KEY (orders_products_attributes_id), KEY idx_orders_id_prod_id_zen (orders_id,orders_products_id) ) TYPE=MyISAM;]
    According to MySQL docs:
    Error: 1101 SQLSTATE: 42000 (ER_BLOB_CANT_HAVE_DEFAULT)
    Message: BLOB/TEXT column '%s' can't have a default value
    Other fields which have the same bug:
    Code:
    query_builder : query_description
    query_builder : query_string
    query_builder : query_keys_list
    Removing
    Code:
     default ''
    from the relevant field definitions in ./zc_install/sql/mysql_zencart.sql seems to solve the problem.

  2. #2
    Join Date
    Sep 2006
    Location
    San Antonio, TX, USA
    Posts
    32
    Plugin Contributions
    0

    Default Re: 1101 BLOB/TEXT column can't have a default value

    Quote Originally Posted by tkroh View Post
    Removing default '' from the relevant field definitions in ./zc_install/sql/mysql_zencart.sql seems to solve the problem.
    Forgot to add:
    ...but this causes problems because parts of the system don't set values for those NOT NULL fields (they assume a default value exists).

    I don't know if this has always been like this, or if it's a new restriction with MySQL 5.

  3. #3
    Join Date
    Jan 2004
    Posts
    66,373
    Blog Entries
    7
    Plugin Contributions
    274

    Default Re: 1101 BLOB/TEXT column can't have a default value

    You're right Travis.

    There were a few adjustments required to fix this fully, most of which are discussed here:
    http://www.zen-cart.com/forum/showthread.php?t=50340

    It's also fixed in v1.3.7, announced here:
    http://www.zen-cart.com/forum/showthread.php?t=54424
    .

    Zen Cart - putting the dream of business ownership within reach of anyone!
    Donate to: DrByte directly or to the Zen Cart team as a whole

    Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
    Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

  4. #4
    Join Date
    Sep 2006
    Location
    San Antonio, TX, USA
    Posts
    32
    Plugin Contributions
    0

    Default Re: 1101 BLOB/TEXT column can't have a default value

    Well, don't I feel silly. I did search to see if this had previously been covered, but apparently my searching skills aren't quite up to snuff. :)

 

 

Similar Threads

  1. v150 install error wont pass the database: PHP Fatal error: 1101:BLOB/TEXT
    By tparmley2001 in forum Installing on a Windows Server
    Replies: 9
    Last Post: 6 Aug 2012, 04:22 AM
  2. Replies: 2
    Last Post: 2 Aug 2011, 03:57 PM
  3. Is it possible to have a default value in text attributes?
    By rbobzin in forum Setting Up Categories, Products, Attributes
    Replies: 3
    Last Post: 12 Sep 2008, 09:20 PM
  4. BLOB/TEXT column 'products_options_values' can't have a default value ??
    By quantumfusion in forum Installing on a Windows Server
    Replies: 16
    Last Post: 26 Jan 2008, 01:40 AM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
disjunctive-egg
Zen-Cart, Internet Selling Services, Klamath Falls, OR