List:Internals« Previous MessageNext Message »
From:ramil Date:July 15 2005 12:51pm
Subject:bk commit into 5.0 tree (ramil:1.1939) BUG#9881
View as plain text  
Below is the list of changes that have just been committed into a local
5.0 repository of ram. When ram 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.1939 05/07/15 15:50:57 ramil@stripped +3 -0
  a fix (bug #9881: ALTER TABLE gives wrong error message with sql-mode TRADITIONAL).

  sql/field.cc
    1.273 05/07/15 15:50:48 ramil@stripped +2 -1
    a fix (bug #9881: ALTER TABLE gives wrong error message with sql-mode TRADITIONAL).
    Don't set def if NO_DEFAULT_VALUE_FLAG is set.

  mysql-test/t/strict.test
    1.14 05/07/15 15:50:48 ramil@stripped +10 -0
    a fix (bug #9881: ALTER TABLE gives wrong error message with sql-mode TRADITIONAL).

  mysql-test/r/strict.result
    1.19 05/07/15 15:50:48 ramil@stripped +10 -0
    a fix (bug #9881: ALTER TABLE gives wrong error message with sql-mode TRADITIONAL).

# 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:	ramil
# Host:	gw.mysql.r18.ru
# Root:	/usr/home/ram/work/mysql-5.0

--- 1.272/sql/field.cc	2005-07-14 18:32:59 +05:00
+++ 1.273/sql/field.cc	2005-07-15 15:50:48 +05:00
@@ -8487,7 +8487,8 @@
   else
     interval=0;
   def=0;
-  if (!old_field->is_real_null() && ! (flags & BLOB_FLAG) &&
+  if (!(flags & NO_DEFAULT_VALUE_FLAG) &&
+      !old_field->is_real_null() && ! (flags & BLOB_FLAG) &&
       old_field->ptr && orig_field)
   {
     char buff[MAX_FIELD_WIDTH],*pos;

--- 1.18/mysql-test/r/strict.result	2005-05-13 13:22:21 +05:00
+++ 1.19/mysql-test/r/strict.result	2005-07-15 15:50:48 +05:00
@@ -1235,3 +1235,13 @@
 ERROR 42000: Column length too big for column 'a' (max = 65535); use BLOB or TEXT instead
 create table t1(a varbinary(65537));
 ERROR 42000: Column length too big for column 'a' (max = 65535); use BLOB or TEXT instead
+set @@sql_mode='traditional';
+create table t1(a int, b date not null);
+alter table t1 modify a bigint unsigned not null;
+show create table t1;
+Table	Create Table
+t1	CREATE TABLE `t1` (
+  `a` bigint(20) unsigned NOT NULL,
+  `b` date NOT NULL
+) ENGINE=MyISAM DEFAULT CHARSET=latin1
+drop table t1;

--- 1.13/mysql-test/t/strict.test	2005-05-13 13:22:21 +05:00
+++ 1.14/mysql-test/t/strict.test	2005-07-15 15:50:48 +05:00
@@ -1093,3 +1093,13 @@
 create table t1(a varchar(65537));
 --error 1074
 create table t1(a varbinary(65537));
+
+#
+# Bug #9881: problem with altering table
+#
+
+set @@sql_mode='traditional';
+create table t1(a int, b date not null);                                       
+alter table t1 modify a bigint unsigned not null;
+show create table t1;
+drop table t1;
Thread
bk commit into 5.0 tree (ramil:1.1939) BUG#9881ramil15 Jul