summaryrefslogtreecommitdiff
path: root/mysql-test/r/select.result
diff options
context:
space:
mode:
authorGeorgi Kodinov <kgeorge@mysql.com>2008-12-09 19:46:03 +0200
committerGeorgi Kodinov <kgeorge@mysql.com>2008-12-09 19:46:03 +0200
commitbd8657786a185fee54cfbc35b7ef5142e8508073 (patch)
tree1ca8a7d5afa6e52bb5322471d4f14486076ffde7 /mysql-test/r/select.result
parentc82ff582226749c6049bdbbbdaa2031dc72d343b (diff)
downloadmariadb-git-bd8657786a185fee54cfbc35b7ef5142e8508073.tar.gz
Bug #37936: ASSERT_COLUMN_MARKED_FOR_WRITE in Field_datetime::store ,
Field_varstring::store The code that temporary saved the bitmaps of the read set and the write set so that it can set it to all columns for debug purposes was not expecting that the table->read_set and table->write_set can be the same. And was always saving both in sequence. As a result the original value was never restored. Fixed by saving & restoring the original value only once if the two sets are the same (in a special set of functions). mysql-test/r/select.result: Bug #37936: test case mysql-test/t/select.test: Bug #37936: test case sql/item_cmpfunc.cc: Bug #37936: don't save/restore twice if the read and write sets are the same sql/opt_range.cc: Bug #37936: don't save/restore twice if the read and write sets are the same sql/table.h: Bug #37936: Make a designated set of functions that save/restore both the read and the write sets in a single call.
Diffstat (limited to 'mysql-test/r/select.result')
-rw-r--r--mysql-test/r/select.result26
1 files changed, 26 insertions, 0 deletions
diff --git a/mysql-test/r/select.result b/mysql-test/r/select.result
index 4b2464af688..313bc9b9630 100644
--- a/mysql-test/r/select.result
+++ b/mysql-test/r/select.result
@@ -4358,3 +4358,29 @@ a
4
5
DROP TABLE t1;
+CREATE TABLE A (date_key date);
+CREATE TABLE C (
+pk int,
+int_nokey int,
+int_key int,
+date_key date NOT NULL,
+date_nokey date,
+varchar_key varchar(1)
+);
+INSERT INTO C VALUES
+(1,1,1,'0000-00-00',NULL,NULL),
+(1,1,1,'0000-00-00',NULL,NULL);
+SELECT 1 FROM C WHERE pk > ANY (SELECT 1 FROM C);
+1
+SELECT COUNT(DISTINCT 1) FROM C
+WHERE date_key = (SELECT 1 FROM A WHERE C.date_key IS NULL) GROUP BY pk;
+COUNT(DISTINCT 1)
+SELECT date_nokey FROM C
+WHERE int_key IN (SELECT 1 FROM A)
+HAVING date_nokey = '10:41:7'
+ORDER BY date_key;
+date_nokey
+Warnings:
+Warning 1292 Incorrect date value: '10:41:7' for column 'date_nokey' at row 1
+DROP TABLE A,C;
+End of 5.1 tests