Bug #80173 | Prepared statements created through C API not logged in performance schema | ||
---|---|---|---|
Submitted: | 27 Jan 2016 11:11 | Modified: | 28 Jan 2016 8:26 |
Reporter: | d sech | Email Updates: | |
Status: | Verified | Impact on me: | |
Category: | MySQL Server: Performance Schema | Severity: | S4 (Feature request) |
Version: | 5.7.10 | OS: | Windows (Windows 7) |
Assigned to: | Marc ALFF | CPU Architecture: | Any |
[27 Jan 2016 11:11]
d sech
[27 Jan 2016 11:25]
d sech
PHP sample script
Attachment: prep.php (application/octet-stream, text), 698 bytes.
[28 Jan 2016 8:26]
MySQL Verification Team
Hello Dorian, Thank you for the report and test case. Verified as described with 5.7.10 build. Thanks, Umesh
[28 Jan 2016 8:26]
MySQL Verification Team
Also, https://bugs.mysql.com/bug.php?id=69218
[28 Jan 2016 8:27]
MySQL Verification Team
Also, http://bugs.mysql.com/bug.php?id=76284
[31 May 2017 9:51]
Anushree Prakash B
Posted by developer: Analysis: After comparing the current behaviour of instrumentation of prepared statements from SQL prompt and from C API, we figured out that in both these cases, the instrumentation of the actual query used in prepared statement is not being done. Although for prepared statements from SQL prompt, only some top level statements are added to digest, the present aggregated statistics will not help much in monitoring because the query part is being replaced by a placeholder. Solution: It requires calculating and saving the digest of a non-top-level statement particularly the query part of the statement being prepared. The solution also needs to make sure that the behaviour is consistent for prepared statements from both the SQL prompt and the C API. After further analysis and discussions with the development team, we have come to a conclusion that it's essentially a feature request as prepared statements are instrumented in a different way in the present design. Right now we are instrumenting the prepared statements, but not *together* with the non-prepared ones This would require some design level changes in the performance schema code and hence does not qualify to go into the GA versions.