Skip to content

Commit 2a471e8

Browse files
committed
fix func_hybrid_type crash in --ps --embedded
create_embedded_thd() must reset current_thd before returning, otherwise client [de-]allocations will be happening in that stray THD context
1 parent b867ade commit 2a471e8

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

libmysqld/lib_sql.cc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -701,6 +701,7 @@ void *create_embedded_thd(int client_flag)
701701
threads.append(thd);
702702
mysql_mutex_unlock(&LOCK_thread_count);
703703
thd->mysys_var= 0;
704+
thd->reset_globals();
704705
return thd;
705706
err:
706707
delete(thd);

0 commit comments

Comments
 (0)