Commit 5488c269 authored by mats@romeo.(none)'s avatar mats@romeo.(none)

BUG#20821 (INSERT DELAYED failes to write some rows to binlog):

Fixing typo and potential memory problem.
Reducing number of concurrent mysqlslap threads since tests fail
in pushbuild due to too many threads.
parent b6384f46
......@@ -9,8 +9,8 @@ USE mysqlslap;
CREATE TABLE t1 (id INT, name VARCHAR(64));
SELECT COUNT(*) FROM mysqlslap.t1;
COUNT(*)
20000
5000
SELECT COUNT(*) FROM mysqlslap.t1;
COUNT(*)
20000
5000
DROP SCHEMA IF EXISTS mysqlslap;
......@@ -15,7 +15,7 @@ USE mysqlslap;
CREATE TABLE t1 (id INT, name VARCHAR(64));
let $query = "INSERT DELAYED INTO t1 VALUES (1, 'Dr. No'), (2, 'From Russia With Love'), (3, 'Goldfinger'), (4, 'Thunderball'), (5, 'You Only Live Twice')";
--exec $MYSQL_SLAP --silent --concurrency=20 --iterations=200 --query=$query --delimiter=";"
--exec $MYSQL_SLAP --silent --concurrency=5 --iterations=200 --query=$query --delimiter=";"
--sleep 10
......
......@@ -1638,8 +1638,12 @@ write_delayed(THD *thd,TABLE *table, enum_duplicates duplic,
*/
if (query.str)
if (!(query.str= my_strndup(query.str, MYF(MY_WME), query.length)))
{
char *str;
if (!(str= my_strndup(query.str, query.length, MYF(MY_WME))))
goto err;
query.str= str;
}
row= new delayed_row(query, duplic, ignore, log_on);
if (row == NULL)
{
......
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