Commit 51256b60 authored by Sergei Golubchik's avatar Sergei Golubchik

fixes for lower_case_table_names=2

parent c9801135
......@@ -613,7 +613,7 @@ DROP TABLE t1;
# Test Case from MDEV-21067
#
CREATE DATABASE world;
CREATE TABLE world.City (
CREATE TABLE world.city (
ID INT AUTO_INCREMENT PRIMARY KEY,
Name VARCHAR(64),
CountryCode VARCHAR(64),
......@@ -625,35 +625,35 @@ ID INT AUTO_INCREMENT PRIMARY KEY,
REC VARCHAR(64),
ts TIMESTAMP
) ENGINE=InnoDB;
INSERT INTO world.City VALUES (NULL, 'Davenport', 'USA', 'Iowa', 100);
INSERT INTO world.City VALUES (NULL, 'Boulder', 'USA', 'Colorado', 1000);
INSERT INTO world.City VALUES (NULL, 'Gweru', 'ZWE', 'Midlands', 10000);
INSERT INTO world.city VALUES (NULL, 'Davenport', 'USA', 'Iowa', 100);
INSERT INTO world.city VALUES (NULL, 'Boulder', 'USA', 'Colorado', 1000);
INSERT INTO world.city VALUES (NULL, 'Gweru', 'ZWE', 'Midlands', 10000);
RESET MASTER;
CHECKSUM TABLE world.City;
CHECKSUM TABLE world.city;
Table Checksum
world.City 563256876
world.city 563256876
INSERT INTO test.test VALUES (NULL, 'Good record 1', CURRENT_TIMESTAMP());
INSERT INTO world.City VALUES (NULL, 'Wrong value 1', '000', 'Wrong', 0);
INSERT INTO world.City VALUES (NULL, 'Wrong value 2', '000', 'Wrong', 0) , (NULL, 'Wrong value 3', '000', 'Wrong', 0);
INSERT INTO world.city VALUES (NULL, 'Wrong value 1', '000', 'Wrong', 0);
INSERT INTO world.city VALUES (NULL, 'Wrong value 2', '000', 'Wrong', 0) , (NULL, 'Wrong value 3', '000', 'Wrong', 0);
INSERT INTO test.test VALUES (NULL, 'Good record 2', CURRENT_TIMESTAMP());
UPDATE world.City SET Population = 99999999 WHERE ID IN (1, 2, 3);
UPDATE world.city SET Population = 99999999 WHERE ID IN (1, 2, 3);
INSERT INTO test.test VALUES (NULL, 'Good record 3', CURRENT_TIMESTAMP());
DELETE FROM world.City WHERE ID BETWEEN 1 AND 2;
DELETE FROM world.city WHERE ID BETWEEN 1 AND 2;
INSERT INTO test.test VALUES (NULL, 'Good record 5', CURRENT_TIMESTAMP());
REPLACE INTO world.City VALUES (4074, 'Wrong value 4', '000', 'Wrong', 0);
REPLACE INTO world.City VALUES (4078, 'Wrong value 5', '000', 'Wrong', 0), (NULL, 'Wrong value 6', '000', 'Wrong', 0);
REPLACE INTO world.city VALUES (4074, 'Wrong value 4', '000', 'Wrong', 0);
REPLACE INTO world.city VALUES (4078, 'Wrong value 5', '000', 'Wrong', 0), (NULL, 'Wrong value 6', '000', 'Wrong', 0);
INSERT INTO test.test VALUES (NULL, 'Good record 6', CURRENT_TIMESTAMP());
INSERT INTO world.City
SELECT NULL, Name, CountryCode, District, Population FROM world.City WHERE ID BETWEEN 2 AND 10;
INSERT INTO world.city
SELECT NULL, Name, CountryCode, District, Population FROM world.city WHERE ID BETWEEN 2 AND 10;
INSERT INTO test.test VALUES (NULL, 'Good record 7', CURRENT_TIMESTAMP());
INSERT INTO test.test VALUES (NULL, 'Good record 8', CURRENT_TIMESTAMP());
DELETE FROM world.City;
DELETE FROM world.city;
INSERT INTO test.test VALUES (NULL, 'Good record 9', CURRENT_TIMESTAMP());
FLUSH LOGS;
# < CASE 6 >
# Flashback & Check the result
#
SELECT * FROM world.City;
SELECT * FROM world.city;
ID Name CountryCode District Population
1 Davenport USA Iowa 100
2 Boulder USA Colorado 1000
......@@ -668,11 +668,11 @@ ID REC ts
6 Good record 7 2001-09-09 09:46:40
7 Good record 8 2001-09-09 09:46:40
8 Good record 9 2001-09-09 09:46:40
CHECKSUM TABLE world.City;
CHECKSUM TABLE world.city;
Table Checksum
world.City 563256876
world.city 563256876
DROP TABLE test.test;
DROP TABLE world.City;
DROP TABLE world.city;
DROP DATABASE world;
SET binlog_format=statement;
Warnings:
......
......@@ -260,7 +260,7 @@ DROP TABLE t1;
# Init Structure
CREATE DATABASE world;
CREATE TABLE world.City (
CREATE TABLE world.city (
ID INT AUTO_INCREMENT PRIMARY KEY,
Name VARCHAR(64),
CountryCode VARCHAR(64),
......@@ -273,43 +273,43 @@ CREATE TABLE test.test (
ts TIMESTAMP
) ENGINE=InnoDB;
INSERT INTO world.City VALUES (NULL, 'Davenport', 'USA', 'Iowa', 100);
INSERT INTO world.City VALUES (NULL, 'Boulder', 'USA', 'Colorado', 1000);
INSERT INTO world.City VALUES (NULL, 'Gweru', 'ZWE', 'Midlands', 10000);
INSERT INTO world.city VALUES (NULL, 'Davenport', 'USA', 'Iowa', 100);
INSERT INTO world.city VALUES (NULL, 'Boulder', 'USA', 'Colorado', 1000);
INSERT INTO world.city VALUES (NULL, 'Gweru', 'ZWE', 'Midlands', 10000);
RESET MASTER;
CHECKSUM TABLE world.City;
CHECKSUM TABLE world.city;
# Insert test data
INSERT INTO test.test VALUES (NULL, 'Good record 1', CURRENT_TIMESTAMP());
INSERT INTO world.City VALUES (NULL, 'Wrong value 1', '000', 'Wrong', 0);
INSERT INTO world.City VALUES (NULL, 'Wrong value 2', '000', 'Wrong', 0) , (NULL, 'Wrong value 3', '000', 'Wrong', 0);
INSERT INTO world.city VALUES (NULL, 'Wrong value 1', '000', 'Wrong', 0);
INSERT INTO world.city VALUES (NULL, 'Wrong value 2', '000', 'Wrong', 0) , (NULL, 'Wrong value 3', '000', 'Wrong', 0);
INSERT INTO test.test VALUES (NULL, 'Good record 2', CURRENT_TIMESTAMP());
UPDATE world.City SET Population = 99999999 WHERE ID IN (1, 2, 3);
UPDATE world.city SET Population = 99999999 WHERE ID IN (1, 2, 3);
INSERT INTO test.test VALUES (NULL, 'Good record 3', CURRENT_TIMESTAMP());
DELETE FROM world.City WHERE ID BETWEEN 1 AND 2;
DELETE FROM world.city WHERE ID BETWEEN 1 AND 2;
INSERT INTO test.test VALUES (NULL, 'Good record 5', CURRENT_TIMESTAMP());
REPLACE INTO world.City VALUES (4074, 'Wrong value 4', '000', 'Wrong', 0);
REPLACE INTO world.City VALUES (4078, 'Wrong value 5', '000', 'Wrong', 0), (NULL, 'Wrong value 6', '000', 'Wrong', 0);
REPLACE INTO world.city VALUES (4074, 'Wrong value 4', '000', 'Wrong', 0);
REPLACE INTO world.city VALUES (4078, 'Wrong value 5', '000', 'Wrong', 0), (NULL, 'Wrong value 6', '000', 'Wrong', 0);
INSERT INTO test.test VALUES (NULL, 'Good record 6', CURRENT_TIMESTAMP());
INSERT INTO world.City
SELECT NULL, Name, CountryCode, District, Population FROM world.City WHERE ID BETWEEN 2 AND 10;
INSERT INTO world.city
SELECT NULL, Name, CountryCode, District, Population FROM world.city WHERE ID BETWEEN 2 AND 10;
INSERT INTO test.test VALUES (NULL, 'Good record 7', CURRENT_TIMESTAMP());
INSERT INTO test.test VALUES (NULL, 'Good record 8', CURRENT_TIMESTAMP());
DELETE FROM world.City;
DELETE FROM world.city;
INSERT INTO test.test VALUES (NULL, 'Good record 9', CURRENT_TIMESTAMP());
......@@ -321,18 +321,18 @@ FLUSH LOGS;
let $MYSQLD_DATADIR= `select @@datadir`;
--replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR
--exec $MYSQL_BINLOG --database=world --table=City -vv $MYSQLD_DATADIR/master-bin.000001 > $MYSQLTEST_VARDIR/tmp/mysqlbinlog_row_flashback_original_6.sql
--exec $MYSQL_BINLOG --database=world --table=City -B $MYSQLD_DATADIR/master-bin.000001 > $MYSQLTEST_VARDIR/tmp/mysqlbinlog_row_flashback_6.sql
--exec $MYSQL_BINLOG --database=world --table=city -vv $MYSQLD_DATADIR/master-bin.000001 > $MYSQLTEST_VARDIR/tmp/mysqlbinlog_row_flashback_original_6.sql
--exec $MYSQL_BINLOG --database=world --table=city -B $MYSQLD_DATADIR/master-bin.000001 > $MYSQLTEST_VARDIR/tmp/mysqlbinlog_row_flashback_6.sql
--exec $MYSQL -e "SET binlog_format= ROW; source $MYSQLTEST_VARDIR/tmp/mysqlbinlog_row_flashback_6.sql;"
SELECT * FROM world.City;
SELECT * FROM world.city;
SELECT * FROM test.test;
CHECKSUM TABLE world.City;
CHECKSUM TABLE world.city;
DROP TABLE test.test;
DROP TABLE world.City;
DROP TABLE world.city;
DROP DATABASE world;
## Clear
......
......@@ -56,14 +56,14 @@ Table Create Table
TableA CREATE TABLE `TableA` (
`a` int(11) DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1
PARTITION BY KEY (a)
(PARTITION parta ENGINE = InnoDB,
PARTITION partB ENGINE = InnoDB,
PARTITION Partc ENGINE = InnoDB,
PARTITION PartD ENGINE = InnoDB,
PARTITION partE ENGINE = InnoDB,
PARTITION Partf ENGINE = InnoDB,
PARTITION PartG ENGINE = InnoDB)
PARTITION BY KEY (`a`)
(PARTITION `parta` ENGINE = InnoDB,
PARTITION `partB` ENGINE = InnoDB,
PARTITION `Partc` ENGINE = InnoDB,
PARTITION `PartD` ENGINE = InnoDB,
PARTITION `partE` ENGINE = InnoDB,
PARTITION `Partf` ENGINE = InnoDB,
PARTITION `PartG` ENGINE = InnoDB)
ALTER TABLE TableA COALESCE PARTITION 4;
SELECT * FROM TableA;
a
......@@ -84,10 +84,10 @@ Table Create Table
TableA CREATE TABLE `TableA` (
`a` int(11) DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1
PARTITION BY KEY (a)
(PARTITION parta ENGINE = InnoDB,
PARTITION partB ENGINE = InnoDB,
PARTITION Partc ENGINE = InnoDB)
PARTITION BY KEY (`a`)
(PARTITION `parta` ENGINE = InnoDB,
PARTITION `partB` ENGINE = InnoDB,
PARTITION `Partc` ENGINE = InnoDB)
# Test of EXCHANGE PARTITION WITH TABLE
SELECT PARTITION_NAME, TABLE_ROWS FROM INFORMATION_SCHEMA.PARTITIONS WHERE TABLE_SCHEMA ='MySQL_Test_DB' AND TABLE_NAME = 'TableA';
PARTITION_NAME TABLE_ROWS
......@@ -112,10 +112,10 @@ Table Create Table
TableA CREATE TABLE `TableA` (
`a` int(11) DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1
PARTITION BY KEY (a)
(PARTITION parta ENGINE = InnoDB,
PARTITION partB ENGINE = InnoDB,
PARTITION Partc ENGINE = InnoDB)
PARTITION BY KEY (`a`)
(PARTITION `parta` ENGINE = InnoDB,
PARTITION `partB` ENGINE = InnoDB,
PARTITION `Partc` ENGINE = InnoDB)
SELECT * FROM TableB;
a
10
......@@ -156,10 +156,10 @@ Table Create Table
TableA CREATE TABLE `TableA` (
`a` int(11) DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1
PARTITION BY KEY (a)
(PARTITION parta ENGINE = InnoDB,
PARTITION partB ENGINE = InnoDB,
PARTITION Partc ENGINE = InnoDB)
PARTITION BY KEY (`a`)
(PARTITION `parta` ENGINE = InnoDB,
PARTITION `partB` ENGINE = InnoDB,
PARTITION `Partc` ENGINE = InnoDB)
# Test of REORGANIZE PARTITIONS
# Should not work on HASH/KEY
ALTER TABLE TableA REORGANIZE PARTITION parta,partB,Partc INTO
......@@ -192,10 +192,10 @@ Table Create Table
TableA CREATE TABLE `TableA` (
`a` int(11) DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1
PARTITION BY KEY (a)
(PARTITION partB COMMENT = 'Previusly named parta' ENGINE = InnoDB,
PARTITION parta COMMENT = 'Previusly named partB' ENGINE = InnoDB,
PARTITION Partc ENGINE = InnoDB)
PARTITION BY KEY (`a`)
(PARTITION `partB` COMMENT = 'Previusly named parta' ENGINE = InnoDB,
PARTITION `parta` COMMENT = 'Previusly named partB' ENGINE = InnoDB,
PARTITION `Partc` ENGINE = InnoDB)
# Test of RENAME TABLE
RENAME TABLE TableA to TableB;
SELECT * FROM TableB;
......@@ -264,10 +264,10 @@ Table Create Table
tablea CREATE TABLE `tablea` (
`a` int(11) DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1
PARTITION BY KEY (a)
(PARTITION partB COMMENT = 'Previusly named parta' ENGINE = InnoDB,
PARTITION parta COMMENT = 'Previusly named partB' ENGINE = InnoDB,
PARTITION Partc ENGINE = InnoDB)
PARTITION BY KEY (`a`)
(PARTITION `partB` COMMENT = 'Previusly named parta' ENGINE = InnoDB,
PARTITION `parta` COMMENT = 'Previusly named partB' ENGINE = InnoDB,
PARTITION `Partc` ENGINE = InnoDB)
# Test of REMOVE PARTITIONING
ALTER TABLE TableA REMOVE PARTITIONING;
SELECT * FROM TableA;
......@@ -355,14 +355,14 @@ Table Create Table
TableA CREATE TABLE `TableA` (
`a` int(11) DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1
PARTITION BY HASH (a)
(PARTITION parta ENGINE = InnoDB,
PARTITION partB ENGINE = InnoDB,
PARTITION Partc ENGINE = InnoDB,
PARTITION PartD ENGINE = InnoDB,
PARTITION partE ENGINE = InnoDB,
PARTITION Partf ENGINE = InnoDB,
PARTITION PartG ENGINE = InnoDB)
PARTITION BY HASH (`a`)
(PARTITION `parta` ENGINE = InnoDB,
PARTITION `partB` ENGINE = InnoDB,
PARTITION `Partc` ENGINE = InnoDB,
PARTITION `PartD` ENGINE = InnoDB,
PARTITION `partE` ENGINE = InnoDB,
PARTITION `Partf` ENGINE = InnoDB,
PARTITION `PartG` ENGINE = InnoDB)
ALTER TABLE TableA COALESCE PARTITION 4;
SELECT * FROM TableA;
a
......@@ -383,10 +383,10 @@ Table Create Table
TableA CREATE TABLE `TableA` (
`a` int(11) DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1
PARTITION BY HASH (a)
(PARTITION parta ENGINE = InnoDB,
PARTITION partB ENGINE = InnoDB,
PARTITION Partc ENGINE = InnoDB)
PARTITION BY HASH (`a`)
(PARTITION `parta` ENGINE = InnoDB,
PARTITION `partB` ENGINE = InnoDB,
PARTITION `Partc` ENGINE = InnoDB)
# Test of REORGANIZE PARTITIONS
# Should not work on HASH/KEY
ALTER TABLE TableA REORGANIZE PARTITION parta,partB,Partc INTO
......@@ -419,10 +419,10 @@ Table Create Table
TableA CREATE TABLE `TableA` (
`a` int(11) DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1
PARTITION BY HASH (a)
(PARTITION partB COMMENT = 'Previusly named parta' ENGINE = InnoDB,
PARTITION parta COMMENT = 'Previusly named partB' ENGINE = InnoDB,
PARTITION Partc ENGINE = InnoDB)
PARTITION BY HASH (`a`)
(PARTITION `partB` COMMENT = 'Previusly named parta' ENGINE = InnoDB,
PARTITION `parta` COMMENT = 'Previusly named partB' ENGINE = InnoDB,
PARTITION `Partc` ENGINE = InnoDB)
# Test of RENAME TABLE
RENAME TABLE TableA to TableB;
SELECT * FROM TableB;
......@@ -491,10 +491,10 @@ Table Create Table
tablea CREATE TABLE `tablea` (
`a` int(11) DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1
PARTITION BY HASH (a)
(PARTITION partB COMMENT = 'Previusly named parta' ENGINE = InnoDB,
PARTITION parta COMMENT = 'Previusly named partB' ENGINE = InnoDB,
PARTITION Partc ENGINE = InnoDB)
PARTITION BY HASH (`a`)
(PARTITION `partB` COMMENT = 'Previusly named parta' ENGINE = InnoDB,
PARTITION `parta` COMMENT = 'Previusly named partB' ENGINE = InnoDB,
PARTITION `Partc` ENGINE = InnoDB)
# Test of REMOVE PARTITIONING
ALTER TABLE TableA REMOVE PARTITIONING;
SELECT * FROM TableA;
......@@ -571,14 +571,14 @@ Table Create Table
TableA CREATE TABLE `TableA` (
`a` int(11) DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1
PARTITION BY RANGE (a)
(PARTITION parta VALUES LESS THAN (4) ENGINE = InnoDB,
PARTITION partB VALUES LESS THAN (7) ENGINE = InnoDB,
PARTITION Partc VALUES LESS THAN (10) ENGINE = InnoDB,
PARTITION PartD VALUES LESS THAN (13) ENGINE = InnoDB,
PARTITION partE VALUES LESS THAN (16) ENGINE = InnoDB,
PARTITION Partf VALUES LESS THAN (19) ENGINE = InnoDB,
PARTITION PartG VALUES LESS THAN (22) ENGINE = InnoDB)
PARTITION BY RANGE (`a`)
(PARTITION `parta` VALUES LESS THAN (4) ENGINE = InnoDB,
PARTITION `partB` VALUES LESS THAN (7) ENGINE = InnoDB,
PARTITION `Partc` VALUES LESS THAN (10) ENGINE = InnoDB,
PARTITION `PartD` VALUES LESS THAN (13) ENGINE = InnoDB,
PARTITION `partE` VALUES LESS THAN (16) ENGINE = InnoDB,
PARTITION `Partf` VALUES LESS THAN (19) ENGINE = InnoDB,
PARTITION `PartG` VALUES LESS THAN (22) ENGINE = InnoDB)
ALTER TABLE TableA DROP PARTITION partE, PartG;
ALTER TABLE TableA DROP PARTITION Partf;
ALTER TABLE TableA ADD PARTITION
......@@ -602,12 +602,12 @@ Table Create Table
TableA CREATE TABLE `TableA` (
`a` int(11) DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1
PARTITION BY RANGE (a)
(PARTITION parta VALUES LESS THAN (4) ENGINE = InnoDB,
PARTITION partB VALUES LESS THAN (7) ENGINE = InnoDB,
PARTITION Partc VALUES LESS THAN (10) ENGINE = InnoDB,
PARTITION PartD VALUES LESS THAN (13) ENGINE = InnoDB,
PARTITION PartE VALUES LESS THAN MAXVALUE ENGINE = InnoDB)
PARTITION BY RANGE (`a`)
(PARTITION `parta` VALUES LESS THAN (4) ENGINE = InnoDB,
PARTITION `partB` VALUES LESS THAN (7) ENGINE = InnoDB,
PARTITION `Partc` VALUES LESS THAN (10) ENGINE = InnoDB,
PARTITION `PartD` VALUES LESS THAN (13) ENGINE = InnoDB,
PARTITION `PartE` VALUES LESS THAN MAXVALUE ENGINE = InnoDB)
# Test of REORGANIZE PARTITIONS
# Error since it must reorganize a consecutive range
ALTER TABLE TableA REORGANIZE PARTITION parta,Partc INTO
......@@ -640,11 +640,11 @@ Table Create Table
TableA CREATE TABLE `TableA` (
`a` int(11) DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1
PARTITION BY RANGE (a)
(PARTITION parta VALUES LESS THAN (4) ENGINE = InnoDB,
PARTITION partD VALUES LESS THAN (8) COMMENT = 'Previously partB and partly Partc' ENGINE = InnoDB,
PARTITION partB VALUES LESS THAN (11) COMMENT = 'Previously partly Partc and partly PartD' ENGINE = InnoDB,
PARTITION partC VALUES LESS THAN MAXVALUE COMMENT = 'Previously partly PartD' ENGINE = InnoDB)
PARTITION BY RANGE (`a`)
(PARTITION `parta` VALUES LESS THAN (4) ENGINE = InnoDB,
PARTITION `partD` VALUES LESS THAN (8) COMMENT = 'Previously partB and partly Partc' ENGINE = InnoDB,
PARTITION `partB` VALUES LESS THAN (11) COMMENT = 'Previously partly Partc and partly PartD' ENGINE = InnoDB,
PARTITION `partC` VALUES LESS THAN MAXVALUE COMMENT = 'Previously partly PartD' ENGINE = InnoDB)
# Test of RENAME TABLE
RENAME TABLE TableA to TableB;
SELECT * FROM TableB;
......@@ -713,11 +713,11 @@ Table Create Table
tablea CREATE TABLE `tablea` (
`a` int(11) DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1
PARTITION BY RANGE (a)
(PARTITION parta VALUES LESS THAN (4) ENGINE = InnoDB,
PARTITION partD VALUES LESS THAN (8) COMMENT = 'Previously partB and partly Partc' ENGINE = InnoDB,
PARTITION partB VALUES LESS THAN (11) COMMENT = 'Previously partly Partc and partly PartD' ENGINE = InnoDB,
PARTITION partC VALUES LESS THAN MAXVALUE COMMENT = 'Previously partly PartD' ENGINE = InnoDB)
PARTITION BY RANGE (`a`)
(PARTITION `parta` VALUES LESS THAN (4) ENGINE = InnoDB,
PARTITION `partD` VALUES LESS THAN (8) COMMENT = 'Previously partB and partly Partc' ENGINE = InnoDB,
PARTITION `partB` VALUES LESS THAN (11) COMMENT = 'Previously partly Partc and partly PartD' ENGINE = InnoDB,
PARTITION `partC` VALUES LESS THAN MAXVALUE COMMENT = 'Previously partly PartD' ENGINE = InnoDB)
# Test of REMOVE PARTITIONING
ALTER TABLE TableA REMOVE PARTITIONING;
SELECT * FROM TableA;
......@@ -794,14 +794,14 @@ Table Create Table
TableA CREATE TABLE `TableA` (
`a` int(11) DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1
PARTITION BY LIST (a)
(PARTITION parta VALUES IN (1,8,9) ENGINE = InnoDB,
PARTITION partB VALUES IN (2,10,11) ENGINE = InnoDB,
PARTITION Partc VALUES IN (3,4,7) ENGINE = InnoDB,
PARTITION PartD VALUES IN (5,6,12) ENGINE = InnoDB,
PARTITION partE VALUES IN (16) ENGINE = InnoDB,
PARTITION Partf VALUES IN (19) ENGINE = InnoDB,
PARTITION PartG VALUES IN (22) ENGINE = InnoDB)
PARTITION BY LIST (`a`)
(PARTITION `parta` VALUES IN (1,8,9) ENGINE = InnoDB,
PARTITION `partB` VALUES IN (2,10,11) ENGINE = InnoDB,
PARTITION `Partc` VALUES IN (3,4,7) ENGINE = InnoDB,
PARTITION `PartD` VALUES IN (5,6,12) ENGINE = InnoDB,
PARTITION `partE` VALUES IN (16) ENGINE = InnoDB,
PARTITION `Partf` VALUES IN (19) ENGINE = InnoDB,
PARTITION `PartG` VALUES IN (22) ENGINE = InnoDB)
ALTER TABLE TableA DROP PARTITION partE, PartG;
ALTER TABLE TableA DROP PARTITION Partf;
ALTER TABLE TableA ADD PARTITION
......@@ -825,12 +825,12 @@ Table Create Table
TableA CREATE TABLE `TableA` (
`a` int(11) DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1
PARTITION BY LIST (a)
(PARTITION parta VALUES IN (1,8,9) ENGINE = InnoDB,
PARTITION partB VALUES IN (2,10,11) ENGINE = InnoDB,
PARTITION Partc VALUES IN (3,4,7) ENGINE = InnoDB,
PARTITION PartD VALUES IN (5,6,12) ENGINE = InnoDB,
PARTITION PartE VALUES IN (13) ENGINE = InnoDB)
PARTITION BY LIST (`a`)
(PARTITION `parta` VALUES IN (1,8,9) ENGINE = InnoDB,
PARTITION `partB` VALUES IN (2,10,11) ENGINE = InnoDB,
PARTITION `Partc` VALUES IN (3,4,7) ENGINE = InnoDB,
PARTITION `PartD` VALUES IN (5,6,12) ENGINE = InnoDB,
PARTITION `PartE` VALUES IN (13) ENGINE = InnoDB)
# Test of REORGANIZE PARTITIONS
ALTER TABLE TableA REORGANIZE PARTITION parta,Partc INTO
(PARTITION Partc VALUES IN (1,7)
......@@ -863,12 +863,12 @@ Table Create Table
TableA CREATE TABLE `TableA` (
`a` int(11) DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1
PARTITION BY LIST (a)
(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 partB VALUES IN (4,8) COMMENT = 'Mix 3 of old parta and Partc' ENGINE = InnoDB,
PARTITION PartD VALUES IN (5,6,12) ENGINE = InnoDB,
PARTITION PartE VALUES IN (13) ENGINE = InnoDB)
PARTITION BY LIST (`a`)
(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 `partB` VALUES IN (4,8) COMMENT = 'Mix 3 of old parta and Partc' ENGINE = InnoDB,
PARTITION `PartD` VALUES IN (5,6,12) ENGINE = InnoDB,
PARTITION `PartE` VALUES IN (13) ENGINE = InnoDB)
# Test of RENAME TABLE
RENAME TABLE TableA to TableB;
SELECT * FROM TableB;
......@@ -928,12 +928,12 @@ Table Create Table
tablea CREATE TABLE `tablea` (
`a` int(11) DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1
PARTITION BY LIST (a)
(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 partB VALUES IN (4,8) COMMENT = 'Mix 3 of old parta and Partc' ENGINE = InnoDB,
PARTITION PartD VALUES IN (5,6,12) ENGINE = InnoDB,
PARTITION PartE VALUES IN (13) ENGINE = InnoDB)
PARTITION BY LIST (`a`)
(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 `partB` VALUES IN (4,8) COMMENT = 'Mix 3 of old parta and Partc' ENGINE = InnoDB,
PARTITION `PartD` VALUES IN (5,6,12) ENGINE = InnoDB,
PARTITION `PartE` VALUES IN (13) ENGINE = InnoDB)
# Test of REMOVE PARTITIONING
ALTER TABLE TableA REMOVE PARTITIONING;
SELECT * FROM TableA;
......@@ -971,10 +971,10 @@ t1 CREATE TABLE `t1` (
`b` varchar(255) DEFAULT NULL,
PRIMARY KEY (`a`)
) ENGINE=InnoDB AUTO_INCREMENT=2002 DEFAULT CHARSET=latin1
PARTITION BY RANGE (a)
(PARTITION LT1000 VALUES LESS THAN (1000) ENGINE = InnoDB,
PARTITION LT2000 VALUES LESS THAN (2000) ENGINE = InnoDB,
PARTITION MAX VALUES LESS THAN MAXVALUE ENGINE = InnoDB)
PARTITION BY RANGE (`a`)
(PARTITION `LT1000` VALUES LESS THAN (1000) ENGINE = InnoDB,
PARTITION `LT2000` VALUES LESS THAN (2000) ENGINE = InnoDB,
PARTITION `MAX` VALUES LESS THAN MAXVALUE ENGINE = InnoDB)
SELECT * FROM t1 ORDER BY a;
a b
1 First
......
......@@ -56,14 +56,14 @@ Table Create Table
TableA CREATE TABLE `TableA` (
`a` int(11) DEFAULT NULL
) ENGINE=MEMORY DEFAULT CHARSET=latin1
PARTITION BY KEY (a)
(PARTITION parta ENGINE = MEMORY,
PARTITION partB ENGINE = MEMORY,
PARTITION Partc ENGINE = MEMORY,
PARTITION PartD ENGINE = MEMORY,
PARTITION partE ENGINE = MEMORY,
PARTITION Partf ENGINE = MEMORY,
PARTITION PartG ENGINE = MEMORY)
PARTITION BY KEY (`a`)
(PARTITION `parta` ENGINE = MEMORY,
PARTITION `partB` ENGINE = MEMORY,
PARTITION `Partc` ENGINE = MEMORY,
PARTITION `PartD` ENGINE = MEMORY,
PARTITION `partE` ENGINE = MEMORY,
PARTITION `Partf` ENGINE = MEMORY,
PARTITION `PartG` ENGINE = MEMORY)
ALTER TABLE TableA COALESCE PARTITION 4;
SELECT * FROM TableA;
a
......@@ -84,10 +84,10 @@ Table Create Table
TableA CREATE TABLE `TableA` (
`a` int(11) DEFAULT NULL
) ENGINE=MEMORY DEFAULT CHARSET=latin1
PARTITION BY KEY (a)
(PARTITION parta ENGINE = MEMORY,
PARTITION partB ENGINE = MEMORY,
PARTITION Partc ENGINE = MEMORY)
PARTITION BY KEY (`a`)
(PARTITION `parta` ENGINE = MEMORY,
PARTITION `partB` ENGINE = MEMORY,
PARTITION `Partc` ENGINE = MEMORY)
# Test of EXCHANGE PARTITION WITH TABLE
SELECT PARTITION_NAME, TABLE_ROWS FROM INFORMATION_SCHEMA.PARTITIONS WHERE TABLE_SCHEMA ='MySQL_Test_DB' AND TABLE_NAME = 'TableA';
PARTITION_NAME TABLE_ROWS
......@@ -112,10 +112,10 @@ Table Create Table
TableA CREATE TABLE `TableA` (
`a` int(11) DEFAULT NULL
) ENGINE=MEMORY DEFAULT CHARSET=latin1
PARTITION BY KEY (a)
(PARTITION parta ENGINE = MEMORY,
PARTITION partB ENGINE = MEMORY,
PARTITION Partc ENGINE = MEMORY)
PARTITION BY KEY (`a`)
(PARTITION `parta` ENGINE = MEMORY,
PARTITION `partB` ENGINE = MEMORY,
PARTITION `Partc` ENGINE = MEMORY)
SELECT * FROM TableB;
a
10
......@@ -156,10 +156,10 @@ Table Create Table
TableA CREATE TABLE `TableA` (
`a` int(11) DEFAULT NULL
) ENGINE=MEMORY DEFAULT CHARSET=latin1
PARTITION BY KEY (a)
(PARTITION parta ENGINE = MEMORY,
PARTITION partB ENGINE = MEMORY,
PARTITION Partc ENGINE = MEMORY)
PARTITION BY KEY (`a`)
(PARTITION `parta` ENGINE = MEMORY,
PARTITION `partB` ENGINE = MEMORY,
PARTITION `Partc` ENGINE = MEMORY)
# Test of REORGANIZE PARTITIONS
# Should not work on HASH/KEY
ALTER TABLE TableA REORGANIZE PARTITION parta,partB,Partc INTO
......@@ -192,10 +192,10 @@ Table Create Table
TableA CREATE TABLE `TableA` (
`a` int(11) DEFAULT NULL
) ENGINE=MEMORY DEFAULT CHARSET=latin1
PARTITION BY KEY (a)
(PARTITION partB COMMENT = 'Previusly named parta' ENGINE = MEMORY,
PARTITION parta COMMENT = 'Previusly named partB' ENGINE = MEMORY,
PARTITION Partc ENGINE = MEMORY)
PARTITION BY KEY (`a`)
(PARTITION `partB` COMMENT = 'Previusly named parta' ENGINE = MEMORY,
PARTITION `parta` COMMENT = 'Previusly named partB' ENGINE = MEMORY,
PARTITION `Partc` ENGINE = MEMORY)
# Test of RENAME TABLE
RENAME TABLE TableA to TableB;
SELECT * FROM TableB;
......@@ -264,10 +264,10 @@ Table Create Table
tablea CREATE TABLE `tablea` (
`a` int(11) DEFAULT NULL
) ENGINE=MEMORY DEFAULT CHARSET=latin1
PARTITION BY KEY (a)
(PARTITION partB COMMENT = 'Previusly named parta' ENGINE = MEMORY,
PARTITION parta COMMENT = 'Previusly named partB' ENGINE = MEMORY,
PARTITION Partc ENGINE = MEMORY)
PARTITION BY KEY (`a`)
(PARTITION `partB` COMMENT = 'Previusly named parta' ENGINE = MEMORY,
PARTITION `parta` COMMENT = 'Previusly named partB' ENGINE = MEMORY,
PARTITION `Partc` ENGINE = MEMORY)
# Test of REMOVE PARTITIONING
ALTER TABLE TableA REMOVE PARTITIONING;
SELECT * FROM TableA;
......@@ -355,14 +355,14 @@ Table Create Table
TableA CREATE TABLE `TableA` (
`a` int(11) DEFAULT NULL
) ENGINE=MEMORY DEFAULT CHARSET=latin1
PARTITION BY HASH (a)
(PARTITION parta ENGINE = MEMORY,
PARTITION partB ENGINE = MEMORY,
PARTITION Partc ENGINE = MEMORY,
PARTITION PartD ENGINE = MEMORY,
PARTITION partE ENGINE = MEMORY,
PARTITION Partf ENGINE = MEMORY,
PARTITION PartG ENGINE = MEMORY)
PARTITION BY HASH (`a`)
(PARTITION `parta` ENGINE = MEMORY,
PARTITION `partB` ENGINE = MEMORY,
PARTITION `Partc` ENGINE = MEMORY,
PARTITION `PartD` ENGINE = MEMORY,
PARTITION `partE` ENGINE = MEMORY,
PARTITION `Partf` ENGINE = MEMORY,
PARTITION `PartG` ENGINE = MEMORY)
ALTER TABLE TableA COALESCE PARTITION 4;
SELECT * FROM TableA;
a
......@@ -383,10 +383,10 @@ Table Create Table
TableA CREATE TABLE `TableA` (
`a` int(11) DEFAULT NULL
) ENGINE=MEMORY DEFAULT CHARSET=latin1
PARTITION BY HASH (a)
(PARTITION parta ENGINE = MEMORY,
PARTITION partB ENGINE = MEMORY,
PARTITION Partc ENGINE = MEMORY)
PARTITION BY HASH (`a`)
(PARTITION `parta` ENGINE = MEMORY,
PARTITION `partB` ENGINE = MEMORY,
PARTITION `Partc` ENGINE = MEMORY)
# Test of REORGANIZE PARTITIONS
# Should not work on HASH/KEY
ALTER TABLE TableA REORGANIZE PARTITION parta,partB,Partc INTO
......@@ -419,10 +419,10 @@ Table Create Table
TableA CREATE TABLE `TableA` (
`a` int(11) DEFAULT NULL
) ENGINE=MEMORY DEFAULT CHARSET=latin1
PARTITION BY HASH (a)
(PARTITION partB COMMENT = 'Previusly named parta' ENGINE = MEMORY,
PARTITION parta COMMENT = 'Previusly named partB' ENGINE = MEMORY,
PARTITION Partc ENGINE = MEMORY)
PARTITION BY HASH (`a`)
(PARTITION `partB` COMMENT = 'Previusly named parta' ENGINE = MEMORY,
PARTITION `parta` COMMENT = 'Previusly named partB' ENGINE = MEMORY,
PARTITION `Partc` ENGINE = MEMORY)
# Test of RENAME TABLE
RENAME TABLE TableA to TableB;
SELECT * FROM TableB;
......@@ -491,10 +491,10 @@ Table Create Table
tablea CREATE TABLE `tablea` (
`a` int(11) DEFAULT NULL
) ENGINE=MEMORY DEFAULT CHARSET=latin1
PARTITION BY HASH (a)
(PARTITION partB COMMENT = 'Previusly named parta' ENGINE = MEMORY,
PARTITION parta COMMENT = 'Previusly named partB' ENGINE = MEMORY,
PARTITION Partc ENGINE = MEMORY)
PARTITION BY HASH (`a`)
(PARTITION `partB` COMMENT = 'Previusly named parta' ENGINE = MEMORY,
PARTITION `parta` COMMENT = 'Previusly named partB' ENGINE = MEMORY,
PARTITION `Partc` ENGINE = MEMORY)
# Test of REMOVE PARTITIONING
ALTER TABLE TableA REMOVE PARTITIONING;
SELECT * FROM TableA;
......@@ -571,14 +571,14 @@ Table Create Table
TableA CREATE TABLE `TableA` (
`a` int(11) DEFAULT NULL
) ENGINE=MEMORY DEFAULT CHARSET=latin1
PARTITION BY RANGE (a)
(PARTITION parta VALUES LESS THAN (4) ENGINE = MEMORY,
PARTITION partB VALUES LESS THAN (7) ENGINE = MEMORY,
PARTITION Partc VALUES LESS THAN (10) ENGINE = MEMORY,
PARTITION PartD VALUES LESS THAN (13) ENGINE = MEMORY,
PARTITION partE VALUES LESS THAN (16) ENGINE = MEMORY,
PARTITION Partf VALUES LESS THAN (19) ENGINE = MEMORY,
PARTITION PartG VALUES LESS THAN (22) ENGINE = MEMORY)
PARTITION BY RANGE (`a`)
(PARTITION `parta` VALUES LESS THAN (4) ENGINE = MEMORY,
PARTITION `partB` VALUES LESS THAN (7) ENGINE = MEMORY,
PARTITION `Partc` VALUES LESS THAN (10) ENGINE = MEMORY,
PARTITION `PartD` VALUES LESS THAN (13) ENGINE = MEMORY,
PARTITION `partE` VALUES LESS THAN (16) ENGINE = MEMORY,
PARTITION `Partf` VALUES LESS THAN (19) ENGINE = MEMORY,
PARTITION `PartG` VALUES LESS THAN (22) ENGINE = MEMORY)
ALTER TABLE TableA DROP PARTITION partE, PartG;
ALTER TABLE TableA DROP PARTITION Partf;
ALTER TABLE TableA ADD PARTITION
......@@ -602,12 +602,12 @@ Table Create Table
TableA CREATE TABLE `TableA` (
`a` int(11) DEFAULT NULL
) ENGINE=MEMORY DEFAULT CHARSET=latin1
PARTITION BY RANGE (a)
(PARTITION parta VALUES LESS THAN (4) ENGINE = MEMORY,
PARTITION partB VALUES LESS THAN (7) ENGINE = MEMORY,
PARTITION Partc VALUES LESS THAN (10) ENGINE = MEMORY,
PARTITION PartD VALUES LESS THAN (13) ENGINE = MEMORY,
PARTITION PartE VALUES LESS THAN MAXVALUE ENGINE = MEMORY)
PARTITION BY RANGE (`a`)
(PARTITION `parta` VALUES LESS THAN (4) ENGINE = MEMORY,
PARTITION `partB` VALUES LESS THAN (7) ENGINE = MEMORY,
PARTITION `Partc` VALUES LESS THAN (10) ENGINE = MEMORY,
PARTITION `PartD` VALUES LESS THAN (13) ENGINE = MEMORY,
PARTITION `PartE` VALUES LESS THAN MAXVALUE ENGINE = MEMORY)
# Test of REORGANIZE PARTITIONS
# Error since it must reorganize a consecutive range
ALTER TABLE TableA REORGANIZE PARTITION parta,Partc INTO
......@@ -640,11 +640,11 @@ Table Create Table
TableA CREATE TABLE `TableA` (
`a` int(11) DEFAULT NULL
) ENGINE=MEMORY DEFAULT CHARSET=latin1
PARTITION BY RANGE (a)
(PARTITION parta VALUES LESS THAN (4) ENGINE = MEMORY,
PARTITION partD VALUES LESS THAN (8) COMMENT = 'Previously partB and partly Partc' ENGINE = MEMORY,
PARTITION partB VALUES LESS THAN (11) COMMENT = 'Previously partly Partc and partly PartD' ENGINE = MEMORY,
PARTITION partC VALUES LESS THAN MAXVALUE COMMENT = 'Previously partly PartD' ENGINE = MEMORY)
PARTITION BY RANGE (`a`)
(PARTITION `parta` VALUES LESS THAN (4) ENGINE = MEMORY,
PARTITION `partD` VALUES LESS THAN (8) COMMENT = 'Previously partB and partly Partc' ENGINE = MEMORY,
PARTITION `partB` VALUES LESS THAN (11) COMMENT = 'Previously partly Partc and partly PartD' ENGINE = MEMORY,
PARTITION `partC` VALUES LESS THAN MAXVALUE COMMENT = 'Previously partly PartD' ENGINE = MEMORY)
# Test of RENAME TABLE
RENAME TABLE TableA to TableB;
SELECT * FROM TableB;
......@@ -713,11 +713,11 @@ Table Create Table
tablea CREATE TABLE `tablea` (
`a` int(11) DEFAULT NULL
) ENGINE=MEMORY DEFAULT CHARSET=latin1
PARTITION BY RANGE (a)
(PARTITION parta VALUES LESS THAN (4) ENGINE = MEMORY,
PARTITION partD VALUES LESS THAN (8) COMMENT = 'Previously partB and partly Partc' ENGINE = MEMORY,
PARTITION partB VALUES LESS THAN (11) COMMENT = 'Previously partly Partc and partly PartD' ENGINE = MEMORY,
PARTITION partC VALUES LESS THAN MAXVALUE COMMENT = 'Previously partly PartD' ENGINE = MEMORY)
PARTITION BY RANGE (`a`)
(PARTITION `parta` VALUES LESS THAN (4) ENGINE = MEMORY,
PARTITION `partD` VALUES LESS THAN (8) COMMENT = 'Previously partB and partly Partc' ENGINE = MEMORY,
PARTITION `partB` VALUES LESS THAN (11) COMMENT = 'Previously partly Partc and partly PartD' ENGINE = MEMORY,
PARTITION `partC` VALUES LESS THAN MAXVALUE COMMENT = 'Previously partly PartD' ENGINE = MEMORY)
# Test of REMOVE PARTITIONING
ALTER TABLE TableA REMOVE PARTITIONING;
SELECT * FROM TableA;
......@@ -794,14 +794,14 @@ Table Create Table
TableA CREATE TABLE `TableA` (
`a` int(11) DEFAULT NULL
) ENGINE=MEMORY DEFAULT CHARSET=latin1
PARTITION BY LIST (a)
(PARTITION parta VALUES IN (1,8,9) ENGINE = MEMORY,
PARTITION partB VALUES IN (2,10,11) ENGINE = MEMORY,
PARTITION Partc VALUES IN (3,4,7) ENGINE = MEMORY,
PARTITION PartD VALUES IN (5,6,12) ENGINE = MEMORY,
PARTITION partE VALUES IN (16) ENGINE = MEMORY,
PARTITION Partf VALUES IN (19) ENGINE = MEMORY,
PARTITION PartG VALUES IN (22) ENGINE = MEMORY)
PARTITION BY LIST (`a`)
(PARTITION `parta` VALUES IN (1,8,9) ENGINE = MEMORY,
PARTITION `partB` VALUES IN (2,10,11) ENGINE = MEMORY,
PARTITION `Partc` VALUES IN (3,4,7) ENGINE = MEMORY,
PARTITION `PartD` VALUES IN (5,6,12) ENGINE = MEMORY,
PARTITION `partE` VALUES IN (16) ENGINE = MEMORY,
PARTITION `Partf` VALUES IN (19) ENGINE = MEMORY,
PARTITION `PartG` VALUES IN (22) ENGINE = MEMORY)
ALTER TABLE TableA DROP PARTITION partE, PartG;
ALTER TABLE TableA DROP PARTITION Partf;
ALTER TABLE TableA ADD PARTITION
......@@ -825,12 +825,12 @@ Table Create Table
TableA CREATE TABLE `TableA` (
`a` int(11) DEFAULT NULL
) ENGINE=MEMORY DEFAULT CHARSET=latin1
PARTITION BY LIST (a)
(PARTITION parta VALUES IN (1,8,9) ENGINE = MEMORY,
PARTITION partB VALUES IN (2,10,11) ENGINE = MEMORY,
PARTITION Partc VALUES IN (3,4,7) ENGINE = MEMORY,
PARTITION PartD VALUES IN (5,6,12) ENGINE = MEMORY,
PARTITION PartE VALUES IN (13) ENGINE = MEMORY)
PARTITION BY LIST (`a`)
(PARTITION `parta` VALUES IN (1,8,9) ENGINE = MEMORY,
PARTITION `partB` VALUES IN (2,10,11) ENGINE = MEMORY,
PARTITION `Partc` VALUES IN (3,4,7) ENGINE = MEMORY,
PARTITION `PartD` VALUES IN (5,6,12) ENGINE = MEMORY,
PARTITION `PartE` VALUES IN (13) ENGINE = MEMORY)
# Test of REORGANIZE PARTITIONS
ALTER TABLE TableA REORGANIZE PARTITION parta,Partc INTO
(PARTITION Partc VALUES IN (1,7)
......@@ -863,12 +863,12 @@ Table Create Table
TableA CREATE TABLE `TableA` (
`a` int(11) DEFAULT NULL
) ENGINE=MEMORY DEFAULT CHARSET=latin1
PARTITION BY LIST (a)
(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 partB VALUES IN (4,8) COMMENT = 'Mix 3 of old parta and Partc' ENGINE = MEMORY,
PARTITION PartD VALUES IN (5,6,12) ENGINE = MEMORY,
PARTITION PartE VALUES IN (13) ENGINE = MEMORY)
PARTITION BY LIST (`a`)
(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 `partB` VALUES IN (4,8) COMMENT = 'Mix 3 of old parta and Partc' ENGINE = MEMORY,
PARTITION `PartD` VALUES IN (5,6,12) ENGINE = MEMORY,
PARTITION `PartE` VALUES IN (13) ENGINE = MEMORY)
# Test of RENAME TABLE
RENAME TABLE TableA to TableB;
SELECT * FROM TableB;
......@@ -928,12 +928,12 @@ Table Create Table
tablea CREATE TABLE `tablea` (
`a` int(11) DEFAULT NULL
) ENGINE=MEMORY DEFAULT CHARSET=latin1
PARTITION BY LIST (a)
(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 partB VALUES IN (4,8) COMMENT = 'Mix 3 of old parta and Partc' ENGINE = MEMORY,
PARTITION PartD VALUES IN (5,6,12) ENGINE = MEMORY,
PARTITION PartE VALUES IN (13) ENGINE = MEMORY)
PARTITION BY LIST (`a`)
(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 `partB` VALUES IN (4,8) COMMENT = 'Mix 3 of old parta and Partc' ENGINE = MEMORY,
PARTITION `PartD` VALUES IN (5,6,12) ENGINE = MEMORY,
PARTITION `PartE` VALUES IN (13) ENGINE = MEMORY)
# Test of REMOVE PARTITIONING
ALTER TABLE TableA REMOVE PARTITIONING;
SELECT * FROM TableA;
......@@ -971,10 +971,10 @@ t1 CREATE TABLE `t1` (
`b` varchar(255) DEFAULT NULL,
PRIMARY KEY (`a`)
) ENGINE=MEMORY AUTO_INCREMENT=2002 DEFAULT CHARSET=latin1
PARTITION BY RANGE (a)
(PARTITION LT1000 VALUES LESS THAN (1000) ENGINE = MEMORY,
PARTITION LT2000 VALUES LESS THAN (2000) ENGINE = MEMORY,
PARTITION MAX VALUES LESS THAN MAXVALUE ENGINE = MEMORY)
PARTITION BY RANGE (`a`)
(PARTITION `LT1000` VALUES LESS THAN (1000) ENGINE = MEMORY,
PARTITION `LT2000` VALUES LESS THAN (2000) ENGINE = MEMORY,
PARTITION `MAX` VALUES LESS THAN MAXVALUE ENGINE = MEMORY)
SELECT * FROM t1 ORDER BY a;
a b
1 First
......
......@@ -56,14 +56,14 @@ Table Create Table
TableA CREATE TABLE `TableA` (
`a` int(11) DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
PARTITION BY KEY (a)
(PARTITION parta ENGINE = MyISAM,
PARTITION partB ENGINE = MyISAM,
PARTITION Partc ENGINE = MyISAM,
PARTITION PartD ENGINE = MyISAM,
PARTITION partE ENGINE = MyISAM,
PARTITION Partf ENGINE = MyISAM,
PARTITION PartG ENGINE = MyISAM)
PARTITION BY KEY (`a`)
(PARTITION `parta` ENGINE = MyISAM,
PARTITION `partB` ENGINE = MyISAM,
PARTITION `Partc` ENGINE = MyISAM,
PARTITION `PartD` ENGINE = MyISAM,
PARTITION `partE` ENGINE = MyISAM,
PARTITION `Partf` ENGINE = MyISAM,
PARTITION `PartG` ENGINE = MyISAM)
ALTER TABLE TableA COALESCE PARTITION 4;
SELECT * FROM TableA;
a
......@@ -84,10 +84,10 @@ Table Create Table
TableA CREATE TABLE `TableA` (
`a` int(11) DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
PARTITION BY KEY (a)
(PARTITION parta ENGINE = MyISAM,
PARTITION partB ENGINE = MyISAM,
PARTITION Partc ENGINE = MyISAM)
PARTITION BY KEY (`a`)
(PARTITION `parta` ENGINE = MyISAM,
PARTITION `partB` ENGINE = MyISAM,
PARTITION `Partc` ENGINE = MyISAM)
# Test of EXCHANGE PARTITION WITH TABLE
SELECT PARTITION_NAME, TABLE_ROWS FROM INFORMATION_SCHEMA.PARTITIONS WHERE TABLE_SCHEMA ='MySQL_Test_DB' AND TABLE_NAME = 'TableA';
PARTITION_NAME TABLE_ROWS
......@@ -112,10 +112,10 @@ Table Create Table
TableA CREATE TABLE `TableA` (
`a` int(11) DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
PARTITION BY KEY (a)
(PARTITION parta ENGINE = MyISAM,
PARTITION partB ENGINE = MyISAM,
PARTITION Partc ENGINE = MyISAM)
PARTITION BY KEY (`a`)
(PARTITION `parta` ENGINE = MyISAM,
PARTITION `partB` ENGINE = MyISAM,
PARTITION `Partc` ENGINE = MyISAM)
SELECT * FROM TableB;
a
10
......@@ -156,10 +156,10 @@ Table Create Table
TableA CREATE TABLE `TableA` (
`a` int(11) DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
PARTITION BY KEY (a)
(PARTITION parta ENGINE = MyISAM,
PARTITION partB ENGINE = MyISAM,
PARTITION Partc ENGINE = MyISAM)
PARTITION BY KEY (`a`)
(PARTITION `parta` ENGINE = MyISAM,
PARTITION `partB` ENGINE = MyISAM,
PARTITION `Partc` ENGINE = MyISAM)
# Test of REORGANIZE PARTITIONS
# Should not work on HASH/KEY
ALTER TABLE TableA REORGANIZE PARTITION parta,partB,Partc INTO
......@@ -192,10 +192,10 @@ Table Create Table
TableA CREATE TABLE `TableA` (
`a` int(11) DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
PARTITION BY KEY (a)
(PARTITION partB COMMENT = 'Previusly named parta' ENGINE = MyISAM,
PARTITION parta COMMENT = 'Previusly named partB' ENGINE = MyISAM,
PARTITION Partc ENGINE = MyISAM)
PARTITION BY KEY (`a`)
(PARTITION `partB` COMMENT = 'Previusly named parta' ENGINE = MyISAM,
PARTITION `parta` COMMENT = 'Previusly named partB' ENGINE = MyISAM,
PARTITION `Partc` ENGINE = MyISAM)
# Test of RENAME TABLE
RENAME TABLE TableA to TableB;
SELECT * FROM TableB;
......@@ -264,10 +264,10 @@ Table Create Table
tablea CREATE TABLE `tablea` (
`a` int(11) DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
PARTITION BY KEY (a)
(PARTITION partB COMMENT = 'Previusly named parta' ENGINE = MyISAM,
PARTITION parta COMMENT = 'Previusly named partB' ENGINE = MyISAM,
PARTITION Partc ENGINE = MyISAM)
PARTITION BY KEY (`a`)
(PARTITION `partB` COMMENT = 'Previusly named parta' ENGINE = MyISAM,
PARTITION `parta` COMMENT = 'Previusly named partB' ENGINE = MyISAM,
PARTITION `Partc` ENGINE = MyISAM)
# Test of REMOVE PARTITIONING
ALTER TABLE TableA REMOVE PARTITIONING;
SELECT * FROM TableA;
......@@ -355,14 +355,14 @@ Table Create Table
TableA CREATE TABLE `TableA` (
`a` int(11) DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
PARTITION BY HASH (a)
(PARTITION parta ENGINE = MyISAM,
PARTITION partB ENGINE = MyISAM,
PARTITION Partc ENGINE = MyISAM,
PARTITION PartD ENGINE = MyISAM,
PARTITION partE ENGINE = MyISAM,
PARTITION Partf ENGINE = MyISAM,
PARTITION PartG ENGINE = MyISAM)
PARTITION BY HASH (`a`)
(PARTITION `parta` ENGINE = MyISAM,
PARTITION `partB` ENGINE = MyISAM,
PARTITION `Partc` ENGINE = MyISAM,
PARTITION `PartD` ENGINE = MyISAM,
PARTITION `partE` ENGINE = MyISAM,
PARTITION `Partf` ENGINE = MyISAM,
PARTITION `PartG` ENGINE = MyISAM)
ALTER TABLE TableA COALESCE PARTITION 4;
SELECT * FROM TableA;
a
......@@ -383,10 +383,10 @@ Table Create Table
TableA CREATE TABLE `TableA` (
`a` int(11) DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
PARTITION BY HASH (a)
(PARTITION parta ENGINE = MyISAM,
PARTITION partB ENGINE = MyISAM,
PARTITION Partc ENGINE = MyISAM)
PARTITION BY HASH (`a`)
(PARTITION `parta` ENGINE = MyISAM,
PARTITION `partB` ENGINE = MyISAM,
PARTITION `Partc` ENGINE = MyISAM)
# Test of REORGANIZE PARTITIONS
# Should not work on HASH/KEY
ALTER TABLE TableA REORGANIZE PARTITION parta,partB,Partc INTO
......@@ -419,10 +419,10 @@ Table Create Table
TableA CREATE TABLE `TableA` (
`a` int(11) DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
PARTITION BY HASH (a)
(PARTITION partB COMMENT = 'Previusly named parta' ENGINE = MyISAM,
PARTITION parta COMMENT = 'Previusly named partB' ENGINE = MyISAM,
PARTITION Partc ENGINE = MyISAM)
PARTITION BY HASH (`a`)
(PARTITION `partB` COMMENT = 'Previusly named parta' ENGINE = MyISAM,
PARTITION `parta` COMMENT = 'Previusly named partB' ENGINE = MyISAM,
PARTITION `Partc` ENGINE = MyISAM)
# Test of RENAME TABLE
RENAME TABLE TableA to TableB;
SELECT * FROM TableB;
......@@ -491,10 +491,10 @@ Table Create Table
tablea CREATE TABLE `tablea` (
`a` int(11) DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
PARTITION BY HASH (a)
(PARTITION partB COMMENT = 'Previusly named parta' ENGINE = MyISAM,
PARTITION parta COMMENT = 'Previusly named partB' ENGINE = MyISAM,
PARTITION Partc ENGINE = MyISAM)
PARTITION BY HASH (`a`)
(PARTITION `partB` COMMENT = 'Previusly named parta' ENGINE = MyISAM,
PARTITION `parta` COMMENT = 'Previusly named partB' ENGINE = MyISAM,
PARTITION `Partc` ENGINE = MyISAM)
# Test of REMOVE PARTITIONING
ALTER TABLE TableA REMOVE PARTITIONING;
SELECT * FROM TableA;
......@@ -571,14 +571,14 @@ Table Create Table
TableA CREATE TABLE `TableA` (
`a` int(11) DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
PARTITION BY RANGE (a)
(PARTITION parta VALUES LESS THAN (4) ENGINE = MyISAM,
PARTITION partB VALUES LESS THAN (7) ENGINE = MyISAM,
PARTITION Partc VALUES LESS THAN (10) ENGINE = MyISAM,
PARTITION PartD VALUES LESS THAN (13) ENGINE = MyISAM,
PARTITION partE VALUES LESS THAN (16) ENGINE = MyISAM,
PARTITION Partf VALUES LESS THAN (19) ENGINE = MyISAM,
PARTITION PartG VALUES LESS THAN (22) ENGINE = MyISAM)
PARTITION BY RANGE (`a`)
(PARTITION `parta` VALUES LESS THAN (4) ENGINE = MyISAM,
PARTITION `partB` VALUES LESS THAN (7) ENGINE = MyISAM,
PARTITION `Partc` VALUES LESS THAN (10) ENGINE = MyISAM,
PARTITION `PartD` VALUES LESS THAN (13) ENGINE = MyISAM,
PARTITION `partE` VALUES LESS THAN (16) ENGINE = MyISAM,
PARTITION `Partf` VALUES LESS THAN (19) ENGINE = MyISAM,
PARTITION `PartG` VALUES LESS THAN (22) ENGINE = MyISAM)
ALTER TABLE TableA DROP PARTITION partE, PartG;
ALTER TABLE TableA DROP PARTITION Partf;
ALTER TABLE TableA ADD PARTITION
......@@ -602,12 +602,12 @@ Table Create Table
TableA CREATE TABLE `TableA` (
`a` int(11) DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
PARTITION BY RANGE (a)
(PARTITION parta VALUES LESS THAN (4) ENGINE = MyISAM,
PARTITION partB VALUES LESS THAN (7) ENGINE = MyISAM,
PARTITION Partc VALUES LESS THAN (10) ENGINE = MyISAM,
PARTITION PartD VALUES LESS THAN (13) ENGINE = MyISAM,
PARTITION PartE VALUES LESS THAN MAXVALUE ENGINE = MyISAM)
PARTITION BY RANGE (`a`)
(PARTITION `parta` VALUES LESS THAN (4) ENGINE = MyISAM,
PARTITION `partB` VALUES LESS THAN (7) ENGINE = MyISAM,
PARTITION `Partc` VALUES LESS THAN (10) ENGINE = MyISAM,
PARTITION `PartD` VALUES LESS THAN (13) ENGINE = MyISAM,
PARTITION `PartE` VALUES LESS THAN MAXVALUE ENGINE = MyISAM)
# Test of REORGANIZE PARTITIONS
# Error since it must reorganize a consecutive range
ALTER TABLE TableA REORGANIZE PARTITION parta,Partc INTO
......@@ -640,11 +640,11 @@ Table Create Table
TableA CREATE TABLE `TableA` (
`a` int(11) DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
PARTITION BY RANGE (a)
(PARTITION parta VALUES LESS THAN (4) ENGINE = MyISAM,
PARTITION partD VALUES LESS THAN (8) COMMENT = 'Previously partB and partly Partc' ENGINE = MyISAM,
PARTITION partB VALUES LESS THAN (11) COMMENT = 'Previously partly Partc and partly PartD' ENGINE = MyISAM,
PARTITION partC VALUES LESS THAN MAXVALUE COMMENT = 'Previously partly PartD' ENGINE = MyISAM)
PARTITION BY RANGE (`a`)
(PARTITION `parta` VALUES LESS THAN (4) ENGINE = MyISAM,
PARTITION `partD` VALUES LESS THAN (8) COMMENT = 'Previously partB and partly Partc' ENGINE = MyISAM,
PARTITION `partB` VALUES LESS THAN (11) COMMENT = 'Previously partly Partc and partly PartD' ENGINE = MyISAM,
PARTITION `partC` VALUES LESS THAN MAXVALUE COMMENT = 'Previously partly PartD' ENGINE = MyISAM)
# Test of RENAME TABLE
RENAME TABLE TableA to TableB;
SELECT * FROM TableB;
......@@ -713,11 +713,11 @@ Table Create Table
tablea CREATE TABLE `tablea` (
`a` int(11) DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
PARTITION BY RANGE (a)
(PARTITION parta VALUES LESS THAN (4) ENGINE = MyISAM,
PARTITION partD VALUES LESS THAN (8) COMMENT = 'Previously partB and partly Partc' ENGINE = MyISAM,
PARTITION partB VALUES LESS THAN (11) COMMENT = 'Previously partly Partc and partly PartD' ENGINE = MyISAM,
PARTITION partC VALUES LESS THAN MAXVALUE COMMENT = 'Previously partly PartD' ENGINE = MyISAM)
PARTITION BY RANGE (`a`)
(PARTITION `parta` VALUES LESS THAN (4) ENGINE = MyISAM,
PARTITION `partD` VALUES LESS THAN (8) COMMENT = 'Previously partB and partly Partc' ENGINE = MyISAM,
PARTITION `partB` VALUES LESS THAN (11) COMMENT = 'Previously partly Partc and partly PartD' ENGINE = MyISAM,
PARTITION `partC` VALUES LESS THAN MAXVALUE COMMENT = 'Previously partly PartD' ENGINE = MyISAM)
# Test of REMOVE PARTITIONING
ALTER TABLE TableA REMOVE PARTITIONING;
SELECT * FROM TableA;
......@@ -794,14 +794,14 @@ Table Create Table
TableA CREATE TABLE `TableA` (
`a` int(11) DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
PARTITION BY LIST (a)
(PARTITION parta VALUES IN (1,8,9) ENGINE = MyISAM,
PARTITION partB VALUES IN (2,10,11) ENGINE = MyISAM,
PARTITION Partc VALUES IN (3,4,7) ENGINE = MyISAM,
PARTITION PartD VALUES IN (5,6,12) ENGINE = MyISAM,
PARTITION partE VALUES IN (16) ENGINE = MyISAM,
PARTITION Partf VALUES IN (19) ENGINE = MyISAM,
PARTITION PartG VALUES IN (22) ENGINE = MyISAM)
PARTITION BY LIST (`a`)
(PARTITION `parta` VALUES IN (1,8,9) ENGINE = MyISAM,
PARTITION `partB` VALUES IN (2,10,11) ENGINE = MyISAM,
PARTITION `Partc` VALUES IN (3,4,7) ENGINE = MyISAM,
PARTITION `PartD` VALUES IN (5,6,12) ENGINE = MyISAM,
PARTITION `partE` VALUES IN (16) ENGINE = MyISAM,
PARTITION `Partf` VALUES IN (19) ENGINE = MyISAM,
PARTITION `PartG` VALUES IN (22) ENGINE = MyISAM)
ALTER TABLE TableA DROP PARTITION partE, PartG;
ALTER TABLE TableA DROP PARTITION Partf;
ALTER TABLE TableA ADD PARTITION
......@@ -825,12 +825,12 @@ Table Create Table
TableA CREATE TABLE `TableA` (
`a` int(11) DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
PARTITION BY LIST (a)
(PARTITION parta VALUES IN (1,8,9) ENGINE = MyISAM,
PARTITION partB VALUES IN (2,10,11) ENGINE = MyISAM,
PARTITION Partc VALUES IN (3,4,7) ENGINE = MyISAM,
PARTITION PartD VALUES IN (5,6,12) ENGINE = MyISAM,
PARTITION PartE VALUES IN (13) ENGINE = MyISAM)
PARTITION BY LIST (`a`)
(PARTITION `parta` VALUES IN (1,8,9) ENGINE = MyISAM,
PARTITION `partB` VALUES IN (2,10,11) ENGINE = MyISAM,
PARTITION `Partc` VALUES IN (3,4,7) ENGINE = MyISAM,
PARTITION `PartD` VALUES IN (5,6,12) ENGINE = MyISAM,
PARTITION `PartE` VALUES IN (13) ENGINE = MyISAM)
# Test of REORGANIZE PARTITIONS
ALTER TABLE TableA REORGANIZE PARTITION parta,Partc INTO
(PARTITION Partc VALUES IN (1,7)
......@@ -863,12 +863,12 @@ Table Create Table
TableA CREATE TABLE `TableA` (
`a` int(11) DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
PARTITION BY LIST (a)
(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 partB VALUES IN (4,8) COMMENT = 'Mix 3 of old parta and Partc' ENGINE = MyISAM,
PARTITION PartD VALUES IN (5,6,12) ENGINE = MyISAM,
PARTITION PartE VALUES IN (13) ENGINE = MyISAM)
PARTITION BY LIST (`a`)
(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 `partB` VALUES IN (4,8) COMMENT = 'Mix 3 of old parta and Partc' ENGINE = MyISAM,
PARTITION `PartD` VALUES IN (5,6,12) ENGINE = MyISAM,
PARTITION `PartE` VALUES IN (13) ENGINE = MyISAM)
# Test of RENAME TABLE
RENAME TABLE TableA to TableB;
SELECT * FROM TableB;
......@@ -928,12 +928,12 @@ Table Create Table
tablea CREATE TABLE `tablea` (
`a` int(11) DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
PARTITION BY LIST (a)
(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 partB VALUES IN (4,8) COMMENT = 'Mix 3 of old parta and Partc' ENGINE = MyISAM,
PARTITION PartD VALUES IN (5,6,12) ENGINE = MyISAM,
PARTITION PartE VALUES IN (13) ENGINE = MyISAM)
PARTITION BY LIST (`a`)
(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 `partB` VALUES IN (4,8) COMMENT = 'Mix 3 of old parta and Partc' ENGINE = MyISAM,
PARTITION `PartD` VALUES IN (5,6,12) ENGINE = MyISAM,
PARTITION `PartE` VALUES IN (13) ENGINE = MyISAM)
# Test of REMOVE PARTITIONING
ALTER TABLE TableA REMOVE PARTITIONING;
SELECT * FROM TableA;
......@@ -971,10 +971,10 @@ t1 CREATE TABLE `t1` (
`b` varchar(255) DEFAULT NULL,
PRIMARY KEY (`a`)
) ENGINE=MyISAM AUTO_INCREMENT=2002 DEFAULT CHARSET=latin1
PARTITION BY RANGE (a)
(PARTITION LT1000 VALUES LESS THAN (1000) ENGINE = MyISAM,
PARTITION LT2000 VALUES LESS THAN (2000) ENGINE = MyISAM,
PARTITION MAX VALUES LESS THAN MAXVALUE ENGINE = MyISAM)
PARTITION BY RANGE (`a`)
(PARTITION `LT1000` VALUES LESS THAN (1000) ENGINE = MyISAM,
PARTITION `LT2000` VALUES LESS THAN (2000) ENGINE = MyISAM,
PARTITION `MAX` VALUES LESS THAN MAXVALUE ENGINE = MyISAM)
SELECT * FROM t1 ORDER BY a;
a b
1 First
......
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