diff options
author | unknown <Sinisa@sinisa.nasamreza.org> | 2003-06-12 16:52:36 +0300 |
---|---|---|
committer | unknown <Sinisa@sinisa.nasamreza.org> | 2003-06-12 16:52:36 +0300 |
commit | 4ac20ad4a925fe9efa4f0937ddeb026cf112857f (patch) | |
tree | c4add756e3fc9920bd44b6c481e233ad82d452ac /sql/sql_table.cc | |
parent | 9be78a051939fad1f947b14560e016e86263cb63 (diff) | |
download | mariadb-git-4ac20ad4a925fe9efa4f0937ddeb026cf112857f.tar.gz |
Derived tables bug fix .......
sql/ha_myisam.cc:
DISABLE KEYS warnings
sql/sql_table.cc:
DISABLE KEYS warnings
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 2b329aac305..60e034302a0 100644 --- a/sql/sql_table.cc +++ b/sql/sql_table.cc @@ -1835,10 +1835,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; } |