diff options
author | Mattias Jonsson <mattias.jonsson@sun.com> | 2008-10-10 20:12:38 +0200 |
---|---|---|
committer | Mattias Jonsson <mattias.jonsson@sun.com> | 2008-10-10 20:12:38 +0200 |
commit | 5063431c64170ca0315dffb3c8420fe197b4e1d8 (patch) | |
tree | 3dedd41f3a0163a4465388811c0aebd2d1b6fbf3 /mysql-test/r/partition_mgm_err.result | |
parent | c37758b52fe16fd30d0ce369c504580f3aa1e1e6 (diff) | |
download | mariadb-git-5063431c64170ca0315dffb3c8420fe197b4e1d8.tar.gz |
Bug#39434: ALTER TABLE CHECK/OPTIMIZE/ANALYZE PARTITION work
on non-partitioned table
Problem was that partitioning specific commands was accepted
for non partitioned tables and treated like
ANALYZE/CHECK/OPTIMIZE/REPAIR TABLE, after bug-20129 was fixed,
which changed the code path from mysql_alter_table to
mysql_admin_table.
Solution was to check if the table was partitioned before
trying to execute the admin command
mysql-test/r/partition_mgm_err.result:
Bug#39434: ALTER TABLE CHECK/OPTIMIZE/ANALYZE PARTITION work
on non-partitioned table
Updated test result
mysql-test/t/partition_mgm_err.test:
Bug#39434: ALTER TABLE CHECK/OPTIMIZE/ANALYZE PARTITION work
on non-partitioned table
Updated test case
sql/ha_partition.cc:
Bug#39434: ALTER TABLE CHECK/OPTIMIZE/ANALYZE PARTITION work
on non-partitioned table
Simplified the code by using ALTER_ADMIN_PARTITION for all
commands that go through mysql_admin_tables and is set
for partitioning specific commands that.
sql/ha_partition.h:
Bug#39434: ALTER TABLE CHECK/OPTIMIZE/ANALYZE PARTITION work
on non-partitioned table
Simplified the code by using ALTER_ADMIN_PARTITION for all
commands that go through mysql_admin_tables and is set
for partitioning specific commands that.
sql/sql_lex.h:
Bug#39434: ALTER TABLE CHECK/OPTIMIZE/ANALYZE PARTITION work
on non-partitioned table
Simplified the code by using ALTER_ADMIN_PARTITION for all
commands that go through mysql_admin_tables and is set
for partitioning specific commands that.
Removed ALTER_ANALYZE/CHECK/OPTIMIZE/REPAIR_PARTITION and
added ALTER_ADMIN_PARTITION instead.
sql/sql_partition.cc:
Bug#39434: ALTER TABLE CHECK/OPTIMIZE/ANALYZE PARTITION work
on non-partitioned table
Simplified the code by using ALTER_ADMIN_PARTITION for all
commands that go through mysql_admin_tables and is set
for partitioning specific commands that.
Removed ALTER_ANALYZE/CHECK/OPTIMIZE/REPAIR_PARTITION and
added ALTER_ADMIN_PARTITION instead.
sql/sql_table.cc:
Bug#39434: ALTER TABLE CHECK/OPTIMIZE/ANALYZE PARTITION work
on non-partitioned table
Give error and return if trying partitioning admin command
on non partitioned table.
Simplified the code by using ALTER_ADMIN_PARTITION for all
commands that go through mysql_admin_tables and is set
for partitioning specific commands that.
Removed ALTER_ANALYZE/CHECK/OPTIMIZE/REPAIR_PARTITION and
added ALTER_ADMIN_PARTITION instead.
sql/sql_yacc.yy:
Bug#39434: ALTER TABLE CHECK/OPTIMIZE/ANALYZE PARTITION work
on non-partitioned table
Simplified the code by using ALTER_ADMIN_PARTITION for all
commands that go through mysql_admin_tables and is set
for partitioning specific commands that.
Removed ALTER_ANALYZE/CHECK/OPTIMIZE/REPAIR_PARTITION and
added ALTER_ADMIN_PARTITION instead.
Diffstat (limited to 'mysql-test/r/partition_mgm_err.result')
-rw-r--r-- | mysql-test/r/partition_mgm_err.result | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/mysql-test/r/partition_mgm_err.result b/mysql-test/r/partition_mgm_err.result index 764f6fb5632..adfeaa61e67 100644 --- a/mysql-test/r/partition_mgm_err.result +++ b/mysql-test/r/partition_mgm_err.result @@ -84,6 +84,14 @@ ALTER TABLE t1 DROP PARTITION x1; ERROR HY000: Partition management on a not partitioned table is not possible ALTER TABLE t1 COALESCE PARTITION 1; ERROR HY000: Partition management on a not partitioned table is not possible +ALTER TABLE t1 ANALYZE PARTITION p1; +ERROR HY000: Partition management on a not partitioned table is not possible +ALTER TABLE t1 CHECK PARTITION p1; +ERROR HY000: Partition management on a not partitioned table is not possible +ALTER TABLE t1 OPTIMIZE PARTITION p1; +ERROR HY000: Partition management on a not partitioned table is not possible +ALTER TABLE t1 REPAIR PARTITION p1; +ERROR HY000: Partition management on a not partitioned table is not possible DROP TABLE t1; CREATE TABLE t1 (a int) PARTITION BY KEY (a) |