Commit 8144fd1a authored by unknown's avatar unknown

Merge witty.:/Users/mattiasj/clones/mysql-5.1-bug20129.2

into  witty.:/Users/mattiasj/clones/topush-51


mysql-test/r/partition.result:
  Auto merged
mysql-test/suite/parts/t/disabled.def:
  Auto merged
mysql-test/t/partition.test:
  Auto merged
sql/sql_partition.cc:
  Auto merged
mysql-test/suite/parts/r/partition_basic_innodb.result:
  Manual merge
mysql-test/suite/parts/r/partition_basic_myisam.result:
  Manual merge
mysql-test/suite/parts/r/partition_engine_innodb.result:
  Manual merge
mysql-test/suite/parts/r/partition_engine_myisam.result:
  Manual merge
parents 1864caea 6a154536
......@@ -336,7 +336,7 @@ PARTITION BY LIST (a)
(PARTITION x1 VALUES IN (10), PARTITION x2 VALUES IN (20));
analyze table t1;
Table Op Msg_type Msg_text
test.t1 analyze status OK
test.t1 analyze note The storage engine for the table doesn't support analyze
drop table t1;
create table t1
(a int)
......@@ -1037,9 +1037,7 @@ SHOW TABLE STATUS;
Name Engine Version Row_format Rows Avg_row_length Data_length Max_data_length Index_length Data_free Auto_increment Create_time Update_time Check_time Collation Checksum Create_options Comment
t1 MyISAM 10 Fixed 1 14 14 0 0 7 NULL NULL NULL NULL latin1_swedish_ci NULL partitioned
ALTER TABLE t1 OPTIMIZE PARTITION p0;
SHOW TABLE STATUS;
Name Engine Version Row_format Rows Avg_row_length Data_length Max_data_length Index_length Data_free Auto_increment Create_time Update_time Check_time Collation Checksum Create_options Comment
t1 MyISAM 10 Fixed 1 7 7 0 1024 0 NULL NULL NULL NULL latin1_swedish_ci NULL partitioned
ERROR 42000: The storage engine for the table doesn't support optimize partition
DROP TABLE t1;
CREATE TABLE t1 (a int, index(a)) PARTITION BY KEY(a);
ALTER TABLE t1 DISABLE KEYS;
......
......@@ -83,17 +83,17 @@ let $alter= ALTER TABLE t1 REBUILD PARTITION part_1,part_1,part_1;
--echo #------------------------------------------------------------------------
--echo # 5 ALTER ... REPAIR PARTITION
--echo #------------------------------------------------------------------------
--echo # 5.1 ALTER ... REBUILD PARTITION part_1;
let $alter= ALTER TABLE t1 REBUILD PARTITION part_1;
--echo # 5.1 ALTER ... REPAIR PARTITION part_1;
let $alter= ALTER TABLE t1 REPAIR PARTITION part_1;
--source suite/parts/inc/partition_alter_41.inc
--echo # 5.2 ALTER ... REBUILD PARTITION part_1,part_2;
let $alter= ALTER TABLE t1 REBUILD PARTITION part_1,part_2;
--echo # 5.2 ALTER ... REPAIR PARTITION part_1,part_2;
let $alter= ALTER TABLE t1 REPAIR PARTITION part_1,part_2;
--source suite/parts/inc/partition_alter_41.inc
--echo # 5.3 ALTER ... REBUILD PARTITION part_1,part_2,part_5,part_6,part_10;
let $alter= ALTER TABLE t1 REBUILD PARTITION part_1,part_2,part_5,part_6,part_10;
--echo # 5.3 ALTER ... REPAIR PARTITION part_1,part_2,part_5,part_6,part_10;
let $alter= ALTER TABLE t1 REPAIR PARTITION part_1,part_2,part_5,part_6,part_10;
--source suite/parts/inc/partition_alter_41.inc
--echo # 5.4 ALTER ... REBUILD PARTITION part_1,part_1,part_1;
let $alter= ALTER TABLE t1 REBUILD PARTITION part_1,part_1,part_1;
--echo # 5.4 ALTER ... REPAIR PARTITION part_1,part_1,part_1;
let $alter= ALTER TABLE t1 REPAIR PARTITION part_1,part_1,part_1;
--source suite/parts/inc/partition_alter_41.inc
--echo #------------------------------------------------------------------------
......
This source diff could not be displayed because it is too large. You can view the blob instead.
......@@ -473,16 +473,16 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
test.t1 analyze status OK
test.t1 analyze note The storage engine for the table doesn't support analyze
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
test.t1 check status OK
test.t1 check note The storage engine for the table doesn't support check
CHECKSUM TABLE t1 EXTENDED;
Table Checksum
test.t1 <some_value>
OPTIMIZE TABLE t1;
Table Op Msg_type Msg_text
test.t1 optimize status OK
test.t1 optimize note The storage engine for the table doesn't support optimize
# check layout success: 1
REPAIR TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
......@@ -927,16 +927,16 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
test.t1 analyze status OK
test.t1 analyze note The storage engine for the table doesn't support analyze
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
test.t1 check status OK
test.t1 check note The storage engine for the table doesn't support check
CHECKSUM TABLE t1 EXTENDED;
Table Checksum
test.t1 <some_value>
OPTIMIZE TABLE t1;
Table Op Msg_type Msg_text
test.t1 optimize status OK
test.t1 optimize note The storage engine for the table doesn't support optimize
# check layout success: 1
REPAIR TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
......@@ -1380,16 +1380,16 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
test.t1 analyze status OK
test.t1 analyze note The storage engine for the table doesn't support analyze
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
test.t1 check status OK
test.t1 check note The storage engine for the table doesn't support check
CHECKSUM TABLE t1 EXTENDED;
Table Checksum
test.t1 <some_value>
OPTIMIZE TABLE t1;
Table Op Msg_type Msg_text
test.t1 optimize status OK
test.t1 optimize note The storage engine for the table doesn't support optimize
# check layout success: 1
REPAIR TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
......@@ -1416,7 +1416,6 @@ PARTITION BY HASH(f_int1)
( PARTITION part1 STORAGE ENGINE = 'InnoDB',
PARTITION part2
);
ERROR HY000: The mix of handlers in the partitions is not allowed in this version of MySQL
CREATE TABLE t1 (
f_int1 INTEGER,
f_int2 INTEGER,
......@@ -1428,7 +1427,6 @@ PARTITION BY HASH(f_int1)
( PARTITION part1 ,
PARTITION part2 STORAGE ENGINE = 'InnoDB'
);
ERROR HY000: The mix of handlers in the partitions is not allowed in this version of MySQL
CREATE TABLE t1 (
f_int1 INTEGER,
f_int2 INTEGER,
......@@ -1445,9 +1443,6 @@ PARTITION part2 VALUES LESS THAN (2147483646)
(SUBPARTITION subpart21 STORAGE ENGINE = 'InnoDB',
SUBPARTITION subpart22 STORAGE ENGINE = 'InnoDB')
);
ERROR HY000: The mix of handlers in the partitions is not allowed in this version of MySQL
# this should fail with ER_MIX_HANDLER_ERROR
# after fixing Bug#33722
CREATE TABLE t1 (
f_int1 INTEGER,
f_int2 INTEGER,
......@@ -1880,16 +1875,16 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
test.t1 analyze status OK
test.t1 analyze note The storage engine for the table doesn't support analyze
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
test.t1 check status OK
test.t1 check note The storage engine for the table doesn't support check
CHECKSUM TABLE t1 EXTENDED;
Table Checksum
test.t1 <some_value>
OPTIMIZE TABLE t1;
Table Op Msg_type Msg_text
test.t1 optimize status OK
test.t1 optimize note The storage engine for the table doesn't support optimize
# check layout success: 1
REPAIR TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
......@@ -1923,9 +1918,6 @@ PARTITION part2 VALUES LESS THAN (2147483646)
(SUBPARTITION subpart21 STORAGE ENGINE = 'InnoDB',
SUBPARTITION subpart22 STORAGE ENGINE = 'InnoDB')
);
ERROR HY000: The mix of handlers in the partitions is not allowed in this version of MySQL
# this should work
# after fixing Bug#33722
CREATE TABLE t1 (
f_int1 INTEGER,
f_int2 INTEGER,
......@@ -1942,7 +1934,6 @@ PARTITION part2 VALUES LESS THAN (2147483646) ENGINE = 'InnoDB'
(SUBPARTITION subpart21,
SUBPARTITION subpart22)
);
ERROR HY000: The mix of handlers in the partitions is not allowed in this version of MySQL
#------------------------------------------------------------------------
# 5 Precedence of storage engine assignments (if there is any)
#------------------------------------------------------------------------
......@@ -2377,16 +2368,16 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
test.t1 analyze status OK
test.t1 analyze note The storage engine for the table doesn't support analyze
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
test.t1 check status OK
test.t1 check note The storage engine for the table doesn't support check
CHECKSUM TABLE t1 EXTENDED;
Table Checksum
test.t1 <some_value>
OPTIMIZE TABLE t1;
Table Op Msg_type Msg_text
test.t1 optimize status OK
test.t1 optimize note The storage engine for the table doesn't support optimize
# check layout success: 1
REPAIR TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
......@@ -2830,16 +2821,16 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
test.t1 analyze status OK
test.t1 analyze note The storage engine for the table doesn't support analyze
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
test.t1 check status OK
test.t1 check note The storage engine for the table doesn't support check
CHECKSUM TABLE t1 EXTENDED;
Table Checksum
test.t1 <some_value>
OPTIMIZE TABLE t1;
Table Op Msg_type Msg_text
test.t1 optimize status OK
test.t1 optimize note The storage engine for the table doesn't support optimize
# check layout success: 1
REPAIR TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
......@@ -2871,7 +2862,6 @@ PARTITION part2 VALUES LESS THAN (2147483646)
(SUBPARTITION subpart21 STORAGE ENGINE = 'InnoDB',
SUBPARTITION subpart22 STORAGE ENGINE = 'InnoDB')
);
ERROR HY000: The mix of handlers in the partitions is not allowed in this version of MySQL
#------------------------------------------------------------------------
# 6 Session default engine differs from engine used within create table
#------------------------------------------------------------------------
......@@ -3302,16 +3292,16 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
test.t1 analyze status OK
test.t1 analyze note The storage engine for the table doesn't support analyze
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
test.t1 check status OK
test.t1 check note The storage engine for the table doesn't support check
CHECKSUM TABLE t1 EXTENDED;
Table Checksum
test.t1 <some_value>
OPTIMIZE TABLE t1;
Table Op Msg_type Msg_text
test.t1 optimize status OK
test.t1 optimize note The storage engine for the table doesn't support optimize
# check layout success: 1
REPAIR TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
......@@ -3751,16 +3741,16 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
test.t1 analyze status OK
test.t1 analyze note The storage engine for the table doesn't support analyze
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
test.t1 check status OK
test.t1 check note The storage engine for the table doesn't support check
CHECKSUM TABLE t1 EXTENDED;
Table Checksum
test.t1 <some_value>
OPTIMIZE TABLE t1;
Table Op Msg_type Msg_text
test.t1 optimize status OK
test.t1 optimize note The storage engine for the table doesn't support optimize
# check layout success: 1
REPAIR TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
......
......@@ -483,20 +483,20 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
test.t1 analyze status OK
test.t1 analyze note The storage engine for the table doesn't support analyze
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
test.t1 check status OK
test.t1 check note The storage engine for the table doesn't support check
CHECKSUM TABLE t1 EXTENDED;
Table Checksum
test.t1 <some_value>
OPTIMIZE TABLE t1;
Table Op Msg_type Msg_text
test.t1 optimize status OK
test.t1 optimize note The storage engine for the table doesn't support optimize
# check layout success: 1
REPAIR TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
test.t1 repair status OK
test.t1 repair note The storage engine for the table doesn't support repair
# check layout success: 1
TRUNCATE t1;
......@@ -947,20 +947,20 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
test.t1 analyze status OK
test.t1 analyze note The storage engine for the table doesn't support analyze
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
test.t1 check status OK
test.t1 check note The storage engine for the table doesn't support check
CHECKSUM TABLE t1 EXTENDED;
Table Checksum
test.t1 <some_value>
OPTIMIZE TABLE t1;
Table Op Msg_type Msg_text
test.t1 optimize status OK
test.t1 optimize note The storage engine for the table doesn't support optimize
# check layout success: 1
REPAIR TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
test.t1 repair status OK
test.t1 repair note The storage engine for the table doesn't support repair
# check layout success: 1
TRUNCATE t1;
......@@ -1414,20 +1414,20 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
test.t1 analyze status OK
test.t1 analyze note The storage engine for the table doesn't support analyze
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
test.t1 check status OK
test.t1 check note The storage engine for the table doesn't support check
CHECKSUM TABLE t1 EXTENDED;
Table Checksum
test.t1 <some_value>
OPTIMIZE TABLE t1;
Table Op Msg_type Msg_text
test.t1 optimize status OK
test.t1 optimize note The storage engine for the table doesn't support optimize
# check layout success: 1
REPAIR TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
test.t1 repair status OK
test.t1 repair note The storage engine for the table doesn't support repair
# check layout success: 1
TRUNCATE t1;
......@@ -1450,7 +1450,6 @@ PARTITION BY HASH(f_int1)
( PARTITION part1 STORAGE ENGINE = 'MyISAM',
PARTITION part2
);
ERROR HY000: The mix of handlers in the partitions is not allowed in this version of MySQL
CREATE TABLE t1 (
f_int1 INTEGER,
f_int2 INTEGER,
......@@ -1462,7 +1461,6 @@ PARTITION BY HASH(f_int1)
( PARTITION part1 ,
PARTITION part2 STORAGE ENGINE = 'MyISAM'
);
ERROR HY000: The mix of handlers in the partitions is not allowed in this version of MySQL
CREATE TABLE t1 (
f_int1 INTEGER,
f_int2 INTEGER,
......@@ -1479,9 +1477,6 @@ PARTITION part2 VALUES LESS THAN (2147483646)
(SUBPARTITION subpart21 STORAGE ENGINE = 'MyISAM',
SUBPARTITION subpart22 STORAGE ENGINE = 'MyISAM')
);
ERROR HY000: The mix of handlers in the partitions is not allowed in this version of MySQL
# this should fail with ER_MIX_HANDLER_ERROR
# after fixing Bug#33722
CREATE TABLE t1 (
f_int1 INTEGER,
f_int2 INTEGER,
......@@ -1928,20 +1923,20 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
test.t1 analyze status OK
test.t1 analyze note The storage engine for the table doesn't support analyze
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
test.t1 check status OK
test.t1 check note The storage engine for the table doesn't support check
CHECKSUM TABLE t1 EXTENDED;
Table Checksum
test.t1 <some_value>
OPTIMIZE TABLE t1;
Table Op Msg_type Msg_text
test.t1 optimize status OK
test.t1 optimize note The storage engine for the table doesn't support optimize
# check layout success: 1
REPAIR TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
test.t1 repair status OK
test.t1 repair note The storage engine for the table doesn't support repair
# check layout success: 1
TRUNCATE t1;
......@@ -1971,9 +1966,6 @@ PARTITION part2 VALUES LESS THAN (2147483646)
(SUBPARTITION subpart21 STORAGE ENGINE = 'MyISAM',
SUBPARTITION subpart22 STORAGE ENGINE = 'MyISAM')
);
ERROR HY000: The mix of handlers in the partitions is not allowed in this version of MySQL
# this should work
# after fixing Bug#33722
CREATE TABLE t1 (
f_int1 INTEGER,
f_int2 INTEGER,
......@@ -1990,7 +1982,6 @@ PARTITION part2 VALUES LESS THAN (2147483646) ENGINE = 'MyISAM'
(SUBPARTITION subpart21,
SUBPARTITION subpart22)
);
ERROR HY000: The mix of handlers in the partitions is not allowed in this version of MySQL
#------------------------------------------------------------------------
# 5 Precedence of storage engine assignments (if there is any)
#------------------------------------------------------------------------
......@@ -2435,20 +2426,20 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
test.t1 analyze status OK
test.t1 analyze note The storage engine for the table doesn't support analyze
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
test.t1 check status OK
test.t1 check note The storage engine for the table doesn't support check
CHECKSUM TABLE t1 EXTENDED;
Table Checksum
test.t1 <some_value>
OPTIMIZE TABLE t1;
Table Op Msg_type Msg_text
test.t1 optimize status OK
test.t1 optimize note The storage engine for the table doesn't support optimize
# check layout success: 1
REPAIR TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
test.t1 repair status OK
test.t1 repair note The storage engine for the table doesn't support repair
# check layout success: 1
TRUNCATE t1;
......@@ -2902,20 +2893,20 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
test.t1 analyze status OK
test.t1 analyze note The storage engine for the table doesn't support analyze
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
test.t1 check status OK
test.t1 check note The storage engine for the table doesn't support check
CHECKSUM TABLE t1 EXTENDED;
Table Checksum
test.t1 <some_value>
OPTIMIZE TABLE t1;
Table Op Msg_type Msg_text
test.t1 optimize status OK
test.t1 optimize note The storage engine for the table doesn't support optimize
# check layout success: 1
REPAIR TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
test.t1 repair status OK
test.t1 repair note The storage engine for the table doesn't support repair
# check layout success: 1
TRUNCATE t1;
......@@ -2943,7 +2934,6 @@ PARTITION part2 VALUES LESS THAN (2147483646)
(SUBPARTITION subpart21 STORAGE ENGINE = 'MyISAM',
SUBPARTITION subpart22 STORAGE ENGINE = 'MyISAM')
);
ERROR HY000: The mix of handlers in the partitions is not allowed in this version of MySQL
#------------------------------------------------------------------------
# 6 Session default engine differs from engine used within create table
#------------------------------------------------------------------------
......@@ -3382,20 +3372,20 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
test.t1 analyze status OK
test.t1 analyze note The storage engine for the table doesn't support analyze
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
test.t1 check status OK
test.t1 check note The storage engine for the table doesn't support check
CHECKSUM TABLE t1 EXTENDED;
Table Checksum
test.t1 <some_value>
OPTIMIZE TABLE t1;
Table Op Msg_type Msg_text
test.t1 optimize status OK
test.t1 optimize note The storage engine for the table doesn't support optimize
# check layout success: 1
REPAIR TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
test.t1 repair status OK
test.t1 repair note The storage engine for the table doesn't support repair
# check layout success: 1
TRUNCATE t1;
......@@ -3841,20 +3831,20 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
test.t1 analyze status OK
test.t1 analyze note The storage engine for the table doesn't support analyze
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
test.t1 check status OK
test.t1 check note The storage engine for the table doesn't support check
CHECKSUM TABLE t1 EXTENDED;
Table Checksum
test.t1 <some_value>
OPTIMIZE TABLE t1;
Table Op Msg_type Msg_text
test.t1 optimize status OK
test.t1 optimize note The storage engine for the table doesn't support optimize
# check layout success: 1
REPAIR TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
test.t1 repair status OK
test.t1 repair note The storage engine for the table doesn't support repair
# check layout success: 1
TRUNCATE t1;
......
......@@ -23,3 +23,5 @@ partition_value_innodb : Bug#30581 partition_value tests use disallowed
partition_value_myisam : Bug#30581 partition_value tests use disallowed CAST() function
partition_value_ndb : cannot create t1
rpl_ndb_dd_partitions : cannot create t1
partition_alter4_myisam : Bug#20129 / WL#4176
partition_alter4_innodb : Bug#20129 / WL#4176
......@@ -39,7 +39,7 @@ PARTITION `p5` VALUES LESS THAN (2010)
COMMENT 'APSTART \' APEND'
);
#--exec sed 's/APSTART \\/APSTART /' var/master-data/test/t1.frm > tmpt1.frm && mv tmpt1.frm var/master-data/test/t1.frm
#--error 1064
#--error ER_PARSE_ERROR
SELECT * FROM t1 LIMIT 1;
DROP TABLE t1;
......@@ -1197,9 +1197,11 @@ SHOW TABLE STATUS;
DELETE from t1 where a = 1;
--replace_column 9 0 12 NULL 13 NULL 14 NULL
SHOW TABLE STATUS;
# restore this after WL#4176 is completed
-- error ER_CHECK_NOT_IMPLEMENTED
ALTER TABLE t1 OPTIMIZE PARTITION p0;
--replace_column 12 NULL 13 NULL 14 NULL
SHOW TABLE STATUS;
#--replace_column 12 NULL 13 NULL 14 NULL
#SHOW TABLE STATUS;
DROP TABLE t1;
#
......@@ -1528,9 +1530,9 @@ PARTITION BY RANGE (a) (
PARTITION p1 VALUES LESS THAN (10),
PARTITION p2 VALUES LESS THAN (20)
);
--error 1064
--error ER_PARSE_ERROR
ALTER TABLE t1 OPTIMIZE PARTITION p1 EXTENDED;
--error 1064
--error ER_PARSE_ERROR
ALTER TABLE t1 ANALYZE PARTITION p1 EXTENDED;
DROP TABLE t1;
......
......@@ -1035,6 +1035,13 @@ static int handle_opt_part(THD *thd, HA_CHECK_OPT *check_opt,
DBUG_ENTER("handle_opt_part");
DBUG_PRINT("enter", ("flag = %u", flag));
/*
TODO:
Rewrite the code for ANALYZE/CHECK/OPTIMIZE/REPAIR PARTITION WL4176
*/
DBUG_RETURN(HA_ADMIN_NOT_IMPLEMENTED);
#ifdef WL4176_IS_DONE
if (flag == OPTIMIZE_PARTS)
error= file->ha_optimize(thd, check_opt);
else if (flag == ANALYZE_PARTS)
......@@ -1051,6 +1058,7 @@ static int handle_opt_part(THD *thd, HA_CHECK_OPT *check_opt,
if (error == HA_ADMIN_ALREADY_DONE)
error= 0;
DBUG_RETURN(error);
#endif
}
......@@ -1080,6 +1088,12 @@ int ha_partition::handle_opt_partitions(THD *thd, HA_CHECK_OPT *check_opt,
DBUG_ENTER("ha_partition::handle_opt_partitions");
DBUG_PRINT("enter", ("all_parts %u, flag= %u", all_parts, flag));
/*
TODO:
Rewrite the code for ANALYZE/CHECK/OPTIMIZE/REPAIR PARTITION WL4176
*/
DBUG_RETURN(HA_ADMIN_NOT_IMPLEMENTED);
#ifdef WL4176_IS_DONE
do
{
partition_element *part_elem= part_it++;
......@@ -1110,6 +1124,7 @@ int ha_partition::handle_opt_partitions(THD *thd, HA_CHECK_OPT *check_opt,
}
} while (++i < no_parts);
DBUG_RETURN(FALSE);
#endif
}
/*
......
......@@ -6047,6 +6047,18 @@ uint fast_alter_partition_table(THD *thd, TABLE *table,
((alter_info->flags & ALTER_REPAIR_PARTITION) &&
(error= table->file->ha_repair_partitions(thd))))
{
if (error == HA_ADMIN_NOT_IMPLEMENTED) {
if (alter_info->flags & ALTER_OPTIMIZE_PARTITION)
my_error(ER_CHECK_NOT_IMPLEMENTED, MYF(0), "optimize partition");
else if (alter_info->flags & ALTER_ANALYZE_PARTITION)
my_error(ER_CHECK_NOT_IMPLEMENTED, MYF(0), "analyze partition");
else if (alter_info->flags & ALTER_CHECK_PARTITION)
my_error(ER_CHECK_NOT_IMPLEMENTED, MYF(0), "check partition");
else if (alter_info->flags & ALTER_REPAIR_PARTITION)
my_error(ER_CHECK_NOT_IMPLEMENTED, MYF(0), "repair partition");
else
table->file->print_error(error, MYF(0));
} else
table->file->print_error(error, MYF(0));
goto err;
}
......
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