Commit 0a62b558 authored by pcrews@pcrews-mac-local.local's avatar pcrews@pcrews-mac-local.local

Merge bk-internal.mysql.com:/home/bk/mysql-5.1-build

into  pcrews-mac-local.local:/Users/pcrews/usr/local/bin/data0/34468/mysql-5.1-build-34468
parents cc72fa88 dd71e64a
...@@ -38,9 +38,6 @@ DROP TABLE t1; ...@@ -38,9 +38,6 @@ DROP TABLE t1;
DROP TABLE IF EXISTS t1; DROP TABLE IF EXISTS t1;
CREATE TABLE t1 (a int NOT NULL, b char(10) NOT NULL) ENGINE = CSV; CREATE TABLE t1 (a int NOT NULL, b char(10) NOT NULL) ENGINE = CSV;
INSERT INTO t1 VALUES(); 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; SELECT * FROM t1;
a b a b
0 0
...@@ -49,9 +46,8 @@ SELECT * FROM t1; ...@@ -49,9 +46,8 @@ SELECT * FROM t1;
a b a b
0 new_value 0 new_value
UPDATE t1 set b = NULL where b = 'new_value'; UPDATE t1 set b = NULL where b = 'new_value';
Warnings: ERROR 23000: Column 'b' cannot be null
Warning 1048 Column 'b' cannot be null
SELECT * FROM t1; SELECT * FROM t1;
a b a b
0 0 new_value
DROP TABLE t1; DROP TABLE t1;
...@@ -77,12 +77,6 @@ DROP TABLE t1; ...@@ -77,12 +77,6 @@ DROP TABLE t1;
############################################################################## ##############################################################################
# Testcase csv_not_null.3: UPDATE tests -- examining behavior of UPDATE # Testcase csv_not_null.3: UPDATE tests -- examining behavior of UPDATE
# statements for CSV # 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 ===== -- echo # ===== csv_not_null.3 =====
-- disable_warnings -- disable_warnings
...@@ -91,13 +85,15 @@ DROP TABLE IF EXISTS t1; ...@@ -91,13 +85,15 @@ DROP TABLE IF EXISTS t1;
CREATE TABLE t1 (a int NOT NULL, b char(10) NOT NULL) ENGINE = CSV; CREATE TABLE t1 (a int NOT NULL, b char(10) NOT NULL) ENGINE = CSV;
--disable_warnings
INSERT INTO t1 VALUES(); INSERT INTO t1 VALUES();
--enable_warnings
SELECT * FROM t1; SELECT * FROM t1;
--disable_warnings
UPDATE t1 set b = 'new_value' where a = 0; UPDATE t1 set b = 'new_value' where a = 0;
--enable_warnings
SELECT * FROM t1; SELECT * FROM t1;
# Might need to change this depending on Bug#33699 -UPDATE allows NULL --error ER_BAD_NULL_ERROR
# as new value on NOT NULL columns (= default datatype value)
# Currently sets to datatype default -- might throw error
UPDATE t1 set b = NULL where b = 'new_value'; UPDATE t1 set b = NULL where b = 'new_value';
SELECT * FROM t1; SELECT * FROM t1;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment