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
2b58fa02
Commit
2b58fa02
authored
Mar 19, 2008
by
kaa@kaamos.(none)
Browse files
Options
Browse Files
Download
Plain Diff
Merge kaamos.(none):/data/src/opt/bug34650/my51
into kaamos.(none):/data/src/opt/mysql-5.1-opt
parents
106cd870
04829e09
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
80 additions
and
267 deletions
+80
-267
mysql-test/r/change_user.result
mysql-test/r/change_user.result
+2
-2
mysql-test/r/subselect.result
mysql-test/r/subselect.result
+0
-35
mysql-test/r/subselect_notembedded.result
mysql-test/r/subselect_notembedded.result
+32
-97
mysql-test/t/change_user.test
mysql-test/t/change_user.test
+7
-0
mysql-test/t/subselect.test
mysql-test/t/subselect.test
+0
-46
mysql-test/t/subselect_notembedded.test
mysql-test/t/subselect_notembedded.test
+39
-87
No files found.
mysql-test/r/change_user.result
View file @
2b58fa02
...
...
@@ -4,14 +4,14 @@ SELECT @@session.sql_big_selects;
1
SELECT @@global.max_join_size;
@@global.max_join_size
18446744073709551615
HA_POS_ERROR
change_user
SELECT @@session.sql_big_selects;
@@session.sql_big_selects
1
SELECT @@global.max_join_size;
@@global.max_join_size
18446744073709551615
HA_POS_ERROR
SET @@global.max_join_size = 10000;
SET @@session.max_join_size = default;
change_user
...
...
mysql-test/r/subselect.result
View file @
2b58fa02
...
...
@@ -4155,41 +4155,6 @@ SELECT ((a1,a2) IN (SELECT * FROM t2 WHERE b2 > 0)) IS NULL FROM t1;
0
0
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);
5
4
3
2
1
26
25
24
23
22
21
20
19
18
17
16
15
14
13
12
11
10
9
8
7
6
5
4
3
2
1
drop table t1;
CREATE TABLE t1 (s1 BINARY(5), s2 VARBINARY(5));
INSERT INTO t1 VALUES (0x41,0x41), (0x42,0x42), (0x43,0x43);
SELECT s1, s2 FROM t1 WHERE s2 IN (SELECT s1 FROM t1);
...
...
mysql-test/r/subselect_notembedded.result
View file @
2b58fa02
...
...
@@ -4,101 +4,36 @@ purge master logs before adddate(current_timestamp(), interval -4 day);
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
5
4
3
2
1
26
25
24
23
22
21
20
19
18
17
16
15
14
13
12
11
10
9
8
7
6
5
4
3
2
1
drop table t1;
End of 5.1 tests
mysql-test/t/change_user.test
View file @
2b58fa02
...
...
@@ -4,17 +4,24 @@
--
echo
Bug
#20023
SELECT
@@
session
.
sql_big_selects
;
# The exact value depends on the server build flags
--
replace_result
4294967295
HA_POS_ERROR
18446744073709551615
HA_POS_ERROR
SELECT
@@
global
.
max_join_size
;
--
echo
change_user
--
change_user
SELECT
@@
session
.
sql_big_selects
;
# The exact value depends on the server build flags
--
replace_result
4294967295
HA_POS_ERROR
18446744073709551615
HA_POS_ERROR
SELECT
@@
global
.
max_join_size
;
SET
@@
global
.
max_join_size
=
10000
;
SET
@@
session
.
max_join_size
=
default
;
--
echo
change_user
--
change_user
SELECT
@@
session
.
sql_big_selects
;
# May produce a warning depending on server build flags
--
disable_warnings
SET
@@
global
.
max_join_size
=
-
1
;
--
enable_warnings
SET
@@
session
.
max_join_size
=
default
;
--
echo
change_user
--
change_user
...
...
mysql-test/t/subselect.test
View file @
2b58fa02
...
...
@@ -3015,52 +3015,6 @@ INSERT INTO t2 VALUES (103, 203);
SELECT
((
a1
,
a2
)
IN
(
SELECT
*
FROM
t2
WHERE
b2
>
0
))
IS
NULL
FROM
t1
;
DROP
TABLE
t1
,
t2
;
#
# Bug31048: Many nested subqueries may cause server crash.
#
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
);
let
$nesting
=
26
;
let
$should_work_nesting
=
5
;
let
$start
=
select
sum
(
a
),
a
from
t1
where
a
>
(
select
sum
(
a
)
from
t1
;
let
$end
=
)
group
by
a
;
let
$start_app
=
where
a
>
(
select
sum
(
a
)
from
t1
;
let
$end_pre
=
)
group
by
b
limit
1
;
--
disable_result_log
--
disable_query_log
# At least 4 level nesting should work without errors
while
(
$should_work_nesting
)
{
--
echo
$should_work_nesting
eval
$start
$end
;
eval
explain
$start
$end
;
let
$start
=
$start
$start_app
;
let
$end
=
$end_pre
$end
;
dec
$should_work_nesting
;
}
# Other may fail with the 'stack overrun error'
while
(
$nesting
)
{
--
echo
$nesting
--
error
0
,
1436
eval
$start
$end
;
--
error
0
,
1436
eval
explain
$start
$end
;
let
$start
=
$start
$start_app
;
let
$end
=
$end_pre
$end
;
dec
$nesting
;
}
--
enable_result_log
--
enable_query_log
drop
table
t1
;
#
# Bug #28076: inconsistent binary/varbinary comparison
#
...
...
mysql-test/t/subselect_notembedded.test
View file @
2b58fa02
...
...
@@ -14,92 +14,44 @@ purge master logs before adddate(current_timestamp(), interval -4 day);
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
);
# test for the stack overflow bug
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
;
--
replace_regex
/
overrun
.*
$
/
overrun
detected
/
--
error
1436
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
;
# test for the memory consumption & subquery slowness bug
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
;
--
replace_regex
/
overrun
.*
$
/
overrun
detected
/
--
error
1436
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
;
drop
table
t1
;
let
$nesting
=
26
;
let
$should_work_nesting
=
5
;
let
$start
=
select
sum
(
a
),
a
from
t1
where
a
>
(
select
sum
(
a
)
from
t1
;
let
$end
=
)
group
by
a
;
let
$start_app
=
where
a
>
(
select
sum
(
a
)
from
t1
;
let
$end_pre
=
)
group
by
b
limit
1
;
--
disable_result_log
--
disable_query_log
# At least 4 level nesting should work without errors
while
(
$should_work_nesting
)
{
--
echo
$should_work_nesting
eval
$start
$end
;
eval
explain
$start
$end
;
let
$start
=
$start
$start_app
;
let
$end
=
$end_pre
$end
;
dec
$should_work_nesting
;
}
# Other may fail with the 'stack overrun error'
while
(
$nesting
)
{
--
echo
$nesting
--
error
0
,
1436
eval
$start
$end
;
--
error
0
,
1436
eval
explain
$start
$end
;
let
$start
=
$start
$start_app
;
let
$end
=
$end_pre
$end
;
dec
$nesting
;
}
--
enable_result_log
--
enable_query_log
drop
table
t1
;
--
echo
End
of
5.1
tests
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