List:Commits« Previous MessageNext Message »
From:Patrick Crews Date:February 13 2008 5:57pm
Subject:bk commit into 5.1 tree (pcrews:1.2523) BUG#34468
View as plain text  
Below is the list of changes that have just been committed into a local
5.1 repository of pcrews.  When pcrews 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@stripped, 2008-02-13 11:39:09-05:00, 
pcrews@stripped +2 -0
  Bug#34468 - csv_not_null fails
  Altered test to expect error on UPDATE SET <not_null_col> = NULL instead
  of expecting warning and re-recorded .result file.

  mysql-test/r/csv_not_null.result@stripped, 2008-02-13 11:39:08-05:00, 
pcrews@stripped +2 -6
    Bug#34468 - csv_not_null fails
    Altered test to expect error on UPDATE SET <not_null_col> = NULL instead
    of expecting warning and re-recorded .result file.  New results file 
passes

  mysql-test/t/csv_not_null.test@stripped, 2008-02-13 11:39:08-05:00, 
pcrews@stripped +5 -9
    Bug#34468 - csv_not_null fails
    Altered test to expect error on UPDATE SET <not_null_col> = NULL instead
    of expecting warning and re-recorded .result file.  Also cleaned up 
comments

diff -Nrup a/mysql-test/r/csv_not_null.result 
b/mysql-test/r/csv_not_null.result
--- a/mysql-test/r/csv_not_null.result    2008-01-21 22:28:42 -05:00
+++ b/mysql-test/r/csv_not_null.result    2008-02-13 11:39:08 -05:00
@@ -38,9 +38,6 @@ DROP TABLE t1;
 DROP TABLE IF EXISTS t1;
 CREATE TABLE t1 (a int NOT NULL, b char(10) NOT NULL) ENGINE = CSV;
 INSERT INTO t1 VALUES();
-Warnings:
-Warning    1364    Field 'a' doesn't have a default value
-Warning    1364    Field 'b' doesn't have a default value
 SELECT * FROM t1;
 a    b
 0   
@@ -49,9 +46,8 @@ SELECT * FROM t1;
 a    b
 0    new_value
 UPDATE t1 set b = NULL where b = 'new_value';
-Warnings:
-Warning    1048    Column 'b' cannot be null
+ERROR 23000: Column 'b' cannot be null
 SELECT * FROM t1;
 a    b
-0   
+0    new_value
 DROP TABLE t1;
diff -Nrup a/mysql-test/t/csv_not_null.test b/mysql-test/t/csv_not_null.test
--- a/mysql-test/t/csv_not_null.test    2008-01-21 22:28:42 -05:00
+++ b/mysql-test/t/csv_not_null.test    2008-02-13 11:39:08 -05:00
@@ -77,12 +77,6 @@ DROP TABLE t1;
 ##############################################################################
 # Testcase csv_not_null.3:  UPDATE tests -- examining behavior of UPDATE
 #                           statements for CSV
-# NOTE:  Should not allow UPDATE <table> set <NOT_NULL_COLUMN> = NULL
-#                         WHERE <condition>;
-#        However, this is currently allowed -- <NOT_NULL_COLUMN> is
-#        set to the default value for the given datatype
-#        Might have to change this test depending on the action taken for
-#        Bug#33699 (addressing this behavior)
 ##############################################################################
 -- echo # ===== csv_not_null.3 =====
 -- disable_warnings
@@ -91,13 +85,15 @@ DROP TABLE IF EXISTS t1;
 
 
 CREATE TABLE t1 (a int NOT NULL, b char(10) NOT NULL) ENGINE = CSV;
+--disable_warnings
 INSERT INTO t1 VALUES();
+--enable_warnings
 SELECT * FROM t1;
+--disable_warnings
 UPDATE t1 set b = 'new_value' where a = 0;
+--enable_warnings
 SELECT * FROM t1;
-# Might need to change this depending on Bug#33699 -UPDATE allows NULL
-#          as new value on NOT NULL columns (= default datatype value)
-# Currently sets to datatype default -- might throw error
+--error ER_BAD_NULL_ERROR
 UPDATE t1 set b = NULL where b = 'new_value';
 SELECT * FROM t1;
 

-- 


Patrick Crews, Database QA Engineer

MySQL Inc, www.mysql.com

Jacksonville, FL, United States

Office / Mobile: +1-904-881-7807

Skype:  pocrews

(Eastern Time Zone / UTC -5 hours)


Are you MySQL certified?  www.mysql.com/certification

Thread
bk commit into 5.1 tree (pcrews:1.2523) BUG#34468Patrick Crews13 Feb 2008