List:Internals« Previous MessageNext Message »
From:Jim Winstead Date:April 6 2005 3:55am
Subject:bk commit into 5.0 tree (jimw:1.1877)
View as plain text  
Below is the list of changes that have just been committed into a local
5.0 repository of jimw. When jimw 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.1877 05/04/05 20:55:06 jimw@stripped +5 -0
  Update tests after merge of bug fix.

  mysql-test/t/show_check.test
    1.48 05/04/05 20:55:04 jimw@stripped +1 -1
    Fix default for bool column.

  mysql-test/t/null.test
    1.18 05/04/05 20:55:04 jimw@stripped +1 -1
    Fix default for smallint column.

  mysql-test/r/strict.result
    1.16 05/04/05 20:55:04 jimw@stripped +41 -41
    Update results

  mysql-test/r/show_check.result
    1.66 05/04/05 20:55:04 jimw@stripped +8 -8
    Update results

  mysql-test/r/null.result
    1.31 05/04/05 20:55:03 jimw@stripped +1 -1
    Update results

# 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:	jimw
# Host:	rama.(none)
# Root:	/home/jimw/my/mysql-5.0-clean

--- 1.30/mysql-test/r/null.result	2005-01-14 11:30:00 -08:00
+++ 1.31/mysql-test/r/null.result	2005-04-05 20:55:03 -07:00
@@ -88,7 +88,7 @@
 NULL	this is null
 NULL	this is null
 drop table t1;
-CREATE TABLE t1 (a varchar(16) NOT NULL default '', b smallint(6) NOT NULL default '', c datetime NOT NULL default '0000-00-00 00:00:00', d smallint(6) NOT NULL default 0);
+CREATE TABLE t1 (a varchar(16) NOT NULL default '', b smallint(6) NOT NULL default 0, c datetime NOT NULL default '0000-00-00 00:00:00', d smallint(6) NOT NULL default 0);
 INSERT INTO t1 SET a = "", d= "2003-01-14 03:54:55";
 Warnings:
 Warning	1265	Data truncated for column 'd' at row 1

