Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
M
MariaDB
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
nexedi
MariaDB
Commits
2ba1eb14
Commit
2ba1eb14
authored
Sep 22, 2005
by
evgen@moonbone.local
Browse files
Options
Browse Files
Download
Plain Diff
Manual merge
parents
a5a4c412
b7e8c8b1
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
27 additions
and
2 deletions
+27
-2
mysql-test/r/update.result
mysql-test/r/update.result
+12
-0
mysql-test/t/update.test
mysql-test/t/update.test
+12
-0
sql/sql_lex.cc
sql/sql_lex.cc
+1
-0
sql/sql_prepare.cc
sql/sql_prepare.cc
+2
-2
No files found.
mysql-test/r/update.result
View file @
2ba1eb14
...
@@ -251,3 +251,15 @@ f1 f2
...
@@ -251,3 +251,15 @@ f1 f2
1 1
1 1
2 2
2 2
drop table t1,t2;
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;
mysql-test/t/update.test
View file @
2ba1eb14
...
@@ -215,4 +215,16 @@ UPDATE t1 SET t1.f2=(SELECT MAX(t2.f4) FROM t2 WHERE t2.f3=t1.f1);
...
@@ -215,4 +215,16 @@ UPDATE t1 SET t1.f2=(SELECT MAX(t2.f4) FROM t2 WHERE t2.f3=t1.f1);
select
*
from
t1
;
select
*
from
t1
;
drop
table
t1
,
t2
;
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
# End of 4.1 tests
sql/sql_lex.cc
View file @
2ba1eb14
...
@@ -171,6 +171,7 @@ void lex_start(THD *thd, uchar *buf,uint length)
...
@@ -171,6 +171,7 @@ void lex_start(THD *thd, uchar *buf,uint length)
lex
->
sql_command
=
lex
->
orig_sql_command
=
SQLCOM_END
;
lex
->
sql_command
=
lex
->
orig_sql_command
=
SQLCOM_END
;
lex
->
duplicates
=
DUP_ERROR
;
lex
->
duplicates
=
DUP_ERROR
;
lex
->
ignore
=
0
;
lex
->
ignore
=
0
;
thd
->
allow_sum_func
=
0
;
lex
->
sphead
=
NULL
;
lex
->
sphead
=
NULL
;
lex
->
spcont
=
NULL
;
lex
->
spcont
=
NULL
;
lex
->
proc_list
.
first
=
0
;
lex
->
proc_list
.
first
=
0
;
...
...
sql/sql_prepare.cc
View file @
2ba1eb14
...
@@ -2129,8 +2129,8 @@ void reinit_stmt_before_use(THD *thd, LEX *lex)
...
@@ -2129,8 +2129,8 @@ void reinit_stmt_before_use(THD *thd, LEX *lex)
lex
->
result
->
cleanup
();
lex
->
result
->
cleanup
();
lex
->
result
->
set_thd
(
thd
);
lex
->
result
->
set_thd
(
thd
);
}
}
thd
->
allow_sum_func
=
0
;
DBUG_VOID_RETURN
;
DBUG_VOID_RETURN
;
}
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment