summaryrefslogtreecommitdiff
path: root/sql/rpl_rli.h
diff options
context:
space:
mode:
authorTor Didriksen <tor.didriksen@oracle.com>2012-03-29 15:07:54 +0200
committerTor Didriksen <tor.didriksen@oracle.com>2012-03-29 15:07:54 +0200
commited418461614d912fbb114053508b3fb09b1fc2f0 (patch)
tree0be98efd7bd42720d221310b7c3a8949439296df /sql/rpl_rli.h
parentd1809a5c85bf76136aa7645c152e9f723fd4250b (diff)
downloadmariadb-git-ed418461614d912fbb114053508b3fb09b1fc2f0.tar.gz
Patch for Bug#13805127: Stored program cache produces wrong result in same THD.
Background: - as described in MySQL Internals Prepared Stored (http://forge.mysql.com/wiki/MySQL_Internals_Prepared_Stored), the Optimizer sometimes does destructive changes to the parsed LEX-object (Item-tree), which makes it impossible to re-use that tree for PS/SP re-execution. - in order to be able to re-use the Item-tree, the destructive changes are remembered and rolled back after the statement execution. The problem, discovered by this bug, was that the objects representing GROUP-BY clause did not restored after query execution. So, the GROUP-BY part of the statement could not be properly re-initialized for re-execution after destructive changes. Those objects do not take part in the Item-tree, so they can not be saved using the approach for Item-tree. The fix is as follows: - introduce a new array in st_select_lex to store the original ORDER pointers, representing the GROUP-BY clause; - Initialize this array in fix_prepare_information(). - restore the list of GROUP-BY items in reinit_stmt_before_use().
Diffstat (limited to 'sql/rpl_rli.h')
0 files changed, 0 insertions, 0 deletions