diff options
author | unknown <monty@hundin.mysql.fi> | 2001-10-02 21:08:08 +0300 |
---|---|---|
committer | unknown <monty@hundin.mysql.fi> | 2001-10-02 21:08:08 +0300 |
commit | 77b021005ef3648501b3413ac5bce4a7db495cf0 (patch) | |
tree | 10d5cc825ed60eb9400958861f0101e212097efb /sql | |
parent | 396490901c77e3fce3aa8ab12a34760f5928567e (diff) | |
download | mariadb-git-77b021005ef3648501b3413ac5bce4a7db495cf0.tar.gz |
Fixed bug in INSERT DELAYED
Fixed some problems in SHOW CREATE TABLE
Fixed calculation of checksums in myisamchk
Docs/manual.texi:
ChangelogWh
client/mysql.cc:
Added comment
myisam/mi_check.c:
Fixed calcualtion of checksums
sql/sql_insert.cc:
Fixed bug in INSERT DELAYED
sql/sql_show.cc:
Fixed some problems in SHOW CREATE TABLE
Diffstat (limited to 'sql')
-rw-r--r-- | sql/sql_insert.cc | 11 | ||||
-rw-r--r-- | sql/sql_show.cc | 13 |
2 files changed, 21 insertions, 3 deletions
diff --git a/sql/sql_insert.cc b/sql/sql_insert.cc index cd738999383..f7ff3ed159c 100644 --- a/sql/sql_insert.cc +++ b/sql/sql_insert.cc @@ -841,6 +841,7 @@ void kill_delayed_threads(void) delayed_insert *tmp; while ((tmp=it++)) { + /* Ensure that the thread doesn't kill itself while we are looking at it */ pthread_mutex_lock(&tmp->mutex); tmp->thd.killed=1; if (tmp->thd.mysys_var) @@ -848,9 +849,15 @@ void kill_delayed_threads(void) pthread_mutex_lock(&tmp->thd.mysys_var->mutex); if (tmp->thd.mysys_var->current_cond) { - pthread_mutex_lock(tmp->thd.mysys_var->current_mutex); + /* + We need the following test because the main mutex may be locked + in handle_delayed_insert() + */ + if (&tmp->mutex != tmp->thd.mysys_var->current_mutex) + pthread_mutex_lock(tmp->thd.mysys_var->current_mutex); pthread_cond_broadcast(tmp->thd.mysys_var->current_cond); - pthread_mutex_unlock(tmp->thd.mysys_var->current_mutex); + if (&tmp->mutex != tmp->thd.mysys_var->current_mutex) + pthread_mutex_unlock(tmp->thd.mysys_var->current_mutex); } pthread_mutex_unlock(&tmp->thd.mysys_var->mutex); } diff --git a/sql/sql_show.cc b/sql/sql_show.cc index 5869feefdc3..6ae7eeb41d3 100644 --- a/sql/sql_show.cc +++ b/sql/sql_show.cc @@ -390,7 +390,7 @@ int mysqld_extend_show_tables(THD *thd,const char *db,const char *wild) if (table->db_create_options & HA_OPTION_DELAY_KEY_WRITE) ptr=strmov(ptr," delay_key_write=1"); if (table->row_type != ROW_TYPE_DEFAULT) - ptr=strxmov(ptr, " format=", ha_row_type[(uint) table->row_type], + ptr=strxmov(ptr, " row_format=", ha_row_type[(uint) table->row_type], NullS); if (file->raid_type) { @@ -910,6 +910,12 @@ store_create_info(THD *thd, TABLE *table, String *packet) p = longlong10_to_str(table->max_rows, buff, 10); packet->append(buff, (uint) (p - buff)); } + if (table->avg_row_length) + { + packet->append(" AVG_ROW_LENGTH="); + p=longlong10_to_str(table->avg_row_length, buff,10); + packet->append(buff, (uint) (p - buff)); + } if (table->db_create_options & HA_OPTION_PACK_KEYS) packet->append(" PACK_KEYS=1", 12); @@ -919,6 +925,11 @@ store_create_info(THD *thd, TABLE *table, String *packet) packet->append(" CHECKSUM=1", 11); if (table->db_create_options & HA_OPTION_DELAY_KEY_WRITE) packet->append(" DELAY_KEY_WRITE=1",18); + if (table->row_type != ROW_TYPE_DEFAULT) + { + packet->append(" ROW_FORMAT=",12); + packet->append(ha_row_type[(uint) table->row_type]); + } table->file->append_create_info(packet); if (table->comment && table->comment[0]) { |