diff options
author | Alexey Botchkov <holyfoot@mysql.com> | 2009-06-04 23:36:34 +0500 |
---|---|---|
committer | Alexey Botchkov <holyfoot@mysql.com> | 2009-06-04 23:36:34 +0500 |
commit | 173802140785148cc9e68cb149d9d6501b54a04f (patch) | |
tree | 2fa6635e22c8af729885282e5b02d21fd39f3541 | |
parent | 744373ecc02462839db2800f17d0f92a6ff57968 (diff) | |
download | mariadb-git-173802140785148cc9e68cb149d9d6501b54a04f.tar.gz |
Bug#43733 Select on processlist let the embedded server crash (concurrent_innodb_safelog)
the thread->mysys_var parameter should be empty for the idle
embedded-server threads so that working threads can safely free
this memory.
per-file comments:
libmysqld/lib_sql.cc
Bug#43733 Select on processlist let the embedded server crash (concurrent_innodb_safelog)
set thread->mysys_var= 0 after the query is handled
mysql-test/include/concurrent.inc
Bug#43733 Select on processlist let the embedded server crash (concurrent_innodb_safelog)
enable these for the embedded-server mode
sql/sql_show.cc
Bug#43733 Select on processlist let the embedded server crash (concurrent_innodb_safelog)
show thread lock status in the query result
-rw-r--r-- | libmysqld/lib_sql.cc | 3 | ||||
-rw-r--r-- | mysql-test/include/concurrent.inc | 2 | ||||
-rw-r--r-- | sql/sql_show.cc | 2 |
3 files changed, 4 insertions, 3 deletions
diff --git a/libmysqld/lib_sql.cc b/libmysqld/lib_sql.cc index d644c45a66a..4fd5cf19812 100644 --- a/libmysqld/lib_sql.cc +++ b/libmysqld/lib_sql.cc @@ -142,6 +142,8 @@ emb_advanced_command(MYSQL *mysql, enum enum_server_command command, if (!skip_check) result= thd->is_error() ? -1 : 0; + thd->mysys_var= 0; + #if defined(ENABLED_PROFILING) && defined(COMMUNITY_SERVER) thd->profiling.finish_current_query(); #endif @@ -634,6 +636,7 @@ void *create_embedded_thd(int client_flag) thread_count++; threads.append(thd); + thd->mysys_var= 0; return thd; err: delete(thd); diff --git a/mysql-test/include/concurrent.inc b/mysql-test/include/concurrent.inc index 66f8a65a102..0b7299a3c34 100644 --- a/mysql-test/include/concurrent.inc +++ b/mysql-test/include/concurrent.inc @@ -25,8 +25,6 @@ # new wrapper t/concurrent_innodb_safelog.test # ---source include/not_embedded.inc - connection default; # # Show prerequisites for this test. diff --git a/sql/sql_show.cc b/sql/sql_show.cc index d08b3a248c4..e9ae8fea3ed 100644 --- a/sql/sql_show.cc +++ b/sql/sql_show.cc @@ -1888,7 +1888,7 @@ int fill_schema_processlist(THD* thd, TABLE_LIST* tables, COND* cond) tmp->mysys_var->current_cond ? "Waiting on cond" : NullS); #else - val= (char *) "Writing to net"; + val= (char *) (tmp->proc_info ? tmp->proc_info : NullS); #endif if (val) { |