Commit bfa6db38 authored by Alexey Botchkov's avatar Alexey Botchkov

MENT-510 Failing test(s): perfschema.threads_insert_delayed.

The thread_id of the INSERT DELAYED thread should not be set to 0.
parent 0e403db2
...@@ -221,7 +221,7 @@ connection cn1; ...@@ -221,7 +221,7 @@ connection cn1;
create table t1(id int) engine=myisam; create table t1(id int) engine=myisam;
insert delayed into t1 values (1), (2); insert delayed into t1 values (1), (2);
connection default; connection default;
# Waiting until ALTER TABLE is blocked. # Waiting until INSERT DELAYED thread does the insert.
drop table t1; drop table t1;
disconnect cn1; disconnect cn1;
drop user user1@localhost; drop user user1@localhost;
......
...@@ -148,7 +148,7 @@ connection cn1; ...@@ -148,7 +148,7 @@ connection cn1;
create table t1(id int) engine=myisam; create table t1(id int) engine=myisam;
insert delayed into t1 values (1), (2); insert delayed into t1 values (1), (2);
connection default; connection default;
--echo # Waiting until ALTER TABLE is blocked. --echo # Waiting until INSERT DELAYED thread does the insert.
let $wait_condition= SELECT COUNT(*) = 2 FROM t1; let $wait_condition= SELECT COUNT(*) = 2 FROM t1;
--source include/wait_condition.inc --source include/wait_condition.inc
drop table t1; drop table t1;
......
...@@ -2076,13 +2076,14 @@ class Delayed_insert :public ilink { ...@@ -2076,13 +2076,14 @@ class Delayed_insert :public ilink {
passed from connection thread to the handler thread. passed from connection thread to the handler thread.
*/ */
MDL_request grl_protection; MDL_request grl_protection;
my_thread_id orig_thread_id;
void set_default_user() void set_default_user()
{ {
thd.security_ctx->user=(char*) delayed_user; thd.security_ctx->user=(char*) delayed_user;
thd.security_ctx->host=(char*) my_localhost; thd.security_ctx->host=(char*) my_localhost;
thd.security_ctx->ip= NULL; thd.security_ctx->ip= NULL;
thd.query_id= 0; thd.query_id= 0;
thd.thread_id= 0; thd.thread_id= orig_thread_id;
} }
void set_user_from_row(const delayed_row *r) void set_user_from_row(const delayed_row *r)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment