summaryrefslogtreecommitdiff
path: root/sql/item.cc
diff options
context:
space:
mode:
authorDavi Arnaut <Davi.Arnaut@Sun.COM>2010-03-09 18:55:08 -0300
committerDavi Arnaut <Davi.Arnaut@Sun.COM>2010-03-09 18:55:08 -0300
commit02ac873ccfb5deb46533aefd35640a95f51d1c67 (patch)
tree6e80e0d206fc3bbdd80786379064a055c0c9643a /sql/item.cc
parentfd35fc4ea228f38af35d065214fd002b0c09cb71 (diff)
downloadmariadb-git-02ac873ccfb5deb46533aefd35640a95f51d1c67.tar.gz
Bug#51650: crash with user variables and triggers
The problem was that bits of the destructive equality propagation optimization weren't being undone after the execution of a stored program. Modifications to the parse tree that are based on transient properties must be undone to enable the re-execution of stored programs. The solution is to cleanup any references to predicates generated by the equality propagation during the execution of a stored program. mysql-test/r/trigger.result: Add test case result for Bug#51650. mysql-test/t/trigger.test: Add test case for Bug#51650. sql/item.cc: Remove reference to a equality predicate.
Diffstat (limited to 'sql/item.cc')
-rw-r--r--sql/item.cc1
1 files changed, 1 insertions, 0 deletions
diff --git a/sql/item.cc b/sql/item.cc
index 04496338b8f..ec4c2e6e662 100644
--- a/sql/item.cc
+++ b/sql/item.cc
@@ -4475,6 +4475,7 @@ void Item_field::cleanup()
I.e. we can drop 'field'.
*/
field= result_field= 0;
+ item_equal= NULL;
null_value= FALSE;
DBUG_VOID_RETURN;
}