diff options
author | Monty <monty@mariadb.org> | 2017-01-05 01:07:03 +0200 |
---|---|---|
committer | Monty <monty@mariadb.org> | 2017-01-11 09:19:45 +0200 |
commit | 135e144479c70d8e470e67fd95e4b17051127952 (patch) | |
tree | 1fbca0bf595cae0ee787192e2948c8690220844d /mysql-test/suite/vcol/r/vcol_keys_innodb.result | |
parent | de22cd3fe5caa1db8839701e45f379b3b5be7328 (diff) | |
download | mariadb-git-135e144479c70d8e470e67fd95e4b17051127952.tar.gz |
MDEV-11598 Assertion `!table || (!table->read_set || bitmap_is_set(table->read_set, field_index))' failed
Found and fixed 2 problems:
- Filesort addon fields didn't mark virtual columns properly
- multi-range-read calculated vcol bitmap but was not using it.
This caused wrong vcol field to be calculated on read, which caused the assert.
Diffstat (limited to 'mysql-test/suite/vcol/r/vcol_keys_innodb.result')
-rw-r--r-- | mysql-test/suite/vcol/r/vcol_keys_innodb.result | 47 |
1 files changed, 47 insertions, 0 deletions
diff --git a/mysql-test/suite/vcol/r/vcol_keys_innodb.result b/mysql-test/suite/vcol/r/vcol_keys_innodb.result index 43c911118c2..19e0db00336 100644 --- a/mysql-test/suite/vcol/r/vcol_keys_innodb.result +++ b/mysql-test/suite/vcol/r/vcol_keys_innodb.result @@ -168,3 +168,50 @@ create table t1 (a int, b double as (rand())); alter table t1 add index (b); ERROR HY000: Function or expression 'rand()' cannot be used in the GENERATED ALWAYS AS clause of `b` drop table t1; +CREATE OR REPLACE TABLE t1 ( +f2 DOUBLE NOT NULL DEFAULT '0', +f3 DOUBLE NOT NULL DEFAULT '0', +f4 DOUBLE, +f5 DOUBLE DEFAULT '0', +v4 DOUBLE AS (IF(f4,f3,f2)) VIRTUAL, +KEY (f5), +KEY (v4) +); +INSERT INTO t1 (f2,f3,f4,f5) VALUES (5,4,1,0),(5,7,NULL,0); +INSERT INTO t1 (f2,f3,f4,f5) SELECT f2, f3, f5, f3 FROM t1; +INSERT INTO t1 (f2,f3,f4,f5) VALUES (5,0,NULL,1); +INSERT INTO t1 (f2,f3,f4,f5) SELECT f2, f5, f5, f3 FROM t1; +DELETE FROM t1 WHERE f5 = 1 OR v4 = 4 ORDER BY f5,v4 LIMIT 9; +SELECT * from t1; +f2 f3 f4 f5 v4 +5 7 NULL 0 5 +5 4 0 4 5 +5 7 0 7 5 +5 0 0 4 5 +5 0 0 7 5 +5 7 7 7 7 +5 1 1 0 1 +DROP TABLE t1; +CREATE TABLE t1 ( +d DECIMAL(63,0) NOT NULL DEFAULT 0, +c VARCHAR(64) NOT NULL DEFAULT '', +vd DECIMAL(63,0) AS (d) VIRTUAL, +vc VARCHAR(2048) AS (c) VIRTUAL, +pk BIGINT AUTO_INCREMENT, +PRIMARY KEY(pk)); +INSERT INTO t1 (d,c) VALUES (0.5,'foo'); +Warnings: +Note 1265 Data truncated for column 'd' at row 1 +SELECT * FROM t1 WHERE vc != 'bar' ORDER BY vd; +d c vd vc pk +1 foo 1 foo 1 +DROP TABLE t1; +CREATE TABLE t1 ( +pk BIGINT, +c CHAR(64) NOT NULL DEFAULT '', +vc CHAR(64) AS (c) VIRTUAL, +PRIMARY KEY(pk), +INDEX(vc(32)) +); +DELETE FROM t1 WHERE vc IS NULL ORDER BY pk; +DROP TABLE t1; |