mirror of
https://github.com/MariaDB/server.git
synced 2025-01-15 19:42:28 +01:00
Merge branch '10.5' into '10.6'
This commit is contained in:
commit
3cd9f9d1b3
17 changed files with 221 additions and 115 deletions
23
mysql-test/suite/galera/r/MDEV-26266.result
Normal file
23
mysql-test/suite/galera/r/MDEV-26266.result
Normal file
|
@ -0,0 +1,23 @@
|
||||||
|
connection node_2;
|
||||||
|
connection node_1;
|
||||||
|
SET SESSION query_prealloc_size=8192;
|
||||||
|
SET max_session_mem_used=50000;
|
||||||
|
CREATE TABLE t1 (c1 INT NOT NULL) ENGINE=InnoDB ;
|
||||||
|
UPDATE t1 SET c1='1';
|
||||||
|
ERROR HY000: The MariaDB server is running with the --max-session-mem-used=50000 option so it cannot execute this statement
|
||||||
|
SET wsrep_trx_fragment_size=1;
|
||||||
|
SET SESSION AUTOCOMMIT=0;
|
||||||
|
INSERT INTO t1 VALUES (1);
|
||||||
|
SET @inserted_value=REPEAT ('z', 257);
|
||||||
|
CREATE TABLE t2 (a INT PRIMARY KEY) ENGINE=InnoDB ;
|
||||||
|
SELECT * FROM t1 WHERE c1='two';
|
||||||
|
ERROR HY000: The MariaDB server is running with the --max-session-mem-used=50000 option so it cannot execute this statement
|
||||||
|
UPDATE t1 SET c1='2';
|
||||||
|
INSERT INTO t2 VALUES (2);
|
||||||
|
ERROR HY000: The MariaDB server is running with the --max-session-mem-used=50000 option so it cannot execute this statement
|
||||||
|
INSERT INTO t2 VALUES (3);
|
||||||
|
INSERT INTO t2 VALUES (4);
|
||||||
|
INSERT INTO t2 VALUES (5);
|
||||||
|
CREATE VIEW v1 AS SELECT c1 FROM t1 WHERE c1 IN (SELECT a FROM t2) GROUP BY c1;
|
||||||
|
ERROR 40001: Deadlock found when trying to get lock; try restarting transaction
|
||||||
|
DROP TABLE t1,t2;
|
35
mysql-test/suite/galera/t/MDEV-26266.test
Normal file
35
mysql-test/suite/galera/t/MDEV-26266.test
Normal file
|
@ -0,0 +1,35 @@
|
||||||
|
#
|
||||||
|
# MDEV-26266 - Assertion
|
||||||
|
# state() == s_preparing ||
|
||||||
|
# (is_xa() && state() == s_replaying) ||
|
||||||
|
# (ret && (state() == s_must_abort ||
|
||||||
|
# state() == s_must_replay ||
|
||||||
|
# state() == s_cert_failed ||
|
||||||
|
# state() == s_aborted))
|
||||||
|
# failed.
|
||||||
|
#
|
||||||
|
|
||||||
|
--source include/galera_cluster.inc
|
||||||
|
|
||||||
|
SET SESSION query_prealloc_size=8192;
|
||||||
|
SET max_session_mem_used=50000;
|
||||||
|
CREATE TABLE t1 (c1 INT NOT NULL) ENGINE=InnoDB ;
|
||||||
|
--error ER_OPTION_PREVENTS_STATEMENT
|
||||||
|
UPDATE t1 SET c1='1';
|
||||||
|
SET wsrep_trx_fragment_size=1;
|
||||||
|
SET SESSION AUTOCOMMIT=0;
|
||||||
|
INSERT INTO t1 VALUES (1);
|
||||||
|
SET @inserted_value=REPEAT ('z', 257);
|
||||||
|
CREATE TABLE t2 (a INT PRIMARY KEY) ENGINE=InnoDB ;
|
||||||
|
--error ER_OPTION_PREVENTS_STATEMENT
|
||||||
|
SELECT * FROM t1 WHERE c1='two';
|
||||||
|
UPDATE t1 SET c1='2';
|
||||||
|
--error ER_OPTION_PREVENTS_STATEMENT
|
||||||
|
INSERT INTO t2 VALUES (2);
|
||||||
|
INSERT INTO t2 VALUES (3);
|
||||||
|
INSERT INTO t2 VALUES (4);
|
||||||
|
INSERT INTO t2 VALUES (5);
|
||||||
|
--error ER_LOCK_DEADLOCK
|
||||||
|
CREATE VIEW v1 AS SELECT c1 FROM t1 WHERE c1 IN (SELECT a FROM t2) GROUP BY c1;
|
||||||
|
|
||||||
|
DROP TABLE t1,t2;
|
|
@ -55,7 +55,7 @@ SHOW CREATE TABLE TableA;
|
||||||
Table Create Table
|
Table Create Table
|
||||||
TableA CREATE TABLE `TableA` (
|
TableA CREATE TABLE `TableA` (
|
||||||
`a` int(11) DEFAULT NULL
|
`a` int(11) DEFAULT NULL
|
||||||
) ENGINE=InnoDB DEFAULT CHARSET=latin1
|
) ENGINE=InnoDB DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci
|
||||||
PARTITION BY KEY (`a`)
|
PARTITION BY KEY (`a`)
|
||||||
(PARTITION `parta` ENGINE = InnoDB,
|
(PARTITION `parta` ENGINE = InnoDB,
|
||||||
PARTITION `partB` ENGINE = InnoDB,
|
PARTITION `partB` ENGINE = InnoDB,
|
||||||
|
@ -83,7 +83,7 @@ SHOW CREATE TABLE TableA;
|
||||||
Table Create Table
|
Table Create Table
|
||||||
TableA CREATE TABLE `TableA` (
|
TableA CREATE TABLE `TableA` (
|
||||||
`a` int(11) DEFAULT NULL
|
`a` int(11) DEFAULT NULL
|
||||||
) ENGINE=InnoDB DEFAULT CHARSET=latin1
|
) ENGINE=InnoDB DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci
|
||||||
PARTITION BY KEY (`a`)
|
PARTITION BY KEY (`a`)
|
||||||
(PARTITION `parta` ENGINE = InnoDB,
|
(PARTITION `parta` ENGINE = InnoDB,
|
||||||
PARTITION `partB` ENGINE = InnoDB,
|
PARTITION `partB` ENGINE = InnoDB,
|
||||||
|
@ -111,7 +111,7 @@ SHOW CREATE TABLE TableA;
|
||||||
Table Create Table
|
Table Create Table
|
||||||
TableA CREATE TABLE `TableA` (
|
TableA CREATE TABLE `TableA` (
|
||||||
`a` int(11) DEFAULT NULL
|
`a` int(11) DEFAULT NULL
|
||||||
) ENGINE=InnoDB DEFAULT CHARSET=latin1
|
) ENGINE=InnoDB DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci
|
||||||
PARTITION BY KEY (`a`)
|
PARTITION BY KEY (`a`)
|
||||||
(PARTITION `parta` ENGINE = InnoDB,
|
(PARTITION `parta` ENGINE = InnoDB,
|
||||||
PARTITION `partB` ENGINE = InnoDB,
|
PARTITION `partB` ENGINE = InnoDB,
|
||||||
|
@ -126,7 +126,7 @@ SHOW CREATE TABLE TableB;
|
||||||
Table Create Table
|
Table Create Table
|
||||||
TableB CREATE TABLE `TableB` (
|
TableB CREATE TABLE `TableB` (
|
||||||
`a` int(11) DEFAULT NULL
|
`a` int(11) DEFAULT NULL
|
||||||
) ENGINE=InnoDB DEFAULT CHARSET=latin1
|
) ENGINE=InnoDB DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci
|
||||||
SELECT PARTITION_NAME, IF(TABLE_ROWS, 'YES', 'NO') AS HAVE_TABLE_ROWS FROM INFORMATION_SCHEMA.PARTITIONS WHERE TABLE_SCHEMA ='MySQL_Test_DB' AND TABLE_NAME = 'TableA';
|
SELECT PARTITION_NAME, IF(TABLE_ROWS, 'YES', 'NO') AS HAVE_TABLE_ROWS FROM INFORMATION_SCHEMA.PARTITIONS WHERE TABLE_SCHEMA ='MySQL_Test_DB' AND TABLE_NAME = 'TableA';
|
||||||
PARTITION_NAME HAVE_TABLE_ROWS
|
PARTITION_NAME HAVE_TABLE_ROWS
|
||||||
parta NO
|
parta NO
|
||||||
|
@ -155,7 +155,7 @@ SHOW CREATE TABLE TableA;
|
||||||
Table Create Table
|
Table Create Table
|
||||||
TableA CREATE TABLE `TableA` (
|
TableA CREATE TABLE `TableA` (
|
||||||
`a` int(11) DEFAULT NULL
|
`a` int(11) DEFAULT NULL
|
||||||
) ENGINE=InnoDB DEFAULT CHARSET=latin1
|
) ENGINE=InnoDB DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci
|
||||||
PARTITION BY KEY (`a`)
|
PARTITION BY KEY (`a`)
|
||||||
(PARTITION `parta` ENGINE = InnoDB,
|
(PARTITION `parta` ENGINE = InnoDB,
|
||||||
PARTITION `partB` ENGINE = InnoDB,
|
PARTITION `partB` ENGINE = InnoDB,
|
||||||
|
@ -191,7 +191,7 @@ SHOW CREATE TABLE TableA;
|
||||||
Table Create Table
|
Table Create Table
|
||||||
TableA CREATE TABLE `TableA` (
|
TableA CREATE TABLE `TableA` (
|
||||||
`a` int(11) DEFAULT NULL
|
`a` int(11) DEFAULT NULL
|
||||||
) ENGINE=InnoDB DEFAULT CHARSET=latin1
|
) ENGINE=InnoDB DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci
|
||||||
PARTITION BY KEY (`a`)
|
PARTITION BY KEY (`a`)
|
||||||
(PARTITION `partB` COMMENT = 'Previusly named parta' ENGINE = InnoDB,
|
(PARTITION `partB` COMMENT = 'Previusly named parta' ENGINE = InnoDB,
|
||||||
PARTITION `parta` COMMENT = 'Previusly named partB' ENGINE = InnoDB,
|
PARTITION `parta` COMMENT = 'Previusly named partB' ENGINE = InnoDB,
|
||||||
|
@ -263,7 +263,7 @@ SHOW CREATE TABLE tablea;
|
||||||
Table Create Table
|
Table Create Table
|
||||||
tablea CREATE TABLE `tablea` (
|
tablea CREATE TABLE `tablea` (
|
||||||
`a` int(11) DEFAULT NULL
|
`a` int(11) DEFAULT NULL
|
||||||
) ENGINE=InnoDB DEFAULT CHARSET=latin1
|
) ENGINE=InnoDB DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci
|
||||||
PARTITION BY KEY (`a`)
|
PARTITION BY KEY (`a`)
|
||||||
(PARTITION `partB` COMMENT = 'Previusly named parta' ENGINE = InnoDB,
|
(PARTITION `partB` COMMENT = 'Previusly named parta' ENGINE = InnoDB,
|
||||||
PARTITION `parta` COMMENT = 'Previusly named partB' ENGINE = InnoDB,
|
PARTITION `parta` COMMENT = 'Previusly named partB' ENGINE = InnoDB,
|
||||||
|
@ -288,7 +288,7 @@ SHOW CREATE TABLE TableA;
|
||||||
Table Create Table
|
Table Create Table
|
||||||
TableA CREATE TABLE `TableA` (
|
TableA CREATE TABLE `TableA` (
|
||||||
`a` int(11) DEFAULT NULL
|
`a` int(11) DEFAULT NULL
|
||||||
) ENGINE=InnoDB DEFAULT CHARSET=latin1
|
) ENGINE=InnoDB DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci
|
||||||
# Cleaning up after KEY PARTITIONING test
|
# Cleaning up after KEY PARTITIONING test
|
||||||
DROP TABLE TableA;
|
DROP TABLE TableA;
|
||||||
# 2.0 HASH partitioning mgm
|
# 2.0 HASH partitioning mgm
|
||||||
|
@ -354,7 +354,7 @@ SHOW CREATE TABLE TableA;
|
||||||
Table Create Table
|
Table Create Table
|
||||||
TableA CREATE TABLE `TableA` (
|
TableA CREATE TABLE `TableA` (
|
||||||
`a` int(11) DEFAULT NULL
|
`a` int(11) DEFAULT NULL
|
||||||
) ENGINE=InnoDB DEFAULT CHARSET=latin1
|
) ENGINE=InnoDB DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci
|
||||||
PARTITION BY HASH (`a`)
|
PARTITION BY HASH (`a`)
|
||||||
(PARTITION `parta` ENGINE = InnoDB,
|
(PARTITION `parta` ENGINE = InnoDB,
|
||||||
PARTITION `partB` ENGINE = InnoDB,
|
PARTITION `partB` ENGINE = InnoDB,
|
||||||
|
@ -382,7 +382,7 @@ SHOW CREATE TABLE TableA;
|
||||||
Table Create Table
|
Table Create Table
|
||||||
TableA CREATE TABLE `TableA` (
|
TableA CREATE TABLE `TableA` (
|
||||||
`a` int(11) DEFAULT NULL
|
`a` int(11) DEFAULT NULL
|
||||||
) ENGINE=InnoDB DEFAULT CHARSET=latin1
|
) ENGINE=InnoDB DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci
|
||||||
PARTITION BY HASH (`a`)
|
PARTITION BY HASH (`a`)
|
||||||
(PARTITION `parta` ENGINE = InnoDB,
|
(PARTITION `parta` ENGINE = InnoDB,
|
||||||
PARTITION `partB` ENGINE = InnoDB,
|
PARTITION `partB` ENGINE = InnoDB,
|
||||||
|
@ -418,7 +418,7 @@ SHOW CREATE TABLE TableA;
|
||||||
Table Create Table
|
Table Create Table
|
||||||
TableA CREATE TABLE `TableA` (
|
TableA CREATE TABLE `TableA` (
|
||||||
`a` int(11) DEFAULT NULL
|
`a` int(11) DEFAULT NULL
|
||||||
) ENGINE=InnoDB DEFAULT CHARSET=latin1
|
) ENGINE=InnoDB DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci
|
||||||
PARTITION BY HASH (`a`)
|
PARTITION BY HASH (`a`)
|
||||||
(PARTITION `partB` COMMENT = 'Previusly named parta' ENGINE = InnoDB,
|
(PARTITION `partB` COMMENT = 'Previusly named parta' ENGINE = InnoDB,
|
||||||
PARTITION `parta` COMMENT = 'Previusly named partB' ENGINE = InnoDB,
|
PARTITION `parta` COMMENT = 'Previusly named partB' ENGINE = InnoDB,
|
||||||
|
@ -490,7 +490,7 @@ SHOW CREATE TABLE tablea;
|
||||||
Table Create Table
|
Table Create Table
|
||||||
tablea CREATE TABLE `tablea` (
|
tablea CREATE TABLE `tablea` (
|
||||||
`a` int(11) DEFAULT NULL
|
`a` int(11) DEFAULT NULL
|
||||||
) ENGINE=InnoDB DEFAULT CHARSET=latin1
|
) ENGINE=InnoDB DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci
|
||||||
PARTITION BY HASH (`a`)
|
PARTITION BY HASH (`a`)
|
||||||
(PARTITION `partB` COMMENT = 'Previusly named parta' ENGINE = InnoDB,
|
(PARTITION `partB` COMMENT = 'Previusly named parta' ENGINE = InnoDB,
|
||||||
PARTITION `parta` COMMENT = 'Previusly named partB' ENGINE = InnoDB,
|
PARTITION `parta` COMMENT = 'Previusly named partB' ENGINE = InnoDB,
|
||||||
|
@ -515,7 +515,7 @@ SHOW CREATE TABLE TableA;
|
||||||
Table Create Table
|
Table Create Table
|
||||||
TableA CREATE TABLE `TableA` (
|
TableA CREATE TABLE `TableA` (
|
||||||
`a` int(11) DEFAULT NULL
|
`a` int(11) DEFAULT NULL
|
||||||
) ENGINE=InnoDB DEFAULT CHARSET=latin1
|
) ENGINE=InnoDB DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci
|
||||||
# Cleaning up after HASH PARTITIONING test
|
# Cleaning up after HASH PARTITIONING test
|
||||||
DROP TABLE TableA;
|
DROP TABLE TableA;
|
||||||
# 3.0 RANGE partitioning mgm
|
# 3.0 RANGE partitioning mgm
|
||||||
|
@ -570,7 +570,7 @@ SHOW CREATE TABLE TableA;
|
||||||
Table Create Table
|
Table Create Table
|
||||||
TableA CREATE TABLE `TableA` (
|
TableA CREATE TABLE `TableA` (
|
||||||
`a` int(11) DEFAULT NULL
|
`a` int(11) DEFAULT NULL
|
||||||
) ENGINE=InnoDB DEFAULT CHARSET=latin1
|
) ENGINE=InnoDB DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci
|
||||||
PARTITION BY RANGE (`a`)
|
PARTITION BY RANGE (`a`)
|
||||||
(PARTITION `parta` VALUES LESS THAN (4) ENGINE = InnoDB,
|
(PARTITION `parta` VALUES LESS THAN (4) ENGINE = InnoDB,
|
||||||
PARTITION `partB` VALUES LESS THAN (7) ENGINE = InnoDB,
|
PARTITION `partB` VALUES LESS THAN (7) ENGINE = InnoDB,
|
||||||
|
@ -601,7 +601,7 @@ SHOW CREATE TABLE TableA;
|
||||||
Table Create Table
|
Table Create Table
|
||||||
TableA CREATE TABLE `TableA` (
|
TableA CREATE TABLE `TableA` (
|
||||||
`a` int(11) DEFAULT NULL
|
`a` int(11) DEFAULT NULL
|
||||||
) ENGINE=InnoDB DEFAULT CHARSET=latin1
|
) ENGINE=InnoDB DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci
|
||||||
PARTITION BY RANGE (`a`)
|
PARTITION BY RANGE (`a`)
|
||||||
(PARTITION `parta` VALUES LESS THAN (4) ENGINE = InnoDB,
|
(PARTITION `parta` VALUES LESS THAN (4) ENGINE = InnoDB,
|
||||||
PARTITION `partB` VALUES LESS THAN (7) ENGINE = InnoDB,
|
PARTITION `partB` VALUES LESS THAN (7) ENGINE = InnoDB,
|
||||||
|
@ -639,7 +639,7 @@ SHOW CREATE TABLE TableA;
|
||||||
Table Create Table
|
Table Create Table
|
||||||
TableA CREATE TABLE `TableA` (
|
TableA CREATE TABLE `TableA` (
|
||||||
`a` int(11) DEFAULT NULL
|
`a` int(11) DEFAULT NULL
|
||||||
) ENGINE=InnoDB DEFAULT CHARSET=latin1
|
) ENGINE=InnoDB DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci
|
||||||
PARTITION BY RANGE (`a`)
|
PARTITION BY RANGE (`a`)
|
||||||
(PARTITION `parta` VALUES LESS THAN (4) ENGINE = InnoDB,
|
(PARTITION `parta` VALUES LESS THAN (4) ENGINE = InnoDB,
|
||||||
PARTITION `partD` VALUES LESS THAN (8) COMMENT = 'Previously partB and partly Partc' ENGINE = InnoDB,
|
PARTITION `partD` VALUES LESS THAN (8) COMMENT = 'Previously partB and partly Partc' ENGINE = InnoDB,
|
||||||
|
@ -712,7 +712,7 @@ SHOW CREATE TABLE tablea;
|
||||||
Table Create Table
|
Table Create Table
|
||||||
tablea CREATE TABLE `tablea` (
|
tablea CREATE TABLE `tablea` (
|
||||||
`a` int(11) DEFAULT NULL
|
`a` int(11) DEFAULT NULL
|
||||||
) ENGINE=InnoDB DEFAULT CHARSET=latin1
|
) ENGINE=InnoDB DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci
|
||||||
PARTITION BY RANGE (`a`)
|
PARTITION BY RANGE (`a`)
|
||||||
(PARTITION `parta` VALUES LESS THAN (4) ENGINE = InnoDB,
|
(PARTITION `parta` VALUES LESS THAN (4) ENGINE = InnoDB,
|
||||||
PARTITION `partD` VALUES LESS THAN (8) COMMENT = 'Previously partB and partly Partc' ENGINE = InnoDB,
|
PARTITION `partD` VALUES LESS THAN (8) COMMENT = 'Previously partB and partly Partc' ENGINE = InnoDB,
|
||||||
|
@ -738,7 +738,7 @@ SHOW CREATE TABLE TableA;
|
||||||
Table Create Table
|
Table Create Table
|
||||||
TableA CREATE TABLE `TableA` (
|
TableA CREATE TABLE `TableA` (
|
||||||
`a` int(11) DEFAULT NULL
|
`a` int(11) DEFAULT NULL
|
||||||
) ENGINE=InnoDB DEFAULT CHARSET=latin1
|
) ENGINE=InnoDB DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci
|
||||||
# Cleaning up after RANGE PARTITIONING test
|
# Cleaning up after RANGE PARTITIONING test
|
||||||
DROP TABLE TableA;
|
DROP TABLE TableA;
|
||||||
# 4.0 LIST partitioning mgm
|
# 4.0 LIST partitioning mgm
|
||||||
|
@ -793,7 +793,7 @@ SHOW CREATE TABLE TableA;
|
||||||
Table Create Table
|
Table Create Table
|
||||||
TableA CREATE TABLE `TableA` (
|
TableA CREATE TABLE `TableA` (
|
||||||
`a` int(11) DEFAULT NULL
|
`a` int(11) DEFAULT NULL
|
||||||
) ENGINE=InnoDB DEFAULT CHARSET=latin1
|
) ENGINE=InnoDB DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci
|
||||||
PARTITION BY LIST (`a`)
|
PARTITION BY LIST (`a`)
|
||||||
(PARTITION `parta` VALUES IN (1,8,9) ENGINE = InnoDB,
|
(PARTITION `parta` VALUES IN (1,8,9) ENGINE = InnoDB,
|
||||||
PARTITION `partB` VALUES IN (2,10,11) ENGINE = InnoDB,
|
PARTITION `partB` VALUES IN (2,10,11) ENGINE = InnoDB,
|
||||||
|
@ -824,7 +824,7 @@ SHOW CREATE TABLE TableA;
|
||||||
Table Create Table
|
Table Create Table
|
||||||
TableA CREATE TABLE `TableA` (
|
TableA CREATE TABLE `TableA` (
|
||||||
`a` int(11) DEFAULT NULL
|
`a` int(11) DEFAULT NULL
|
||||||
) ENGINE=InnoDB DEFAULT CHARSET=latin1
|
) ENGINE=InnoDB DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci
|
||||||
PARTITION BY LIST (`a`)
|
PARTITION BY LIST (`a`)
|
||||||
(PARTITION `parta` VALUES IN (1,8,9) ENGINE = InnoDB,
|
(PARTITION `parta` VALUES IN (1,8,9) ENGINE = InnoDB,
|
||||||
PARTITION `partB` VALUES IN (2,10,11) ENGINE = InnoDB,
|
PARTITION `partB` VALUES IN (2,10,11) ENGINE = InnoDB,
|
||||||
|
@ -862,7 +862,7 @@ SHOW CREATE TABLE TableA;
|
||||||
Table Create Table
|
Table Create Table
|
||||||
TableA CREATE TABLE `TableA` (
|
TableA CREATE TABLE `TableA` (
|
||||||
`a` int(11) DEFAULT NULL
|
`a` int(11) DEFAULT NULL
|
||||||
) ENGINE=InnoDB DEFAULT CHARSET=latin1
|
) ENGINE=InnoDB DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci
|
||||||
PARTITION BY LIST (`a`)
|
PARTITION BY LIST (`a`)
|
||||||
(PARTITION `Partc` VALUES IN (1,7) COMMENT = 'Mix 1 of old parta and Partc' ENGINE = InnoDB,
|
(PARTITION `Partc` VALUES IN (1,7) COMMENT = 'Mix 1 of old parta and Partc' ENGINE = InnoDB,
|
||||||
PARTITION `parta` VALUES IN (3,9) COMMENT = 'Mix 2 of old parta and Partc' ENGINE = InnoDB,
|
PARTITION `parta` VALUES IN (3,9) COMMENT = 'Mix 2 of old parta and Partc' ENGINE = InnoDB,
|
||||||
|
@ -927,7 +927,7 @@ SHOW CREATE TABLE tablea;
|
||||||
Table Create Table
|
Table Create Table
|
||||||
tablea CREATE TABLE `tablea` (
|
tablea CREATE TABLE `tablea` (
|
||||||
`a` int(11) DEFAULT NULL
|
`a` int(11) DEFAULT NULL
|
||||||
) ENGINE=InnoDB DEFAULT CHARSET=latin1
|
) ENGINE=InnoDB DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci
|
||||||
PARTITION BY LIST (`a`)
|
PARTITION BY LIST (`a`)
|
||||||
(PARTITION `Partc` VALUES IN (1,7) COMMENT = 'Mix 1 of old parta and Partc' ENGINE = InnoDB,
|
(PARTITION `Partc` VALUES IN (1,7) COMMENT = 'Mix 1 of old parta and Partc' ENGINE = InnoDB,
|
||||||
PARTITION `parta` VALUES IN (3,9) COMMENT = 'Mix 2 of old parta and Partc' ENGINE = InnoDB,
|
PARTITION `parta` VALUES IN (3,9) COMMENT = 'Mix 2 of old parta and Partc' ENGINE = InnoDB,
|
||||||
|
@ -951,7 +951,7 @@ SHOW CREATE TABLE TableA;
|
||||||
Table Create Table
|
Table Create Table
|
||||||
TableA CREATE TABLE `TableA` (
|
TableA CREATE TABLE `TableA` (
|
||||||
`a` int(11) DEFAULT NULL
|
`a` int(11) DEFAULT NULL
|
||||||
) ENGINE=InnoDB DEFAULT CHARSET=latin1
|
) ENGINE=InnoDB DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci
|
||||||
# Cleaning up after LIST PARTITIONING test
|
# Cleaning up after LIST PARTITIONING test
|
||||||
DROP TABLE TableA;
|
DROP TABLE TableA;
|
||||||
# Testing TRUNCATE PARTITION
|
# Testing TRUNCATE PARTITION
|
||||||
|
@ -970,7 +970,7 @@ t1 CREATE TABLE `t1` (
|
||||||
`a` bigint(20) NOT NULL AUTO_INCREMENT,
|
`a` bigint(20) NOT NULL AUTO_INCREMENT,
|
||||||
`b` varchar(255) DEFAULT NULL,
|
`b` varchar(255) DEFAULT NULL,
|
||||||
PRIMARY KEY (`a`)
|
PRIMARY KEY (`a`)
|
||||||
) ENGINE=InnoDB AUTO_INCREMENT=2002 DEFAULT CHARSET=latin1
|
) ENGINE=InnoDB AUTO_INCREMENT=2002 DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci
|
||||||
PARTITION BY RANGE (`a`)
|
PARTITION BY RANGE (`a`)
|
||||||
(PARTITION `LT1000` VALUES LESS THAN (1000) ENGINE = InnoDB,
|
(PARTITION `LT1000` VALUES LESS THAN (1000) ENGINE = InnoDB,
|
||||||
PARTITION `LT2000` VALUES LESS THAN (2000) ENGINE = InnoDB,
|
PARTITION `LT2000` VALUES LESS THAN (2000) ENGINE = InnoDB,
|
||||||
|
@ -987,7 +987,6 @@ a b
|
||||||
2001 Second in MAX
|
2001 Second in MAX
|
||||||
ALTER TABLE t1 ANALYZE PARTITION MAX;
|
ALTER TABLE t1 ANALYZE PARTITION MAX;
|
||||||
Table Op Msg_type Msg_text
|
Table Op Msg_type Msg_text
|
||||||
mysql_test_db.t1 analyze status Engine-independent statistics collected
|
|
||||||
mysql_test_db.t1 analyze status OK
|
mysql_test_db.t1 analyze status OK
|
||||||
# Truncate without FLUSH
|
# Truncate without FLUSH
|
||||||
ALTER TABLE t1 TRUNCATE PARTITION MAX;
|
ALTER TABLE t1 TRUNCATE PARTITION MAX;
|
||||||
|
|
|
@ -55,7 +55,7 @@ SHOW CREATE TABLE TableA;
|
||||||
Table Create Table
|
Table Create Table
|
||||||
TableA CREATE TABLE `TableA` (
|
TableA CREATE TABLE `TableA` (
|
||||||
`a` int(11) DEFAULT NULL
|
`a` int(11) DEFAULT NULL
|
||||||
) ENGINE=MEMORY DEFAULT CHARSET=latin1
|
) ENGINE=MEMORY DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci
|
||||||
PARTITION BY KEY (`a`)
|
PARTITION BY KEY (`a`)
|
||||||
(PARTITION `parta` ENGINE = MEMORY,
|
(PARTITION `parta` ENGINE = MEMORY,
|
||||||
PARTITION `partB` ENGINE = MEMORY,
|
PARTITION `partB` ENGINE = MEMORY,
|
||||||
|
@ -83,7 +83,7 @@ SHOW CREATE TABLE TableA;
|
||||||
Table Create Table
|
Table Create Table
|
||||||
TableA CREATE TABLE `TableA` (
|
TableA CREATE TABLE `TableA` (
|
||||||
`a` int(11) DEFAULT NULL
|
`a` int(11) DEFAULT NULL
|
||||||
) ENGINE=MEMORY DEFAULT CHARSET=latin1
|
) ENGINE=MEMORY DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci
|
||||||
PARTITION BY KEY (`a`)
|
PARTITION BY KEY (`a`)
|
||||||
(PARTITION `parta` ENGINE = MEMORY,
|
(PARTITION `parta` ENGINE = MEMORY,
|
||||||
PARTITION `partB` ENGINE = MEMORY,
|
PARTITION `partB` ENGINE = MEMORY,
|
||||||
|
@ -111,7 +111,7 @@ SHOW CREATE TABLE TableA;
|
||||||
Table Create Table
|
Table Create Table
|
||||||
TableA CREATE TABLE `TableA` (
|
TableA CREATE TABLE `TableA` (
|
||||||
`a` int(11) DEFAULT NULL
|
`a` int(11) DEFAULT NULL
|
||||||
) ENGINE=MEMORY DEFAULT CHARSET=latin1
|
) ENGINE=MEMORY DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci
|
||||||
PARTITION BY KEY (`a`)
|
PARTITION BY KEY (`a`)
|
||||||
(PARTITION `parta` ENGINE = MEMORY,
|
(PARTITION `parta` ENGINE = MEMORY,
|
||||||
PARTITION `partB` ENGINE = MEMORY,
|
PARTITION `partB` ENGINE = MEMORY,
|
||||||
|
@ -126,7 +126,7 @@ SHOW CREATE TABLE TableB;
|
||||||
Table Create Table
|
Table Create Table
|
||||||
TableB CREATE TABLE `TableB` (
|
TableB CREATE TABLE `TableB` (
|
||||||
`a` int(11) DEFAULT NULL
|
`a` int(11) DEFAULT NULL
|
||||||
) ENGINE=MEMORY DEFAULT CHARSET=latin1
|
) ENGINE=MEMORY DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci
|
||||||
SELECT PARTITION_NAME, IF(TABLE_ROWS, 'YES', 'NO') AS HAVE_TABLE_ROWS FROM INFORMATION_SCHEMA.PARTITIONS WHERE TABLE_SCHEMA ='MySQL_Test_DB' AND TABLE_NAME = 'TableA';
|
SELECT PARTITION_NAME, IF(TABLE_ROWS, 'YES', 'NO') AS HAVE_TABLE_ROWS FROM INFORMATION_SCHEMA.PARTITIONS WHERE TABLE_SCHEMA ='MySQL_Test_DB' AND TABLE_NAME = 'TableA';
|
||||||
PARTITION_NAME HAVE_TABLE_ROWS
|
PARTITION_NAME HAVE_TABLE_ROWS
|
||||||
parta NO
|
parta NO
|
||||||
|
@ -155,7 +155,7 @@ SHOW CREATE TABLE TableA;
|
||||||
Table Create Table
|
Table Create Table
|
||||||
TableA CREATE TABLE `TableA` (
|
TableA CREATE TABLE `TableA` (
|
||||||
`a` int(11) DEFAULT NULL
|
`a` int(11) DEFAULT NULL
|
||||||
) ENGINE=MEMORY DEFAULT CHARSET=latin1
|
) ENGINE=MEMORY DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci
|
||||||
PARTITION BY KEY (`a`)
|
PARTITION BY KEY (`a`)
|
||||||
(PARTITION `parta` ENGINE = MEMORY,
|
(PARTITION `parta` ENGINE = MEMORY,
|
||||||
PARTITION `partB` ENGINE = MEMORY,
|
PARTITION `partB` ENGINE = MEMORY,
|
||||||
|
@ -191,7 +191,7 @@ SHOW CREATE TABLE TableA;
|
||||||
Table Create Table
|
Table Create Table
|
||||||
TableA CREATE TABLE `TableA` (
|
TableA CREATE TABLE `TableA` (
|
||||||
`a` int(11) DEFAULT NULL
|
`a` int(11) DEFAULT NULL
|
||||||
) ENGINE=MEMORY DEFAULT CHARSET=latin1
|
) ENGINE=MEMORY DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci
|
||||||
PARTITION BY KEY (`a`)
|
PARTITION BY KEY (`a`)
|
||||||
(PARTITION `partB` COMMENT = 'Previusly named parta' ENGINE = MEMORY,
|
(PARTITION `partB` COMMENT = 'Previusly named parta' ENGINE = MEMORY,
|
||||||
PARTITION `parta` COMMENT = 'Previusly named partB' ENGINE = MEMORY,
|
PARTITION `parta` COMMENT = 'Previusly named partB' ENGINE = MEMORY,
|
||||||
|
@ -263,7 +263,7 @@ SHOW CREATE TABLE tablea;
|
||||||
Table Create Table
|
Table Create Table
|
||||||
tablea CREATE TABLE `tablea` (
|
tablea CREATE TABLE `tablea` (
|
||||||
`a` int(11) DEFAULT NULL
|
`a` int(11) DEFAULT NULL
|
||||||
) ENGINE=MEMORY DEFAULT CHARSET=latin1
|
) ENGINE=MEMORY DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci
|
||||||
PARTITION BY KEY (`a`)
|
PARTITION BY KEY (`a`)
|
||||||
(PARTITION `partB` COMMENT = 'Previusly named parta' ENGINE = MEMORY,
|
(PARTITION `partB` COMMENT = 'Previusly named parta' ENGINE = MEMORY,
|
||||||
PARTITION `parta` COMMENT = 'Previusly named partB' ENGINE = MEMORY,
|
PARTITION `parta` COMMENT = 'Previusly named partB' ENGINE = MEMORY,
|
||||||
|
@ -288,7 +288,7 @@ SHOW CREATE TABLE TableA;
|
||||||
Table Create Table
|
Table Create Table
|
||||||
TableA CREATE TABLE `TableA` (
|
TableA CREATE TABLE `TableA` (
|
||||||
`a` int(11) DEFAULT NULL
|
`a` int(11) DEFAULT NULL
|
||||||
) ENGINE=MEMORY DEFAULT CHARSET=latin1
|
) ENGINE=MEMORY DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci
|
||||||
# Cleaning up after KEY PARTITIONING test
|
# Cleaning up after KEY PARTITIONING test
|
||||||
DROP TABLE TableA;
|
DROP TABLE TableA;
|
||||||
# 2.0 HASH partitioning mgm
|
# 2.0 HASH partitioning mgm
|
||||||
|
@ -354,7 +354,7 @@ SHOW CREATE TABLE TableA;
|
||||||
Table Create Table
|
Table Create Table
|
||||||
TableA CREATE TABLE `TableA` (
|
TableA CREATE TABLE `TableA` (
|
||||||
`a` int(11) DEFAULT NULL
|
`a` int(11) DEFAULT NULL
|
||||||
) ENGINE=MEMORY DEFAULT CHARSET=latin1
|
) ENGINE=MEMORY DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci
|
||||||
PARTITION BY HASH (`a`)
|
PARTITION BY HASH (`a`)
|
||||||
(PARTITION `parta` ENGINE = MEMORY,
|
(PARTITION `parta` ENGINE = MEMORY,
|
||||||
PARTITION `partB` ENGINE = MEMORY,
|
PARTITION `partB` ENGINE = MEMORY,
|
||||||
|
@ -382,7 +382,7 @@ SHOW CREATE TABLE TableA;
|
||||||
Table Create Table
|
Table Create Table
|
||||||
TableA CREATE TABLE `TableA` (
|
TableA CREATE TABLE `TableA` (
|
||||||
`a` int(11) DEFAULT NULL
|
`a` int(11) DEFAULT NULL
|
||||||
) ENGINE=MEMORY DEFAULT CHARSET=latin1
|
) ENGINE=MEMORY DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci
|
||||||
PARTITION BY HASH (`a`)
|
PARTITION BY HASH (`a`)
|
||||||
(PARTITION `parta` ENGINE = MEMORY,
|
(PARTITION `parta` ENGINE = MEMORY,
|
||||||
PARTITION `partB` ENGINE = MEMORY,
|
PARTITION `partB` ENGINE = MEMORY,
|
||||||
|
@ -418,7 +418,7 @@ SHOW CREATE TABLE TableA;
|
||||||
Table Create Table
|
Table Create Table
|
||||||
TableA CREATE TABLE `TableA` (
|
TableA CREATE TABLE `TableA` (
|
||||||
`a` int(11) DEFAULT NULL
|
`a` int(11) DEFAULT NULL
|
||||||
) ENGINE=MEMORY DEFAULT CHARSET=latin1
|
) ENGINE=MEMORY DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci
|
||||||
PARTITION BY HASH (`a`)
|
PARTITION BY HASH (`a`)
|
||||||
(PARTITION `partB` COMMENT = 'Previusly named parta' ENGINE = MEMORY,
|
(PARTITION `partB` COMMENT = 'Previusly named parta' ENGINE = MEMORY,
|
||||||
PARTITION `parta` COMMENT = 'Previusly named partB' ENGINE = MEMORY,
|
PARTITION `parta` COMMENT = 'Previusly named partB' ENGINE = MEMORY,
|
||||||
|
@ -490,7 +490,7 @@ SHOW CREATE TABLE tablea;
|
||||||
Table Create Table
|
Table Create Table
|
||||||
tablea CREATE TABLE `tablea` (
|
tablea CREATE TABLE `tablea` (
|
||||||
`a` int(11) DEFAULT NULL
|
`a` int(11) DEFAULT NULL
|
||||||
) ENGINE=MEMORY DEFAULT CHARSET=latin1
|
) ENGINE=MEMORY DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci
|
||||||
PARTITION BY HASH (`a`)
|
PARTITION BY HASH (`a`)
|
||||||
(PARTITION `partB` COMMENT = 'Previusly named parta' ENGINE = MEMORY,
|
(PARTITION `partB` COMMENT = 'Previusly named parta' ENGINE = MEMORY,
|
||||||
PARTITION `parta` COMMENT = 'Previusly named partB' ENGINE = MEMORY,
|
PARTITION `parta` COMMENT = 'Previusly named partB' ENGINE = MEMORY,
|
||||||
|
@ -515,7 +515,7 @@ SHOW CREATE TABLE TableA;
|
||||||
Table Create Table
|
Table Create Table
|
||||||
TableA CREATE TABLE `TableA` (
|
TableA CREATE TABLE `TableA` (
|
||||||
`a` int(11) DEFAULT NULL
|
`a` int(11) DEFAULT NULL
|
||||||
) ENGINE=MEMORY DEFAULT CHARSET=latin1
|
) ENGINE=MEMORY DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci
|
||||||
# Cleaning up after HASH PARTITIONING test
|
# Cleaning up after HASH PARTITIONING test
|
||||||
DROP TABLE TableA;
|
DROP TABLE TableA;
|
||||||
# 3.0 RANGE partitioning mgm
|
# 3.0 RANGE partitioning mgm
|
||||||
|
@ -570,7 +570,7 @@ SHOW CREATE TABLE TableA;
|
||||||
Table Create Table
|
Table Create Table
|
||||||
TableA CREATE TABLE `TableA` (
|
TableA CREATE TABLE `TableA` (
|
||||||
`a` int(11) DEFAULT NULL
|
`a` int(11) DEFAULT NULL
|
||||||
) ENGINE=MEMORY DEFAULT CHARSET=latin1
|
) ENGINE=MEMORY DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci
|
||||||
PARTITION BY RANGE (`a`)
|
PARTITION BY RANGE (`a`)
|
||||||
(PARTITION `parta` VALUES LESS THAN (4) ENGINE = MEMORY,
|
(PARTITION `parta` VALUES LESS THAN (4) ENGINE = MEMORY,
|
||||||
PARTITION `partB` VALUES LESS THAN (7) ENGINE = MEMORY,
|
PARTITION `partB` VALUES LESS THAN (7) ENGINE = MEMORY,
|
||||||
|
@ -601,7 +601,7 @@ SHOW CREATE TABLE TableA;
|
||||||
Table Create Table
|
Table Create Table
|
||||||
TableA CREATE TABLE `TableA` (
|
TableA CREATE TABLE `TableA` (
|
||||||
`a` int(11) DEFAULT NULL
|
`a` int(11) DEFAULT NULL
|
||||||
) ENGINE=MEMORY DEFAULT CHARSET=latin1
|
) ENGINE=MEMORY DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci
|
||||||
PARTITION BY RANGE (`a`)
|
PARTITION BY RANGE (`a`)
|
||||||
(PARTITION `parta` VALUES LESS THAN (4) ENGINE = MEMORY,
|
(PARTITION `parta` VALUES LESS THAN (4) ENGINE = MEMORY,
|
||||||
PARTITION `partB` VALUES LESS THAN (7) ENGINE = MEMORY,
|
PARTITION `partB` VALUES LESS THAN (7) ENGINE = MEMORY,
|
||||||
|
@ -639,7 +639,7 @@ SHOW CREATE TABLE TableA;
|
||||||
Table Create Table
|
Table Create Table
|
||||||
TableA CREATE TABLE `TableA` (
|
TableA CREATE TABLE `TableA` (
|
||||||
`a` int(11) DEFAULT NULL
|
`a` int(11) DEFAULT NULL
|
||||||
) ENGINE=MEMORY DEFAULT CHARSET=latin1
|
) ENGINE=MEMORY DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci
|
||||||
PARTITION BY RANGE (`a`)
|
PARTITION BY RANGE (`a`)
|
||||||
(PARTITION `parta` VALUES LESS THAN (4) ENGINE = MEMORY,
|
(PARTITION `parta` VALUES LESS THAN (4) ENGINE = MEMORY,
|
||||||
PARTITION `partD` VALUES LESS THAN (8) COMMENT = 'Previously partB and partly Partc' ENGINE = MEMORY,
|
PARTITION `partD` VALUES LESS THAN (8) COMMENT = 'Previously partB and partly Partc' ENGINE = MEMORY,
|
||||||
|
@ -712,7 +712,7 @@ SHOW CREATE TABLE tablea;
|
||||||
Table Create Table
|
Table Create Table
|
||||||
tablea CREATE TABLE `tablea` (
|
tablea CREATE TABLE `tablea` (
|
||||||
`a` int(11) DEFAULT NULL
|
`a` int(11) DEFAULT NULL
|
||||||
) ENGINE=MEMORY DEFAULT CHARSET=latin1
|
) ENGINE=MEMORY DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci
|
||||||
PARTITION BY RANGE (`a`)
|
PARTITION BY RANGE (`a`)
|
||||||
(PARTITION `parta` VALUES LESS THAN (4) ENGINE = MEMORY,
|
(PARTITION `parta` VALUES LESS THAN (4) ENGINE = MEMORY,
|
||||||
PARTITION `partD` VALUES LESS THAN (8) COMMENT = 'Previously partB and partly Partc' ENGINE = MEMORY,
|
PARTITION `partD` VALUES LESS THAN (8) COMMENT = 'Previously partB and partly Partc' ENGINE = MEMORY,
|
||||||
|
@ -738,7 +738,7 @@ SHOW CREATE TABLE TableA;
|
||||||
Table Create Table
|
Table Create Table
|
||||||
TableA CREATE TABLE `TableA` (
|
TableA CREATE TABLE `TableA` (
|
||||||
`a` int(11) DEFAULT NULL
|
`a` int(11) DEFAULT NULL
|
||||||
) ENGINE=MEMORY DEFAULT CHARSET=latin1
|
) ENGINE=MEMORY DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci
|
||||||
# Cleaning up after RANGE PARTITIONING test
|
# Cleaning up after RANGE PARTITIONING test
|
||||||
DROP TABLE TableA;
|
DROP TABLE TableA;
|
||||||
# 4.0 LIST partitioning mgm
|
# 4.0 LIST partitioning mgm
|
||||||
|
@ -793,7 +793,7 @@ SHOW CREATE TABLE TableA;
|
||||||
Table Create Table
|
Table Create Table
|
||||||
TableA CREATE TABLE `TableA` (
|
TableA CREATE TABLE `TableA` (
|
||||||
`a` int(11) DEFAULT NULL
|
`a` int(11) DEFAULT NULL
|
||||||
) ENGINE=MEMORY DEFAULT CHARSET=latin1
|
) ENGINE=MEMORY DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci
|
||||||
PARTITION BY LIST (`a`)
|
PARTITION BY LIST (`a`)
|
||||||
(PARTITION `parta` VALUES IN (1,8,9) ENGINE = MEMORY,
|
(PARTITION `parta` VALUES IN (1,8,9) ENGINE = MEMORY,
|
||||||
PARTITION `partB` VALUES IN (2,10,11) ENGINE = MEMORY,
|
PARTITION `partB` VALUES IN (2,10,11) ENGINE = MEMORY,
|
||||||
|
@ -824,7 +824,7 @@ SHOW CREATE TABLE TableA;
|
||||||
Table Create Table
|
Table Create Table
|
||||||
TableA CREATE TABLE `TableA` (
|
TableA CREATE TABLE `TableA` (
|
||||||
`a` int(11) DEFAULT NULL
|
`a` int(11) DEFAULT NULL
|
||||||
) ENGINE=MEMORY DEFAULT CHARSET=latin1
|
) ENGINE=MEMORY DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci
|
||||||
PARTITION BY LIST (`a`)
|
PARTITION BY LIST (`a`)
|
||||||
(PARTITION `parta` VALUES IN (1,8,9) ENGINE = MEMORY,
|
(PARTITION `parta` VALUES IN (1,8,9) ENGINE = MEMORY,
|
||||||
PARTITION `partB` VALUES IN (2,10,11) ENGINE = MEMORY,
|
PARTITION `partB` VALUES IN (2,10,11) ENGINE = MEMORY,
|
||||||
|
@ -862,7 +862,7 @@ SHOW CREATE TABLE TableA;
|
||||||
Table Create Table
|
Table Create Table
|
||||||
TableA CREATE TABLE `TableA` (
|
TableA CREATE TABLE `TableA` (
|
||||||
`a` int(11) DEFAULT NULL
|
`a` int(11) DEFAULT NULL
|
||||||
) ENGINE=MEMORY DEFAULT CHARSET=latin1
|
) ENGINE=MEMORY DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci
|
||||||
PARTITION BY LIST (`a`)
|
PARTITION BY LIST (`a`)
|
||||||
(PARTITION `Partc` VALUES IN (1,7) COMMENT = 'Mix 1 of old parta and Partc' ENGINE = MEMORY,
|
(PARTITION `Partc` VALUES IN (1,7) COMMENT = 'Mix 1 of old parta and Partc' ENGINE = MEMORY,
|
||||||
PARTITION `parta` VALUES IN (3,9) COMMENT = 'Mix 2 of old parta and Partc' ENGINE = MEMORY,
|
PARTITION `parta` VALUES IN (3,9) COMMENT = 'Mix 2 of old parta and Partc' ENGINE = MEMORY,
|
||||||
|
@ -927,7 +927,7 @@ SHOW CREATE TABLE tablea;
|
||||||
Table Create Table
|
Table Create Table
|
||||||
tablea CREATE TABLE `tablea` (
|
tablea CREATE TABLE `tablea` (
|
||||||
`a` int(11) DEFAULT NULL
|
`a` int(11) DEFAULT NULL
|
||||||
) ENGINE=MEMORY DEFAULT CHARSET=latin1
|
) ENGINE=MEMORY DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci
|
||||||
PARTITION BY LIST (`a`)
|
PARTITION BY LIST (`a`)
|
||||||
(PARTITION `Partc` VALUES IN (1,7) COMMENT = 'Mix 1 of old parta and Partc' ENGINE = MEMORY,
|
(PARTITION `Partc` VALUES IN (1,7) COMMENT = 'Mix 1 of old parta and Partc' ENGINE = MEMORY,
|
||||||
PARTITION `parta` VALUES IN (3,9) COMMENT = 'Mix 2 of old parta and Partc' ENGINE = MEMORY,
|
PARTITION `parta` VALUES IN (3,9) COMMENT = 'Mix 2 of old parta and Partc' ENGINE = MEMORY,
|
||||||
|
@ -951,7 +951,7 @@ SHOW CREATE TABLE TableA;
|
||||||
Table Create Table
|
Table Create Table
|
||||||
TableA CREATE TABLE `TableA` (
|
TableA CREATE TABLE `TableA` (
|
||||||
`a` int(11) DEFAULT NULL
|
`a` int(11) DEFAULT NULL
|
||||||
) ENGINE=MEMORY DEFAULT CHARSET=latin1
|
) ENGINE=MEMORY DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci
|
||||||
# Cleaning up after LIST PARTITIONING test
|
# Cleaning up after LIST PARTITIONING test
|
||||||
DROP TABLE TableA;
|
DROP TABLE TableA;
|
||||||
# Testing TRUNCATE PARTITION
|
# Testing TRUNCATE PARTITION
|
||||||
|
@ -970,7 +970,7 @@ t1 CREATE TABLE `t1` (
|
||||||
`a` bigint(20) NOT NULL AUTO_INCREMENT,
|
`a` bigint(20) NOT NULL AUTO_INCREMENT,
|
||||||
`b` varchar(255) DEFAULT NULL,
|
`b` varchar(255) DEFAULT NULL,
|
||||||
PRIMARY KEY (`a`)
|
PRIMARY KEY (`a`)
|
||||||
) ENGINE=MEMORY AUTO_INCREMENT=2002 DEFAULT CHARSET=latin1
|
) ENGINE=MEMORY AUTO_INCREMENT=2002 DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci
|
||||||
PARTITION BY RANGE (`a`)
|
PARTITION BY RANGE (`a`)
|
||||||
(PARTITION `LT1000` VALUES LESS THAN (1000) ENGINE = MEMORY,
|
(PARTITION `LT1000` VALUES LESS THAN (1000) ENGINE = MEMORY,
|
||||||
PARTITION `LT2000` VALUES LESS THAN (2000) ENGINE = MEMORY,
|
PARTITION `LT2000` VALUES LESS THAN (2000) ENGINE = MEMORY,
|
||||||
|
@ -987,7 +987,6 @@ a b
|
||||||
2001 Second in MAX
|
2001 Second in MAX
|
||||||
ALTER TABLE t1 ANALYZE PARTITION MAX;
|
ALTER TABLE t1 ANALYZE PARTITION MAX;
|
||||||
Table Op Msg_type Msg_text
|
Table Op Msg_type Msg_text
|
||||||
mysql_test_db.t1 analyze status Engine-independent statistics collected
|
|
||||||
mysql_test_db.t1 analyze note The storage engine for the table doesn't support analyze
|
mysql_test_db.t1 analyze note The storage engine for the table doesn't support analyze
|
||||||
# Truncate without FLUSH
|
# Truncate without FLUSH
|
||||||
ALTER TABLE t1 TRUNCATE PARTITION MAX;
|
ALTER TABLE t1 TRUNCATE PARTITION MAX;
|
||||||
|
|
|
@ -55,7 +55,7 @@ SHOW CREATE TABLE TableA;
|
||||||
Table Create Table
|
Table Create Table
|
||||||
TableA CREATE TABLE `TableA` (
|
TableA CREATE TABLE `TableA` (
|
||||||
`a` int(11) DEFAULT NULL
|
`a` int(11) DEFAULT NULL
|
||||||
) ENGINE=MyISAM DEFAULT CHARSET=latin1
|
) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci
|
||||||
PARTITION BY KEY (`a`)
|
PARTITION BY KEY (`a`)
|
||||||
(PARTITION `parta` ENGINE = MyISAM,
|
(PARTITION `parta` ENGINE = MyISAM,
|
||||||
PARTITION `partB` ENGINE = MyISAM,
|
PARTITION `partB` ENGINE = MyISAM,
|
||||||
|
@ -83,7 +83,7 @@ SHOW CREATE TABLE TableA;
|
||||||
Table Create Table
|
Table Create Table
|
||||||
TableA CREATE TABLE `TableA` (
|
TableA CREATE TABLE `TableA` (
|
||||||
`a` int(11) DEFAULT NULL
|
`a` int(11) DEFAULT NULL
|
||||||
) ENGINE=MyISAM DEFAULT CHARSET=latin1
|
) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci
|
||||||
PARTITION BY KEY (`a`)
|
PARTITION BY KEY (`a`)
|
||||||
(PARTITION `parta` ENGINE = MyISAM,
|
(PARTITION `parta` ENGINE = MyISAM,
|
||||||
PARTITION `partB` ENGINE = MyISAM,
|
PARTITION `partB` ENGINE = MyISAM,
|
||||||
|
@ -111,7 +111,7 @@ SHOW CREATE TABLE TableA;
|
||||||
Table Create Table
|
Table Create Table
|
||||||
TableA CREATE TABLE `TableA` (
|
TableA CREATE TABLE `TableA` (
|
||||||
`a` int(11) DEFAULT NULL
|
`a` int(11) DEFAULT NULL
|
||||||
) ENGINE=MyISAM DEFAULT CHARSET=latin1
|
) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci
|
||||||
PARTITION BY KEY (`a`)
|
PARTITION BY KEY (`a`)
|
||||||
(PARTITION `parta` ENGINE = MyISAM,
|
(PARTITION `parta` ENGINE = MyISAM,
|
||||||
PARTITION `partB` ENGINE = MyISAM,
|
PARTITION `partB` ENGINE = MyISAM,
|
||||||
|
@ -126,7 +126,7 @@ SHOW CREATE TABLE TableB;
|
||||||
Table Create Table
|
Table Create Table
|
||||||
TableB CREATE TABLE `TableB` (
|
TableB CREATE TABLE `TableB` (
|
||||||
`a` int(11) DEFAULT NULL
|
`a` int(11) DEFAULT NULL
|
||||||
) ENGINE=MyISAM DEFAULT CHARSET=latin1
|
) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci
|
||||||
SELECT PARTITION_NAME, IF(TABLE_ROWS, 'YES', 'NO') AS HAVE_TABLE_ROWS FROM INFORMATION_SCHEMA.PARTITIONS WHERE TABLE_SCHEMA ='MySQL_Test_DB' AND TABLE_NAME = 'TableA';
|
SELECT PARTITION_NAME, IF(TABLE_ROWS, 'YES', 'NO') AS HAVE_TABLE_ROWS FROM INFORMATION_SCHEMA.PARTITIONS WHERE TABLE_SCHEMA ='MySQL_Test_DB' AND TABLE_NAME = 'TableA';
|
||||||
PARTITION_NAME HAVE_TABLE_ROWS
|
PARTITION_NAME HAVE_TABLE_ROWS
|
||||||
parta NO
|
parta NO
|
||||||
|
@ -155,7 +155,7 @@ SHOW CREATE TABLE TableA;
|
||||||
Table Create Table
|
Table Create Table
|
||||||
TableA CREATE TABLE `TableA` (
|
TableA CREATE TABLE `TableA` (
|
||||||
`a` int(11) DEFAULT NULL
|
`a` int(11) DEFAULT NULL
|
||||||
) ENGINE=MyISAM DEFAULT CHARSET=latin1
|
) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci
|
||||||
PARTITION BY KEY (`a`)
|
PARTITION BY KEY (`a`)
|
||||||
(PARTITION `parta` ENGINE = MyISAM,
|
(PARTITION `parta` ENGINE = MyISAM,
|
||||||
PARTITION `partB` ENGINE = MyISAM,
|
PARTITION `partB` ENGINE = MyISAM,
|
||||||
|
@ -191,7 +191,7 @@ SHOW CREATE TABLE TableA;
|
||||||
Table Create Table
|
Table Create Table
|
||||||
TableA CREATE TABLE `TableA` (
|
TableA CREATE TABLE `TableA` (
|
||||||
`a` int(11) DEFAULT NULL
|
`a` int(11) DEFAULT NULL
|
||||||
) ENGINE=MyISAM DEFAULT CHARSET=latin1
|
) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci
|
||||||
PARTITION BY KEY (`a`)
|
PARTITION BY KEY (`a`)
|
||||||
(PARTITION `partB` COMMENT = 'Previusly named parta' ENGINE = MyISAM,
|
(PARTITION `partB` COMMENT = 'Previusly named parta' ENGINE = MyISAM,
|
||||||
PARTITION `parta` COMMENT = 'Previusly named partB' ENGINE = MyISAM,
|
PARTITION `parta` COMMENT = 'Previusly named partB' ENGINE = MyISAM,
|
||||||
|
@ -263,7 +263,7 @@ SHOW CREATE TABLE tablea;
|
||||||
Table Create Table
|
Table Create Table
|
||||||
tablea CREATE TABLE `tablea` (
|
tablea CREATE TABLE `tablea` (
|
||||||
`a` int(11) DEFAULT NULL
|
`a` int(11) DEFAULT NULL
|
||||||
) ENGINE=MyISAM DEFAULT CHARSET=latin1
|
) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci
|
||||||
PARTITION BY KEY (`a`)
|
PARTITION BY KEY (`a`)
|
||||||
(PARTITION `partB` COMMENT = 'Previusly named parta' ENGINE = MyISAM,
|
(PARTITION `partB` COMMENT = 'Previusly named parta' ENGINE = MyISAM,
|
||||||
PARTITION `parta` COMMENT = 'Previusly named partB' ENGINE = MyISAM,
|
PARTITION `parta` COMMENT = 'Previusly named partB' ENGINE = MyISAM,
|
||||||
|
@ -288,7 +288,7 @@ SHOW CREATE TABLE TableA;
|
||||||
Table Create Table
|
Table Create Table
|
||||||
TableA CREATE TABLE `TableA` (
|
TableA CREATE TABLE `TableA` (
|
||||||
`a` int(11) DEFAULT NULL
|
`a` int(11) DEFAULT NULL
|
||||||
) ENGINE=MyISAM DEFAULT CHARSET=latin1
|
) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci
|
||||||
# Cleaning up after KEY PARTITIONING test
|
# Cleaning up after KEY PARTITIONING test
|
||||||
DROP TABLE TableA;
|
DROP TABLE TableA;
|
||||||
# 2.0 HASH partitioning mgm
|
# 2.0 HASH partitioning mgm
|
||||||
|
@ -354,7 +354,7 @@ SHOW CREATE TABLE TableA;
|
||||||
Table Create Table
|
Table Create Table
|
||||||
TableA CREATE TABLE `TableA` (
|
TableA CREATE TABLE `TableA` (
|
||||||
`a` int(11) DEFAULT NULL
|
`a` int(11) DEFAULT NULL
|
||||||
) ENGINE=MyISAM DEFAULT CHARSET=latin1
|
) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci
|
||||||
PARTITION BY HASH (`a`)
|
PARTITION BY HASH (`a`)
|
||||||
(PARTITION `parta` ENGINE = MyISAM,
|
(PARTITION `parta` ENGINE = MyISAM,
|
||||||
PARTITION `partB` ENGINE = MyISAM,
|
PARTITION `partB` ENGINE = MyISAM,
|
||||||
|
@ -382,7 +382,7 @@ SHOW CREATE TABLE TableA;
|
||||||
Table Create Table
|
Table Create Table
|
||||||
TableA CREATE TABLE `TableA` (
|
TableA CREATE TABLE `TableA` (
|
||||||
`a` int(11) DEFAULT NULL
|
`a` int(11) DEFAULT NULL
|
||||||
) ENGINE=MyISAM DEFAULT CHARSET=latin1
|
) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci
|
||||||
PARTITION BY HASH (`a`)
|
PARTITION BY HASH (`a`)
|
||||||
(PARTITION `parta` ENGINE = MyISAM,
|
(PARTITION `parta` ENGINE = MyISAM,
|
||||||
PARTITION `partB` ENGINE = MyISAM,
|
PARTITION `partB` ENGINE = MyISAM,
|
||||||
|
@ -418,7 +418,7 @@ SHOW CREATE TABLE TableA;
|
||||||
Table Create Table
|
Table Create Table
|
||||||
TableA CREATE TABLE `TableA` (
|
TableA CREATE TABLE `TableA` (
|
||||||
`a` int(11) DEFAULT NULL
|
`a` int(11) DEFAULT NULL
|
||||||
) ENGINE=MyISAM DEFAULT CHARSET=latin1
|
) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci
|
||||||
PARTITION BY HASH (`a`)
|
PARTITION BY HASH (`a`)
|
||||||
(PARTITION `partB` COMMENT = 'Previusly named parta' ENGINE = MyISAM,
|
(PARTITION `partB` COMMENT = 'Previusly named parta' ENGINE = MyISAM,
|
||||||
PARTITION `parta` COMMENT = 'Previusly named partB' ENGINE = MyISAM,
|
PARTITION `parta` COMMENT = 'Previusly named partB' ENGINE = MyISAM,
|
||||||
|
@ -490,7 +490,7 @@ SHOW CREATE TABLE tablea;
|
||||||
Table Create Table
|
Table Create Table
|
||||||
tablea CREATE TABLE `tablea` (
|
tablea CREATE TABLE `tablea` (
|
||||||
`a` int(11) DEFAULT NULL
|
`a` int(11) DEFAULT NULL
|
||||||
) ENGINE=MyISAM DEFAULT CHARSET=latin1
|
) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci
|
||||||
PARTITION BY HASH (`a`)
|
PARTITION BY HASH (`a`)
|
||||||
(PARTITION `partB` COMMENT = 'Previusly named parta' ENGINE = MyISAM,
|
(PARTITION `partB` COMMENT = 'Previusly named parta' ENGINE = MyISAM,
|
||||||
PARTITION `parta` COMMENT = 'Previusly named partB' ENGINE = MyISAM,
|
PARTITION `parta` COMMENT = 'Previusly named partB' ENGINE = MyISAM,
|
||||||
|
@ -515,7 +515,7 @@ SHOW CREATE TABLE TableA;
|
||||||
Table Create Table
|
Table Create Table
|
||||||
TableA CREATE TABLE `TableA` (
|
TableA CREATE TABLE `TableA` (
|
||||||
`a` int(11) DEFAULT NULL
|
`a` int(11) DEFAULT NULL
|
||||||
) ENGINE=MyISAM DEFAULT CHARSET=latin1
|
) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci
|
||||||
# Cleaning up after HASH PARTITIONING test
|
# Cleaning up after HASH PARTITIONING test
|
||||||
DROP TABLE TableA;
|
DROP TABLE TableA;
|
||||||
# 3.0 RANGE partitioning mgm
|
# 3.0 RANGE partitioning mgm
|
||||||
|
@ -570,7 +570,7 @@ SHOW CREATE TABLE TableA;
|
||||||
Table Create Table
|
Table Create Table
|
||||||
TableA CREATE TABLE `TableA` (
|
TableA CREATE TABLE `TableA` (
|
||||||
`a` int(11) DEFAULT NULL
|
`a` int(11) DEFAULT NULL
|
||||||
) ENGINE=MyISAM DEFAULT CHARSET=latin1
|
) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci
|
||||||
PARTITION BY RANGE (`a`)
|
PARTITION BY RANGE (`a`)
|
||||||
(PARTITION `parta` VALUES LESS THAN (4) ENGINE = MyISAM,
|
(PARTITION `parta` VALUES LESS THAN (4) ENGINE = MyISAM,
|
||||||
PARTITION `partB` VALUES LESS THAN (7) ENGINE = MyISAM,
|
PARTITION `partB` VALUES LESS THAN (7) ENGINE = MyISAM,
|
||||||
|
@ -601,7 +601,7 @@ SHOW CREATE TABLE TableA;
|
||||||
Table Create Table
|
Table Create Table
|
||||||
TableA CREATE TABLE `TableA` (
|
TableA CREATE TABLE `TableA` (
|
||||||
`a` int(11) DEFAULT NULL
|
`a` int(11) DEFAULT NULL
|
||||||
) ENGINE=MyISAM DEFAULT CHARSET=latin1
|
) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci
|
||||||
PARTITION BY RANGE (`a`)
|
PARTITION BY RANGE (`a`)
|
||||||
(PARTITION `parta` VALUES LESS THAN (4) ENGINE = MyISAM,
|
(PARTITION `parta` VALUES LESS THAN (4) ENGINE = MyISAM,
|
||||||
PARTITION `partB` VALUES LESS THAN (7) ENGINE = MyISAM,
|
PARTITION `partB` VALUES LESS THAN (7) ENGINE = MyISAM,
|
||||||
|
@ -639,7 +639,7 @@ SHOW CREATE TABLE TableA;
|
||||||
Table Create Table
|
Table Create Table
|
||||||
TableA CREATE TABLE `TableA` (
|
TableA CREATE TABLE `TableA` (
|
||||||
`a` int(11) DEFAULT NULL
|
`a` int(11) DEFAULT NULL
|
||||||
) ENGINE=MyISAM DEFAULT CHARSET=latin1
|
) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci
|
||||||
PARTITION BY RANGE (`a`)
|
PARTITION BY RANGE (`a`)
|
||||||
(PARTITION `parta` VALUES LESS THAN (4) ENGINE = MyISAM,
|
(PARTITION `parta` VALUES LESS THAN (4) ENGINE = MyISAM,
|
||||||
PARTITION `partD` VALUES LESS THAN (8) COMMENT = 'Previously partB and partly Partc' ENGINE = MyISAM,
|
PARTITION `partD` VALUES LESS THAN (8) COMMENT = 'Previously partB and partly Partc' ENGINE = MyISAM,
|
||||||
|
@ -712,7 +712,7 @@ SHOW CREATE TABLE tablea;
|
||||||
Table Create Table
|
Table Create Table
|
||||||
tablea CREATE TABLE `tablea` (
|
tablea CREATE TABLE `tablea` (
|
||||||
`a` int(11) DEFAULT NULL
|
`a` int(11) DEFAULT NULL
|
||||||
) ENGINE=MyISAM DEFAULT CHARSET=latin1
|
) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci
|
||||||
PARTITION BY RANGE (`a`)
|
PARTITION BY RANGE (`a`)
|
||||||
(PARTITION `parta` VALUES LESS THAN (4) ENGINE = MyISAM,
|
(PARTITION `parta` VALUES LESS THAN (4) ENGINE = MyISAM,
|
||||||
PARTITION `partD` VALUES LESS THAN (8) COMMENT = 'Previously partB and partly Partc' ENGINE = MyISAM,
|
PARTITION `partD` VALUES LESS THAN (8) COMMENT = 'Previously partB and partly Partc' ENGINE = MyISAM,
|
||||||
|
@ -738,7 +738,7 @@ SHOW CREATE TABLE TableA;
|
||||||
Table Create Table
|
Table Create Table
|
||||||
TableA CREATE TABLE `TableA` (
|
TableA CREATE TABLE `TableA` (
|
||||||
`a` int(11) DEFAULT NULL
|
`a` int(11) DEFAULT NULL
|
||||||
) ENGINE=MyISAM DEFAULT CHARSET=latin1
|
) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci
|
||||||
# Cleaning up after RANGE PARTITIONING test
|
# Cleaning up after RANGE PARTITIONING test
|
||||||
DROP TABLE TableA;
|
DROP TABLE TableA;
|
||||||
# 4.0 LIST partitioning mgm
|
# 4.0 LIST partitioning mgm
|
||||||
|
@ -793,7 +793,7 @@ SHOW CREATE TABLE TableA;
|
||||||
Table Create Table
|
Table Create Table
|
||||||
TableA CREATE TABLE `TableA` (
|
TableA CREATE TABLE `TableA` (
|
||||||
`a` int(11) DEFAULT NULL
|
`a` int(11) DEFAULT NULL
|
||||||
) ENGINE=MyISAM DEFAULT CHARSET=latin1
|
) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci
|
||||||
PARTITION BY LIST (`a`)
|
PARTITION BY LIST (`a`)
|
||||||
(PARTITION `parta` VALUES IN (1,8,9) ENGINE = MyISAM,
|
(PARTITION `parta` VALUES IN (1,8,9) ENGINE = MyISAM,
|
||||||
PARTITION `partB` VALUES IN (2,10,11) ENGINE = MyISAM,
|
PARTITION `partB` VALUES IN (2,10,11) ENGINE = MyISAM,
|
||||||
|
@ -824,7 +824,7 @@ SHOW CREATE TABLE TableA;
|
||||||
Table Create Table
|
Table Create Table
|
||||||
TableA CREATE TABLE `TableA` (
|
TableA CREATE TABLE `TableA` (
|
||||||
`a` int(11) DEFAULT NULL
|
`a` int(11) DEFAULT NULL
|
||||||
) ENGINE=MyISAM DEFAULT CHARSET=latin1
|
) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci
|
||||||
PARTITION BY LIST (`a`)
|
PARTITION BY LIST (`a`)
|
||||||
(PARTITION `parta` VALUES IN (1,8,9) ENGINE = MyISAM,
|
(PARTITION `parta` VALUES IN (1,8,9) ENGINE = MyISAM,
|
||||||
PARTITION `partB` VALUES IN (2,10,11) ENGINE = MyISAM,
|
PARTITION `partB` VALUES IN (2,10,11) ENGINE = MyISAM,
|
||||||
|
@ -862,7 +862,7 @@ SHOW CREATE TABLE TableA;
|
||||||
Table Create Table
|
Table Create Table
|
||||||
TableA CREATE TABLE `TableA` (
|
TableA CREATE TABLE `TableA` (
|
||||||
`a` int(11) DEFAULT NULL
|
`a` int(11) DEFAULT NULL
|
||||||
) ENGINE=MyISAM DEFAULT CHARSET=latin1
|
) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci
|
||||||
PARTITION BY LIST (`a`)
|
PARTITION BY LIST (`a`)
|
||||||
(PARTITION `Partc` VALUES IN (1,7) COMMENT = 'Mix 1 of old parta and Partc' ENGINE = MyISAM,
|
(PARTITION `Partc` VALUES IN (1,7) COMMENT = 'Mix 1 of old parta and Partc' ENGINE = MyISAM,
|
||||||
PARTITION `parta` VALUES IN (3,9) COMMENT = 'Mix 2 of old parta and Partc' ENGINE = MyISAM,
|
PARTITION `parta` VALUES IN (3,9) COMMENT = 'Mix 2 of old parta and Partc' ENGINE = MyISAM,
|
||||||
|
@ -927,7 +927,7 @@ SHOW CREATE TABLE tablea;
|
||||||
Table Create Table
|
Table Create Table
|
||||||
tablea CREATE TABLE `tablea` (
|
tablea CREATE TABLE `tablea` (
|
||||||
`a` int(11) DEFAULT NULL
|
`a` int(11) DEFAULT NULL
|
||||||
) ENGINE=MyISAM DEFAULT CHARSET=latin1
|
) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci
|
||||||
PARTITION BY LIST (`a`)
|
PARTITION BY LIST (`a`)
|
||||||
(PARTITION `Partc` VALUES IN (1,7) COMMENT = 'Mix 1 of old parta and Partc' ENGINE = MyISAM,
|
(PARTITION `Partc` VALUES IN (1,7) COMMENT = 'Mix 1 of old parta and Partc' ENGINE = MyISAM,
|
||||||
PARTITION `parta` VALUES IN (3,9) COMMENT = 'Mix 2 of old parta and Partc' ENGINE = MyISAM,
|
PARTITION `parta` VALUES IN (3,9) COMMENT = 'Mix 2 of old parta and Partc' ENGINE = MyISAM,
|
||||||
|
@ -951,7 +951,7 @@ SHOW CREATE TABLE TableA;
|
||||||
Table Create Table
|
Table Create Table
|
||||||
TableA CREATE TABLE `TableA` (
|
TableA CREATE TABLE `TableA` (
|
||||||
`a` int(11) DEFAULT NULL
|
`a` int(11) DEFAULT NULL
|
||||||
) ENGINE=MyISAM DEFAULT CHARSET=latin1
|
) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci
|
||||||
# Cleaning up after LIST PARTITIONING test
|
# Cleaning up after LIST PARTITIONING test
|
||||||
DROP TABLE TableA;
|
DROP TABLE TableA;
|
||||||
# Testing TRUNCATE PARTITION
|
# Testing TRUNCATE PARTITION
|
||||||
|
@ -970,7 +970,7 @@ t1 CREATE TABLE `t1` (
|
||||||
`a` bigint(20) NOT NULL AUTO_INCREMENT,
|
`a` bigint(20) NOT NULL AUTO_INCREMENT,
|
||||||
`b` varchar(255) DEFAULT NULL,
|
`b` varchar(255) DEFAULT NULL,
|
||||||
PRIMARY KEY (`a`)
|
PRIMARY KEY (`a`)
|
||||||
) ENGINE=MyISAM AUTO_INCREMENT=2002 DEFAULT CHARSET=latin1
|
) ENGINE=MyISAM AUTO_INCREMENT=2002 DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci
|
||||||
PARTITION BY RANGE (`a`)
|
PARTITION BY RANGE (`a`)
|
||||||
(PARTITION `LT1000` VALUES LESS THAN (1000) ENGINE = MyISAM,
|
(PARTITION `LT1000` VALUES LESS THAN (1000) ENGINE = MyISAM,
|
||||||
PARTITION `LT2000` VALUES LESS THAN (2000) ENGINE = MyISAM,
|
PARTITION `LT2000` VALUES LESS THAN (2000) ENGINE = MyISAM,
|
||||||
|
@ -987,7 +987,6 @@ a b
|
||||||
2001 Second in MAX
|
2001 Second in MAX
|
||||||
ALTER TABLE t1 ANALYZE PARTITION MAX;
|
ALTER TABLE t1 ANALYZE PARTITION MAX;
|
||||||
Table Op Msg_type Msg_text
|
Table Op Msg_type Msg_text
|
||||||
mysql_test_db.t1 analyze status Engine-independent statistics collected
|
|
||||||
mysql_test_db.t1 analyze status OK
|
mysql_test_db.t1 analyze status OK
|
||||||
# Truncate without FLUSH
|
# Truncate without FLUSH
|
||||||
ALTER TABLE t1 TRUNCATE PARTITION MAX;
|
ALTER TABLE t1 TRUNCATE PARTITION MAX;
|
||||||
|
|
|
@ -3,6 +3,9 @@ SHOW GLOBAL STATUS LIKE 'wsrep%';
|
||||||
Variable_name Value
|
Variable_name Value
|
||||||
wsrep_local_state_uuid #
|
wsrep_local_state_uuid #
|
||||||
wsrep_protocol_version #
|
wsrep_protocol_version #
|
||||||
|
wsrep_protocol_application #
|
||||||
|
wsrep_protocol_replicator #
|
||||||
|
wsrep_protocol_gcs #
|
||||||
wsrep_last_committed #
|
wsrep_last_committed #
|
||||||
wsrep_replicated #
|
wsrep_replicated #
|
||||||
wsrep_replicated_bytes #
|
wsrep_replicated_bytes #
|
||||||
|
|
|
@ -3,6 +3,9 @@ SHOW GLOBAL STATUS LIKE 'wsrep%';
|
||||||
Variable_name Value
|
Variable_name Value
|
||||||
wsrep_local_state_uuid #
|
wsrep_local_state_uuid #
|
||||||
wsrep_protocol_version #
|
wsrep_protocol_version #
|
||||||
|
wsrep_protocol_application #
|
||||||
|
wsrep_protocol_replicator #
|
||||||
|
wsrep_protocol_gcs #
|
||||||
wsrep_last_committed #
|
wsrep_last_committed #
|
||||||
wsrep_replicated #
|
wsrep_replicated #
|
||||||
wsrep_replicated_bytes #
|
wsrep_replicated_bytes #
|
||||||
|
|
7
mysql-test/suite/wsrep/r/wsrep_protocol_versions.result
Normal file
7
mysql-test/suite/wsrep/r/wsrep_protocol_versions.result
Normal file
|
@ -0,0 +1,7 @@
|
||||||
|
# Correct Galera library found
|
||||||
|
show status like 'wsrep_protocol%';
|
||||||
|
Variable_name Value
|
||||||
|
wsrep_protocol_application 4
|
||||||
|
wsrep_protocol_gcs 5
|
||||||
|
wsrep_protocol_replicator 11
|
||||||
|
wsrep_protocol_version 11
|
|
@ -3,7 +3,7 @@
|
||||||
--source include/have_innodb.inc
|
--source include/have_innodb.inc
|
||||||
--source include/galera_no_debug_sync.inc
|
--source include/galera_no_debug_sync.inc
|
||||||
|
|
||||||
--let $galera_version=26.4.9
|
--let $galera_version=26.4.21
|
||||||
source include/check_galera_version.inc;
|
source include/check_galera_version.inc;
|
||||||
|
|
||||||
source include/galera_variables_ok.inc;
|
source include/galera_variables_ok.inc;
|
||||||
|
|
|
@ -5,7 +5,7 @@
|
||||||
--source include/have_debug_sync.inc
|
--source include/have_debug_sync.inc
|
||||||
--source include/galera_have_debug_sync.inc
|
--source include/galera_have_debug_sync.inc
|
||||||
|
|
||||||
--let $galera_version=26.4.9
|
--let $galera_version=26.4.21
|
||||||
source include/check_galera_version.inc;
|
source include/check_galera_version.inc;
|
||||||
|
|
||||||
source include/galera_variables_ok.inc;
|
source include/galera_variables_ok.inc;
|
||||||
|
|
13
mysql-test/suite/wsrep/t/wsrep_protocol_versions.cnf
Normal file
13
mysql-test/suite/wsrep/t/wsrep_protocol_versions.cnf
Normal file
|
@ -0,0 +1,13 @@
|
||||||
|
# Use default setting for mysqld processes
|
||||||
|
!include include/default_mysqld.cnf
|
||||||
|
|
||||||
|
[mysqld.1]
|
||||||
|
wsrep-on=ON
|
||||||
|
binlog-format=ROW
|
||||||
|
innodb-flush-log-at-trx-commit=1
|
||||||
|
wsrep-cluster-address=gcomm://
|
||||||
|
wsrep-provider=@ENV.WSREP_PROVIDER
|
||||||
|
innodb-autoinc-lock-mode=2
|
||||||
|
#galera_port=@OPT.port
|
||||||
|
#ist_port=@OPT.port
|
||||||
|
#sst_port=@OPT.port
|
9
mysql-test/suite/wsrep/t/wsrep_protocol_versions.test
Normal file
9
mysql-test/suite/wsrep/t/wsrep_protocol_versions.test
Normal file
|
@ -0,0 +1,9 @@
|
||||||
|
--source include/have_wsrep.inc
|
||||||
|
--source include/force_restart.inc
|
||||||
|
--source include/have_innodb.inc
|
||||||
|
|
||||||
|
--let $galera_version=26.4.21
|
||||||
|
source include/check_galera_version.inc;
|
||||||
|
|
||||||
|
--sorted_result
|
||||||
|
show status like 'wsrep_protocol%';
|
|
@ -1157,8 +1157,7 @@ static bool wsrep_command_no_result(char command)
|
||||||
{
|
{
|
||||||
return (command == COM_STMT_FETCH ||
|
return (command == COM_STMT_FETCH ||
|
||||||
command == COM_STMT_SEND_LONG_DATA ||
|
command == COM_STMT_SEND_LONG_DATA ||
|
||||||
command == COM_STMT_CLOSE ||
|
command == COM_STMT_CLOSE);
|
||||||
command == COM_STMT_PREPARE);
|
|
||||||
}
|
}
|
||||||
#endif /* WITH_WSREP */
|
#endif /* WITH_WSREP */
|
||||||
#ifndef EMBEDDED_LIBRARY
|
#ifndef EMBEDDED_LIBRARY
|
||||||
|
@ -2402,13 +2401,23 @@ resume:
|
||||||
{
|
{
|
||||||
DEBUG_SYNC(thd, "wsrep_at_dispatch_end_before_result");
|
DEBUG_SYNC(thd, "wsrep_at_dispatch_end_before_result");
|
||||||
}
|
}
|
||||||
wsrep_after_command_before_result(thd);
|
if (thd->wsrep_cs().state() == wsrep::client_state::s_exec)
|
||||||
if (wsrep_current_error(thd) && !wsrep_command_no_result(command))
|
|
||||||
{
|
{
|
||||||
/* todo: Pass wsrep client state current error to override */
|
wsrep_after_command_before_result(thd);
|
||||||
wsrep_override_error(thd, wsrep_current_error(thd),
|
if (wsrep_current_error(thd) && !wsrep_command_no_result(command))
|
||||||
wsrep_current_error_status(thd));
|
{
|
||||||
WSREP_LOG_THD(thd, "leave");
|
/* todo: Pass wsrep client state current error to override */
|
||||||
|
wsrep_override_error(thd, wsrep_current_error(thd),
|
||||||
|
wsrep_current_error_status(thd));
|
||||||
|
WSREP_LOG_THD(thd, "leave");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
/* wsrep_after_command_before_result() already called elsewhere
|
||||||
|
or not necessary to call it */
|
||||||
|
assert(thd->wsrep_cs().state() == wsrep::client_state::s_none ||
|
||||||
|
thd->wsrep_cs().state() == wsrep::client_state::s_result);
|
||||||
}
|
}
|
||||||
if (WSREP(thd))
|
if (WSREP(thd))
|
||||||
{
|
{
|
||||||
|
|
|
@ -2475,6 +2475,16 @@ static bool check_prepared_statement(Prepared_statement *stmt)
|
||||||
#ifdef WITH_WSREP
|
#ifdef WITH_WSREP
|
||||||
if (wsrep_sync_wait(thd, sql_command))
|
if (wsrep_sync_wait(thd, sql_command))
|
||||||
goto error;
|
goto error;
|
||||||
|
if (!stmt->is_sql_prepare())
|
||||||
|
{
|
||||||
|
wsrep_after_command_before_result(thd);
|
||||||
|
if (wsrep_current_error(thd))
|
||||||
|
{
|
||||||
|
wsrep_override_error(thd, wsrep_current_error(thd),
|
||||||
|
wsrep_current_error_status(thd));
|
||||||
|
goto error;
|
||||||
|
}
|
||||||
|
}
|
||||||
#endif
|
#endif
|
||||||
switch (sql_command) {
|
switch (sql_command) {
|
||||||
case SQLCOM_REPLACE:
|
case SQLCOM_REPLACE:
|
||||||
|
|
|
@ -1582,35 +1582,7 @@ bool wsrep_sync_wait (THD* thd, uint mask)
|
||||||
This allows autocommit SELECTs and a first SELECT after SET AUTOCOMMIT=0
|
This allows autocommit SELECTs and a first SELECT after SET AUTOCOMMIT=0
|
||||||
TODO: modify to check if thd has locked any rows.
|
TODO: modify to check if thd has locked any rows.
|
||||||
*/
|
*/
|
||||||
if (thd->wsrep_cs().sync_wait(-1))
|
return thd->wsrep_cs().sync_wait(-1);
|
||||||
{
|
|
||||||
const char* msg;
|
|
||||||
int err;
|
|
||||||
|
|
||||||
/*
|
|
||||||
Possibly relevant error codes:
|
|
||||||
ER_CHECKREAD, ER_ERROR_ON_READ, ER_INVALID_DEFAULT, ER_EMPTY_QUERY,
|
|
||||||
ER_FUNCTION_NOT_DEFINED, ER_NOT_ALLOWED_COMMAND, ER_NOT_SUPPORTED_YET,
|
|
||||||
ER_FEATURE_DISABLED, ER_QUERY_INTERRUPTED
|
|
||||||
*/
|
|
||||||
|
|
||||||
switch (thd->wsrep_cs().current_error())
|
|
||||||
{
|
|
||||||
case wsrep::e_not_supported_error:
|
|
||||||
msg= "synchronous reads by wsrep backend. "
|
|
||||||
"Please unset wsrep_causal_reads variable.";
|
|
||||||
err= ER_NOT_SUPPORTED_YET;
|
|
||||||
break;
|
|
||||||
default:
|
|
||||||
msg= "Synchronous wait failed.";
|
|
||||||
err= ER_LOCK_WAIT_TIMEOUT; // NOTE: the above msg won't be displayed
|
|
||||||
// with ER_LOCK_WAIT_TIMEOUT
|
|
||||||
}
|
|
||||||
|
|
||||||
my_error(err, MYF(0), msg);
|
|
||||||
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return false;
|
return false;
|
||||||
|
|
|
@ -894,6 +894,27 @@ int my_fprintf(FILE *stream, const char* format, ...)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
#ifdef __APPLE__
|
||||||
|
/* Delete the ':' character added by Apple's implementation of strerror_r */
|
||||||
|
static void delete_colon_char(char *buf)
|
||||||
|
{
|
||||||
|
static const char *unknown_err= "Unknown error";
|
||||||
|
static const size_t unknown_err_len= 13;
|
||||||
|
char *ptr= strstr(buf, unknown_err);
|
||||||
|
char *src= NULL;
|
||||||
|
if (ptr) {
|
||||||
|
ptr+= unknown_err_len;
|
||||||
|
if (*ptr == ':') {
|
||||||
|
// just overwrite the colon by shifting everything down by one,
|
||||||
|
// e.g. "Unknown error: 1000" becomes "Unknown error 1000"
|
||||||
|
src= ptr + 1;
|
||||||
|
memmove(ptr, src, strlen(src) + 1); // include null
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
Return system error text for given error number
|
Return system error text for given error number
|
||||||
|
|
||||||
|
@ -947,6 +968,10 @@ const char* my_strerror(char *buf, size_t len, int nr)
|
||||||
#else
|
#else
|
||||||
strerror_r(nr, buf, len);
|
strerror_r(nr, buf, len);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#ifdef __APPLE__
|
||||||
|
delete_colon_char(buf);
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|
|
@ -1 +1 @@
|
||||||
Subproject commit 1c61b809d1e1d03771dcad689d3a084e17c6b6c3
|
Subproject commit 70cd967f5e249b53d6cce90e2e4198641c564381
|
Loading…
Reference in a new issue