MySQL: BLOB/TEXT column 'xxx' can't have a default value
| Project: | Video |
| Version: | 6.x-2.1-beta1 |
| Component: | Code |
| Category: | bug report |
| Priority: | normal |
| Assigned: | heshanmw |
| Status: | active |
Jump to:
This is a problem, which happens with MySql (e.g. 5.0.37, 5.0.41) at least in Windows.
The fix:
video.install:
<- vidfile text NOT NULL default '',
-> vidfile text NOT NULL,
video_ffmpeg_helper.install:
<- origfile text NOT NULL default '',
-> origfile text NOT NULL,
user warning: BLOB/TEXT column 'vidfile' can't have a default value query: CREATE TABLE video ( vid int(10) unsigned NOT NULL default '0', nid int(10) unsigned NOT NULL default '0', vidfile text NOT NULL default '', videox smallint(4) unsigned NOT NULL default '0', videoy smallint(4) unsigned NOT NULL default '0', size bigint(13) unsigned default NULL, download_counter int(10) unsigned NOT NULL default '0', play_counter int(10) unsigned NOT NULL default '0', video_bitrate int(10) unsigned default NULL, audio_bitrate int(10) unsigned default NULL, audio_sampling_rate int(10) unsigned default NULL, audio_channels enum('','5.1','stereo','mono') default NULL, playtime_seconds int(10) unsigned default NULL, download_folder varchar(255) NULL default NULL, disable_multidownload tinyint(1) unsigned NOT NULL default '0', use_play_folder tinyint(1) unsigned NOT NULL default '0', custom_field_1 varchar(255) NULL default NULL, custom_field_2 varchar(255) NULL default NULL, custom_field_3 varchar(255) NULL default NULL, custom_field_4 varchar(255) NULL default NULL, custom_field_5 text NULL default NULL, custom_field_6 text NULL default NULL, serialized_data text NULL default NULL, PRIMARY KEY (vid) ) TYPE=MyISAM COMMENT='size is in bytes' /*!40100 DEFAULT CHARACTER SET utf8 */; in C:\xxx\includes\database.mysqli.inc on line 151.
user warning: BLOB/TEXT column 'origfile' can't have a default value query: CREATE TABLE video_rendering ( vid int(10) unsigned NOT NULL default '0', nid int(10) unsigned NOT NULL default '0', origfile text NOT NULL default '', pid int(10) unsigned NOT NULL default '0', status int(1) unsigned NOT NULL default '0', started int NOT NULL default '0', completed int NOT NULL default '0', PRIMARY KEY (vid) ) TYPE=MyISAM /*!40100 DEFAULT CHARACTER SET utf8 */; in C:\xxx\includes\database.mysqli.inc on line 151.

#1
Ok.. I investigated this problem: found that the behavior of default values between win and Linux MySQL are differents, regarding default values.
http://bugs.mysql.com/bug.php?id=25520
I'm going to remove the default declaration.
#2
fixed on the rewrite. Going to publish it soon.
Thanks!
Fabio
#3
#4
I have this problem after i activate the Video module in my drupal application. May i know how to fix it?
Thanks.
#5
well.. this bug should have gone in the latest version.. are you running the latest version of video module?
#6
i have the same problem, when i activate video module, i get error message about default values, and it is no table video in the db.
version - 6.x-2.1beta1
drupal - 6.12
what can i do with this problem?
#7
Working onthis
#8
0. disable the video module through the drupal admin panel
1. open the mysql cli (~
windows run>command.exe>mysql --user=... --pass databasename)2. mysql>
delete from system where name = 'video';3. open the video module video.install file, find the line with
'vidfile' => array (and then remove the'default' => '',line a few lines down and change the'not null' => FALSE,line to'not null' => TRUE4. enable the video module
this worked for me