diff options
author | unknown <gshchepa/uchum@gleb.loc> | 2007-11-18 00:02:55 +0400 |
---|---|---|
committer | unknown <gshchepa/uchum@gleb.loc> | 2007-11-18 00:02:55 +0400 |
commit | 99054db64c8a41acbe570756e286a8d78811197c (patch) | |
tree | acce2ade0392c10725743341a35697fc72c70260 /mysql-test/r/select.result | |
parent | 4b48eb6f1e4565ba31982f73908664108ba0fb7b (diff) | |
download | mariadb-git-99054db64c8a41acbe570756e286a8d78811197c.tar.gz |
Fixed bug #32335.
Comparison of a BIGINT NOT NULL column with a constant arithmetic
expression that evaluates to NULL caused error 1048: "Column '...'
cannot be null".
Made convert_constant_item() check if the constant expression is NULL
before attempting to store it in a field. Attempts to store NULL in a
NOT NULL field caused query errors.
sql/item_cmpfunc.cc:
Fixed bug #32335.
1. Made convert_constant_item() check if the constant expression is NULL
before attempting to store it in a field. Attempts to store NULL in
a NOT NULL field caused query errors.
2. Also minor bug has been fixed: the thd->count_cuted_fields value
was not restored in case of successful conversion.
mysql-test/t/select.test:
Added test case for bug #32335.
mysql-test/r/select.result:
Added test case for bug #32335.
Diffstat (limited to 'mysql-test/r/select.result')
-rw-r--r-- | mysql-test/r/select.result | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/mysql-test/r/select.result b/mysql-test/r/select.result index a1ba58a536c..3ca84bcf34b 100644 --- a/mysql-test/r/select.result +++ b/mysql-test/r/select.result @@ -4322,4 +4322,10 @@ c3 DROP TABLE t1; DROP TABLE t2; +CREATE TABLE t1 (c1 BIGINT NOT NULL); +INSERT INTO t1 (c1) VALUES (1); +SELECT * FROM t1 WHERE c1 > NULL + 1; +c1 +DROP TABLE t1; + End of 5.0 tests |