Commit 72c33d24 authored by Sergey Petrunya's avatar Sergey Petrunya

Update test results to fix trivial test failures in parts testsuite

- New error message text
- PARTITION is now a reserved word in SQL, so it should be quoted
parent 9f14736a
......@@ -5,7 +5,7 @@ create database second_db;
use first_db;
DROP TABLE IF EXISTS first_db.t1;
Warnings:
Note 1051 Unknown table 't1'
Note 1051 Unknown table 'first_db.t1'
CREATE TABLE first_db.t1 (
`id` int(20) NOT NULL,
`name` varchar(64) NOT NULL default ''
......@@ -13,7 +13,7 @@ CREATE TABLE first_db.t1 (
DEFAULT CHARSET=latin1;
DROP TABLE IF EXISTS first_db.t2;
Warnings:
Note 1051 Unknown table 't2'
Note 1051 Unknown table 'first_db.t2'
CREATE TABLE first_db.t2 (
`id` int(20) NOT NULL,
`name` varchar(64) NOT NULL default ''
......@@ -22,7 +22,7 @@ DEFAULT CHARSET=latin1;
use second_db;
DROP TABLE IF EXISTS second_db.t1;
Warnings:
Note 1051 Unknown table 't1'
Note 1051 Unknown table 'second_db.t1'
CREATE TABLE second_db.t1 (
`id` int(20) NOT NULL,
`name` varchar(64) NOT NULL default ''
......@@ -30,7 +30,7 @@ CREATE TABLE second_db.t1 (
DEFAULT CHARSET=latin1;
DROP TABLE IF EXISTS second_db.t2;
Warnings:
Note 1051 Unknown table 't2'
Note 1051 Unknown table 'second_db.t2'
CREATE TABLE second_db.t2 (
`id` int(20) NOT NULL,
`name` varchar(64) NOT NULL default ''
......@@ -60,7 +60,7 @@ server_one 127.0.0.1 first_db root SLAVE_PORT mysql root
server_two 127.0.0.1 second_db root SLAVE_PORT mysql root
DROP TABLE IF EXISTS federated.old;
Warnings:
Note 1051 Unknown table 'old'
Note 1051 Unknown table 'federated.old'
CREATE TABLE federated.old (
`id` int(20) NOT NULL,
`name` varchar(64) NOT NULL default ''
......@@ -73,7 +73,7 @@ id name
1 federated.old-> first_db.t1, url format
DROP TABLE IF EXISTS federated.old2;
Warnings:
Note 1051 Unknown table 'old2'
Note 1051 Unknown table 'federated.old2'
CREATE TABLE federated.old2 (
`id` int(20) NOT NULL,
`name` varchar(64) NOT NULL default ''
......@@ -86,7 +86,7 @@ id name
1 federated.old2-> first_db.t2, url format
DROP TABLE IF EXISTS federated.urldb2t1;
Warnings:
Note 1051 Unknown table 'urldb2t1'
Note 1051 Unknown table 'federated.urldb2t1'
CREATE TABLE federated.urldb2t1 (
`id` int(20) NOT NULL,
`name` varchar(64) NOT NULL default ''
......@@ -99,7 +99,7 @@ id name
1 federated.urldb2t1 -> second_db.t1, url format
DROP TABLE IF EXISTS federated.urldb2t2;
Warnings:
Note 1051 Unknown table 'urldb2t2'
Note 1051 Unknown table 'federated.urldb2t2'
CREATE TABLE federated.urldb2t2 (
`id` int(20) NOT NULL,
`name` varchar(64) NOT NULL default ''
......@@ -112,7 +112,7 @@ id name
1 federated.urldb2t2 -> second_db.t2, url format
DROP TABLE IF EXISTS federated.t1;
Warnings:
Note 1051 Unknown table 't1'
Note 1051 Unknown table 'federated.t1'
CREATE TABLE federated.t1 (
`id` int(20) NOT NULL,
`name` varchar(64) NOT NULL default ''
......@@ -126,7 +126,7 @@ id name
1 server_one, new scheme, first_db.t1
DROP TABLE IF EXISTS federated.whatever;
Warnings:
Note 1051 Unknown table 'whatever'
Note 1051 Unknown table 'federated.whatever'
CREATE TABLE federated.whatever (
`id` int(20) NOT NULL,
`name` varchar(64) NOT NULL default ''
......
drop table if exists t1,t2;
Warnings:
Note 1051 Unknown table 't1'
Note 1051 Unknown table 't2'
Note 1051 Unknown table 'test.t1'
Note 1051 Unknown table 'test.t2'
create table t1 (id int(10) unsigned not null auto_increment primary key, v varchar(1000), b blob) row_format=page max_rows=2 engine=aria;
create table t2 (id int(10) unsigned not null auto_increment primary key, v varchar(1000), b blob) row_format=page max_rows=20000000 engine=aria;
lock tables t1 write,t2 write;
......
drop table if exists graph;
Warnings:
Note 1051 Unknown table 'graph'
Note 1051 Unknown table 'test.graph'
CREATE TABLE graph (
latch SMALLINT UNSIGNED NULL,
origid BIGINT UNSIGNED NULL,
......
......@@ -32,7 +32,7 @@ ALTER TABLE TableA ADD PARTITION
(PARTITION partA,
PARTITION Parta,
PARTITION PartA);
ERROR HY000: Duplicate partition name parta
ERROR HY000: Duplicate partition name partA
ALTER TABLE TableA ADD PARTITION
(PARTITION partE,
PARTITION Partf,
......@@ -237,7 +237,7 @@ PARTITION BY HASH (a)
PARTITION partA ,
PARTITION Parta ,
PARTITION PartA );
ERROR HY000: Duplicate partition name parta
ERROR HY000: Duplicate partition name partA
# Creating Hash partitioned table
CREATE TABLE TableA (a INT)
ENGINE = 'Archive'
......@@ -268,7 +268,7 @@ ALTER TABLE TableA ADD PARTITION
(PARTITION partA,
PARTITION Parta,
PARTITION PartA);
ERROR HY000: Duplicate partition name parta
ERROR HY000: Duplicate partition name partA
ALTER TABLE TableA ADD PARTITION
(PARTITION partE,
PARTITION Partf,
......@@ -493,7 +493,7 @@ a
# expecting duplicate partition name
ALTER TABLE TableA ADD PARTITION
(PARTITION partA VALUES LESS THAN (MAXVALUE));
ERROR HY000: Duplicate partition name parta
ERROR HY000: Duplicate partition name partA
ALTER TABLE TableA ADD PARTITION
(PARTITION partE VALUES LESS THAN (16),
PARTITION Partf VALUES LESS THAN (19),
......@@ -724,7 +724,7 @@ a
# expecting duplicate partition name
ALTER TABLE TableA ADD PARTITION
(PARTITION partA VALUES IN (0));
ERROR HY000: Duplicate partition name parta
ERROR HY000: Duplicate partition name partA
ALTER TABLE TableA ADD PARTITION
(PARTITION partE VALUES IN (16),
PARTITION Partf VALUES IN (19),
......
......@@ -32,7 +32,7 @@ ALTER TABLE TableA ADD PARTITION
(PARTITION partA,
PARTITION Parta,
PARTITION PartA);
ERROR HY000: Duplicate partition name parta
ERROR HY000: Duplicate partition name partA
ALTER TABLE TableA ADD PARTITION
(PARTITION partE,
PARTITION Partf,
......@@ -237,7 +237,7 @@ PARTITION BY HASH (a)
PARTITION partA ,
PARTITION Parta ,
PARTITION PartA );
ERROR HY000: Duplicate partition name parta
ERROR HY000: Duplicate partition name partA
# Creating Hash partitioned table
CREATE TABLE TableA (a INT)
ENGINE = 'InnoDB'
......@@ -268,7 +268,7 @@ ALTER TABLE TableA ADD PARTITION
(PARTITION partA,
PARTITION Parta,
PARTITION PartA);
ERROR HY000: Duplicate partition name parta
ERROR HY000: Duplicate partition name partA
ALTER TABLE TableA ADD PARTITION
(PARTITION partE,
PARTITION Partf,
......@@ -493,7 +493,7 @@ a
# expecting duplicate partition name
ALTER TABLE TableA ADD PARTITION
(PARTITION partA VALUES LESS THAN (MAXVALUE));
ERROR HY000: Duplicate partition name parta
ERROR HY000: Duplicate partition name partA
ALTER TABLE TableA ADD PARTITION
(PARTITION partE VALUES LESS THAN (16),
PARTITION Partf VALUES LESS THAN (19),
......@@ -724,7 +724,7 @@ a
# expecting duplicate partition name
ALTER TABLE TableA ADD PARTITION
(PARTITION partA VALUES IN (0));
ERROR HY000: Duplicate partition name parta
ERROR HY000: Duplicate partition name partA
ALTER TABLE TableA ADD PARTITION
(PARTITION partE VALUES IN (16),
PARTITION Partf VALUES IN (19),
......
......@@ -32,7 +32,7 @@ ALTER TABLE TableA ADD PARTITION
(PARTITION partA,
PARTITION Parta,
PARTITION PartA);
ERROR HY000: Duplicate partition name parta
ERROR HY000: Duplicate partition name partA
ALTER TABLE TableA ADD PARTITION
(PARTITION partE,
PARTITION Partf,
......@@ -237,7 +237,7 @@ PARTITION BY HASH (a)
PARTITION partA ,
PARTITION Parta ,
PARTITION PartA );
ERROR HY000: Duplicate partition name parta
ERROR HY000: Duplicate partition name partA
# Creating Hash partitioned table
CREATE TABLE TableA (a INT)
ENGINE = 'Memory'
......@@ -268,7 +268,7 @@ ALTER TABLE TableA ADD PARTITION
(PARTITION partA,
PARTITION Parta,
PARTITION PartA);
ERROR HY000: Duplicate partition name parta
ERROR HY000: Duplicate partition name partA
ALTER TABLE TableA ADD PARTITION
(PARTITION partE,
PARTITION Partf,
......@@ -493,7 +493,7 @@ a
# expecting duplicate partition name
ALTER TABLE TableA ADD PARTITION
(PARTITION partA VALUES LESS THAN (MAXVALUE));
ERROR HY000: Duplicate partition name parta
ERROR HY000: Duplicate partition name partA
ALTER TABLE TableA ADD PARTITION
(PARTITION partE VALUES LESS THAN (16),
PARTITION Partf VALUES LESS THAN (19),
......@@ -724,7 +724,7 @@ a
# expecting duplicate partition name
ALTER TABLE TableA ADD PARTITION
(PARTITION partA VALUES IN (0));
ERROR HY000: Duplicate partition name parta
ERROR HY000: Duplicate partition name partA
ALTER TABLE TableA ADD PARTITION
(PARTITION partE VALUES IN (16),
PARTITION Partf VALUES IN (19),
......
......@@ -32,7 +32,7 @@ ALTER TABLE TableA ADD PARTITION
(PARTITION partA,
PARTITION Parta,
PARTITION PartA);
ERROR HY000: Duplicate partition name parta
ERROR HY000: Duplicate partition name partA
ALTER TABLE TableA ADD PARTITION
(PARTITION partE,
PARTITION Partf,
......@@ -237,7 +237,7 @@ PARTITION BY HASH (a)
PARTITION partA ,
PARTITION Parta ,
PARTITION PartA );
ERROR HY000: Duplicate partition name parta
ERROR HY000: Duplicate partition name partA
# Creating Hash partitioned table
CREATE TABLE TableA (a INT)
ENGINE = 'MyISAM'
......@@ -268,7 +268,7 @@ ALTER TABLE TableA ADD PARTITION
(PARTITION partA,
PARTITION Parta,
PARTITION PartA);
ERROR HY000: Duplicate partition name parta
ERROR HY000: Duplicate partition name partA
ALTER TABLE TableA ADD PARTITION
(PARTITION partE,
PARTITION Partf,
......@@ -493,7 +493,7 @@ a
# expecting duplicate partition name
ALTER TABLE TableA ADD PARTITION
(PARTITION partA VALUES LESS THAN (MAXVALUE));
ERROR HY000: Duplicate partition name parta
ERROR HY000: Duplicate partition name partA
ALTER TABLE TableA ADD PARTITION
(PARTITION partE VALUES LESS THAN (16),
PARTITION Partf VALUES LESS THAN (19),
......@@ -724,7 +724,7 @@ a
# expecting duplicate partition name
ALTER TABLE TableA ADD PARTITION
(PARTITION partA VALUES IN (0));
ERROR HY000: Duplicate partition name parta
ERROR HY000: Duplicate partition name partA
ALTER TABLE TableA ADD PARTITION
(PARTITION partE VALUES IN (16),
PARTITION Partf VALUES IN (19),
......
......@@ -32,7 +32,7 @@ ALTER TABLE TableA ADD PARTITION
(PARTITION partA,
PARTITION Parta,
PARTITION PartA);
ERROR HY000: Duplicate partition name parta
ERROR HY000: Duplicate partition name partA
ALTER TABLE TableA ADD PARTITION
(PARTITION partE,
PARTITION Partf,
......@@ -228,7 +228,7 @@ PARTITION BY HASH (a)
PARTITION partA ,
PARTITION Parta ,
PARTITION PartA );
ERROR HY000: Duplicate partition name parta
ERROR HY000: Duplicate partition name partA
# Creating Hash partitioned table
CREATE TABLE TableA (a INT)
ENGINE = 'Archive'
......@@ -259,7 +259,7 @@ ALTER TABLE TableA ADD PARTITION
(PARTITION partA,
PARTITION Parta,
PARTITION PartA);
ERROR HY000: Duplicate partition name parta
ERROR HY000: Duplicate partition name partA
ALTER TABLE TableA ADD PARTITION
(PARTITION partE,
PARTITION Partf,
......@@ -475,7 +475,7 @@ a
# expecting duplicate partition name
ALTER TABLE TableA ADD PARTITION
(PARTITION partA VALUES LESS THAN (MAXVALUE));
ERROR HY000: Duplicate partition name parta
ERROR HY000: Duplicate partition name partA
ALTER TABLE TableA ADD PARTITION
(PARTITION partE VALUES LESS THAN (16),
PARTITION Partf VALUES LESS THAN (19),
......@@ -698,7 +698,7 @@ a
# expecting duplicate partition name
ALTER TABLE TableA ADD PARTITION
(PARTITION partA VALUES IN (0));
ERROR HY000: Duplicate partition name parta
ERROR HY000: Duplicate partition name partA
ALTER TABLE TableA ADD PARTITION
(PARTITION partE VALUES IN (16),
PARTITION Partf VALUES IN (19),
......
......@@ -32,7 +32,7 @@ ALTER TABLE TableA ADD PARTITION
(PARTITION partA,
PARTITION Parta,
PARTITION PartA);
ERROR HY000: Duplicate partition name parta
ERROR HY000: Duplicate partition name partA
ALTER TABLE TableA ADD PARTITION
(PARTITION partE,
PARTITION Partf,
......@@ -228,7 +228,7 @@ PARTITION BY HASH (a)
PARTITION partA ,
PARTITION Parta ,
PARTITION PartA );
ERROR HY000: Duplicate partition name parta
ERROR HY000: Duplicate partition name partA
# Creating Hash partitioned table
CREATE TABLE TableA (a INT)
ENGINE = 'InnoDB'
......@@ -259,7 +259,7 @@ ALTER TABLE TableA ADD PARTITION
(PARTITION partA,
PARTITION Parta,
PARTITION PartA);
ERROR HY000: Duplicate partition name parta
ERROR HY000: Duplicate partition name partA
ALTER TABLE TableA ADD PARTITION
(PARTITION partE,
PARTITION Partf,
......@@ -475,7 +475,7 @@ a
# expecting duplicate partition name
ALTER TABLE TableA ADD PARTITION
(PARTITION partA VALUES LESS THAN (MAXVALUE));
ERROR HY000: Duplicate partition name parta
ERROR HY000: Duplicate partition name partA
ALTER TABLE TableA ADD PARTITION
(PARTITION partE VALUES LESS THAN (16),
PARTITION Partf VALUES LESS THAN (19),
......@@ -698,7 +698,7 @@ a
# expecting duplicate partition name
ALTER TABLE TableA ADD PARTITION
(PARTITION partA VALUES IN (0));
ERROR HY000: Duplicate partition name parta
ERROR HY000: Duplicate partition name partA
ALTER TABLE TableA ADD PARTITION
(PARTITION partE VALUES IN (16),
PARTITION Partf VALUES IN (19),
......
......@@ -32,7 +32,7 @@ ALTER TABLE TableA ADD PARTITION
(PARTITION partA,
PARTITION Parta,
PARTITION PartA);
ERROR HY000: Duplicate partition name parta
ERROR HY000: Duplicate partition name partA
ALTER TABLE TableA ADD PARTITION
(PARTITION partE,
PARTITION Partf,
......@@ -228,7 +228,7 @@ PARTITION BY HASH (a)
PARTITION partA ,
PARTITION Parta ,
PARTITION PartA );
ERROR HY000: Duplicate partition name parta
ERROR HY000: Duplicate partition name partA
# Creating Hash partitioned table
CREATE TABLE TableA (a INT)
ENGINE = 'Memory'
......@@ -259,7 +259,7 @@ ALTER TABLE TableA ADD PARTITION
(PARTITION partA,
PARTITION Parta,
PARTITION PartA);
ERROR HY000: Duplicate partition name parta
ERROR HY000: Duplicate partition name partA
ALTER TABLE TableA ADD PARTITION
(PARTITION partE,
PARTITION Partf,
......@@ -475,7 +475,7 @@ a
# expecting duplicate partition name
ALTER TABLE TableA ADD PARTITION
(PARTITION partA VALUES LESS THAN (MAXVALUE));
ERROR HY000: Duplicate partition name parta
ERROR HY000: Duplicate partition name partA
ALTER TABLE TableA ADD PARTITION
(PARTITION partE VALUES LESS THAN (16),
PARTITION Partf VALUES LESS THAN (19),
......@@ -698,7 +698,7 @@ a
# expecting duplicate partition name
ALTER TABLE TableA ADD PARTITION
(PARTITION partA VALUES IN (0));
ERROR HY000: Duplicate partition name parta
ERROR HY000: Duplicate partition name partA
ALTER TABLE TableA ADD PARTITION
(PARTITION partE VALUES IN (16),
PARTITION Partf VALUES IN (19),
......
......@@ -32,7 +32,7 @@ ALTER TABLE TableA ADD PARTITION
(PARTITION partA,
PARTITION Parta,
PARTITION PartA);
ERROR HY000: Duplicate partition name parta
ERROR HY000: Duplicate partition name partA
ALTER TABLE TableA ADD PARTITION
(PARTITION partE,
PARTITION Partf,
......@@ -228,7 +228,7 @@ PARTITION BY HASH (a)
PARTITION partA ,
PARTITION Parta ,
PARTITION PartA );
ERROR HY000: Duplicate partition name parta
ERROR HY000: Duplicate partition name partA
# Creating Hash partitioned table
CREATE TABLE TableA (a INT)
ENGINE = 'MyISAM'
......@@ -259,7 +259,7 @@ ALTER TABLE TableA ADD PARTITION
(PARTITION partA,
PARTITION Parta,
PARTITION PartA);
ERROR HY000: Duplicate partition name parta
ERROR HY000: Duplicate partition name partA
ALTER TABLE TableA ADD PARTITION
(PARTITION partE,
PARTITION Partf,
......@@ -475,7 +475,7 @@ a
# expecting duplicate partition name
ALTER TABLE TableA ADD PARTITION
(PARTITION partA VALUES LESS THAN (MAXVALUE));
ERROR HY000: Duplicate partition name parta
ERROR HY000: Duplicate partition name partA
ALTER TABLE TableA ADD PARTITION
(PARTITION partE VALUES LESS THAN (16),
PARTITION Partf VALUES LESS THAN (19),
......@@ -698,7 +698,7 @@ a
# expecting duplicate partition name
ALTER TABLE TableA ADD PARTITION
(PARTITION partA VALUES IN (0));
ERROR HY000: Duplicate partition name parta
ERROR HY000: Duplicate partition name partA
ALTER TABLE TableA ADD PARTITION
(PARTITION partE VALUES IN (16),
PARTITION Partf VALUES IN (19),
......
......@@ -209,7 +209,7 @@ PARTITIONS 7;
SELECT COUNT(*) FROM t1_will_crash;
COUNT(*)
33
SELECT (b % 7) AS partition, COUNT(*) AS rows FROM t1_will_crash GROUP BY (b % 7);
SELECT (b % 7) AS `partition`, COUNT(*) AS rows FROM t1_will_crash GROUP BY (b % 7);
partition rows
0 2
1 5
......@@ -218,7 +218,7 @@ partition rows
4 4
5 4
6 8
SELECT (b % 7) AS partition, b, a, length(c) FROM t1_will_crash ORDER BY partition, b, a;
SELECT (b % 7) AS `partition`, b, a, length(c) FROM t1_will_crash ORDER BY `partition`, b, a;
partition b a length(c)
0 0 lost 64
0 7 z lost 64
......@@ -282,7 +282,7 @@ test.t1_will_crash repair status OK
SELECT COUNT(*) FROM t1_will_crash;
COUNT(*)
29
SELECT (b % 7) AS partition, COUNT(*) AS rows FROM t1_will_crash GROUP BY (b % 7);
SELECT (b % 7) AS `partition`, COUNT(*) AS rows FROM t1_will_crash GROUP BY (b % 7);
partition rows
1 4
2 5
......@@ -290,7 +290,7 @@ partition rows
4 4
5 4
6 7
SELECT (b % 7) AS partition, b, a, length(c) FROM t1_will_crash ORDER BY partition, b, a;
SELECT (b % 7) AS `partition`, b, a, length(c) FROM t1_will_crash ORDER BY `partition`, b, a;
partition b a length(c)
1 1 abc 64
1 8 tuw 64
......@@ -366,9 +366,9 @@ Table Op Msg_type Msg_text
test.t1_will_crash repair info Delete link points outside datafile at 340
test.t1_will_crash repair info Delete link points outside datafile at 340
test.t1_will_crash repair status OK
SELECT (b % 7) AS partition, b, a, length(c) FROM t1_will_crash
SELECT (b % 7) AS `partition`, b, a, length(c) FROM t1_will_crash
WHERE (b % 7) = 6
ORDER BY partition, b, a;
ORDER BY `partition`, b, a;
partition b a length(c)
6 6 jkl 64
6 13 ooo 64
......@@ -385,9 +385,9 @@ FLUSH TABLES;
# table, depending if one reads via index or direct on datafile.
# Since crash when reuse of deleted row space, CHECK MEDIUM or EXTENDED
# is required (MEDIUM is default) to verify correct behavior!
SELECT (b % 7) AS partition, b, a, length(c) FROM t1_will_crash
SELECT (b % 7) AS `partition`, b, a, length(c) FROM t1_will_crash
WHERE (b % 7) = 6
ORDER BY partition, b, a;
ORDER BY `partition`, b, a;
partition b a length(c)
6 6 jkl 64
6 13 ooo 64
......@@ -396,9 +396,9 @@ partition b a length(c)
6 97 zzzzzZzzzzz 64
SET @save_optimizer_switch= @@optimizer_switch;
SET @@optimizer_switch='derived_merge=off';
SELECT (b % 7) AS partition, b, a FROM (SELECT b,a FROM t1_will_crash) q
SELECT (b % 7) AS `partition`, b, a FROM (SELECT b,a FROM t1_will_crash) q
WHERE (b % 7) = 6
ORDER BY partition, b, a;
ORDER BY `partition`, b, a;
partition b a
6 6 jkl
6 13 ooo
......@@ -422,7 +422,7 @@ test.t1_will_crash repair status OK
SELECT COUNT(*) FROM t1_will_crash;
COUNT(*)
29
SELECT (b % 7) AS partition, COUNT(*) AS rows FROM t1_will_crash GROUP BY (b % 7);
SELECT (b % 7) AS `partition`, COUNT(*) AS rows FROM t1_will_crash GROUP BY (b % 7);
partition rows
1 4
2 4
......@@ -430,7 +430,7 @@ partition rows
4 4
5 4
6 8
SELECT (b % 7) AS partition, b, a, length(c) FROM t1_will_crash ORDER BY partition, b, a;
SELECT (b % 7) AS `partition`, b, a, length(c) FROM t1_will_crash ORDER BY `partition`, b, a;
partition b a length(c)
1 1 abc 64
1 8 tuw 64
......
......@@ -151,8 +151,8 @@ eval INSERT INTO t1_will_crash VALUES
('6 row 7 (crash before completely written to datafile)', 27, '$lt$lt');
--enable_query_log
SELECT COUNT(*) FROM t1_will_crash;
SELECT (b % 7) AS partition, COUNT(*) AS rows FROM t1_will_crash GROUP BY (b % 7);
SELECT (b % 7) AS partition, b, a, length(c) FROM t1_will_crash ORDER BY partition, b, a;
SELECT (b % 7) AS `partition`, COUNT(*) AS rows FROM t1_will_crash GROUP BY (b % 7);
SELECT (b % 7) AS `partition`, b, a, length(c) FROM t1_will_crash ORDER BY `partition`, b, a;
FLUSH TABLES;
# testing p0, p1, p3, p6(1)
--echo # truncating p0 to simulate an empty datafile (not recovered!)
......@@ -177,8 +177,8 @@ OPTIMIZE TABLE t1_will_crash;
CHECK TABLE t1_will_crash;
REPAIR TABLE t1_will_crash;
SELECT COUNT(*) FROM t1_will_crash;
SELECT (b % 7) AS partition, COUNT(*) AS rows FROM t1_will_crash GROUP BY (b % 7);
SELECT (b % 7) AS partition, b, a, length(c) FROM t1_will_crash ORDER BY partition, b, a;
SELECT (b % 7) AS `partition`, COUNT(*) AS rows FROM t1_will_crash GROUP BY (b % 7);
SELECT (b % 7) AS `partition`, b, a, length(c) FROM t1_will_crash ORDER BY `partition`, b, a;
FLUSH TABLES;
# testing p2, p4, p6(2, 3)
......@@ -215,9 +215,9 @@ FLUSH TABLES;
#ALTER TABLE t1_will_crash OPTIMIZE PARTITION p6;
ALTER TABLE t1_will_crash CHECK PARTITION p6;
ALTER TABLE t1_will_crash REPAIR PARTITION p6;
SELECT (b % 7) AS partition, b, a, length(c) FROM t1_will_crash
SELECT (b % 7) AS `partition`, b, a, length(c) FROM t1_will_crash
WHERE (b % 7) = 6
ORDER BY partition, b, a;
ORDER BY `partition`, b, a;
FLUSH TABLES;
--echo #
......@@ -229,21 +229,21 @@ FLUSH TABLES;
--echo # table, depending if one reads via index or direct on datafile.
--echo # Since crash when reuse of deleted row space, CHECK MEDIUM or EXTENDED
--echo # is required (MEDIUM is default) to verify correct behavior!
SELECT (b % 7) AS partition, b, a, length(c) FROM t1_will_crash
SELECT (b % 7) AS `partition`, b, a, length(c) FROM t1_will_crash
WHERE (b % 7) = 6
ORDER BY partition, b, a;
ORDER BY `partition`, b, a;
SET @save_optimizer_switch= @@optimizer_switch;
SET @@optimizer_switch='derived_merge=off';
SELECT (b % 7) AS partition, b, a FROM (SELECT b,a FROM t1_will_crash) q
SELECT (b % 7) AS `partition`, b, a FROM (SELECT b,a FROM t1_will_crash) q
WHERE (b % 7) = 6
ORDER BY partition, b, a;
ORDER BY `partition`, b, a;
SET @@optimizer_switch=@save_optimizer_switch;
# NOTE: REBUILD PARTITION without CHECK before, 2 + (1) records will be lost!
#ALTER TABLE t1_will_crash REBUILD PARTITION p6;
ALTER TABLE t1_will_crash CHECK PARTITION p6;
ALTER TABLE t1_will_crash REPAIR PARTITION p6;
SELECT COUNT(*) FROM t1_will_crash;
SELECT (b % 7) AS partition, COUNT(*) AS rows FROM t1_will_crash GROUP BY (b % 7);
SELECT (b % 7) AS partition, b, a, length(c) FROM t1_will_crash ORDER BY partition, b, a;
SELECT (b % 7) AS `partition`, COUNT(*) AS rows FROM t1_will_crash GROUP BY (b % 7);
SELECT (b % 7) AS `partition`, b, a, length(c) FROM t1_will_crash ORDER BY `partition`, b, a;
ALTER TABLE t1_will_crash CHECK PARTITION all EXTENDED;
DROP TABLE t1_will_crash;
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