diff options
author | Mattias Jonsson <mattias.jonsson@sun.com> | 2008-11-04 08:55:43 +0100 |
---|---|---|
committer | Mattias Jonsson <mattias.jonsson@sun.com> | 2008-11-04 08:55:43 +0100 |
commit | 8dd07d32c976a885fc0717624cda9b67429551de (patch) | |
tree | 38af9c4f121281e62dd65c438b7a8347c828623f /sql/sql_table.cc | |
parent | c82ff582226749c6049bdbbbdaa2031dc72d343b (diff) | |
parent | c6115db4c3a693dfed25e8e60e8ff5d06ba72756 (diff) | |
download | mariadb-git-8dd07d32c976a885fc0717624cda9b67429551de.tar.gz |
merge
Diffstat (limited to 'sql/sql_table.cc')
-rw-r--r-- | sql/sql_table.cc | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/sql/sql_table.cc b/sql/sql_table.cc index a5b7a90569d..0ee9566dc61 100644 --- a/sql/sql_table.cc +++ b/sql/sql_table.cc @@ -4198,7 +4198,7 @@ static bool mysql_admin_table(THD* thd, TABLE_LIST* tables, table->next_local= save_next_local; thd->open_options&= ~extra_open_options; #ifdef WITH_PARTITION_STORAGE_ENGINE - if (table->table && table->table->part_info) + if (table->table) { /* Set up which partitions that should be processed @@ -4206,11 +4206,13 @@ static bool mysql_admin_table(THD* thd, TABLE_LIST* tables, */ Alter_info *alter_info= &lex->alter_info; - if (alter_info->flags & ALTER_ANALYZE_PARTITION || - alter_info->flags & ALTER_CHECK_PARTITION || - alter_info->flags & ALTER_OPTIMIZE_PARTITION || - alter_info->flags & ALTER_REPAIR_PARTITION) + if (alter_info->flags & ALTER_ADMIN_PARTITION) { + if (!table->table->part_info) + { + my_error(ER_PARTITION_MGMT_ON_NONPARTITIONED, MYF(0)); + DBUG_RETURN(TRUE); + } uint no_parts_found; uint no_parts_opt= alter_info->partition_names.elements; no_parts_found= set_part_state(alter_info, table->table->part_info, |