diff options
author | unknown <acurtis@xiphis.org> | 2006-05-09 13:34:31 -0700 |
---|---|---|
committer | unknown <acurtis@xiphis.org> | 2006-05-09 13:34:31 -0700 |
commit | f61748b796c719bbd0a626a171bddef9f07392ff (patch) | |
tree | 3d8cfd944c559a434f95a37ce231dc1dea6ca886 /sql | |
parent | 47302570e639927b258e10a7c009e6d585ba8adf (diff) | |
parent | 6116d0176be08f85d7096582c46886b7b53440c1 (diff) | |
download | mariadb-git-f61748b796c719bbd0a626a171bddef9f07392ff.tar.gz |
Merge acurtis@bk-internal:/home/bk/mysql-5.0-engines
into xiphis.org:/home/antony/work2/p1-bug10952.1
sql/handler.h:
Auto merged
sql/sql_table.cc:
Auto merged
Diffstat (limited to 'sql')
-rw-r--r-- | sql/ha_blackhole.cc | 2 | ||||
-rw-r--r-- | sql/ha_myisammrg.cc | 2 | ||||
-rw-r--r-- | sql/handler.h | 1 | ||||
-rw-r--r-- | sql/sql_table.cc | 4 |
4 files changed, 6 insertions, 3 deletions
diff --git a/sql/ha_blackhole.cc b/sql/ha_blackhole.cc index 2505919af39..7632ed59949 100644 --- a/sql/ha_blackhole.cc +++ b/sql/ha_blackhole.cc @@ -47,7 +47,7 @@ handlerton blackhole_hton= { NULL, /* create_cursor_read_view */ NULL, /* set_cursor_read_view */ NULL, /* close_cursor_read_view */ - HTON_CAN_RECREATE + HTON_CAN_RECREATE | HTON_ALTER_CANNOT_CREATE }; /***************************************************************************** diff --git a/sql/ha_myisammrg.cc b/sql/ha_myisammrg.cc index 9780f163634..d2fd1a9e28a 100644 --- a/sql/ha_myisammrg.cc +++ b/sql/ha_myisammrg.cc @@ -55,7 +55,7 @@ handlerton myisammrg_hton= { NULL, /* create_cursor_read_view */ NULL, /* set_cursor_read_view */ NULL, /* close_cursor_read_view */ - HTON_CAN_RECREATE + HTON_CAN_RECREATE | HTON_ALTER_CANNOT_CREATE }; diff --git a/sql/handler.h b/sql/handler.h index eee15fc3576..31aac075a5e 100644 --- a/sql/handler.h +++ b/sql/handler.h @@ -409,6 +409,7 @@ struct show_table_alias_st { #define HTON_ALTER_NOT_SUPPORTED (1 << 1) //Engine does not support alter #define HTON_CAN_RECREATE (1 << 2) //Delete all is used fro truncate #define HTON_HIDDEN (1 << 3) //Engine does not appear in lists +#define HTON_ALTER_CANNOT_CREATE (1 << 4) //Cannot use alter to create typedef struct st_thd_trans { 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); |