From 61e988e712ed82542ebc1d867a21e71f3103a0f7 Mon Sep 17 00:00:00 2001 From: unknown Date: Mon, 27 Aug 2007 14:31:27 -0600 Subject: Bug #30389: connection_id() always return 0 in embedded server Initialize thd->variables.pseudo_thread_id when a new embedded thd is created. libmysqld/lib_sql.cc: Add comment regarding duplication of code in create_embedded_thd() vs. create_new_thread() and prepare_new_connection_state(). This was a cause for not properly initializing the pseudo_thread_id variable. mysql-test/r/func_misc.result: Add test case to ensure connection_id() returns a sane value mysql-test/t/func_misc.test: Add test case to ensure connection_id() returns a sane value sql/mysqld.cc: Add comment warning of the duplication of code between create_new_thread() and create_embedded_thd() sql/sql_connect.cc: Add comment warning of the duplication of code between prepare_new_connection_state() and create_embedded_thd() --- mysql-test/r/func_misc.result | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'mysql-test/r/func_misc.result') diff --git a/mysql-test/r/func_misc.result b/mysql-test/r/func_misc.result index 447d5620a4d..39bf1470afe 100644 --- a/mysql-test/r/func_misc.result +++ b/mysql-test/r/func_misc.result @@ -191,3 +191,7 @@ drop table table_26093; drop function func_26093_a; drop function func_26093_b; End of 5.0 tests +select connection_id() > 0; +connection_id() > 0 +1 +End of tests -- cgit v1.2.1