Page 1 of 1

My SQL Error 1101 - BLOB/TEXT cannot have default value

Posted: Thu Oct 12, 2006 4:00 am
by vivekjain
Hi,
I am developing an application using PHP and MySQL. I had an older version of MySQL - 4.0 and installed Joomla CMS and it installed smoothly. I upgraded the MySQL version to the newer one - 5.1 and when I run the same Joomla installer, it gives me this error, when it tries to set up the database:

My SQL Error 1101 - BLOB/TEXT cannot have default value

Any idea why this may happen?

Thanks

Posted: Thu Oct 12, 2006 7:33 am
by feyd
It's trying to apply a default value to a text/blob field. :?

My SQL Error

Posted: Thu Oct 12, 2006 7:57 am
by vivekjain
Yeah, noticed that, but the same thing worked with the previous version of MySQL.

Posted: Thu Oct 12, 2006 8:00 am
by feyd
It's possible the behaviour could have been changed between versions.

Posted: Thu Oct 12, 2006 9:03 am
by volka
joomla.sql wrote:CREATE TABLE `#__poll_data` (
`id` int(11) NOT NULL auto_increment,
`pollid` int(4) NOT NULL default '0',
`text` text NOT NULL default '',
`hits` int(11) NOT NULL default '0',
PRIMARY KEY (`id`),
KEY `pollid` (`pollid`,`text`(1))
) TYPE=MyISAM;
only until mysql 5 the invalid default '' has been ignored. You cannot define a default value for text and blob fields, not even ''.