From: Date: August 21 2007 8:44pm Subject: bk commit into 5.1 tree (tsmith:1.2565) BUG#30389 List-Archive: http://lists.mysql.com/commits/32831 X-Bug: 30389 Message-Id: <20070821184458.8ABB8F803E@ramayana.hindu.god> Below is the list of changes that have just been committed into a local 5.1 repository of tsmith. When tsmith does a push these changes will be propagated to the main repository and, within 24 hours after the push, to the public repository. For information on how to access the public repository see http://dev.mysql.com/doc/mysql/en/installing-source-tree.html ChangeSet@stripped, 2007-08-21 12:44:54-06:00, tsmith@stripped +3 -0 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@stripped, 2007-08-21 12:44:52-06:00, tsmith@stripped +1 -1 Initialize thd->variables.pseudo_thread_id when a new embedded thd is created. mysql-test/r/func_misc.result@stripped, 2007-08-21 12:44:52-06:00, tsmith@stripped +4 -0 Update test results mysql-test/t/func_misc.test@stripped, 2007-08-21 12:44:52-06:00, tsmith@stripped +8 -0 New test case for bug #30389 diff -Nrup a/libmysqld/lib_sql.cc b/libmysqld/lib_sql.cc --- a/libmysqld/lib_sql.cc 2007-08-02 07:26:18 -06:00 +++ b/libmysqld/lib_sql.cc 2007-08-21 12:44:52 -06:00 @@ -567,7 +567,7 @@ void init_embedded_mysql(MYSQL *mysql, i void *create_embedded_thd(int client_flag) { THD * thd= new THD; - thd->thread_id= thread_id++; + thd->thread_id= thd->variables.pseudo_thread_id= thread_id++; thd->thread_stack= (char*) &thd; if (thd->store_globals()) diff -Nrup a/mysql-test/r/func_misc.result b/mysql-test/r/func_misc.result --- a/mysql-test/r/func_misc.result 2007-05-31 08:45:16 -06:00 +++ b/mysql-test/r/func_misc.result 2007-08-21 12:44:52 -06:00 @@ -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 diff -Nrup a/mysql-test/t/func_misc.test b/mysql-test/t/func_misc.test --- a/mysql-test/t/func_misc.test 2007-06-04 17:14:59 -06:00 +++ b/mysql-test/t/func_misc.test 2007-08-21 12:44:52 -06:00 @@ -198,3 +198,11 @@ drop function func_26093_a; drop function func_26093_b; --echo End of 5.0 tests + +# +# Bug #30389: connection_id() always return 0 in embedded server +# + +select connection_id() > 0; + +--echo End of tests