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:
@@ -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)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user