summaryrefslogtreecommitdiff
path: root/sql/sql_table.cc
diff options
context:
space:
mode:
authoracurtis@xiphis.org <>2006-05-09 13:34:31 -0700
committeracurtis@xiphis.org <>2006-05-09 13:34:31 -0700
commit7c9b4c27921967525941e57cca0287edf28f3a5d (patch)
tree3d8cfd944c559a434f95a37ce231dc1dea6ca886 /sql/sql_table.cc
parent91031fc2bc34c5bb020e2696e7f519a98b71e774 (diff)
parent47e89f208a25652ec93529eb7dc4944ec5a73659 (diff)
downloadmariadb-git-7c9b4c27921967525941e57cca0287edf28f3a5d.tar.gz
Merge acurtis@bk-internal:/home/bk/mysql-5.0-engines
into xiphis.org:/home/antony/work2/p1-bug10952.1
Diffstat (limited to 'sql/sql_table.cc')
-rw-r--r--sql/sql_table.cc4
1 files changed, 3 insertions, 1 deletions
diff --git a/sql/sql_table.cc b/sql/sql_table.cc
index c9e9ce1bba7..9eaadc58cb0 100644
--- a/sql/sql_table.cc
+++ b/sql/sql_table.cc
@@ -3324,7 +3324,9 @@ bool mysql_alter_table(THD *thd,char *new_db, char *new_name,
DBUG_PRINT("info", ("old type: %d new type: %d", old_db_type, new_db_type));
if (ha_check_storage_engine_flag(old_db_type, HTON_ALTER_NOT_SUPPORTED) ||
- ha_check_storage_engine_flag(new_db_type, HTON_ALTER_NOT_SUPPORTED))
+ ha_check_storage_engine_flag(new_db_type, HTON_ALTER_NOT_SUPPORTED) ||
+ (old_db_type != new_db_type &&
+ ha_check_storage_engine_flag(new_db_type, HTON_ALTER_CANNOT_CREATE)))
{
DBUG_PRINT("info", ("doesn't support alter"));
my_error(ER_ILLEGAL_HA, MYF(0), table_name);