diff options
author | monty@narttu.mysql.fi <> | 2003-08-25 17:19:44 +0300 |
---|---|---|
committer | monty@narttu.mysql.fi <> | 2003-08-25 17:19:44 +0300 |
commit | 2c1f1206c3062a877e3fe00c4860bd48e55d4fca (patch) | |
tree | 28a19e92b8ac6f4ca2691bb1c3ae3056a65b006c /sql | |
parent | f83e876065e4fe7c8214f418b9febe5be4d00cad (diff) | |
download | mariadb-git-2c1f1206c3062a877e3fe00c4860bd48e55d4fca.tar.gz |
Better fix for myisamchk --sort-index on windows
Fixed deadlock bug when doing resize of key buffer while key buffer was in active use
Diffstat (limited to 'sql')
-rw-r--r-- | sql/ha_myisam.cc | 2 | ||||
-rw-r--r-- | sql/sql_show.cc | 11 |
2 files changed, 8 insertions, 5 deletions
diff --git a/sql/ha_myisam.cc b/sql/ha_myisam.cc index 9059ad803f8..97c002cee52 100644 --- a/sql/ha_myisam.cc +++ b/sql/ha_myisam.cc @@ -1018,7 +1018,7 @@ THR_LOCK_DATA **ha_myisam::store_lock(THD *thd, void ha_myisam::update_create_info(HA_CREATE_INFO *create_info) { - table->file->info(HA_STATUS_AUTO | HA_STATUS_CONST); + ha_myisam::info(HA_STATUS_AUTO | HA_STATUS_CONST); if (!(create_info->used_fields & HA_CREATE_USED_AUTO)) { create_info->auto_increment_value=auto_increment_value; diff --git a/sql/sql_show.cc b/sql/sql_show.cc index 6e7fe650247..6680485ef0c 100644 --- a/sql/sql_show.cc +++ b/sql/sql_show.cc @@ -903,6 +903,7 @@ store_create_info(THD *thd, TABLE *table, String *packet) key_info= table->key_info; file->info(HA_STATUS_VARIABLE | HA_STATUS_NO_LOCK | HA_STATUS_TIME); + bzero((char*) &create_info, sizeof(create_info)); file->update_create_info(&create_info); primary_key= table->primary_key; @@ -1005,10 +1006,12 @@ store_create_info(THD *thd, TABLE *table, String *packet) } if (file->raid_type) { - sprintf(buff," RAID_TYPE=%s RAID_CHUNKS=%d RAID_CHUNKSIZE=%ld", - my_raid_type(file->raid_type), file->raid_chunks, - file->raid_chunksize/RAID_BLOCK_SIZE); - packet->append(buff); + uint length; + length= my_snprintf(buff,sizeof(buff), + " RAID_TYPE=%s RAID_CHUNKS=%d RAID_CHUNKSIZE=%ld", + my_raid_type(file->raid_type), file->raid_chunks, + file->raid_chunksize/RAID_BLOCK_SIZE); + packet->append(buff, length); } append_directory(thd, packet, "DATA", create_info.data_file_name); append_directory(thd, packet, "INDEX", create_info.index_file_name); |