mirror of
https://github.com/MariaDB/server.git
synced 2025-07-29 05:21:33 +03:00
Fixed BUG#51763 Can't delete rows from MEMORY table with HASH key
This commit is contained in:
@ -738,3 +738,23 @@ SELECT c2 FROM t1;
|
||||
c2
|
||||
0
|
||||
DROP TABLE t1;
|
||||
CREATE TABLE t1 (
|
||||
id int(11) NOT NULL AUTO_INCREMENT,
|
||||
color enum('GREEN', 'WHITE') DEFAULT NULL,
|
||||
ts int,
|
||||
PRIMARY KEY (id),
|
||||
KEY color (color) USING HASH
|
||||
) ENGINE=MEMORY DEFAULT CHARSET=utf8;
|
||||
INSERT INTO t1 VALUES("1","GREEN",1);
|
||||
INSERT INTO t1 VALUES("2","GREEN",1);
|
||||
INSERT INTO t1 VALUES("3","GREEN",1);
|
||||
INSERT INTO t1 VALUES("4","GREEN",1);
|
||||
INSERT INTO t1 VALUES("5","GREEN",1);
|
||||
INSERT INTO t1 VALUES("6","GREEN",1);
|
||||
DELETE FROM t1 WHERE id = 1;
|
||||
INSERT INTO t1 VALUES("7","GREEN", 2);
|
||||
DELETE FROM t1 WHERE ts = 1 AND color = 'GREEN';
|
||||
SELECT * from t1;
|
||||
id color ts
|
||||
7 GREEN 2
|
||||
DROP TABLE t1;
|
||||
|
@ -485,3 +485,30 @@ INSERT INTO t1 VALUES('', 0);
|
||||
ALTER TABLE t1 MODIFY c1 VARCHAR(101);
|
||||
SELECT c2 FROM t1;
|
||||
DROP TABLE t1;
|
||||
|
||||
#
|
||||
# BUG#51763 Can't delete rows from MEMORY table with HASH key
|
||||
#
|
||||
|
||||
CREATE TABLE t1 (
|
||||
id int(11) NOT NULL AUTO_INCREMENT,
|
||||
color enum('GREEN', 'WHITE') DEFAULT NULL,
|
||||
ts int,
|
||||
PRIMARY KEY (id),
|
||||
KEY color (color) USING HASH
|
||||
) ENGINE=MEMORY DEFAULT CHARSET=utf8;
|
||||
|
||||
INSERT INTO t1 VALUES("1","GREEN",1);
|
||||
INSERT INTO t1 VALUES("2","GREEN",1);
|
||||
INSERT INTO t1 VALUES("3","GREEN",1);
|
||||
INSERT INTO t1 VALUES("4","GREEN",1);
|
||||
INSERT INTO t1 VALUES("5","GREEN",1);
|
||||
INSERT INTO t1 VALUES("6","GREEN",1);
|
||||
DELETE FROM t1 WHERE id = 1;
|
||||
INSERT INTO t1 VALUES("7","GREEN", 2);
|
||||
DELETE FROM t1 WHERE ts = 1 AND color = 'GREEN';
|
||||
SELECT * from t1;
|
||||
DROP TABLE t1;
|
||||
|
||||
# End of 5.1 tests
|
||||
|
||||
|
Reference in New Issue
Block a user