Commit a92e1c4a authored by unknown's avatar unknown

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.


mysql-test/r/rpl_insert.result:
  Result change.
mysql-test/t/rpl_insert.test:
  Reducing number of threads since it doesn't pass pushbuild.
sql/sql_insert.cc:
  Fixing typo and potential memory problem.
parent 9d14c764
......@@ -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