summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorcmiller@zippy.cornsilk.net <>2007-04-06 09:15:18 -0400
committercmiller@zippy.cornsilk.net <>2007-04-06 09:15:18 -0400
commit88455a047f7d542d3670c073b704cfa2848279d4 (patch)
treef80fd4f330f95124b1f5560ce915ec1765b8ec62 /include
parent6204ae25fc6d6b2153e0e9ab14eee0c0ce5a2e2a (diff)
downloadmariadb-git-88455a047f7d542d3670c073b704cfa2848279d4.tar.gz
Changing the state of whether we're recording profiling information
halfway through a query (as happens in "SET SESSION PROFILING = ...") has a few side-effects, the worst of which is a memory leak for prepared statements, which poke directly from the parser into the profiling code (we don't have the query text when we need it) and that overwrites a pointer to heap-allocated memory when the previous statement turns on profiling. Instead, now set a flag when we begin a new statement that tracks whether profiling is on _at the start_ of the query. Use that to track whether we gather info. Additionally, use that AND use the state of the profiling variable after the end of a query to know whether to store information about the query that just finished.
Diffstat (limited to 'include')
0 files changed, 0 insertions, 0 deletions