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
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
mariadb
Commits
f65403cd
Commit
f65403cd
authored
Dec 13, 2004
by
bell@sanja.is.com.ua
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fixed optimized SOME subquery
parent
b9abf25a
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
10 deletions
+4
-10
mysql-test/r/subselect.result
mysql-test/r/subselect.result
+0
-6
sql/item_cmpfunc.cc
sql/item_cmpfunc.cc
+4
-4
No files found.
mysql-test/r/subselect.result
View file @
f65403cd
...
@@ -1490,9 +1490,6 @@ Warnings:
...
@@ -1490,9 +1490,6 @@ Warnings:
Note 1003 select test.t3.a AS `a` from test.t3 where <not>((test.t3.a < (select max(test.t2.b) from test.t2)))
Note 1003 select test.t3.a AS `a` from test.t3 where <not>((test.t3.a < (select max(test.t2.b) from test.t2)))
select * from t3 where a >= some (select b from t2);
select * from t3 where a >= some (select b from t2);
a
a
6
7
3
explain extended select * from t3 where a >= some (select b from t2);
explain extended select * from t3 where a >= some (select b from t2);
id select_type table type possible_keys key key_len ref rows Extra
id select_type table type possible_keys key key_len ref rows Extra
1 PRIMARY t3 ALL NULL NULL NULL NULL 3 Using where
1 PRIMARY t3 ALL NULL NULL NULL NULL 3 Using where
...
@@ -1512,9 +1509,6 @@ Warnings:
...
@@ -1512,9 +1509,6 @@ Warnings:
Note 1003 select test.t3.a AS `a` from test.t3 where <not>((test.t3.a < <max>(select test.t2.b AS `b` from test.t2 group by test.t2.b)))
Note 1003 select test.t3.a AS `a` from test.t3 where <not>((test.t3.a < <max>(select test.t2.b AS `b` from test.t2 group by test.t2.b)))
select * from t3 where a >= some (select b from t2 group by 1);
select * from t3 where a >= some (select b from t2 group by 1);
a
a
6
7
3
explain extended select * from t3 where a >= some (select b from t2 group by 1);
explain extended select * from t3 where a >= some (select b from t2 group by 1);
id select_type table type possible_keys key key_len ref rows Extra
id select_type table type possible_keys key key_len ref rows Extra
1 PRIMARY t3 ALL NULL NULL NULL NULL 3 Using where
1 PRIMARY t3 ALL NULL NULL NULL NULL 3 Using where
...
...
sql/item_cmpfunc.cc
View file @
f65403cd
...
@@ -120,7 +120,7 @@ longlong Item_func_not_all::val_int()
...
@@ -120,7 +120,7 @@ longlong Item_func_not_all::val_int()
/*
/*
return TRUE if there was records in underlaying select in max/min
return TRUE if there was records in underlaying select in max/min
optimisation
optimisation
(ALL subquery)
*/
*/
if
(
empty_underlying_subquery
())
if
(
empty_underlying_subquery
())
return
1
;
return
1
;
...
@@ -157,11 +157,11 @@ longlong Item_func_nop_all::val_int()
...
@@ -157,11 +157,11 @@ longlong Item_func_nop_all::val_int()
double
value
=
args
[
0
]
->
val
();
double
value
=
args
[
0
]
->
val
();
/*
/*
return
TRU
E if there was records in underlaying select in max/min
return
FALS
E if there was records in underlaying select in max/min
optimisation
optimisation
(SAME/ANY subquery)
*/
*/
if
(
empty_underlying_subquery
())
if
(
empty_underlying_subquery
())
return
1
;
return
0
;
null_value
=
args
[
0
]
->
null_value
;
null_value
=
args
[
0
]
->
null_value
;
return
(
null_value
||
value
==
0
)
?
0
:
1
;
return
(
null_value
||
value
==
0
)
?
0
:
1
;
...
...
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