--- 1.65/mysql-test/r/show_check.result	2005-03-23 00:32:40 -08:00
+++ 1.66/mysql-test/r/show_check.result	2005-04-05 20:55:04 -07:00
@@ -195,7 +195,7 @@
 i	float(3,0)	NULL	YES		NULL		select,insert,update,references	
 drop table t1;
 create table t1 (
-type_bool bool not null,
+type_bool bool not null default 0,
 type_tiny tinyint not null auto_increment primary key,
 type_short smallint(3),
 type_mediumint mediumint,
@@ -206,9 +206,9 @@
 type_char char(2),
 type_varchar varchar(10),
 type_timestamp timestamp not null,
-type_date date not null,
-type_time time not null,
-type_datetime datetime not null,
+type_date date not null default '0000-00-00',
+type_time time not null default '00:00:00',
+type_datetime datetime not null default '0000-00-00 00:00:00',
 type_year year,
 type_enum enum ('red', 'green', 'blue'),
 type_set enum ('red', 'green', 'blue'),
@@ -221,7 +221,7 @@
 show create table t1;
 Table	Create Table
 t1	CREATE TABLE `t1` (
-  `type_bool` tinyint(1) NOT NULL,
+  `type_bool` tinyint(1) NOT NULL default '0',
   `type_tiny` tinyint(4) NOT NULL auto_increment,
   `type_short` smallint(3) default NULL,
   `type_mediumint` mediumint(9) default NULL,
@@ -232,9 +232,9 @@
   `type_char` char(2) default NULL,
   `type_varchar` varchar(10) default NULL,
   `type_timestamp` timestamp NOT NULL default CURRENT_TIMESTAMP on update CURRENT_TIMESTAMP,
-  `type_date` date NOT NULL,
-  `type_time` time NOT NULL,
-  `type_datetime` datetime NOT NULL,
+  `type_date` date NOT NULL default '0000-00-00',
+  `type_time` time NOT NULL default '00:00:00',
+  `type_datetime` datetime NOT NULL default '0000-00-00 00:00:00',
   `type_year` year(4) default NULL,
   `type_enum` enum('red','green','blue') default NULL,
   `type_set` enum('red','green','blue') default NULL,

--- 1.17/mysql-test/t/null.test	2005-01-13 19:16:42 -08:00
+++ 1.18/mysql-test/t/null.test	2005-04-05 20:55:04 -07:00
@@ -59,7 +59,7 @@
 #
 # Test inserting and updating with NULL
 #
-CREATE TABLE t1 (a varchar(16) NOT NULL default '', b smallint(6) NOT NULL default '', c datetime NOT NULL default '0000-00-00 00:00:00', d smallint(6) NOT NULL default 0);
+CREATE TABLE t1 (a varchar(16) NOT NULL default '', b smallint(6) NOT NULL default 0, c datetime NOT NULL default '0000-00-00 00:00:00', d smallint(6) NOT NULL default 0);
 INSERT INTO t1 SET a = "", d= "2003-01-14 03:54:55";
 UPDATE t1 SET d=1/NULL;
 UPDATE t1 SET d=NULL;

--- 1.47/mysql-test/t/show_check.test	2005-04-05 19:45:08 -07:00
+++ 1.48/mysql-test/t/show_check.test	2005-04-05 20:55:04 -07:00
@@ -106,7 +106,7 @@
 # Do a create table that tries to cover all types and options
 #
 create table t1 (
-type_bool bool not null default false,
+type_bool bool not null default 0,
 type_tiny tinyint not null auto_increment primary key,
 type_short smallint(3),
 type_mediumint mediumint,

--- 1.15/mysql-test/r/strict.result	2005-04-05 19:45:08 -07:00
+++ 1.16/mysql-test/r/strict.result	2005-04-05 20:55:04 -07:00
@@ -1042,47 +1042,6 @@
 3	
 99	
 DROP TABLE t1;
-SET @@sql_mode = 'traditional';
-CREATE TABLE t1 (i int not null);
-INSERT INTO t1 VALUES ();
-ERROR HY000: Field 'i' doesn't have a default value
-INSERT INTO t1 VALUES (DEFAULT);
-ERROR HY000: Field 'i' doesn't have a default value
-INSERT INTO t1 VALUES (DEFAULT(i));
-ERROR HY000: Field 'i' doesn't have a default value
-ALTER TABLE t1 ADD j int;
-INSERT INTO t1 SET j = 1;
-ERROR HY000: Field 'i' doesn't have a default value
-INSERT INTO t1 SET j = 1, i = DEFAULT;
-ERROR HY000: Field 'i' doesn't have a default value
-INSERT INTO t1 SET j = 1, i = DEFAULT(i);
-ERROR HY000: Field 'i' doesn't have a default value
-INSERT INTO t1 VALUES (DEFAULT,1);
-ERROR HY000: Field 'i' doesn't have a default value
-DROP TABLE t1;
-SET @@sql_mode = '';
-CREATE TABLE t1 (i int not null);
-INSERT INTO t1 VALUES ();
-Warnings:
-Warning	1364	Field 'i' doesn't have a default value
-INSERT INTO t1 VALUES (DEFAULT);
-Warnings:
-Warning	1364	Field 'i' doesn't have a default value
-INSERT INTO t1 VALUES (DEFAULT(i));
-ERROR HY000: Field 'i' doesn't have a default value
-ALTER TABLE t1 ADD j int;
-INSERT INTO t1 SET j = 1;
-Warnings:
-Warning	1364	Field 'i' doesn't have a default value
-INSERT INTO t1 SET j = 1, i = DEFAULT;
-Warnings:
-Warning	1364	Field 'i' doesn't have a default value
-INSERT INTO t1 SET j = 1, i = DEFAULT(i);
-ERROR HY000: Field 'i' doesn't have a default value
-INSERT INTO t1 VALUES (DEFAULT,1);
-Warnings:
-Warning	1364	Field 'i' doesn't have a default value
-DROP TABLE t1;
 set sql_mode='traditional';
 create table t1 (charcol char(255), varcharcol varchar(255),
 binarycol binary(255), varbinarycol varbinary(255), tinytextcol tinytext,
@@ -1232,3 +1191,44 @@
 drop procedure t1;
 drop table t1;
 set sql_mode=@org_mode;
+SET @@sql_mode = 'traditional';
+CREATE TABLE t1 (i int not null);
+INSERT INTO t1 VALUES ();
+ERROR HY000: Field 'i' doesn't have a default value
+INSERT INTO t1 VALUES (DEFAULT);
+ERROR HY000: Field 'i' doesn't have a default value
+INSERT INTO t1 VALUES (DEFAULT(i));
+ERROR HY000: Field 'i' doesn't have a default value
+ALTER TABLE t1 ADD j int;
+INSERT INTO t1 SET j = 1;
+ERROR HY000: Field 'i' doesn't have a default value
+INSERT INTO t1 SET j = 1, i = DEFAULT;
+ERROR HY000: Field 'i' doesn't have a default value
+INSERT INTO t1 SET j = 1, i = DEFAULT(i);
+ERROR HY000: Field 'i' doesn't have a default value
+INSERT INTO t1 VALUES (DEFAULT,1);
+ERROR HY000: Field 'i' doesn't have a default value
+DROP TABLE t1;
+SET @@sql_mode = '';
+CREATE TABLE t1 (i int not null);
+INSERT INTO t1 VALUES ();
+Warnings:
+Warning	1364	Field 'i' doesn't have a default value
+INSERT INTO t1 VALUES (DEFAULT);
+Warnings:
+Warning	1364	Field 'i' doesn't have a default value
+INSERT INTO t1 VALUES (DEFAULT(i));
+ERROR HY000: Field 'i' doesn't have a default value
+ALTER TABLE t1 ADD j int;
+INSERT INTO t1 SET j = 1;
+Warnings:
+Warning	1364	Field 'i' doesn't have a default value
+INSERT INTO t1 SET j = 1, i = DEFAULT;
+Warnings:
+Warning	1364	Field 'i' doesn't have a default value
+INSERT INTO t1 SET j = 1, i = DEFAULT(i);
+ERROR HY000: Field 'i' doesn't have a default value
+INSERT INTO t1 VALUES (DEFAULT,1);
+Warnings:
+Warning	1364	Field 'i' doesn't have a default value
+DROP TABLE t1;
Thread
bk commit into 5.0 tree (jimw:1.1877)Jim Winstead6 Apr