1
0
mirror of https://github.com/MariaDB/server.git synced 2025-12-24 11:21:21 +03:00

MDEV-10545: Server crashed in my_copy_fix_mb on querying I_S and P_S tables

Once THDs have been added to the global "threads" list,
they must modify query_string only after acquiring per-
thread LOCK_thd_data mutex.
This commit is contained in:
Nirbhay Choubey
2016-09-02 12:21:40 -04:00
parent a322651b8a
commit 31697d0b80
3 changed files with 7 additions and 9 deletions

View File

@@ -7298,10 +7298,9 @@ void mysql_parse(THD *thd, char *rawbuf, uint length,
Note that we don't need LOCK_thread_count to modify query_length.
*/
if (found_semicolon && (ulong) (found_semicolon - thd->query()))
thd->set_query_inner(thd->query(),
(uint32) (found_semicolon -
thd->query() - 1),
thd->charset());
thd->set_query(thd->query(),
(uint32) (found_semicolon - thd->query() - 1),
thd->charset());
/* Actually execute the query */
if (found_semicolon)
{