summaryrefslogtreecommitdiff
path: root/sql/ha_myisam.cc
diff options
context:
space:
mode:
authorunknown <monty@mashka.mysql.fi>2003-07-08 23:58:04 +0300
committerunknown <monty@mashka.mysql.fi>2003-07-08 23:58:04 +0300
commit9388c6fdc06a4634e4e748a3d38b5df2738ebdef (patch)
tree469e4c68e8c5de015364504f40b14cec7177b355 /sql/ha_myisam.cc
parent09e76fe9639b7df1d801ed75e19beb2e9c86734f (diff)
downloadmariadb-git-9388c6fdc06a4634e4e748a3d38b5df2738ebdef.tar.gz
Fixed bug in ALTER TABLE ... DISABLE/ENABLE KEYS
Removed double my_thread_end() which caused fatal error on windows if mysqld died on startup myisam/mi_extra.c: Fixed bug in ALTER TABLE ... DISABLE/ENABLE KEYS mysql-test/r/alter_table.result: Fixed bug in ALTER TABLE ... DISABLE/ENABLE KEYS mysql-test/t/alter_table.test: Test DISABLE/ENABLE KEY sql/ha_myisam.cc: Fixed bug in ALTER TABLE ... DISABLE/ENABLE KEYS sql/mysqld.cc: Removed double my_thread_end() which caused fatal error on windows if mysqld died on startup sql/sql_table.cc: Fixed bug in ALTER TABLE ... DISABLE/ENABLE KEYS sql/table.cc: Fixed bug in ALTER TABLE ... DISABLE/ENABLE KEYS sql/table.h: Fixed bug in ALTER TABLE ... DISABLE/ENABLE KEYS
Diffstat (limited to 'sql/ha_myisam.cc')
-rw-r--r--sql/ha_myisam.cc7
1 files changed, 5 insertions, 2 deletions
diff --git a/sql/ha_myisam.cc b/sql/ha_myisam.cc
index 202cd90fd88..595123f7ac1 100644
--- a/sql/ha_myisam.cc
+++ b/sql/ha_myisam.cc
@@ -715,6 +715,7 @@ void ha_myisam::deactivate_non_unique_index(ha_rows rows)
}
}
enable_activate_all_index=1;
+ info(HA_STATUS_CONST); // Read new key info
}
else
enable_activate_all_index=0;
@@ -743,6 +744,7 @@ bool ha_myisam::activate_all_index(THD *thd)
param.sort_buffer_length= thd->variables.myisam_sort_buff_size;
param.tmpdir=mysql_tmpdir;
error=repair(thd,param,0) != HA_ADMIN_OK;
+ info(HA_STATUS_CONST);
thd->proc_info=save_proc_info;
}
else
@@ -926,8 +928,9 @@ void ha_myisam::info(uint flag)
ref_length=info.reflength;
table->db_options_in_use = info.options;
block_size=myisam_block_size;
- table->keys_in_use&= info.key_map;
- table->keys_for_keyread&= info.key_map;
+ table->keys_in_use= (set_bits(key_map, table->keys) &
+ (key_map) info.key_map);
+ table->keys_for_keyread= table->keys_in_use & ~table->read_only_keys;
table->db_record_offset=info.record_offset;
if (table->key_parts)
memcpy((char*) table->key_info[0].rec_per_key,