mirror of
https://github.com/MariaDB/server.git
synced 2025-01-30 02:30:06 +01:00
Manual merge
This commit is contained in:
commit
2ba1eb1486
4 changed files with 27 additions and 2 deletions
|
@ -251,3 +251,15 @@ f1 f2
|
|||
1 1
|
||||
2 2
|
||||
drop table t1,t2;
|
||||
create table t1(f1 int);
|
||||
select DATABASE();
|
||||
DATABASE()
|
||||
test
|
||||
update t1 set f1=1 where count(*)=1;
|
||||
ERROR HY000: Invalid use of group function
|
||||
select DATABASE();
|
||||
DATABASE()
|
||||
test
|
||||
delete from t1 where count(*)=1;
|
||||
ERROR HY000: Invalid use of group function
|
||||
drop table t1;
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -171,6 +171,7 @@ void lex_start(THD *thd, uchar *buf,uint length)
|
|||
lex->sql_command= lex->orig_sql_command= SQLCOM_END;
|
||||
lex->duplicates= DUP_ERROR;
|
||||
lex->ignore= 0;
|
||||
thd->allow_sum_func= 0;
|
||||
lex->sphead= NULL;
|
||||
lex->spcont= NULL;
|
||||
lex->proc_list.first= 0;
|
||||
|
|
|
@ -2129,8 +2129,8 @@ void reinit_stmt_before_use(THD *thd, LEX *lex)
|
|||
lex->result->cleanup();
|
||||
lex->result->set_thd(thd);
|
||||
}
|
||||
|
||||
DBUG_VOID_RETURN;
|
||||
thd->allow_sum_func= 0;
|
||||
DBUG_VOID_RETURN;
|
||||
}
|
||||
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue