Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
M
MariaDB
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
nexedi
MariaDB
Commits
51256b60
Commit
51256b60
authored
Jul 08, 2017
by
Sergei Golubchik
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fixes for lower_case_table_names=2
parent
c9801135
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
344 additions
and
344 deletions
+344
-344
mysql-test/suite/binlog/r/flashback.result
mysql-test/suite/binlog/r/flashback.result
+19
-19
mysql-test/suite/binlog/t/flashback.test
mysql-test/suite/binlog/t/flashback.test
+19
-19
mysql-test/suite/parts/r/partition_mgm_lc2_innodb.result
mysql-test/suite/parts/r/partition_mgm_lc2_innodb.result
+102
-102
mysql-test/suite/parts/r/partition_mgm_lc2_memory.result
mysql-test/suite/parts/r/partition_mgm_lc2_memory.result
+102
-102
mysql-test/suite/parts/r/partition_mgm_lc2_myisam.result
mysql-test/suite/parts/r/partition_mgm_lc2_myisam.result
+102
-102
No files found.
mysql-test/suite/binlog/r/flashback.result
View file @
51256b60
...
@@ -613,7 +613,7 @@ DROP TABLE t1;
...
@@ -613,7 +613,7 @@ DROP TABLE t1;
# Test Case from MDEV-21067
# Test Case from MDEV-21067
#
#
CREATE DATABASE world;
CREATE DATABASE world;
CREATE TABLE world.
C
ity (
CREATE TABLE world.
c
ity (
ID INT AUTO_INCREMENT PRIMARY KEY,
ID INT AUTO_INCREMENT PRIMARY KEY,
Name VARCHAR(64),
Name VARCHAR(64),
CountryCode VARCHAR(64),
CountryCode VARCHAR(64),
...
@@ -625,35 +625,35 @@ ID INT AUTO_INCREMENT PRIMARY KEY,
...
@@ -625,35 +625,35 @@ ID INT AUTO_INCREMENT PRIMARY KEY,
REC VARCHAR(64),
REC VARCHAR(64),
ts TIMESTAMP
ts TIMESTAMP
) ENGINE=InnoDB;
) ENGINE=InnoDB;
INSERT INTO world.
C
ity VALUES (NULL, 'Davenport', 'USA', 'Iowa', 100);
INSERT INTO world.
c
ity VALUES (NULL, 'Davenport', 'USA', 'Iowa', 100);
INSERT INTO world.
C
ity VALUES (NULL, 'Boulder', 'USA', 'Colorado', 1000);
INSERT INTO world.
c
ity VALUES (NULL, 'Boulder', 'USA', 'Colorado', 1000);
INSERT INTO world.
C
ity VALUES (NULL, 'Gweru', 'ZWE', 'Midlands', 10000);
INSERT INTO world.
c
ity VALUES (NULL, 'Gweru', 'ZWE', 'Midlands', 10000);
RESET MASTER;
RESET MASTER;
CHECKSUM TABLE world.
C
ity;
CHECKSUM TABLE world.
c
ity;
Table Checksum
Table Checksum
world.
C
ity 563256876
world.
c
ity 563256876
INSERT INTO test.test VALUES (NULL, 'Good record 1', CURRENT_TIMESTAMP());
INSERT INTO test.test VALUES (NULL, 'Good record 1', CURRENT_TIMESTAMP());
INSERT INTO world.
C
ity VALUES (NULL, 'Wrong value 1', '000', 'Wrong', 0);
INSERT INTO world.
c
ity VALUES (NULL, 'Wrong value 1', '000', 'Wrong', 0);
INSERT INTO world.
C
ity VALUES (NULL, 'Wrong value 2', '000', 'Wrong', 0) , (NULL, 'Wrong value 3', '000', 'Wrong', 0);
INSERT INTO world.
c
ity 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());
INSERT INTO test.test VALUES (NULL, 'Good record 2', CURRENT_TIMESTAMP());
UPDATE world.
C
ity SET Population = 99999999 WHERE ID IN (1, 2, 3);
UPDATE world.
c
ity SET Population = 99999999 WHERE ID IN (1, 2, 3);
INSERT INTO test.test VALUES (NULL, 'Good record 3', CURRENT_TIMESTAMP());
INSERT INTO test.test VALUES (NULL, 'Good record 3', CURRENT_TIMESTAMP());
DELETE FROM world.
C
ity WHERE ID BETWEEN 1 AND 2;
DELETE FROM world.
c
ity WHERE ID BETWEEN 1 AND 2;
INSERT INTO test.test VALUES (NULL, 'Good record 5', CURRENT_TIMESTAMP());
INSERT INTO test.test VALUES (NULL, 'Good record 5', CURRENT_TIMESTAMP());
REPLACE INTO world.
C
ity VALUES (4074, 'Wrong value 4', '000', 'Wrong', 0);
REPLACE INTO world.
c
ity VALUES (4074, 'Wrong value 4', '000', 'Wrong', 0);
REPLACE INTO world.
C
ity VALUES (4078, 'Wrong value 5', '000', 'Wrong', 0), (NULL, 'Wrong value 6', '000', 'Wrong', 0);
REPLACE INTO world.
c
ity 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 test.test VALUES (NULL, 'Good record 6', CURRENT_TIMESTAMP());
INSERT INTO world.
C
ity
INSERT INTO world.
c
ity
SELECT NULL, Name, CountryCode, District, Population FROM world.
C
ity WHERE ID BETWEEN 2 AND 10;
SELECT NULL, Name, CountryCode, District, Population FROM world.
c
ity 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 7', CURRENT_TIMESTAMP());
INSERT INTO test.test VALUES (NULL, 'Good record 8', CURRENT_TIMESTAMP());
INSERT INTO test.test VALUES (NULL, 'Good record 8', CURRENT_TIMESTAMP());
DELETE FROM world.
C
ity;
DELETE FROM world.
c
ity;
INSERT INTO test.test VALUES (NULL, 'Good record 9', CURRENT_TIMESTAMP());
INSERT INTO test.test VALUES (NULL, 'Good record 9', CURRENT_TIMESTAMP());
FLUSH LOGS;
FLUSH LOGS;
# < CASE 6 >
# < CASE 6 >
# Flashback & Check the result
# Flashback & Check the result
#
#
SELECT * FROM world.
C
ity;
SELECT * FROM world.
c
ity;
ID Name CountryCode District Population
ID Name CountryCode District Population
1 Davenport USA Iowa 100
1 Davenport USA Iowa 100
2 Boulder USA Colorado 1000
2 Boulder USA Colorado 1000
...
@@ -668,11 +668,11 @@ ID REC ts
...
@@ -668,11 +668,11 @@ ID REC ts
6 Good record 7 2001-09-09 09:46:40
6 Good record 7 2001-09-09 09:46:40
7 Good record 8 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
8 Good record 9 2001-09-09 09:46:40
CHECKSUM TABLE world.
C
ity;
CHECKSUM TABLE world.
c
ity;
Table Checksum
Table Checksum
world.
C
ity 563256876
world.
c
ity 563256876
DROP TABLE test.test;
DROP TABLE test.test;
DROP TABLE world.
C
ity;
DROP TABLE world.
c
ity;
DROP DATABASE world;
DROP DATABASE world;
SET binlog_format=statement;
SET binlog_format=statement;
Warnings:
Warnings:
...
...
mysql-test/suite/binlog/t/flashback.test
View file @
51256b60
...
@@ -260,7 +260,7 @@ DROP TABLE t1;
...
@@ -260,7 +260,7 @@ DROP TABLE t1;
# Init Structure
# Init Structure
CREATE
DATABASE
world
;
CREATE
DATABASE
world
;
CREATE
TABLE
world
.
C
ity
(
CREATE
TABLE
world
.
c
ity
(
ID
INT
AUTO_INCREMENT
PRIMARY
KEY
,
ID
INT
AUTO_INCREMENT
PRIMARY
KEY
,
Name
VARCHAR
(
64
),
Name
VARCHAR
(
64
),
CountryCode
VARCHAR
(
64
),
CountryCode
VARCHAR
(
64
),
...
@@ -273,43 +273,43 @@ CREATE TABLE test.test (
...
@@ -273,43 +273,43 @@ CREATE TABLE test.test (
ts
TIMESTAMP
ts
TIMESTAMP
)
ENGINE
=
InnoDB
;
)
ENGINE
=
InnoDB
;
INSERT
INTO
world
.
C
ity
VALUES
(
NULL
,
'Davenport'
,
'USA'
,
'Iowa'
,
100
);
INSERT
INTO
world
.
c
ity
VALUES
(
NULL
,
'Davenport'
,
'USA'
,
'Iowa'
,
100
);
INSERT
INTO
world
.
C
ity
VALUES
(
NULL
,
'Boulder'
,
'USA'
,
'Colorado'
,
1000
);
INSERT
INTO
world
.
c
ity
VALUES
(
NULL
,
'Boulder'
,
'USA'
,
'Colorado'
,
1000
);
INSERT
INTO
world
.
C
ity
VALUES
(
NULL
,
'Gweru'
,
'ZWE'
,
'Midlands'
,
10000
);
INSERT
INTO
world
.
c
ity
VALUES
(
NULL
,
'Gweru'
,
'ZWE'
,
'Midlands'
,
10000
);
RESET
MASTER
;
RESET
MASTER
;
CHECKSUM
TABLE
world
.
C
ity
;
CHECKSUM
TABLE
world
.
c
ity
;
# Insert test data
# Insert test data
INSERT
INTO
test
.
test
VALUES
(
NULL
,
'Good record 1'
,
CURRENT_TIMESTAMP
());
INSERT
INTO
test
.
test
VALUES
(
NULL
,
'Good record 1'
,
CURRENT_TIMESTAMP
());
INSERT
INTO
world
.
C
ity
VALUES
(
NULL
,
'Wrong value 1'
,
'000'
,
'Wrong'
,
0
);
INSERT
INTO
world
.
c
ity
VALUES
(
NULL
,
'Wrong value 1'
,
'000'
,
'Wrong'
,
0
);
INSERT
INTO
world
.
C
ity
VALUES
(
NULL
,
'Wrong value 2'
,
'000'
,
'Wrong'
,
0
)
,
(
NULL
,
'Wrong value 3'
,
'000'
,
'Wrong'
,
0
);
INSERT
INTO
world
.
c
ity
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
());
INSERT
INTO
test
.
test
VALUES
(
NULL
,
'Good record 2'
,
CURRENT_TIMESTAMP
());
UPDATE
world
.
C
ity
SET
Population
=
99999999
WHERE
ID
IN
(
1
,
2
,
3
);
UPDATE
world
.
c
ity
SET
Population
=
99999999
WHERE
ID
IN
(
1
,
2
,
3
);
INSERT
INTO
test
.
test
VALUES
(
NULL
,
'Good record 3'
,
CURRENT_TIMESTAMP
());
INSERT
INTO
test
.
test
VALUES
(
NULL
,
'Good record 3'
,
CURRENT_TIMESTAMP
());
DELETE
FROM
world
.
C
ity
WHERE
ID
BETWEEN
1
AND
2
;
DELETE
FROM
world
.
c
ity
WHERE
ID
BETWEEN
1
AND
2
;
INSERT
INTO
test
.
test
VALUES
(
NULL
,
'Good record 5'
,
CURRENT_TIMESTAMP
());
INSERT
INTO
test
.
test
VALUES
(
NULL
,
'Good record 5'
,
CURRENT_TIMESTAMP
());
REPLACE
INTO
world
.
C
ity
VALUES
(
4074
,
'Wrong value 4'
,
'000'
,
'Wrong'
,
0
);
REPLACE
INTO
world
.
c
ity
VALUES
(
4074
,
'Wrong value 4'
,
'000'
,
'Wrong'
,
0
);
REPLACE
INTO
world
.
C
ity
VALUES
(
4078
,
'Wrong value 5'
,
'000'
,
'Wrong'
,
0
),
(
NULL
,
'Wrong value 6'
,
'000'
,
'Wrong'
,
0
);
REPLACE
INTO
world
.
c
ity
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
test
.
test
VALUES
(
NULL
,
'Good record 6'
,
CURRENT_TIMESTAMP
());
INSERT
INTO
world
.
C
ity
INSERT
INTO
world
.
c
ity
SELECT
NULL
,
Name
,
CountryCode
,
District
,
Population
FROM
world
.
C
ity
WHERE
ID
BETWEEN
2
AND
10
;
SELECT
NULL
,
Name
,
CountryCode
,
District
,
Population
FROM
world
.
c
ity
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 7'
,
CURRENT_TIMESTAMP
());
INSERT
INTO
test
.
test
VALUES
(
NULL
,
'Good record 8'
,
CURRENT_TIMESTAMP
());
INSERT
INTO
test
.
test
VALUES
(
NULL
,
'Good record 8'
,
CURRENT_TIMESTAMP
());
DELETE
FROM
world
.
C
ity
;
DELETE
FROM
world
.
c
ity
;
INSERT
INTO
test
.
test
VALUES
(
NULL
,
'Good record 9'
,
CURRENT_TIMESTAMP
());
INSERT
INTO
test
.
test
VALUES
(
NULL
,
'Good record 9'
,
CURRENT_TIMESTAMP
());
...
@@ -321,18 +321,18 @@ FLUSH LOGS;
...
@@ -321,18 +321,18 @@ FLUSH LOGS;
let
$MYSQLD_DATADIR
=
`select @@datadir`
;
let
$MYSQLD_DATADIR
=
`select @@datadir`
;
--
replace_result
$MYSQLTEST_VARDIR
MYSQLTEST_VARDIR
--
replace_result
$MYSQLTEST_VARDIR
MYSQLTEST_VARDIR
--
exec
$MYSQL_BINLOG
--
database
=
world
--
table
=
C
ity
-
vv
$MYSQLD_DATADIR
/
master
-
bin
.
000001
>
$MYSQLTEST_VARDIR
/
tmp
/
mysqlbinlog_row_flashback_original_6
.
sql
--
exec
$MYSQL_BINLOG
--
database
=
world
--
table
=
c
ity
-
vv
$MYSQLD_DATADIR
/
master
-
bin
.
000001
>
$MYSQLTEST_VARDIR
/
tmp
/
mysqlbinlog_row_flashback_original_6
.
sql
--
exec
$MYSQL_BINLOG
--
database
=
world
--
table
=
C
ity
-
B
$MYSQLD_DATADIR
/
master
-
bin
.
000001
>
$MYSQLTEST_VARDIR
/
tmp
/
mysqlbinlog_row_flashback_6
.
sql
--
exec
$MYSQL_BINLOG
--
database
=
world
--
table
=
c
ity
-
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;"
--
exec
$MYSQL
-
e
"SET binlog_format= ROW; source
$MYSQLTEST_VARDIR
/tmp/mysqlbinlog_row_flashback_6.sql;"
SELECT
*
FROM
world
.
C
ity
;
SELECT
*
FROM
world
.
c
ity
;
SELECT
*
FROM
test
.
test
;
SELECT
*
FROM
test
.
test
;
CHECKSUM
TABLE
world
.
C
ity
;
CHECKSUM
TABLE
world
.
c
ity
;
DROP
TABLE
test
.
test
;
DROP
TABLE
test
.
test
;
DROP
TABLE
world
.
C
ity
;
DROP
TABLE
world
.
c
ity
;
DROP
DATABASE
world
;
DROP
DATABASE
world
;
## Clear
## Clear
...
...
mysql-test/suite/parts/r/partition_mgm_lc2_innodb.result
View file @
51256b60
...
@@ -56,14 +56,14 @@ Table Create Table
...
@@ -56,14 +56,14 @@ 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
PARTITION BY KEY (
a
)
PARTITION BY KEY (
`a`
)
(PARTITION
parta
ENGINE = InnoDB,
(PARTITION
`parta`
ENGINE = InnoDB,
PARTITION
partB
ENGINE = InnoDB,
PARTITION
`partB`
ENGINE = InnoDB,
PARTITION
Partc
ENGINE = InnoDB,
PARTITION
`Partc`
ENGINE = InnoDB,
PARTITION
PartD
ENGINE = InnoDB,
PARTITION
`PartD`
ENGINE = InnoDB,
PARTITION
partE
ENGINE = InnoDB,
PARTITION
`partE`
ENGINE = InnoDB,
PARTITION
Partf
ENGINE = InnoDB,
PARTITION
`Partf`
ENGINE = InnoDB,
PARTITION
PartG
ENGINE = InnoDB)
PARTITION
`PartG`
ENGINE = InnoDB)
ALTER TABLE TableA COALESCE PARTITION 4;
ALTER TABLE TableA COALESCE PARTITION 4;
SELECT * FROM TableA;
SELECT * FROM TableA;
a
a
...
@@ -84,10 +84,10 @@ Table Create Table
...
@@ -84,10 +84,10 @@ 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
PARTITION BY KEY (
a
)
PARTITION BY KEY (
`a`
)
(PARTITION
parta
ENGINE = InnoDB,
(PARTITION
`parta`
ENGINE = InnoDB,
PARTITION
partB
ENGINE = InnoDB,
PARTITION
`partB`
ENGINE = InnoDB,
PARTITION
Partc
ENGINE = InnoDB)
PARTITION
`Partc`
ENGINE = InnoDB)
# Test of EXCHANGE PARTITION WITH TABLE
# 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';
SELECT PARTITION_NAME, TABLE_ROWS FROM INFORMATION_SCHEMA.PARTITIONS WHERE TABLE_SCHEMA ='MySQL_Test_DB' AND TABLE_NAME = 'TableA';
PARTITION_NAME TABLE_ROWS
PARTITION_NAME TABLE_ROWS
...
@@ -112,10 +112,10 @@ Table Create Table
...
@@ -112,10 +112,10 @@ 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
PARTITION BY KEY (
a
)
PARTITION BY KEY (
`a`
)
(PARTITION
parta
ENGINE = InnoDB,
(PARTITION
`parta`
ENGINE = InnoDB,
PARTITION
partB
ENGINE = InnoDB,
PARTITION
`partB`
ENGINE = InnoDB,
PARTITION
Partc
ENGINE = InnoDB)
PARTITION
`Partc`
ENGINE = InnoDB)
SELECT * FROM TableB;
SELECT * FROM TableB;
a
a
10
10
...
@@ -156,10 +156,10 @@ Table Create Table
...
@@ -156,10 +156,10 @@ 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
PARTITION BY KEY (
a
)
PARTITION BY KEY (
`a`
)
(PARTITION
parta
ENGINE = InnoDB,
(PARTITION
`parta`
ENGINE = InnoDB,
PARTITION
partB
ENGINE = InnoDB,
PARTITION
`partB`
ENGINE = InnoDB,
PARTITION
Partc
ENGINE = InnoDB)
PARTITION
`Partc`
ENGINE = InnoDB)
# Test of REORGANIZE PARTITIONS
# Test of REORGANIZE PARTITIONS
# Should not work on HASH/KEY
# Should not work on HASH/KEY
ALTER TABLE TableA REORGANIZE PARTITION parta,partB,Partc INTO
ALTER TABLE TableA REORGANIZE PARTITION parta,partB,Partc INTO
...
@@ -192,10 +192,10 @@ Table Create Table
...
@@ -192,10 +192,10 @@ 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
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,
PARTITION
Partc
ENGINE = InnoDB)
PARTITION
`Partc`
ENGINE = InnoDB)
# Test of RENAME TABLE
# Test of RENAME TABLE
RENAME TABLE TableA to TableB;
RENAME TABLE TableA to TableB;
SELECT * FROM TableB;
SELECT * FROM TableB;
...
@@ -264,10 +264,10 @@ Table Create Table
...
@@ -264,10 +264,10 @@ 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
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,
PARTITION
Partc
ENGINE = InnoDB)
PARTITION
`Partc`
ENGINE = InnoDB)
# Test of REMOVE PARTITIONING
# Test of REMOVE PARTITIONING
ALTER TABLE TableA REMOVE PARTITIONING;
ALTER TABLE TableA REMOVE PARTITIONING;
SELECT * FROM TableA;
SELECT * FROM TableA;
...
@@ -355,14 +355,14 @@ Table Create Table
...
@@ -355,14 +355,14 @@ 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
PARTITION BY HASH (
a
)
PARTITION BY HASH (
`a`
)
(PARTITION
parta
ENGINE = InnoDB,
(PARTITION
`parta`
ENGINE = InnoDB,
PARTITION
partB
ENGINE = InnoDB,
PARTITION
`partB`
ENGINE = InnoDB,
PARTITION
Partc
ENGINE = InnoDB,
PARTITION
`Partc`
ENGINE = InnoDB,
PARTITION
PartD
ENGINE = InnoDB,
PARTITION
`PartD`
ENGINE = InnoDB,
PARTITION
partE
ENGINE = InnoDB,
PARTITION
`partE`
ENGINE = InnoDB,
PARTITION
Partf
ENGINE = InnoDB,
PARTITION
`Partf`
ENGINE = InnoDB,
PARTITION
PartG
ENGINE = InnoDB)
PARTITION
`PartG`
ENGINE = InnoDB)
ALTER TABLE TableA COALESCE PARTITION 4;
ALTER TABLE TableA COALESCE PARTITION 4;
SELECT * FROM TableA;
SELECT * FROM TableA;
a
a
...
@@ -383,10 +383,10 @@ Table Create Table
...
@@ -383,10 +383,10 @@ 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
PARTITION BY HASH (
a
)
PARTITION BY HASH (
`a`
)
(PARTITION
parta
ENGINE = InnoDB,
(PARTITION
`parta`
ENGINE = InnoDB,
PARTITION
partB
ENGINE = InnoDB,
PARTITION
`partB`
ENGINE = InnoDB,
PARTITION
Partc
ENGINE = InnoDB)
PARTITION
`Partc`
ENGINE = InnoDB)
# Test of REORGANIZE PARTITIONS
# Test of REORGANIZE PARTITIONS
# Should not work on HASH/KEY
# Should not work on HASH/KEY
ALTER TABLE TableA REORGANIZE PARTITION parta,partB,Partc INTO
ALTER TABLE TableA REORGANIZE PARTITION parta,partB,Partc INTO
...
@@ -419,10 +419,10 @@ Table Create Table
...
@@ -419,10 +419,10 @@ 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
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,
PARTITION
Partc
ENGINE = InnoDB)
PARTITION
`Partc`
ENGINE = InnoDB)
# Test of RENAME TABLE
# Test of RENAME TABLE
RENAME TABLE TableA to TableB;
RENAME TABLE TableA to TableB;
SELECT * FROM TableB;
SELECT * FROM TableB;
...
@@ -491,10 +491,10 @@ Table Create Table
...
@@ -491,10 +491,10 @@ 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
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,
PARTITION
Partc
ENGINE = InnoDB)
PARTITION
`Partc`
ENGINE = InnoDB)
# Test of REMOVE PARTITIONING
# Test of REMOVE PARTITIONING
ALTER TABLE TableA REMOVE PARTITIONING;
ALTER TABLE TableA REMOVE PARTITIONING;
SELECT * FROM TableA;
SELECT * FROM TableA;
...
@@ -571,14 +571,14 @@ Table Create Table
...
@@ -571,14 +571,14 @@ 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
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,
PARTITION
Partc
VALUES LESS THAN (10) ENGINE = InnoDB,
PARTITION
`Partc`
VALUES LESS THAN (10) ENGINE = InnoDB,
PARTITION
PartD
VALUES LESS THAN (13) ENGINE = InnoDB,
PARTITION
`PartD`
VALUES LESS THAN (13) ENGINE = InnoDB,
PARTITION
partE
VALUES LESS THAN (16) ENGINE = InnoDB,
PARTITION
`partE`
VALUES LESS THAN (16) ENGINE = InnoDB,
PARTITION
Partf
VALUES LESS THAN (19) ENGINE = InnoDB,
PARTITION
`Partf`
VALUES LESS THAN (19) ENGINE = InnoDB,
PARTITION
PartG
VALUES LESS THAN (22) ENGINE = InnoDB)
PARTITION
`PartG`
VALUES LESS THAN (22) ENGINE = InnoDB)
ALTER TABLE TableA DROP PARTITION partE, PartG;
ALTER TABLE TableA DROP PARTITION partE, PartG;
ALTER TABLE TableA DROP PARTITION Partf;
ALTER TABLE TableA DROP PARTITION Partf;
ALTER TABLE TableA ADD PARTITION
ALTER TABLE TableA ADD PARTITION
...
@@ -602,12 +602,12 @@ Table Create Table
...
@@ -602,12 +602,12 @@ 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
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,
PARTITION
Partc
VALUES LESS THAN (10) ENGINE = InnoDB,
PARTITION
`Partc`
VALUES LESS THAN (10) ENGINE = InnoDB,
PARTITION
PartD
VALUES LESS THAN (13) ENGINE = InnoDB,
PARTITION
`PartD`
VALUES LESS THAN (13) ENGINE = InnoDB,
PARTITION
PartE
VALUES LESS THAN MAXVALUE ENGINE = InnoDB)
PARTITION
`PartE`
VALUES LESS THAN MAXVALUE ENGINE = InnoDB)
# Test of REORGANIZE PARTITIONS
# Test of REORGANIZE PARTITIONS
# Error since it must reorganize a consecutive range
# Error since it must reorganize a consecutive range
ALTER TABLE TableA REORGANIZE PARTITION parta,Partc INTO
ALTER TABLE TableA REORGANIZE PARTITION parta,Partc INTO
...
@@ -640,11 +640,11 @@ Table Create Table
...
@@ -640,11 +640,11 @@ 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
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,
PARTITION
partB
VALUES LESS THAN (11) COMMENT = 'Previously partly Partc and partly PartD' 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
`partC`
VALUES LESS THAN MAXVALUE COMMENT = 'Previously partly PartD' ENGINE = InnoDB)
# Test of RENAME TABLE
# Test of RENAME TABLE
RENAME TABLE TableA to TableB;
RENAME TABLE TableA to TableB;
SELECT * FROM TableB;
SELECT * FROM TableB;
...
@@ -713,11 +713,11 @@ Table Create Table
...
@@ -713,11 +713,11 @@ 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
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,
PARTITION
partB
VALUES LESS THAN (11) COMMENT = 'Previously partly Partc and partly PartD' 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
`partC`
VALUES LESS THAN MAXVALUE COMMENT = 'Previously partly PartD' ENGINE = InnoDB)
# Test of REMOVE PARTITIONING
# Test of REMOVE PARTITIONING
ALTER TABLE TableA REMOVE PARTITIONING;
ALTER TABLE TableA REMOVE PARTITIONING;
SELECT * FROM TableA;
SELECT * FROM TableA;
...
@@ -794,14 +794,14 @@ Table Create Table
...
@@ -794,14 +794,14 @@ 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
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,
PARTITION
Partc
VALUES IN (3,4,7) ENGINE = InnoDB,
PARTITION
`Partc`
VALUES IN (3,4,7) ENGINE = InnoDB,
PARTITION
PartD
VALUES IN (5,6,12) ENGINE = InnoDB,
PARTITION
`PartD`
VALUES IN (5,6,12) ENGINE = InnoDB,
PARTITION
partE
VALUES IN (16) ENGINE = InnoDB,
PARTITION
`partE`
VALUES IN (16) ENGINE = InnoDB,
PARTITION
Partf
VALUES IN (19) ENGINE = InnoDB,
PARTITION
`Partf`
VALUES IN (19) ENGINE = InnoDB,
PARTITION
PartG
VALUES IN (22) ENGINE = InnoDB)
PARTITION
`PartG`
VALUES IN (22) ENGINE = InnoDB)
ALTER TABLE TableA DROP PARTITION partE, PartG;
ALTER TABLE TableA DROP PARTITION partE, PartG;
ALTER TABLE TableA DROP PARTITION Partf;
ALTER TABLE TableA DROP PARTITION Partf;
ALTER TABLE TableA ADD PARTITION
ALTER TABLE TableA ADD PARTITION
...
@@ -825,12 +825,12 @@ Table Create Table
...
@@ -825,12 +825,12 @@ 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
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,
PARTITION
Partc
VALUES IN (3,4,7) ENGINE = InnoDB,
PARTITION
`Partc`
VALUES IN (3,4,7) ENGINE = InnoDB,
PARTITION
PartD
VALUES IN (5,6,12) ENGINE = InnoDB,
PARTITION
`PartD`
VALUES IN (5,6,12) ENGINE = InnoDB,
PARTITION
PartE
VALUES IN (13) ENGINE = InnoDB)
PARTITION
`PartE`
VALUES IN (13) ENGINE = InnoDB)
# Test of REORGANIZE PARTITIONS
# Test of REORGANIZE PARTITIONS
ALTER TABLE TableA REORGANIZE PARTITION parta,Partc INTO
ALTER TABLE TableA REORGANIZE PARTITION parta,Partc INTO
(PARTITION Partc VALUES IN (1,7)
(PARTITION Partc VALUES IN (1,7)
...
@@ -863,12 +863,12 @@ Table Create Table
...
@@ -863,12 +863,12 @@ 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
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,
PARTITION
partB
VALUES IN (4,8) COMMENT = 'Mix 3 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
`PartD`
VALUES IN (5,6,12) ENGINE = InnoDB,
PARTITION
PartE
VALUES IN (13) ENGINE = InnoDB)
PARTITION
`PartE`
VALUES IN (13) ENGINE = InnoDB)
# Test of RENAME TABLE
# Test of RENAME TABLE
RENAME TABLE TableA to TableB;
RENAME TABLE TableA to TableB;
SELECT * FROM TableB;
SELECT * FROM TableB;
...
@@ -928,12 +928,12 @@ Table Create Table
...
@@ -928,12 +928,12 @@ 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
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,
PARTITION
partB
VALUES IN (4,8) COMMENT = 'Mix 3 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
`PartD`
VALUES IN (5,6,12) ENGINE = InnoDB,
PARTITION
PartE
VALUES IN (13) ENGINE = InnoDB)
PARTITION
`PartE`
VALUES IN (13) ENGINE = InnoDB)
# Test of REMOVE PARTITIONING
# Test of REMOVE PARTITIONING
ALTER TABLE TableA REMOVE PARTITIONING;
ALTER TABLE TableA REMOVE PARTITIONING;
SELECT * FROM TableA;
SELECT * FROM TableA;
...
@@ -971,10 +971,10 @@ t1 CREATE TABLE `t1` (
...
@@ -971,10 +971,10 @@ t1 CREATE TABLE `t1` (
`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
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,
PARTITION
MAX
VALUES LESS THAN MAXVALUE ENGINE = InnoDB)
PARTITION
`MAX`
VALUES LESS THAN MAXVALUE ENGINE = InnoDB)
SELECT * FROM t1 ORDER BY a;
SELECT * FROM t1 ORDER BY a;
a b
a b
1 First
1 First
...
...
mysql-test/suite/parts/r/partition_mgm_lc2_memory.result
View file @
51256b60
...
@@ -56,14 +56,14 @@ Table Create Table
...
@@ -56,14 +56,14 @@ 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
PARTITION BY KEY (
a
)
PARTITION BY KEY (
`a`
)
(PARTITION
parta
ENGINE = MEMORY,
(PARTITION
`parta`
ENGINE = MEMORY,
PARTITION
partB
ENGINE = MEMORY,
PARTITION
`partB`
ENGINE = MEMORY,
PARTITION
Partc
ENGINE = MEMORY,
PARTITION
`Partc`
ENGINE = MEMORY,
PARTITION
PartD
ENGINE = MEMORY,
PARTITION
`PartD`
ENGINE = MEMORY,
PARTITION
partE
ENGINE = MEMORY,
PARTITION
`partE`
ENGINE = MEMORY,
PARTITION
Partf
ENGINE = MEMORY,
PARTITION
`Partf`
ENGINE = MEMORY,
PARTITION
PartG
ENGINE = MEMORY)
PARTITION
`PartG`
ENGINE = MEMORY)
ALTER TABLE TableA COALESCE PARTITION 4;
ALTER TABLE TableA COALESCE PARTITION 4;
SELECT * FROM TableA;
SELECT * FROM TableA;
a
a
...
@@ -84,10 +84,10 @@ Table Create Table
...
@@ -84,10 +84,10 @@ 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
PARTITION BY KEY (
a
)
PARTITION BY KEY (
`a`
)
(PARTITION
parta
ENGINE = MEMORY,
(PARTITION
`parta`
ENGINE = MEMORY,
PARTITION
partB
ENGINE = MEMORY,
PARTITION
`partB`
ENGINE = MEMORY,
PARTITION
Partc
ENGINE = MEMORY)
PARTITION
`Partc`
ENGINE = MEMORY)
# Test of EXCHANGE PARTITION WITH TABLE
# 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';
SELECT PARTITION_NAME, TABLE_ROWS FROM INFORMATION_SCHEMA.PARTITIONS WHERE TABLE_SCHEMA ='MySQL_Test_DB' AND TABLE_NAME = 'TableA';
PARTITION_NAME TABLE_ROWS
PARTITION_NAME TABLE_ROWS
...
@@ -112,10 +112,10 @@ Table Create Table
...
@@ -112,10 +112,10 @@ 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
PARTITION BY KEY (
a
)
PARTITION BY KEY (
`a`
)
(PARTITION
parta
ENGINE = MEMORY,
(PARTITION
`parta`
ENGINE = MEMORY,
PARTITION
partB
ENGINE = MEMORY,
PARTITION
`partB`
ENGINE = MEMORY,
PARTITION
Partc
ENGINE = MEMORY)
PARTITION
`Partc`
ENGINE = MEMORY)
SELECT * FROM TableB;
SELECT * FROM TableB;
a
a
10
10
...
@@ -156,10 +156,10 @@ Table Create Table
...
@@ -156,10 +156,10 @@ 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
PARTITION BY KEY (
a
)
PARTITION BY KEY (
`a`
)
(PARTITION
parta
ENGINE = MEMORY,
(PARTITION
`parta`
ENGINE = MEMORY,
PARTITION
partB
ENGINE = MEMORY,
PARTITION
`partB`
ENGINE = MEMORY,
PARTITION
Partc
ENGINE = MEMORY)
PARTITION
`Partc`
ENGINE = MEMORY)
# Test of REORGANIZE PARTITIONS
# Test of REORGANIZE PARTITIONS
# Should not work on HASH/KEY
# Should not work on HASH/KEY
ALTER TABLE TableA REORGANIZE PARTITION parta,partB,Partc INTO
ALTER TABLE TableA REORGANIZE PARTITION parta,partB,Partc INTO
...
@@ -192,10 +192,10 @@ Table Create Table
...
@@ -192,10 +192,10 @@ 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
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,
PARTITION
Partc
ENGINE = MEMORY)
PARTITION
`Partc`
ENGINE = MEMORY)
# Test of RENAME TABLE
# Test of RENAME TABLE
RENAME TABLE TableA to TableB;
RENAME TABLE TableA to TableB;
SELECT * FROM TableB;
SELECT * FROM TableB;
...
@@ -264,10 +264,10 @@ Table Create Table
...
@@ -264,10 +264,10 @@ 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
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,
PARTITION
Partc
ENGINE = MEMORY)
PARTITION
`Partc`
ENGINE = MEMORY)
# Test of REMOVE PARTITIONING
# Test of REMOVE PARTITIONING
ALTER TABLE TableA REMOVE PARTITIONING;
ALTER TABLE TableA REMOVE PARTITIONING;
SELECT * FROM TableA;
SELECT * FROM TableA;
...
@@ -355,14 +355,14 @@ Table Create Table
...
@@ -355,14 +355,14 @@ 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
PARTITION BY HASH (
a
)
PARTITION BY HASH (
`a`
)
(PARTITION
parta
ENGINE = MEMORY,
(PARTITION
`parta`
ENGINE = MEMORY,
PARTITION
partB
ENGINE = MEMORY,
PARTITION
`partB`
ENGINE = MEMORY,
PARTITION
Partc
ENGINE = MEMORY,
PARTITION
`Partc`
ENGINE = MEMORY,
PARTITION
PartD
ENGINE = MEMORY,
PARTITION
`PartD`
ENGINE = MEMORY,
PARTITION
partE
ENGINE = MEMORY,
PARTITION
`partE`
ENGINE = MEMORY,
PARTITION
Partf
ENGINE = MEMORY,
PARTITION
`Partf`
ENGINE = MEMORY,
PARTITION
PartG
ENGINE = MEMORY)
PARTITION
`PartG`
ENGINE = MEMORY)
ALTER TABLE TableA COALESCE PARTITION 4;
ALTER TABLE TableA COALESCE PARTITION 4;
SELECT * FROM TableA;
SELECT * FROM TableA;
a
a
...
@@ -383,10 +383,10 @@ Table Create Table
...
@@ -383,10 +383,10 @@ 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
PARTITION BY HASH (
a
)
PARTITION BY HASH (
`a`
)
(PARTITION
parta
ENGINE = MEMORY,
(PARTITION
`parta`
ENGINE = MEMORY,
PARTITION
partB
ENGINE = MEMORY,
PARTITION
`partB`
ENGINE = MEMORY,
PARTITION
Partc
ENGINE = MEMORY)
PARTITION
`Partc`
ENGINE = MEMORY)
# Test of REORGANIZE PARTITIONS
# Test of REORGANIZE PARTITIONS
# Should not work on HASH/KEY
# Should not work on HASH/KEY
ALTER TABLE TableA REORGANIZE PARTITION parta,partB,Partc INTO
ALTER TABLE TableA REORGANIZE PARTITION parta,partB,Partc INTO
...
@@ -419,10 +419,10 @@ Table Create Table
...
@@ -419,10 +419,10 @@ 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
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,
PARTITION
Partc
ENGINE = MEMORY)
PARTITION
`Partc`
ENGINE = MEMORY)
# Test of RENAME TABLE
# Test of RENAME TABLE
RENAME TABLE TableA to TableB;
RENAME TABLE TableA to TableB;
SELECT * FROM TableB;
SELECT * FROM TableB;
...
@@ -491,10 +491,10 @@ Table Create Table
...
@@ -491,10 +491,10 @@ 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
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,
PARTITION
Partc
ENGINE = MEMORY)
PARTITION
`Partc`
ENGINE = MEMORY)
# Test of REMOVE PARTITIONING
# Test of REMOVE PARTITIONING
ALTER TABLE TableA REMOVE PARTITIONING;
ALTER TABLE TableA REMOVE PARTITIONING;
SELECT * FROM TableA;
SELECT * FROM TableA;
...
@@ -571,14 +571,14 @@ Table Create Table
...
@@ -571,14 +571,14 @@ 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
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,
PARTITION
Partc
VALUES LESS THAN (10) ENGINE = MEMORY,
PARTITION
`Partc`
VALUES LESS THAN (10) ENGINE = MEMORY,
PARTITION
PartD
VALUES LESS THAN (13) ENGINE = MEMORY,
PARTITION
`PartD`
VALUES LESS THAN (13) ENGINE = MEMORY,
PARTITION
partE
VALUES LESS THAN (16) ENGINE = MEMORY,
PARTITION
`partE`
VALUES LESS THAN (16) ENGINE = MEMORY,
PARTITION
Partf
VALUES LESS THAN (19) ENGINE = MEMORY,
PARTITION
`Partf`
VALUES LESS THAN (19) ENGINE = MEMORY,
PARTITION
PartG
VALUES LESS THAN (22) ENGINE = MEMORY)
PARTITION
`PartG`
VALUES LESS THAN (22) ENGINE = MEMORY)
ALTER TABLE TableA DROP PARTITION partE, PartG;
ALTER TABLE TableA DROP PARTITION partE, PartG;
ALTER TABLE TableA DROP PARTITION Partf;
ALTER TABLE TableA DROP PARTITION Partf;
ALTER TABLE TableA ADD PARTITION
ALTER TABLE TableA ADD PARTITION
...
@@ -602,12 +602,12 @@ Table Create Table
...
@@ -602,12 +602,12 @@ 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
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,
PARTITION
Partc
VALUES LESS THAN (10) ENGINE = MEMORY,
PARTITION
`Partc`
VALUES LESS THAN (10) ENGINE = MEMORY,
PARTITION
PartD
VALUES LESS THAN (13) ENGINE = MEMORY,
PARTITION
`PartD`
VALUES LESS THAN (13) ENGINE = MEMORY,
PARTITION
PartE
VALUES LESS THAN MAXVALUE ENGINE = MEMORY)
PARTITION
`PartE`
VALUES LESS THAN MAXVALUE ENGINE = MEMORY)
# Test of REORGANIZE PARTITIONS
# Test of REORGANIZE PARTITIONS
# Error since it must reorganize a consecutive range
# Error since it must reorganize a consecutive range
ALTER TABLE TableA REORGANIZE PARTITION parta,Partc INTO
ALTER TABLE TableA REORGANIZE PARTITION parta,Partc INTO
...
@@ -640,11 +640,11 @@ Table Create Table
...
@@ -640,11 +640,11 @@ 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
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,
PARTITION
partB
VALUES LESS THAN (11) COMMENT = 'Previously partly Partc and partly PartD' 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
`partC`
VALUES LESS THAN MAXVALUE COMMENT = 'Previously partly PartD' ENGINE = MEMORY)
# Test of RENAME TABLE
# Test of RENAME TABLE
RENAME TABLE TableA to TableB;
RENAME TABLE TableA to TableB;
SELECT * FROM TableB;
SELECT * FROM TableB;
...
@@ -713,11 +713,11 @@ Table Create Table
...
@@ -713,11 +713,11 @@ 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
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,
PARTITION
partB
VALUES LESS THAN (11) COMMENT = 'Previously partly Partc and partly PartD' 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
`partC`
VALUES LESS THAN MAXVALUE COMMENT = 'Previously partly PartD' ENGINE = MEMORY)
# Test of REMOVE PARTITIONING
# Test of REMOVE PARTITIONING
ALTER TABLE TableA REMOVE PARTITIONING;
ALTER TABLE TableA REMOVE PARTITIONING;
SELECT * FROM TableA;
SELECT * FROM TableA;
...
@@ -794,14 +794,14 @@ Table Create Table
...
@@ -794,14 +794,14 @@ 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
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,
PARTITION
Partc
VALUES IN (3,4,7) ENGINE = MEMORY,
PARTITION
`Partc`
VALUES IN (3,4,7) ENGINE = MEMORY,
PARTITION
PartD
VALUES IN (5,6,12) ENGINE = MEMORY,
PARTITION
`PartD`
VALUES IN (5,6,12) ENGINE = MEMORY,
PARTITION
partE
VALUES IN (16) ENGINE = MEMORY,
PARTITION
`partE`
VALUES IN (16) ENGINE = MEMORY,
PARTITION
Partf
VALUES IN (19) ENGINE = MEMORY,
PARTITION
`Partf`
VALUES IN (19) ENGINE = MEMORY,
PARTITION
PartG
VALUES IN (22) ENGINE = MEMORY)
PARTITION
`PartG`
VALUES IN (22) ENGINE = MEMORY)
ALTER TABLE TableA DROP PARTITION partE, PartG;
ALTER TABLE TableA DROP PARTITION partE, PartG;
ALTER TABLE TableA DROP PARTITION Partf;
ALTER TABLE TableA DROP PARTITION Partf;
ALTER TABLE TableA ADD PARTITION
ALTER TABLE TableA ADD PARTITION
...
@@ -825,12 +825,12 @@ Table Create Table
...
@@ -825,12 +825,12 @@ 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
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,
PARTITION
Partc
VALUES IN (3,4,7) ENGINE = MEMORY,
PARTITION
`Partc`
VALUES IN (3,4,7) ENGINE = MEMORY,
PARTITION
PartD
VALUES IN (5,6,12) ENGINE = MEMORY,
PARTITION
`PartD`
VALUES IN (5,6,12) ENGINE = MEMORY,
PARTITION
PartE
VALUES IN (13) ENGINE = MEMORY)
PARTITION
`PartE`
VALUES IN (13) ENGINE = MEMORY)
# Test of REORGANIZE PARTITIONS
# Test of REORGANIZE PARTITIONS
ALTER TABLE TableA REORGANIZE PARTITION parta,Partc INTO
ALTER TABLE TableA REORGANIZE PARTITION parta,Partc INTO
(PARTITION Partc VALUES IN (1,7)
(PARTITION Partc VALUES IN (1,7)
...
@@ -863,12 +863,12 @@ Table Create Table
...
@@ -863,12 +863,12 @@ 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
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,
PARTITION
partB
VALUES IN (4,8) COMMENT = 'Mix 3 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
`PartD`
VALUES IN (5,6,12) ENGINE = MEMORY,
PARTITION
PartE
VALUES IN (13) ENGINE = MEMORY)
PARTITION
`PartE`
VALUES IN (13) ENGINE = MEMORY)
# Test of RENAME TABLE
# Test of RENAME TABLE
RENAME TABLE TableA to TableB;
RENAME TABLE TableA to TableB;
SELECT * FROM TableB;
SELECT * FROM TableB;
...
@@ -928,12 +928,12 @@ Table Create Table
...
@@ -928,12 +928,12 @@ 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
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,
PARTITION
partB
VALUES IN (4,8) COMMENT = 'Mix 3 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
`PartD`
VALUES IN (5,6,12) ENGINE = MEMORY,
PARTITION
PartE
VALUES IN (13) ENGINE = MEMORY)
PARTITION
`PartE`
VALUES IN (13) ENGINE = MEMORY)
# Test of REMOVE PARTITIONING
# Test of REMOVE PARTITIONING
ALTER TABLE TableA REMOVE PARTITIONING;
ALTER TABLE TableA REMOVE PARTITIONING;
SELECT * FROM TableA;
SELECT * FROM TableA;
...
@@ -971,10 +971,10 @@ t1 CREATE TABLE `t1` (
...
@@ -971,10 +971,10 @@ t1 CREATE TABLE `t1` (
`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
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,
PARTITION
MAX
VALUES LESS THAN MAXVALUE ENGINE = MEMORY)
PARTITION
`MAX`
VALUES LESS THAN MAXVALUE ENGINE = MEMORY)
SELECT * FROM t1 ORDER BY a;
SELECT * FROM t1 ORDER BY a;
a b
a b
1 First
1 First
...
...
mysql-test/suite/parts/r/partition_mgm_lc2_myisam.result
View file @
51256b60
...
@@ -56,14 +56,14 @@ Table Create Table
...
@@ -56,14 +56,14 @@ 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
PARTITION BY KEY (
a
)
PARTITION BY KEY (
`a`
)
(PARTITION
parta
ENGINE = MyISAM,
(PARTITION
`parta`
ENGINE = MyISAM,
PARTITION
partB
ENGINE = MyISAM,
PARTITION
`partB`
ENGINE = MyISAM,
PARTITION
Partc
ENGINE = MyISAM,
PARTITION
`Partc`
ENGINE = MyISAM,
PARTITION
PartD
ENGINE = MyISAM,
PARTITION
`PartD`
ENGINE = MyISAM,
PARTITION
partE
ENGINE = MyISAM,
PARTITION
`partE`
ENGINE = MyISAM,
PARTITION
Partf
ENGINE = MyISAM,
PARTITION
`Partf`
ENGINE = MyISAM,
PARTITION
PartG
ENGINE = MyISAM)
PARTITION
`PartG`
ENGINE = MyISAM)
ALTER TABLE TableA COALESCE PARTITION 4;
ALTER TABLE TableA COALESCE PARTITION 4;
SELECT * FROM TableA;
SELECT * FROM TableA;
a
a
...
@@ -84,10 +84,10 @@ Table Create Table
...
@@ -84,10 +84,10 @@ 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
PARTITION BY KEY (
a
)
PARTITION BY KEY (
`a`
)
(PARTITION
parta
ENGINE = MyISAM,
(PARTITION
`parta`
ENGINE = MyISAM,
PARTITION
partB
ENGINE = MyISAM,
PARTITION
`partB`
ENGINE = MyISAM,
PARTITION
Partc
ENGINE = MyISAM)
PARTITION
`Partc`
ENGINE = MyISAM)
# Test of EXCHANGE PARTITION WITH TABLE
# 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';
SELECT PARTITION_NAME, TABLE_ROWS FROM INFORMATION_SCHEMA.PARTITIONS WHERE TABLE_SCHEMA ='MySQL_Test_DB' AND TABLE_NAME = 'TableA';
PARTITION_NAME TABLE_ROWS
PARTITION_NAME TABLE_ROWS
...
@@ -112,10 +112,10 @@ Table Create Table
...
@@ -112,10 +112,10 @@ 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
PARTITION BY KEY (
a
)
PARTITION BY KEY (
`a`
)
(PARTITION
parta
ENGINE = MyISAM,
(PARTITION
`parta`
ENGINE = MyISAM,
PARTITION
partB
ENGINE = MyISAM,
PARTITION
`partB`
ENGINE = MyISAM,
PARTITION
Partc
ENGINE = MyISAM)
PARTITION
`Partc`
ENGINE = MyISAM)
SELECT * FROM TableB;
SELECT * FROM TableB;
a
a
10
10
...
@@ -156,10 +156,10 @@ Table Create Table
...
@@ -156,10 +156,10 @@ 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
PARTITION BY KEY (
a
)
PARTITION BY KEY (
`a`
)
(PARTITION
parta
ENGINE = MyISAM,
(PARTITION
`parta`
ENGINE = MyISAM,
PARTITION
partB
ENGINE = MyISAM,
PARTITION
`partB`
ENGINE = MyISAM,
PARTITION
Partc
ENGINE = MyISAM)
PARTITION
`Partc`
ENGINE = MyISAM)
# Test of REORGANIZE PARTITIONS
# Test of REORGANIZE PARTITIONS
# Should not work on HASH/KEY
# Should not work on HASH/KEY
ALTER TABLE TableA REORGANIZE PARTITION parta,partB,Partc INTO
ALTER TABLE TableA REORGANIZE PARTITION parta,partB,Partc INTO
...
@@ -192,10 +192,10 @@ Table Create Table
...
@@ -192,10 +192,10 @@ 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
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,
PARTITION
Partc
ENGINE = MyISAM)
PARTITION
`Partc`
ENGINE = MyISAM)
# Test of RENAME TABLE
# Test of RENAME TABLE
RENAME TABLE TableA to TableB;
RENAME TABLE TableA to TableB;
SELECT * FROM TableB;
SELECT * FROM TableB;
...
@@ -264,10 +264,10 @@ Table Create Table
...
@@ -264,10 +264,10 @@ 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
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,
PARTITION
Partc
ENGINE = MyISAM)
PARTITION
`Partc`
ENGINE = MyISAM)
# Test of REMOVE PARTITIONING
# Test of REMOVE PARTITIONING
ALTER TABLE TableA REMOVE PARTITIONING;
ALTER TABLE TableA REMOVE PARTITIONING;
SELECT * FROM TableA;
SELECT * FROM TableA;
...
@@ -355,14 +355,14 @@ Table Create Table
...
@@ -355,14 +355,14 @@ 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
PARTITION BY HASH (
a
)
PARTITION BY HASH (
`a`
)
(PARTITION
parta
ENGINE = MyISAM,
(PARTITION
`parta`
ENGINE = MyISAM,
PARTITION
partB
ENGINE = MyISAM,
PARTITION
`partB`
ENGINE = MyISAM,
PARTITION
Partc
ENGINE = MyISAM,
PARTITION
`Partc`
ENGINE = MyISAM,
PARTITION
PartD
ENGINE = MyISAM,
PARTITION
`PartD`
ENGINE = MyISAM,
PARTITION
partE
ENGINE = MyISAM,
PARTITION
`partE`
ENGINE = MyISAM,
PARTITION
Partf
ENGINE = MyISAM,
PARTITION
`Partf`
ENGINE = MyISAM,
PARTITION
PartG
ENGINE = MyISAM)
PARTITION
`PartG`
ENGINE = MyISAM)
ALTER TABLE TableA COALESCE PARTITION 4;
ALTER TABLE TableA COALESCE PARTITION 4;
SELECT * FROM TableA;
SELECT * FROM TableA;
a
a
...
@@ -383,10 +383,10 @@ Table Create Table
...
@@ -383,10 +383,10 @@ 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
PARTITION BY HASH (
a
)
PARTITION BY HASH (
`a`
)
(PARTITION
parta
ENGINE = MyISAM,
(PARTITION
`parta`
ENGINE = MyISAM,
PARTITION
partB
ENGINE = MyISAM,
PARTITION
`partB`
ENGINE = MyISAM,
PARTITION
Partc
ENGINE = MyISAM)
PARTITION
`Partc`
ENGINE = MyISAM)
# Test of REORGANIZE PARTITIONS
# Test of REORGANIZE PARTITIONS
# Should not work on HASH/KEY
# Should not work on HASH/KEY
ALTER TABLE TableA REORGANIZE PARTITION parta,partB,Partc INTO
ALTER TABLE TableA REORGANIZE PARTITION parta,partB,Partc INTO
...
@@ -419,10 +419,10 @@ Table Create Table
...
@@ -419,10 +419,10 @@ 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
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,
PARTITION
Partc
ENGINE = MyISAM)
PARTITION
`Partc`
ENGINE = MyISAM)
# Test of RENAME TABLE
# Test of RENAME TABLE
RENAME TABLE TableA to TableB;
RENAME TABLE TableA to TableB;
SELECT * FROM TableB;
SELECT * FROM TableB;
...
@@ -491,10 +491,10 @@ Table Create Table
...
@@ -491,10 +491,10 @@ 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
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,
PARTITION
Partc
ENGINE = MyISAM)
PARTITION
`Partc`
ENGINE = MyISAM)
# Test of REMOVE PARTITIONING
# Test of REMOVE PARTITIONING
ALTER TABLE TableA REMOVE PARTITIONING;
ALTER TABLE TableA REMOVE PARTITIONING;
SELECT * FROM TableA;
SELECT * FROM TableA;
...
@@ -571,14 +571,14 @@ Table Create Table
...
@@ -571,14 +571,14 @@ 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
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,
PARTITION
Partc
VALUES LESS THAN (10) ENGINE = MyISAM,
PARTITION
`Partc`
VALUES LESS THAN (10) ENGINE = MyISAM,
PARTITION
PartD
VALUES LESS THAN (13) ENGINE = MyISAM,
PARTITION
`PartD`
VALUES LESS THAN (13) ENGINE = MyISAM,
PARTITION
partE
VALUES LESS THAN (16) ENGINE = MyISAM,
PARTITION
`partE`
VALUES LESS THAN (16) ENGINE = MyISAM,
PARTITION
Partf
VALUES LESS THAN (19) ENGINE = MyISAM,
PARTITION
`Partf`
VALUES LESS THAN (19) ENGINE = MyISAM,
PARTITION
PartG
VALUES LESS THAN (22) ENGINE = MyISAM)
PARTITION
`PartG`
VALUES LESS THAN (22) ENGINE = MyISAM)
ALTER TABLE TableA DROP PARTITION partE, PartG;
ALTER TABLE TableA DROP PARTITION partE, PartG;
ALTER TABLE TableA DROP PARTITION Partf;
ALTER TABLE TableA DROP PARTITION Partf;
ALTER TABLE TableA ADD PARTITION
ALTER TABLE TableA ADD PARTITION
...
@@ -602,12 +602,12 @@ Table Create Table
...
@@ -602,12 +602,12 @@ 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
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,
PARTITION
Partc
VALUES LESS THAN (10) ENGINE = MyISAM,
PARTITION
`Partc`
VALUES LESS THAN (10) ENGINE = MyISAM,
PARTITION
PartD
VALUES LESS THAN (13) ENGINE = MyISAM,
PARTITION
`PartD`
VALUES LESS THAN (13) ENGINE = MyISAM,
PARTITION
PartE
VALUES LESS THAN MAXVALUE ENGINE = MyISAM)
PARTITION
`PartE`
VALUES LESS THAN MAXVALUE ENGINE = MyISAM)
# Test of REORGANIZE PARTITIONS
# Test of REORGANIZE PARTITIONS
# Error since it must reorganize a consecutive range
# Error since it must reorganize a consecutive range
ALTER TABLE TableA REORGANIZE PARTITION parta,Partc INTO
ALTER TABLE TableA REORGANIZE PARTITION parta,Partc INTO
...
@@ -640,11 +640,11 @@ Table Create Table
...
@@ -640,11 +640,11 @@ 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
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,
PARTITION
partB
VALUES LESS THAN (11) COMMENT = 'Previously partly Partc and partly PartD' 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
`partC`
VALUES LESS THAN MAXVALUE COMMENT = 'Previously partly PartD' ENGINE = MyISAM)
# Test of RENAME TABLE
# Test of RENAME TABLE
RENAME TABLE TableA to TableB;
RENAME TABLE TableA to TableB;
SELECT * FROM TableB;
SELECT * FROM TableB;
...
@@ -713,11 +713,11 @@ Table Create Table
...
@@ -713,11 +713,11 @@ 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
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,
PARTITION
partB
VALUES LESS THAN (11) COMMENT = 'Previously partly Partc and partly PartD' 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
`partC`
VALUES LESS THAN MAXVALUE COMMENT = 'Previously partly PartD' ENGINE = MyISAM)
# Test of REMOVE PARTITIONING
# Test of REMOVE PARTITIONING
ALTER TABLE TableA REMOVE PARTITIONING;
ALTER TABLE TableA REMOVE PARTITIONING;
SELECT * FROM TableA;
SELECT * FROM TableA;
...
@@ -794,14 +794,14 @@ Table Create Table
...
@@ -794,14 +794,14 @@ 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
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,
PARTITION
Partc
VALUES IN (3,4,7) ENGINE = MyISAM,
PARTITION
`Partc`
VALUES IN (3,4,7) ENGINE = MyISAM,
PARTITION
PartD
VALUES IN (5,6,12) ENGINE = MyISAM,
PARTITION
`PartD`
VALUES IN (5,6,12) ENGINE = MyISAM,
PARTITION
partE
VALUES IN (16) ENGINE = MyISAM,
PARTITION
`partE`
VALUES IN (16) ENGINE = MyISAM,
PARTITION
Partf
VALUES IN (19) ENGINE = MyISAM,
PARTITION
`Partf`
VALUES IN (19) ENGINE = MyISAM,
PARTITION
PartG
VALUES IN (22) ENGINE = MyISAM)
PARTITION
`PartG`
VALUES IN (22) ENGINE = MyISAM)
ALTER TABLE TableA DROP PARTITION partE, PartG;
ALTER TABLE TableA DROP PARTITION partE, PartG;
ALTER TABLE TableA DROP PARTITION Partf;
ALTER TABLE TableA DROP PARTITION Partf;
ALTER TABLE TableA ADD PARTITION
ALTER TABLE TableA ADD PARTITION
...
@@ -825,12 +825,12 @@ Table Create Table
...
@@ -825,12 +825,12 @@ 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
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,
PARTITION
Partc
VALUES IN (3,4,7) ENGINE = MyISAM,
PARTITION
`Partc`
VALUES IN (3,4,7) ENGINE = MyISAM,
PARTITION
PartD
VALUES IN (5,6,12) ENGINE = MyISAM,
PARTITION
`PartD`
VALUES IN (5,6,12) ENGINE = MyISAM,
PARTITION
PartE
VALUES IN (13) ENGINE = MyISAM)
PARTITION
`PartE`
VALUES IN (13) ENGINE = MyISAM)
# Test of REORGANIZE PARTITIONS
# Test of REORGANIZE PARTITIONS
ALTER TABLE TableA REORGANIZE PARTITION parta,Partc INTO
ALTER TABLE TableA REORGANIZE PARTITION parta,Partc INTO
(PARTITION Partc VALUES IN (1,7)
(PARTITION Partc VALUES IN (1,7)
...
@@ -863,12 +863,12 @@ Table Create Table
...
@@ -863,12 +863,12 @@ 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
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,
PARTITION
partB
VALUES IN (4,8) COMMENT = 'Mix 3 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
`PartD`
VALUES IN (5,6,12) ENGINE = MyISAM,
PARTITION
PartE
VALUES IN (13) ENGINE = MyISAM)
PARTITION
`PartE`
VALUES IN (13) ENGINE = MyISAM)
# Test of RENAME TABLE
# Test of RENAME TABLE
RENAME TABLE TableA to TableB;
RENAME TABLE TableA to TableB;
SELECT * FROM TableB;
SELECT * FROM TableB;
...
@@ -928,12 +928,12 @@ Table Create Table
...
@@ -928,12 +928,12 @@ 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
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,
PARTITION
partB
VALUES IN (4,8) COMMENT = 'Mix 3 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
`PartD`
VALUES IN (5,6,12) ENGINE = MyISAM,
PARTITION
PartE
VALUES IN (13) ENGINE = MyISAM)
PARTITION
`PartE`
VALUES IN (13) ENGINE = MyISAM)
# Test of REMOVE PARTITIONING
# Test of REMOVE PARTITIONING
ALTER TABLE TableA REMOVE PARTITIONING;
ALTER TABLE TableA REMOVE PARTITIONING;
SELECT * FROM TableA;
SELECT * FROM TableA;
...
@@ -971,10 +971,10 @@ t1 CREATE TABLE `t1` (
...
@@ -971,10 +971,10 @@ t1 CREATE TABLE `t1` (
`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
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,
PARTITION
MAX
VALUES LESS THAN MAXVALUE ENGINE = MyISAM)
PARTITION
`MAX`
VALUES LESS THAN MAXVALUE ENGINE = MyISAM)
SELECT * FROM t1 ORDER BY a;
SELECT * FROM t1 ORDER BY a;
a b
a b
1 First
1 First
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment