Collect information about prepared statements if P_S is enabled

Bug #1642750 reported by Sveta Smirnova
10
This bug affects 2 people
Affects Status Importance Assigned to Milestone
Percona Toolkit moved to https://jira.percona.com/projects/PT
Fix Committed
Undecided
Agustín

Bug Description

In version 5.7+ it is possible to see statistics of all prepared statements, currently existing in the server:

select t.processlist_id, pse.* from performance_schema.prepared_statements_instances pse join performance_schema.threads t on (pse.OWNER_THREAD_ID=t.thread_id);

Tags: pt-stalk pt90
tags: added: pt-stalk
Changed in percona-toolkit:
status: New → Confirmed
tags: added: pt90
Revision history for this message
Agustín (agustin-gallego) wrote :

For tests.

SET @sum_statement_prepare = 'SELECT SUM(? + ?) AS sum_A_B';
PREPARE sum_statement FROM @sum_statement_prepare;

SET @random_statement_prepare = 'SELECT RAND() AS rand';
PREPARE rand_statement FROM @random_statement_prepare;
EXECUTE rand_statement;
DEALLOCATE PREPARE rand_statement;

SET @absolute_value_statement_prepare = 'SELECT ABS(?), sleep(10) AS abs_A';
PREPARE abs_statement FROM @absolute_value_statement_prepare;
SET @a = -5;
EXECUTE abs_statement USING @a;

-- DEALLOCATE PREPARE sum_statement;
-- DEALLOCATE PREPARE abs_statement;

Changed in percona-toolkit:
assignee: nobody → Agustín (agustin-gallego)
status: Confirmed → In Progress
Revision history for this message
Agustín (agustin-gallego) wrote :
Changed in percona-toolkit:
status: In Progress → Fix Committed
Revision history for this message
Shahriyar Rzayev (rzayev-sehriyar) wrote :

Percona now uses JIRA for bug reports so this bug report is migrated to: https://jira.percona.com/browse/PT-1395

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.