List:Internals« Previous MessageNext Message »
From:Sergey Petrunia Date:November 9 2005 6:34am
Subject:bk commit into 4.1 tree (sergefp:1.2468) BUG#14480
View as plain text  
Below is the list of changes that have just been committed into a local
4.1 repository of psergey. When psergey 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.2468 05/11/09 09:34:46 sergefp@stripped +3 -0
  BUG#14480: post-fix: use the default field value from CREATE list too. 

  sql/sql_table.cc
    1.305 05/11/09 09:34:41 sergefp@stripped +1 -0
    BUG#14480: post-fix: use the default field value from CREATE list too. 

  mysql-test/t/create.test
    1.62 05/11/09 09:34:41 sergefp@stripped +7 -0
    BUG#14480: post-fix: use the default field value from CREATE list too. 

  mysql-test/r/create.result
    1.88 05/11/09 09:34:41 sergefp@stripped +11 -0
    BUG#14480: post-fix: use the default field value from CREATE list too. 

# 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:	sergefp
# Host:	newbox.mylan
# Root:	/home/psergey/mysql-4.1-nov08-push

--- 1.304/sql/sql_table.cc	2005-11-07 09:22:59 +03:00
+++ 1.305/sql/sql_table.cc	2005-11-09 09:34:41 +03:00
@@ -639,6 +639,7 @@
 	else
 	{
 	  /* Field redefined */
+	  sql_field->def=		dup_field->def;
 	  sql_field->sql_type=		dup_field->sql_type;
 	  sql_field->charset=		(dup_field->charset ?
 					 dup_field->charset :

--- 1.87/mysql-test/r/create.result	2005-11-07 09:22:59 +03:00
+++ 1.88/mysql-test/r/create.result	2005-11-09 09:34:41 +03:00
@@ -697,4 +697,15 @@
 a2 int, a3 int, a4 int, a5 int, a6 int, a7 int, a8 int, a9 int,
 primary key (a1)
 ) select a1,a2,a3,a4,a5,a6,a7,a8,a9 from t1 ;
+drop table t2;
+create table t2 ( a int default 3, b int default 3)
+select a1,a2 from t1;
+show create table t2;
+Table	Create Table
+t2	CREATE TABLE `t2` (
+  `a` int(11) default '3',
+  `b` int(11) default '3',
+  `a1` int(11) default NULL,
+  `a2` int(11) default NULL
+) ENGINE=MyISAM DEFAULT CHARSET=latin1
 drop table t1, t2;

--- 1.61/mysql-test/t/create.test	2005-11-07 09:22:59 +03:00
+++ 1.62/mysql-test/t/create.test	2005-11-09 09:34:41 +03:00
@@ -594,6 +594,13 @@
   primary key (a1)
 ) select a1,a2,a3,a4,a5,a6,a7,a8,a9 from t1 ;
 
+# Test the default value
+drop table t2;
+
+create table t2 ( a int default 3, b int default 3)
+  select a1,a2 from t1;
+show create table t2;
+
 drop table t1, t2;
 
 # End of 4.1 tests
Thread
bk commit into 4.1 tree (sergefp:1.2468) BUG#14480Sergey Petrunia9 Nov