Below is the list of changes that have just been committed into a local
5.0 repository of cmiller. When cmiller does a push these changes will
be propagated to the main repository and, within 24 hours after the
push, to the public repository.
For information on how to access the public repository
see http://dev.mysql.com/doc/mysql/en/installing-source-tree.html
ChangeSet
1.2099 06/04/26 23:43:17 cmiller@zippy.(none) +2 -0
Merge zippy.(none):/home/cmiller/work/mysql/mysql-4.1__bug19145
into zippy.(none):/home/cmiller/work/mysql/mysql-5.0__bug19145
mysql-test/t/null.test
1.20 06/04/26 23:40:37 cmiller@zippy.(none) +0 -0
Auto merged
mysql-test/r/null.result
1.34 06/04/26 23:40:37 cmiller@zippy.(none) +0 -0
Auto merged
# This is a BitKeeper patch. What follows are the unified diffs for the
# set of deltas contained in the patch. The rest of the patch, the part
# that BitKeeper cares about, is below these diffs.
# User: cmiller
# Host: zippy.(none)
# Root: /home/cmiller/work/mysql/mysql-5.0__bug19145/RESYNC
--- 1.33/mysql-test/r/null.result 2005-08-27 01:23:33 -04:00
+++ 1.34/mysql-test/r/null.result 2006-04-26 23:40:37 -04:00
@@ -278,3 +278,45 @@
c01 c02 c03 c04 c05 c08 c09
str str 0 1 2 1 1
set names latin1;
+create table bug19145a (e enum('a','b','c') default 'b' , s set('x', 'y', 'z') default 'y' ) engine=MyISAM;
+create table bug19145b (e enum('a','b','c') default null, s set('x', 'y', 'z') default null) engine=MyISAM;
+create table bug19145c (e enum('a','b','c') not null default 'b' , s set('x', 'y', 'z') not null default 'y' ) engine=MyISAM;
+create table bug19145setnotnulldefaultnull (e enum('a','b','c') default null, s set('x', 'y', 'z') not null default null) engine=MyISAM;
+ERROR 42000: Invalid default value for 's'
+create table bug19145enumnotnulldefaultnull (e enum('a','b','c') not null default null, s set('x', 'y', 'z') default null) engine=MyISAM;
+ERROR 42000: Invalid default value for 'e'
+alter table bug19145a alter column e set default null;
+alter table bug19145a alter column s set default null;
+alter table bug19145a add column (i int);
+alter table bug19145b alter column e set default null;
+alter table bug19145b alter column s set default null;
+alter table bug19145b add column (i int);
+alter table bug19145c alter column e set default null;
+ERROR 42000: Invalid default value for 'e'
+alter table bug19145c alter column s set default null;
+ERROR 42000: Invalid default value for 's'
+alter table bug19145c add column (i int);
+show create table bug19145a;
+Table Create Table
+bug19145a CREATE TABLE `bug19145a` (
+ `e` enum('a','b','c') default NULL,
+ `s` set('x','y','z') default NULL,
+ `i` int(11) default NULL
+) ENGINE=MyISAM DEFAULT CHARSET=latin1
+show create table bug19145b;
+Table Create Table
+bug19145b CREATE TABLE `bug19145b` (
+ `e` enum('a','b','c') default NULL,
+ `s` set('x','y','z') default NULL,
+ `i` int(11) default NULL
+) ENGINE=MyISAM DEFAULT CHARSET=latin1
+show create table bug19145c;
+Table Create Table
+bug19145c CREATE TABLE `bug19145c` (
+ `e` enum('a','b','c') NOT NULL default 'b',
+ `s` set('x','y','z') NOT NULL default 'y',
+ `i` int(11) default NULL
+) ENGINE=MyISAM DEFAULT CHARSET=latin1
+drop table bug19145a;
+drop table bug19145b;
+drop table bug19145c;
--- 1.19/mysql-test/t/null.test 2005-07-28 09:12:35 -04:00
+++ 1.20/mysql-test/t/null.test 2006-04-26 23:40:37 -04:00
@@ -190,4 +190,51 @@
# Restore charset to the default value.
set names latin1;
+#
+# Bug#19145: mysqld crashes if you set the default value of an enum field to NULL
+#
+--exec sleep 20
+#create table bug19145 (e enum('a','b','c'), s set('x', 'y', 'z')) engine=MyISAM;
+#show create table bug19145;
+#drop table bug19145;
+
+
+create table bug19145a (e enum('a','b','c') default 'b' , s set('x', 'y', 'z') default 'y' ) engine=MyISAM;
+create table bug19145b (e enum('a','b','c') default null, s set('x', 'y', 'z') default null) engine=MyISAM;
+
+create table bug19145c (e enum('a','b','c') not null default 'b' , s set('x', 'y', 'z') not null default 'y' ) engine=MyISAM;
+
+# Invalid default value for 's'
+--error 1067
+create table bug19145setnotnulldefaultnull (e enum('a','b','c') default null, s set('x', 'y', 'z') not null default null) engine=MyISAM;
+
+# Invalid default value for 'e'
+--error 1067
+create table bug19145enumnotnulldefaultnull (e enum('a','b','c') not null default null, s set('x', 'y', 'z') default null) engine=MyISAM;
+
+alter table bug19145a alter column e set default null;
+alter table bug19145a alter column s set default null;
+alter table bug19145a add column (i int);
+
+alter table bug19145b alter column e set default null;
+alter table bug19145b alter column s set default null;
+alter table bug19145b add column (i int);
+
+# Invalid default value for 'e'
+--error 1067
+alter table bug19145c alter column e set default null;
+
+# Invalid default value for 's'
+--error 1067
+alter table bug19145c alter column s set default null;
+alter table bug19145c add column (i int);
+
+show create table bug19145a;
+show create table bug19145b;
+show create table bug19145c;
+
+drop table bug19145a;
+drop table bug19145b;
+drop table bug19145c;
+
# End of 4.1 tests
| Thread |
|---|
| • bk commit into 5.0 tree (cmiller:1.2099) | Chad MILLER | 27 Apr |