mirror of
https://github.com/MariaDB/server.git
synced 2025-01-29 02:05:57 +01:00
Adding a test for:
MDEV-8167 XOR returns bad results for an indexed column The bug itself was earlier fixed by one of the earlier changes.
This commit is contained in:
parent
b0928711e0
commit
c94789c3d3
2 changed files with 71 additions and 0 deletions
|
@ -337,3 +337,45 @@ Note 1003 select (strcmp('a','b') <> 0) AS `NOT NOT strcmp('a','b')`
|
|||
#
|
||||
# End of 10.0 tests
|
||||
#
|
||||
#
|
||||
# Start of 10.1 tests
|
||||
#
|
||||
#
|
||||
# MDEV-8167 XOR returns bad results for an indexed column
|
||||
#
|
||||
CREATE TABLE t1 (
|
||||
id INTEGER UNSIGNED NOT NULL AUTO_INCREMENT,
|
||||
k INTEGER UNSIGNED DEFAULT '0' NOT NULL,
|
||||
c CHAR(120) DEFAULT '' NOT NULL,
|
||||
pad CHAR(60) DEFAULT '' NOT NULL,
|
||||
PRIMARY KEY (id)
|
||||
) ENGINE=MyISAM;
|
||||
INSERT INTO t1 (k, c, pad) VALUES (10, 'a', 'xxx');
|
||||
INSERT INTO t1 (k, c, pad) VALUES (11, 'a', 'xxx');
|
||||
INSERT INTO t1 (k, c, pad) VALUES (12, 'a', 'xxx');
|
||||
INSERT INTO t1 (k, c, pad) VALUES (13, 'a', 'xxx');
|
||||
INSERT INTO t1 (k, c, pad) VALUES (14, 'a', 'xxx');
|
||||
INSERT INTO t1 (k, c, pad) VALUES (15, 'a', 'xxx');
|
||||
INSERT INTO t1 (k, c, pad) VALUES (16, 'a', 'xxx');
|
||||
SELECT * FROM t1 WHERE id XOR 0;
|
||||
id k c pad
|
||||
1 10 a xxx
|
||||
2 11 a xxx
|
||||
3 12 a xxx
|
||||
4 13 a xxx
|
||||
5 14 a xxx
|
||||
6 15 a xxx
|
||||
7 16 a xxx
|
||||
SELECT * FROM t1 IGNORE KEY(PRIMARY) WHERE id XOR 0;
|
||||
id k c pad
|
||||
1 10 a xxx
|
||||
2 11 a xxx
|
||||
3 12 a xxx
|
||||
4 13 a xxx
|
||||
5 14 a xxx
|
||||
6 15 a xxx
|
||||
7 16 a xxx
|
||||
DROP TABLE t1;
|
||||
#
|
||||
# End of 10.1 tests
|
||||
#
|
||||
|
|
|
@ -194,3 +194,32 @@ EXPLAIN EXTENDED SELECT NOT NOT strcmp('a','b');
|
|||
--echo #
|
||||
--echo # End of 10.0 tests
|
||||
--echo #
|
||||
|
||||
--echo #
|
||||
--echo # Start of 10.1 tests
|
||||
--echo #
|
||||
|
||||
--echo #
|
||||
--echo # MDEV-8167 XOR returns bad results for an indexed column
|
||||
--echo #
|
||||
CREATE TABLE t1 (
|
||||
id INTEGER UNSIGNED NOT NULL AUTO_INCREMENT,
|
||||
k INTEGER UNSIGNED DEFAULT '0' NOT NULL,
|
||||
c CHAR(120) DEFAULT '' NOT NULL,
|
||||
pad CHAR(60) DEFAULT '' NOT NULL,
|
||||
PRIMARY KEY (id)
|
||||
) ENGINE=MyISAM;
|
||||
INSERT INTO t1 (k, c, pad) VALUES (10, 'a', 'xxx');
|
||||
INSERT INTO t1 (k, c, pad) VALUES (11, 'a', 'xxx');
|
||||
INSERT INTO t1 (k, c, pad) VALUES (12, 'a', 'xxx');
|
||||
INSERT INTO t1 (k, c, pad) VALUES (13, 'a', 'xxx');
|
||||
INSERT INTO t1 (k, c, pad) VALUES (14, 'a', 'xxx');
|
||||
INSERT INTO t1 (k, c, pad) VALUES (15, 'a', 'xxx');
|
||||
INSERT INTO t1 (k, c, pad) VALUES (16, 'a', 'xxx');
|
||||
SELECT * FROM t1 WHERE id XOR 0;
|
||||
SELECT * FROM t1 IGNORE KEY(PRIMARY) WHERE id XOR 0;
|
||||
DROP TABLE t1;
|
||||
|
||||
--echo #
|
||||
--echo # End of 10.1 tests
|
||||
--echo #
|
||||
|
|
Loading…
Add table
Reference in a new issue