mirror of
https://github.com/MariaDB/server.git
synced 2025-07-30 16:24:05 +03:00
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.
This commit is contained in:
@ -842,15 +842,12 @@ inline bool st_select_lex_unit::is_union ()
|
||||
#define ALTER_COALESCE_PARTITION (1L << 15)
|
||||
#define ALTER_REORGANIZE_PARTITION (1L << 16)
|
||||
#define ALTER_PARTITION (1L << 17)
|
||||
#define ALTER_OPTIMIZE_PARTITION (1L << 18)
|
||||
#define ALTER_ADMIN_PARTITION (1L << 18)
|
||||
#define ALTER_TABLE_REORG (1L << 19)
|
||||
#define ALTER_REBUILD_PARTITION (1L << 20)
|
||||
#define ALTER_ALL_PARTITION (1L << 21)
|
||||
#define ALTER_ANALYZE_PARTITION (1L << 22)
|
||||
#define ALTER_CHECK_PARTITION (1L << 23)
|
||||
#define ALTER_REPAIR_PARTITION (1L << 24)
|
||||
#define ALTER_REMOVE_PARTITIONING (1L << 25)
|
||||
#define ALTER_FOREIGN_KEY (1L << 26)
|
||||
#define ALTER_REMOVE_PARTITIONING (1L << 22)
|
||||
#define ALTER_FOREIGN_KEY (1L << 23)
|
||||
|
||||
enum enum_alter_table_change_level
|
||||
{
|
||||
|
Reference in New Issue
Block a user