Commit d902b53c authored by Monty's avatar Monty

Fixed wrong usage strlen(), should be sizeof()

Found by running valgrind on mtr tests
parent cebf9ee2
......@@ -3419,7 +3419,7 @@ static void mysql_stmt_execute_common(THD *thd,
Set thd->query_string with the stmt_id so the
audit plugin gets the meaningful notification.
*/
if (alloc_query(thd, llbuf, strlen(llbuf)))
if (alloc_query(thd, llbuf, sizeof(llbuf)))
thd->set_query(0, 0);
my_error(ER_UNKNOWN_STMT_HANDLER, MYF(0), static_cast<int>(sizeof(llbuf)),
llstr(stmt_id, llbuf), "mysqld_stmt_execute");
......
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