1
0
mirror of https://github.com/MariaDB/server.git synced 2025-08-01 03:47:19 +03:00

5.3->5.5 merge

This commit is contained in:
Sergei Golubchik
2013-02-28 22:47:29 +01:00
52 changed files with 1825 additions and 294 deletions

View File

@ -738,6 +738,26 @@ 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;
CREATE TABLE t1 (a int, index(a)) engine=heap min_rows=10 max_rows=100;
insert into t1 values(1);
select data_length,index_length from information_schema.tables where table_schema="test" and table_name="t1";

View File

@ -486,6 +486,32 @@ 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
#
# Show that MIN_ROWS and MAX_ROWS have an effect on how data_length
# and index_length are allocated.