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
f6f93708
Commit
f6f93708
authored
Nov 23, 2002
by
bell@sanja.is.com.ua
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fixed bug with thd->allow_sum_func value in subselect
parent
1b62dc02
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
9 additions
and
2 deletions
+9
-2
mysql-test/r/subselect.result
mysql-test/r/subselect.result
+3
-0
mysql-test/t/subselect.test
mysql-test/t/subselect.test
+1
-0
sql/sql_base.cc
sql/sql_base.cc
+5
-2
No files found.
mysql-test/r/subselect.result
View file @
f6f93708
...
...
@@ -12,6 +12,9 @@ SELECT (SELECT 1 FROM (SELECT 1) HAVING a=1) as a;
Reference 'a' not supported (forward reference in item list)
SELECT (SELECT 1 FROM (SELECT 1) HAVING b=1) as a,(SELECT 1 FROM (SELECT 1) HAVING a=1) as b;
Reference 'b' not supported (forward reference in item list)
SELECT (SELECT 1),MAX(1) FROM (SELECT 1);
(SELECT 1) MAX(1)
1 1
drop table if exists t1,t2,t3,t4,t5,attend,clinic,inscrit;
create table t1 (a int);
create table t2 (a int, b int);
...
...
mysql-test/t/subselect.test
View file @
f6f93708
...
...
@@ -5,6 +5,7 @@ SELECT (SELECT (SELECT 0 UNION SELECT 0));
SELECT
(
SELECT
1
FROM
(
SELECT
1
)
HAVING
a
=
1
)
as
a
;
--
error
1245
SELECT
(
SELECT
1
FROM
(
SELECT
1
)
HAVING
b
=
1
)
as
a
,(
SELECT
1
FROM
(
SELECT
1
)
HAVING
a
=
1
)
as
b
;
SELECT
(
SELECT
1
),
MAX
(
1
)
FROM
(
SELECT
1
);
drop
table
if
exists
t1
,
t2
,
t3
,
t4
,
t5
,
attend
,
clinic
,
inscrit
;
create
table
t1
(
a
int
);
create
table
t2
(
a
int
,
b
int
);
...
...
sql/sql_base.cc
View file @
f6f93708
...
...
@@ -2225,8 +2225,10 @@ int setup_conds(THD *thd,TABLE_LIST *tables,COND **conds)
{
DBUG_ENTER
(
"setup_conds"
);
thd
->
set_query_id
=
1
;
thd
->
cond_count
=
0
;
thd
->
allow_sum_func
=
0
;
thd
->
cond_count
=
0
;
bool
save_allow_sum_func
=
thd
->
allow_sum_func
;
thd
->
allow_sum_func
=
0
;
if
(
*
conds
)
{
thd
->
where
=
"where clause"
;
...
...
@@ -2299,6 +2301,7 @@ int setup_conds(THD *thd,TABLE_LIST *tables,COND **conds)
table
->
on_expr
=
and_conds
(
table
->
on_expr
,
cond_and
);
}
}
thd
->
allow_sum_func
=
save_allow_sum_func
;
DBUG_RETURN
(
test
(
thd
->
fatal_error
));
}
...
...
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