Bug#31210 - INSERT DELAYED crashes server when used on

              partitioned table
  
Post-pushbuild fix
  
Pushbuild detected a new need for lex initialization in
embedded server.

Fixed test for INSERT DELAYED in partitions_hash.test so that
it works with embedded server.
parent 10df30f0
...@@ -94,6 +94,7 @@ emb_advanced_command(MYSQL *mysql, enum enum_server_command command, ...@@ -94,6 +94,7 @@ emb_advanced_command(MYSQL *mysql, enum enum_server_command command,
thd->current_stmt= stmt; thd->current_stmt= stmt;
thd->store_globals(); // Fix if more than one connect thd->store_globals(); // Fix if more than one connect
lex_start(thd);
/* /*
We have to call free_old_query before we start to fill mysql->fields We have to call free_old_query before we start to fill mysql->fields
for new query. In the case of embedded server we collect field data for new query. In the case of embedded server we collect field data
......
...@@ -185,5 +185,4 @@ c1 c2 c3 ...@@ -185,5 +185,4 @@ c1 c2 c3
drop table t1; drop table t1;
CREATE TABLE t1 (c1 INT) ENGINE=MyISAM PARTITION BY HASH(c1) PARTITIONS 1; CREATE TABLE t1 (c1 INT) ENGINE=MyISAM PARTITION BY HASH(c1) PARTITIONS 1;
INSERT DELAYED INTO t1 VALUES (1); INSERT DELAYED INTO t1 VALUES (1);
ERROR HY000: Table storage engine for 't1' doesn't have this option
DROP TABLE t1; DROP TABLE t1;
...@@ -148,7 +148,9 @@ drop table t1; ...@@ -148,7 +148,9 @@ drop table t1;
# Bug#31210 - INSERT DELAYED crashes server when used on partitioned table # Bug#31210 - INSERT DELAYED crashes server when used on partitioned table
# #
CREATE TABLE t1 (c1 INT) ENGINE=MyISAM PARTITION BY HASH(c1) PARTITIONS 1; CREATE TABLE t1 (c1 INT) ENGINE=MyISAM PARTITION BY HASH(c1) PARTITIONS 1;
--error ER_ILLEGAL_HA # The test succeeds in an embedded server because normal insert is done.
# The test fails in a normal server with "engine doesn't have this option".
--error 0, ER_ILLEGAL_HA
INSERT DELAYED INTO t1 VALUES (1); INSERT DELAYED INTO t1 VALUES (1);
DROP TABLE t1; DROP TABLE t1;
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