summaryrefslogtreecommitdiff
path: root/sql/sql_lex.cc
diff options
context:
space:
mode:
authorunknown <evgen@moonbone.local>2005-09-22 01:38:39 +0400
committerunknown <evgen@moonbone.local>2005-09-22 01:38:39 +0400
commit1b02a815dde1379635fb1c76065fc056c084705a (patch)
tree855aa772951e6545174d3ef67ecc3d5d677db4ee /sql/sql_lex.cc
parent2a5505c7f6e0e41dfe0d85c2d9dd2f5e6eebf222 (diff)
downloadmariadb-git-1b02a815dde1379635fb1c76065fc056c084705a.tar.gz
Fix bug #13180 thd->allow_sum_funcs wasn't reset before query processing.
thd->allow_sum_func was left 'true' after previous statement thus allowing sum funcs to be present in conditions. thd->allow_sum_func should be set to 0 for each query and each prepared statement reinitialization. This is done in lex_start() and reset_stmt_for_execute(). sql/sql_lex.cc: Fix bug#13180 thd->allow_sum_func wasn't reset obefore query processing. thd->allow_sum_func is set to 0 in lex_start(). sql/sql_prepare.cc: Fix bug#13180 thd->allow_sum_func wasn't reset obefore query processing. thd->allow_sum_func is set to 0 in reset_stmt_for_execute(). mysql-test/t/update.test: Test case for bug#13180 thd->allow_sum_funcs wasn't reset before query processing. mysql-test/r/update.result: Test case for bug#13180 thd->allow_sum_funcs wasn't reset before query processing.
Diffstat (limited to 'sql/sql_lex.cc')
-rw-r--r--sql/sql_lex.cc1
1 files changed, 1 insertions, 0 deletions
diff --git a/sql/sql_lex.cc b/sql/sql_lex.cc
index 8636b6542fc..07017451bad 100644
--- a/sql/sql_lex.cc
+++ b/sql/sql_lex.cc
@@ -160,6 +160,7 @@ void lex_start(THD *thd, uchar *buf,uint length)
lex->duplicates= DUP_ERROR;
lex->ignore= 0;
lex->proc_list.first= 0;
+ thd->allow_sum_func= 0;
}
void lex_end(LEX *lex)