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
5a4feb17
Commit
5a4feb17
authored
Nov 23, 2007
by
gkodinov/kgeorge@magare.gmz
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
merge 5.0-opt -> 5.1-opt
parent
784b5d7b
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
103 additions
and
2 deletions
+103
-2
mysql-test/r/subselect.result
mysql-test/r/subselect.result
+101
-0
sql/opt_range.cc
sql/opt_range.cc
+1
-1
sql/sql_select.cc
sql/sql_select.cc
+1
-1
No files found.
mysql-test/r/subselect.result
View file @
5a4feb17
...
@@ -4139,6 +4139,107 @@ SELECT (SELECT SUM(t1.a) FROM t2 WHERE a=1) FROM t1;
...
@@ -4139,6 +4139,107 @@ SELECT (SELECT SUM(t1.a) FROM t2 WHERE a=1) FROM t1;
(SELECT SUM(t1.a) FROM t2 WHERE a=1)
(SELECT SUM(t1.a) FROM t2 WHERE a=1)
3
3
DROP TABLE t1,t2;
DROP TABLE t1,t2;
create table t1(a int,b int,key(a),key(b));
insert into t1(a,b) values (1,2),(2,1),(2,3),(3,4),(5,4),(5,5),
(6,7),(7,4),(5,3);
select sum(a),a from t1 where a> (
select sum(a) from t1 where a> ( select sum(a) from t1 where a> (
select sum(a) from t1 where a> ( select sum(a) from t1 where a> (
select sum(a) from t1 where a> ( select sum(a) from t1 where a> (
select sum(a) from t1 where a> ( select sum(a) from t1 where a> (
select sum(a) from t1 where a> ( select sum(a) from t1 where a> (
select sum(a) from t1 where a> ( select sum(a) from t1
)group by b limit 1)group by b limit 1
)group by b limit 1)group by b limit 1)group by b limit 1
)group by b limit 1)group by b limit 1)group by b limit 1
)group by b limit 1)group by b limit 1)group by b limit 1)
group by a;
sum(a) a
select sum(a),a from t1 where a> (
select sum(a) from t1 where a> ( select sum(a) from t1 where a> (
select sum(a) from t1 where a> ( select sum(a) from t1 where a> (
select sum(a) from t1 where a> ( select sum(a) from t1 where a> (
select sum(a) from t1 where a> ( select sum(a) from t1 where a> (
select sum(a) from t1 where a> ( select sum(a) from t1 where a> (
select sum(a) from t1 where a> ( select sum(a) from t1 where a> (
select sum(a) from t1 where a> ( select sum(a) from t1 where a> (
select sum(a) from t1 where a> ( select sum(a) from t1 where a> (
select sum(a) from t1 where a> ( select sum(a) from t1 where a> (
select sum(a) from t1 where a> ( select sum(a) from t1 where a> (
select sum(a) from t1 where a> ( select sum(a) from t1 where a> (
select sum(a) from t1 where a> ( select sum(a) from t1 where a> (
select sum(a) from t1 where a> ( select sum(a) from t1 where a> (
select sum(a) from t1 where a> ( select sum(a) from t1 where a> (
select sum(a) from t1 where a> ( select sum(a) from t1 where a> (
select sum(a) from t1
)group by b limit 1)group by b limit 1)group by b limit 1
)group by b limit 1)group by b limit 1)group by b limit 1
)group by b limit 1)group by b limit 1)group by b limit 1
)group by b limit 1)group by b limit 1)group by b limit 1
)group by b limit 1)group by b limit 1)group by b limit 1
)group by b limit 1)group by b limit 1)group by b limit 1
)group by b limit 1)group by b limit 1)group by b limit 1
)group by b limit 1)group by b limit 1)group by b limit 1
)group by b limit 1)group by b limit 1)group by b limit 1
)group by b limit 1)group by b limit 1)group by b limit 1)
group by a;
ERROR HY000: Thread stack overrun detected
explain select sum(a),a from t1 where a> (
select sum(a) from t1 where a> ( select sum(a) from t1 where a> (
select sum(a) from t1 where a> ( select sum(a) from t1 where a> (
select sum(a) from t1 where a> ( select sum(a) from t1 where a> (
select sum(a) from t1 where a> ( select sum(a) from t1 where a> (
select sum(a) from t1 where a> ( select sum(a) from t1 where a> (
select sum(a) from t1 where a> ( select sum(a) from t1
)group by b limit 1)group by b limit 1
)group by b limit 1)group by b limit 1)group by b limit 1
)group by b limit 1)group by b limit 1)group by b limit 1
)group by b limit 1)group by b limit 1)group by b limit 1)
group by a;
id select_type table type possible_keys key key_len ref rows Extra
1 PRIMARY t1 index a a 5 NULL 9 Using where; Using index
2 SUBQUERY t1 index a b 5 NULL 9 Using where; Using filesort
3 SUBQUERY t1 index a b 5 NULL 9 Using where; Using filesort
4 SUBQUERY t1 index a b 5 NULL 9 Using where; Using filesort
5 SUBQUERY t1 index a b 5 NULL 9 Using where; Using filesort
6 SUBQUERY t1 index a b 5 NULL 9 Using where; Using filesort
7 SUBQUERY t1 index a b 5 NULL 9 Using where; Using filesort
8 SUBQUERY t1 index a b 5 NULL 9 Using where; Using filesort
9 SUBQUERY t1 index a b 5 NULL 9 Using where; Using filesort
10 SUBQUERY t1 index a b 5 NULL 9 Using where; Using filesort
11 SUBQUERY t1 index a b 5 NULL 9 Using where; Using filesort
12 SUBQUERY t1 range a a 5 NULL 1 Using where; Using temporary; Using filesort
13 SUBQUERY t1 index NULL a 5 NULL 9 Using index
explain select sum(a),a from t1 where a> (
select sum(a) from t1 where a> ( select sum(a) from t1 where a> (
select sum(a) from t1 where a> ( select sum(a) from t1 where a> (
select sum(a) from t1 where a> ( select sum(a) from t1 where a> (
select sum(a) from t1 where a> ( select sum(a) from t1 where a> (
select sum(a) from t1 where a> ( select sum(a) from t1 where a> (
select sum(a) from t1 where a> ( select sum(a) from t1 where a> (
select sum(a) from t1 where a> ( select sum(a) from t1 where a> (
select sum(a) from t1 where a> ( select sum(a) from t1 where a> (
select sum(a) from t1 where a> ( select sum(a) from t1 where a> (
select sum(a) from t1 where a> ( select sum(a) from t1 where a> (
select sum(a) from t1 where a> ( select sum(a) from t1 where a> (
select sum(a) from t1 where a> ( select sum(a) from t1 where a> (
select sum(a) from t1 where a> ( select sum(a) from t1 where a> (
select sum(a) from t1 where a> ( select sum(a) from t1 where a> (
select sum(a) from t1 where a> ( select sum(a) from t1 where a> (
select sum(a) from t1
)group by b limit 1)group by b limit 1)group by b limit 1
)group by b limit 1)group by b limit 1)group by b limit 1
)group by b limit 1)group by b limit 1)group by b limit 1
)group by b limit 1)group by b limit 1)group by b limit 1
)group by b limit 1)group by b limit 1)group by b limit 1
)group by b limit 1)group by b limit 1)group by b limit 1
)group by b limit 1)group by b limit 1)group by b limit 1
)group by b limit 1)group by b limit 1)group by b limit 1
)group by b limit 1)group by b limit 1)group by b limit 1
)group by b limit 1)group by b limit 1)group by b limit 1)
group by a;
ERROR HY000: Thread stack overrun detected
drop table t1;
CREATE TABLE t1 (a1 INT, a2 INT);
CREATE TABLE t1 (a1 INT, a2 INT);
CREATE TABLE t2 (b1 INT, b2 INT);
CREATE TABLE t2 (b1 INT, b2 INT);
INSERT INTO t1 VALUES (100, 200);
INSERT INTO t1 VALUES (100, 200);
...
...
sql/opt_range.cc
View file @
5a4feb17
...
@@ -2162,7 +2162,7 @@ int SQL_SELECT::test_quick_select(THD *thd, key_map keys_to_use,
...
@@ -2162,7 +2162,7 @@ int SQL_SELECT::test_quick_select(THD *thd, key_map keys_to_use,
if
(
!
keys_to_use
.
is_clear_all
())
if
(
!
keys_to_use
.
is_clear_all
())
{
{
#ifndef EMBEDDED_LIBRARY // Avoid compiler warning
#ifndef EMBEDDED_LIBRARY // Avoid compiler warning
char
buff
[
STACK_BUFF_ALLOC
];
u
char
buff
[
STACK_BUFF_ALLOC
];
#endif
#endif
MEM_ROOT
alloc
;
MEM_ROOT
alloc
;
SEL_TREE
*
tree
=
NULL
;
SEL_TREE
*
tree
=
NULL
;
...
...
sql/sql_select.cc
View file @
5a4feb17
...
@@ -2367,7 +2367,7 @@ static ha_rows get_quick_record_count(THD *thd, SQL_SELECT *select,
...
@@ -2367,7 +2367,7 @@ static ha_rows get_quick_record_count(THD *thd, SQL_SELECT *select,
int
error
;
int
error
;
DBUG_ENTER
(
"get_quick_record_count"
);
DBUG_ENTER
(
"get_quick_record_count"
);
#ifndef EMBEDDED_LIBRARY // Avoid compiler warning
#ifndef EMBEDDED_LIBRARY // Avoid compiler warning
char
buff
[
STACK_BUFF_ALLOC
];
u
char
buff
[
STACK_BUFF_ALLOC
];
#endif
#endif
if
(
check_stack_overrun
(
thd
,
STACK_MIN_SIZE
,
buff
))
if
(
check_stack_overrun
(
thd
,
STACK_MIN_SIZE
,
buff
))
DBUG_RETURN
(
0
);
// Fatal error flag is set
DBUG_RETURN
(
0
);
// Fatal error flag is set
...
...
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