From 173802140785148cc9e68cb149d9d6501b54a04f Mon Sep 17 00:00:00 2001 From: Alexey Botchkov Date: Thu, 4 Jun 2009 23:36:34 +0500 Subject: 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 --- libmysqld/lib_sql.cc | 3 +++ mysql-test/include/concurrent.inc | 2 -- 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) { -- cgit v1.2.1 From 88365681aff8e89c60a7a8217d32685c39d8a433 Mon Sep 17 00:00:00 2001 From: Davi Arnaut Date: Tue, 29 Sep 2009 11:11:46 -0300 Subject: Don't use the semicolon character as a argument separator as it can be interpreted as a shell metacharacter in some circumstances. For example, it is interpreted as a command separator when invoking a debugger. mysql-test/lib/mtr_cases.pm: Use ':' as the separator on non-Windows platforms. mysql-test/mysql-test-run.pl: Remove unnecessary use of the separator. --- mysql-test/lib/mtr_cases.pm | 6 ++++-- mysql-test/mysql-test-run.pl | 2 +- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/mysql-test/lib/mtr_cases.pm b/mysql-test/lib/mtr_cases.pm index 224babaaf32..27165d56b50 100644 --- a/mysql-test/lib/mtr_cases.pm +++ b/mysql-test/lib/mtr_cases.pm @@ -493,6 +493,7 @@ sub collect_one_suite($) $lib_innodb_plugin) { my @new_cases; + my $sep= (IS_WINDOWS) ? ';' : ':'; foreach my $test (@cases) { @@ -520,12 +521,13 @@ sub collect_one_suite($) } } my $plugin_filename= basename($lib_innodb_plugin); + my $plugin_list= "innodb=$plugin_filename" . $sep . "innodb_locks=$plugin_filename"; push(@{$new_test->{master_opt}}, '--ignore-builtin-innodb'); push(@{$new_test->{master_opt}}, '--plugin-dir=' . dirname($lib_innodb_plugin)); - push(@{$new_test->{master_opt}}, "--plugin_load=innodb=$plugin_filename;innodb_locks=$plugin_filename"); + push(@{$new_test->{master_opt}}, "--plugin_load=$plugin_list"); push(@{$new_test->{slave_opt}}, '--ignore-builtin-innodb'); push(@{$new_test->{slave_opt}}, '--plugin-dir=' . dirname($lib_innodb_plugin)); - push(@{$new_test->{slave_opt}}, "--plugin_load=innodb=$plugin_filename;innodb_locks=$plugin_filename"); + push(@{$new_test->{slave_opt}}, "--plugin_load=$plugin_list"); if ($new_test->{combination}) { $new_test->{combination}.= ' + InnoDB plugin'; diff --git a/mysql-test/mysql-test-run.pl b/mysql-test/mysql-test-run.pl index 114b6c84aa3..5cae3e8258b 100755 --- a/mysql-test/mysql-test-run.pl +++ b/mysql-test/mysql-test-run.pl @@ -1812,7 +1812,7 @@ sub environment_setup { ($lib_example_plugin ? dirname($lib_example_plugin) : ""); $ENV{'HA_EXAMPLE_SO'}="'".$plugin_filename."'"; - $ENV{'EXAMPLE_PLUGIN_LOAD'}="--plugin_load=;EXAMPLE=".$plugin_filename.";"; + $ENV{'EXAMPLE_PLUGIN_LOAD'}="--plugin_load=EXAMPLE=".$plugin_filename; } # ---------------------------------------------------- -- cgit v1.2.1