List:Internals« Previous MessageNext Message »
From:ramil Date:July 27 2005 10:09am
Subject:bk commit into 5.0 tree (ramil:1.1907)
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.1907 05/07/27 15:09:06 ramil@stripped +3 -0
  Merge rkalimullin@stripped:/home/bk/mysql-5.0
  into  mysql.com:/usr/home/ram/work/mysql-5.0

  mysql-test/t/strict.test
    1.17 05/07/27 15:09:01 ramil@stripped +11 -11
    merging

  mysql-test/r/strict.result
    1.23 05/07/27 15:09:01 ramil@stripped +6 -7
    merging

  sql/field.cc
    1.279 05/07/27 15:04:11 ramil@stripped +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:	ramil
# Host:	gw.mysql.r18.ru
# Root:	/usr/home/ram/work/mysql-5.0/RESYNC

--- 1.278/sql/field.cc	2005-07-25 14:35:59 +05:00
+++ 1.279/sql/field.cc	2005-07-27 15:04:11 +05:00
@@ -7846,7 +7846,10 @@
   {
     set_rec_bits(0xff, bit_ptr, bit_ofs, bit_len);
     memset(ptr, 0xff, field_length);
-    set_warning(MYSQL_ERROR::WARN_LEVEL_WARN, ER_WARN_DATA_OUT_OF_RANGE, 1);
+    if (table->in_use->really_abort_on_warning())
+      set_warning(MYSQL_ERROR::WARN_LEVEL_ERROR, ER_DATA_TOO_LONG, 1);
+    else
+      set_warning(MYSQL_ERROR::WARN_LEVEL_WARN, ER_WARN_DATA_OUT_OF_RANGE, 1);
     return 1;
   }
   /* delta is >= -1 here */
@@ -8063,7 +8066,10 @@
     memset(ptr, 0xff, field_length);
     if (bits)
       *ptr&= ((1 << bits) - 1); /* set first byte */
-    set_warning(MYSQL_ERROR::WARN_LEVEL_WARN, ER_WARN_DATA_OUT_OF_RANGE, 1);
+    if (table->in_use->really_abort_on_warning())
+      set_warning(MYSQL_ERROR::WARN_LEVEL_ERROR, ER_DATA_TOO_LONG, 1);
+    else
+      set_warning(MYSQL_ERROR::WARN_LEVEL_WARN, ER_WARN_DATA_OUT_OF_RANGE, 1);
     return 1;
   }
   bzero(ptr, delta);

--- 1.22/mysql-test/r/strict.result	2005-07-25 14:35:59 +05:00
+++ 1.23/mysql-test/r/strict.result	2005-07-27 15:09:01 +05:00
@@ -1279,3 +1279,9 @@
   PRIMARY KEY  (`a`)
 ) ENGINE=MyISAM DEFAULT CHARSET=latin1
 drop table t1;
+create table t1(a bit(2));
+insert into t1 values(b'101');
+ERROR 22001: Data too long for column 'a' at row 1
+select * from t1;
+a
+drop table t1;

--- 1.16/mysql-test/t/strict.test	2005-07-25 14:35:59 +05:00
+++ 1.17/mysql-test/t/strict.test	2005-07-27 15:09:01 +05:00
@@ -1132,3 +1132,14 @@
 alter table t1 add primary key(a);
 show create table t1;
 drop table t1;
+
+#
+# BIT fields
+#
+
+set @@sql_mode='traditional';
+create table t1(a bit(2));
+--error 1406
+insert into t1 values(b'101');
+select * from t1;
+drop table t1;
Thread
bk commit into 5.0 tree (ramil:1.1907)ramil27 Jul