diff options
author | evgen@moonbone.local <> | 2005-09-22 01:38:39 +0400 |
---|---|---|
committer | evgen@moonbone.local <> | 2005-09-22 01:38:39 +0400 |
commit | b7e8c8b1126e50442f6de02d257d7ab6c020930c (patch) | |
tree | 855aa772951e6545174d3ef67ecc3d5d677db4ee /mysql-test/t/update.test | |
parent | 21636f1ccb4783f9a2b3e99b7bd29cd33ebef466 (diff) | |
download | mariadb-git-b7e8c8b1126e50442f6de02d257d7ab6c020930c.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().
Diffstat (limited to 'mysql-test/t/update.test')
-rw-r--r-- | mysql-test/t/update.test | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/mysql-test/t/update.test b/mysql-test/t/update.test index e4e751862f1..84e9ced2017 100644 --- a/mysql-test/t/update.test +++ b/mysql-test/t/update.test @@ -215,4 +215,16 @@ UPDATE t1 SET t1.f2=(SELECT MAX(t2.f4) FROM t2 WHERE t2.f3=t1.f1); select * from t1; drop table t1,t2; +# +# Bug #13180 sometimes server accepts sum func in update/delete where condition +# +create table t1(f1 int); +select DATABASE(); +--error 1111 +update t1 set f1=1 where count(*)=1; +select DATABASE(); +--error 1111 +delete from t1 where count(*)=1; +drop table t1; + # End of 4.1 tests |