Commit c94789c3 authored by Alexander Barkov's avatar Alexander Barkov

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.
parent b0928711
......@@ -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 #
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