summaryrefslogtreecommitdiff
path: root/sql/sql_partition.cc
diff options
context:
space:
mode:
authorunknown <mattiasj@client-10-129-10-147.upp.off.mysql.com>2008-02-11 11:32:46 +0100
committerunknown <mattiasj@client-10-129-10-147.upp.off.mysql.com>2008-02-11 11:32:46 +0100
commit6a15453640b4d92797817aeb83bcc96957a12c51 (patch)
tree71046d6ee5cd4dc9f62dd424a4ec8cd90f9484c2 /sql/sql_partition.cc
parent324d54170144dc8926258a13ef514a77ce170506 (diff)
downloadmariadb-git-6a15453640b4d92797817aeb83bcc96957a12c51.tar.gz
Bug#20129: ALTER TABLE ... ANALYZE/CHECK/OPTIMIZE/REPAIR PARTITION
Problem was that it did not work with corrupted/crashed tables. Solution is to disable these commands until WL#4176 is completed mysql-test/r/partition.result: Bug#20129: ALTER TABLE ... ANALYZE/CHECK/OPTIMIZE/REPAIR PARTITION Test result mysql-test/suite/parts/inc/partition_alter4.inc: Bug#20129: ALTER TABLE ... ANALYZE/CHECK/OPTIMIZE/REPAIR PARTITION copy-paste error, changed from REBUILT to REPAIR, as the heading says mysql-test/suite/parts/r/partition_alter1_innodb.result: Bug#20129: ALTER TABLE ... ANALYZE/CHECK/OPTIMIZE/REPAIR PARTITION Test result mysql-test/suite/parts/r/partition_alter1_myisam.result: Bug#20129: ALTER TABLE ... ANALYZE/CHECK/OPTIMIZE/REPAIR PARTITION Test result mysql-test/suite/parts/r/partition_alter2_innodb.result: Bug#20129: ALTER TABLE ... ANALYZE/CHECK/OPTIMIZE/REPAIR PARTITION Test result mysql-test/suite/parts/r/partition_alter2_myisam.result: Bug#20129: ALTER TABLE ... ANALYZE/CHECK/OPTIMIZE/REPAIR PARTITION Test result mysql-test/suite/parts/r/partition_basic_innodb.result: Bug#20129: ALTER TABLE ... ANALYZE/CHECK/OPTIMIZE/REPAIR PARTITION Test result mysql-test/suite/parts/r/partition_basic_myisam.result: Bug#20129: ALTER TABLE ... ANALYZE/CHECK/OPTIMIZE/REPAIR PARTITION Test result mysql-test/suite/parts/r/partition_engine_innodb.result: Bug#20129: ALTER TABLE ... ANALYZE/CHECK/OPTIMIZE/REPAIR PARTITION Test result mysql-test/suite/parts/r/partition_engine_myisam.result: Bug#20129: ALTER TABLE ... ANALYZE/CHECK/OPTIMIZE/REPAIR PARTITION Test result mysql-test/suite/parts/t/disabled.def: Bug#20129: ALTER TABLE ... ANALYZE/CHECK/OPTIMIZE/REPAIR PARTITION Disabled test since the tested feature is not longer supported mysql-test/t/partition.test: Bug#20129: ALTER TABLE ... ANALYZE/CHECK/OPTIMIZE/REPAIR PARTITION OPTIMIZE PARTITION is not longer supported, waiting for WL#4176 sql/ha_partition.cc: Bug#20129: ALTER TABLE ... ANALYZE/CHECK/OPTIMIZE/REPAIR PARTITION Problem was that it did not work with corrupted/crashed tables. Solution is to disable these commands until WL#4176 is completed (returning HA_ADMIN_NOT_IMPLEMENTED and #ifdef'ed the non-reachable code)
Diffstat (limited to 'sql/sql_partition.cc')
-rw-r--r--sql/sql_partition.cc14
1 files changed, 13 insertions, 1 deletions
diff --git a/sql/sql_partition.cc b/sql/sql_partition.cc
index eabf4526f7b..c0707360027 100644
--- a/sql/sql_partition.cc
+++ b/sql/sql_partition.cc
@@ -6113,7 +6113,19 @@ uint fast_alter_partition_table(THD *thd, TABLE *table,
((alter_info->flags & ALTER_REPAIR_PARTITION) &&
(error= table->file->ha_repair_partitions(thd))))
{
- table->file->print_error(error, MYF(0));
+ 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;
}
}