List:Internals« Previous MessageNext Message »
From:gluh Date:October 26 2005 2:53pm
Subject:bk commit into 5.0 tree (gluh:1.1938) BUG#11491
View as plain text  
Below is the list of changes that have just been committed into a local
5.0 repository of gluh. When gluh 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.1938 05/10/26 17:53:47 gluh@stripped +3 -0
  Fix bug#11491 Misleading error message if not NULL column set to NULL,
                SQL mode TRADITIONAL
    issue more correct message when NULL is stored into not null field 
    in traditional sql mode

  sql/field_conv.cc
    1.53 05/10/26 17:52:30 gluh@stripped +6 -2
    Fix bug#11491 Misleading error message if not NULL column set to NULL,
                  SQL mode TRADITIONAL
      issue more correct message when NULL is stored into not null field
      in traditional sql mode

  mysql-test/t/strict.test
    1.20 05/10/26 17:52:30 gluh@stripped +4 -4
    Fix bug#11491 Misleading error message if not NULL column set to NULL,
                  SQL mode TRADITIONAL
      test change

  mysql-test/r/strict.result
    1.26 05/10/26 17:52:30 gluh@stripped +4 -4
    Fix bug#11491 Misleading error message if not NULL column set to NULL,
                  SQL mode TRADITIONAL
      result change

# 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:	gluh
# Host:	eagle.intranet.mysql.r18.ru
# Root:	/home/gluh/MySQL/Bugs/5.0.11491

--- 1.52/sql/field_conv.cc	Fri Sep 23 12:18:52 2005
+++ 1.53/sql/field_conv.cc	Wed Oct 26 17:52:30 2005
@@ -178,8 +178,12 @@
   }
   if (current_thd->count_cuted_fields == CHECK_FIELD_WARN)
   {
-    field->set_warning(MYSQL_ERROR::WARN_LEVEL_WARN,
-                       ER_WARN_NULL_TO_NOTNULL, 1);
+    if (current_thd->abort_on_warning)
+      field->set_warning(MYSQL_ERROR::WARN_LEVEL_WARN,
+                         ER_BAD_NULL_ERROR, 1);
+    else
+      field->set_warning(MYSQL_ERROR::WARN_LEVEL_WARN,
+                         ER_WARN_NULL_TO_NOTNULL, 1);
     return 0;
   }
   if (!current_thd->no_errors)

--- 1.25/mysql-test/r/strict.result	Wed Sep 14 03:41:37 2005
+++ 1.26/mysql-test/r/strict.result	Wed Oct 26 17:52:30 2005
@@ -989,11 +989,11 @@
 INSERT INTO t1 VALUES (103,'',NULL);
 ERROR 23000: Column 'col3' cannot be null
 UPDATE t1 SET col1=NULL WHERE col1 =100;
-ERROR 22004: Column set to default value; NULL supplied to NOT NULL column 'col1' at row
1
+ERROR 23000: Column 'col1' cannot be null
 UPDATE t1 SET col2 =NULL WHERE col2 ='hello';
-ERROR 22004: Column set to default value; NULL supplied to NOT NULL column 'col2' at row
1
+ERROR 23000: Column 'col2' cannot be null
 UPDATE t1 SET col2 =NULL where col3 IS NOT NULL;
-ERROR 22004: Column set to default value; NULL supplied to NOT NULL column 'col2' at row
1
+ERROR 23000: Column 'col2' cannot be null
 INSERT IGNORE INTO t1 values (NULL,NULL,NULL);
 Warnings:
 Warning	1263	Column set to default value; NULL supplied to NOT NULL column 'col1' at row
1
@@ -1023,7 +1023,7 @@
 INSERT INTO t1 (col1) SELECT 1;
 ERROR HY000: Field 'col2' doesn't have a default value
 INSERT INTO t1 SELECT 1,NULL;
-ERROR 22004: Column set to default value; NULL supplied to NOT NULL column 'col2' at row
1
+ERROR 23000: Column 'col2' cannot be null
 INSERT IGNORE INTO t1 values (NULL,NULL);
 Warnings:
 Warning	1263	Column set to default value; NULL supplied to NOT NULL column 'col1' at row
1

--- 1.19/mysql-test/t/strict.test	Wed Sep 14 03:41:37 2005
+++ 1.20/mysql-test/t/strict.test	Wed Oct 26 17:52:30 2005
@@ -884,11 +884,11 @@
 INSERT INTO t1 (col1,col2,col3) VALUES (102, NULL, '2004-01-01');
 --error 1048
 INSERT INTO t1 VALUES (103,'',NULL);
---error 1263
+--error 1048
 UPDATE t1 SET col1=NULL WHERE col1 =100;
---error 1263
+--error 1048
 UPDATE t1 SET col2 =NULL WHERE col2 ='hello';
---error 1263
+--error 1048
 UPDATE t1 SET col2 =NULL where col3 IS NOT NULL;
 INSERT IGNORE INTO t1 values (NULL,NULL,NULL);
 SELECT * FROM t1;
@@ -908,7 +908,7 @@
 INSERT INTO t1 VALUES(default(col1),default(col2));
 --error 1364
 INSERT INTO t1 (col1) SELECT 1;
---error 1263
+--error 1048
 INSERT INTO t1 SELECT 1,NULL;
 INSERT IGNORE INTO t1 values (NULL,NULL);
 INSERT IGNORE INTO t1 (col1) values (3);
Thread
bk commit into 5.0 tree (gluh:1.1938) BUG#11491gluh26 Oct