Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix bug 1581949 (Querying GLOBAL_TEMPORARY_TABLES crashes if temp-tab… #543

Merged
merged 1 commit into from
May 30, 2016

Conversation

laurynas-biveinis
Copy link
Contributor

…le owning threads execute new queries)

INFORMATION_SCHEMA.GLOBAL_TEMPORARY_TABLES query cloning temp table
handler passed the memory root of the temp table connection thread
object. This memory root is being freed at the end of query of that
thread, which may result, depending on scheduling, in the
GLOBAL_TEMPORARY_TABLES-querying thread accessing cloned object after it
has been freed.

Fixed by using a memory root of the GLOBAL_TEMPORARY_TABLES-querying
thread.

Add percona_show_temp_tables_debug testcase to test this exact scenario
and percona_show_temp_tables_stress to test querying
GLOBAL_TEMPORARY_TABLES in parallel to creating and destroying them.

http://jenkins.percona.com/job/percona-server-5.5-param/1225/

@@ -0,0 +1,60 @@
--source include/count_sessions.inc

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

--source include/have_innodb.inc

@percona-ysorokin
Copy link
Collaborator

LGTM

…le owning threads execute new queries)

INFORMATION_SCHEMA.GLOBAL_TEMPORARY_TABLES query cloning temp table
handler passed the memory root of the temp table connection thread
object. This memory root is being freed at the end of query of that
thread, which may result, depending on scheduling, in the
GLOBAL_TEMPORARY_TABLES-querying thread accessing cloned object after it
has been freed.

Fixed by using a memory root of the GLOBAL_TEMPORARY_TABLES-querying
thread.

Add percona_show_temp_tables_debug testcase to test this exact scenario
and percona_show_temp_tables_stress to test querying
GLOBAL_TEMPORARY_TABLES in parallel to creating and destroying them.
@laurynas-biveinis
Copy link
Contributor Author

All comments addressed, http://jenkins.percona.com/job/percona-server-5.5-param/1226/ for the changed testcase only

@percona-ysorokin
Copy link
Collaborator

Looks good

@laurynas-biveinis laurynas-biveinis merged commit 4e58a2b into percona:5.5 May 30, 2016
@laurynas-biveinis laurynas-biveinis deleted the bug1581949-5.5 branch May 30, 2016 14:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants