diff options
author | igor@rurik.mysql.com <> | 2003-08-09 12:57:39 -0700 |
---|---|---|
committer | igor@rurik.mysql.com <> | 2003-08-09 12:57:39 -0700 |
commit | 994a1ea3379566fdd4ae085d23a809727a70ce60 (patch) | |
tree | fb4023bd9ec6f5ebab7b09b0defa7fc0df950903 /sql/sql_table.cc | |
parent | 2813cd1f0b8b7a6bb123871f325d4fdb435511b2 (diff) | |
parent | c10d1204bc7edcba8acad51a9ceacf40a7c97c85 (diff) | |
download | mariadb-git-994a1ea3379566fdd4ae085d23a809727a70ce60.tar.gz |
Merge rurik.mysql.com:/home/igor/mysql-4.1
into rurik.mysql.com:/home/igor/dev/mysql-4.1-0
Diffstat (limited to 'sql/sql_table.cc')
-rw-r--r-- | sql/sql_table.cc | 17 |
1 files changed, 13 insertions, 4 deletions
diff --git a/sql/sql_table.cc b/sql/sql_table.cc index 0a873375471..a51e8f4c8e5 100644 --- a/sql/sql_table.cc +++ b/sql/sql_table.cc @@ -1948,10 +1948,19 @@ int mysql_alter_table(THD *thd,char *new_db, char *new_name, /* COND_refresh will be signaled in close_thread_tables() */ break; case DISABLE: - VOID(pthread_mutex_lock(&LOCK_open)); - wait_while_table_is_used(thd, table); - VOID(pthread_mutex_unlock(&LOCK_open)); - table->file->deactivate_non_unique_index(HA_POS_ERROR); + if (table->db_type == DB_TYPE_MYISAM) + { + VOID(pthread_mutex_lock(&LOCK_open)); + wait_while_table_is_used(thd, table); + VOID(pthread_mutex_unlock(&LOCK_open)); + table->file->deactivate_non_unique_index(HA_POS_ERROR); + } + else + push_warning_printf(current_thd, MYSQL_ERROR::WARN_LEVEL_WARN, + ER_ILLEGAL_HA, + ER(ER_ILLEGAL_HA), table->table_name); + break; + /* COND_refresh will be signaled in close_thread_tables() */ break; } |