#At file:///home/hf/work/mysql_common/60mrg/
2812 Alexey Botchkov 2008-09-05 [merge]
merging
modified:
libmysqld/lib_sql.cc
mysql-test/r/information_schema.result
mysql-test/t/information_schema.test
=== modified file 'libmysqld/lib_sql.cc'
--- a/libmysqld/lib_sql.cc 2008-08-13 19:17:28 +0000
+++ b/libmysqld/lib_sql.cc 2008-09-05 07:23:17 +0000
@@ -383,6 +383,7 @@ static void emb_free_embedded_thd(MYSQL
thd->clear_data_list();
thread_count--;
thd->store_globals();
+ thd->unlink();
delete thd;
mysql->thd=0;
}
@@ -592,7 +593,7 @@ void init_embedded_mysql(MYSQL *mysql, i
*/
void *create_embedded_thd(int client_flag)
{
- THD * thd= new THD;
+ THD *thd= new THD;
thd->thread_id= thd->variables.pseudo_thread_id= thread_id++;
thd->thread_stack= (char*) &thd;
@@ -627,6 +628,7 @@ void *create_embedded_thd(int client_fla
bzero((char*) &thd->net, sizeof(thd->net));
thread_count++;
+ threads.append(thd);
return thd;
err:
delete(thd);
=== modified file 'mysql-test/r/information_schema.result'
--- a/mysql-test/r/information_schema.result 2008-06-30 08:43:39 +0000
+++ b/mysql-test/r/information_schema.result 2008-09-05 07:23:17 +0000
@@ -1576,6 +1576,14 @@ drop table t1;
drop function f1;
select * from information_schema.tables where 1=sleep(100000);
select * from information_schema.columns where 1=sleep(100000);
+create table t0 select * from information_schema.global_status where VARIABLE_NAME='COM_SELECT';
+SELECT 1;
+1
+1
+select a.VARIABLE_VALUE - b.VARIABLE_VALUE from t0 b, information_schema.global_status a where a.VARIABLE_NAME = b.VARIABLE_NAME;
+a.VARIABLE_VALUE - b.VARIABLE_VALUE
+2
+drop table t0;
End of 5.1 tests.
create function f1 (p1 int, p2 datetime, p3 decimal(10,2))
returns char(10) return null;
=== modified file 'mysql-test/t/information_schema.test'
--- a/mysql-test/t/information_schema.test 2008-06-30 08:43:39 +0000
+++ b/mysql-test/t/information_schema.test 2008-09-05 07:23:17 +0000
@@ -1310,6 +1310,17 @@ where state='User sleep' and
info='select * from information_schema.columns where 1=sleep(100000)';
--source include/wait_condition.inc
+#
+# Bug #34517 SHOW GLOBAL STATUS does not work properly in embedded server.
+#
+
+create table t0 select * from information_schema.global_status where VARIABLE_NAME='COM_SELECT';
+SELECT 1;
+select a.VARIABLE_VALUE - b.VARIABLE_VALUE from t0 b, information_schema.global_status a where a.VARIABLE_NAME = b.VARIABLE_NAME;
+
+drop table t0;
+
+
--echo End of 5.1 tests.
#
| Thread |
|---|
| • bzr commit into mysql-6.0 branch (holyfoot:2812) | Alexey Botchkov | 5 Sep |