Skip to content

Commit 04829e0

Browse files
author
kaa@kaamos.(none)
committed
Fix for bug #34650: Test suite without cluster fails on Mac OS X
Leopard. The change_user test failed because results of some statements depended on platform and server build flags. subselect_notembedded failure was a result of a bad merge from 5.0. Fixed the corresponding test cases.
1 parent 95fd687 commit 04829e0

6 files changed

+80
-267
lines changed

mysql-test/r/change_user.result

+2-2
Original file line numberDiff line numberDiff line change
@@ -4,14 +4,14 @@ SELECT @@session.sql_big_selects;
44
1
55
SELECT @@global.max_join_size;
66
@@global.max_join_size
7-
18446744073709551615
7+
HA_POS_ERROR
88
change_user
99
SELECT @@session.sql_big_selects;
1010
@@session.sql_big_selects
1111
1
1212
SELECT @@global.max_join_size;
1313
@@global.max_join_size
14-
18446744073709551615
14+
HA_POS_ERROR
1515
SET @@global.max_join_size = 10000;
1616
SET @@session.max_join_size = default;
1717
change_user

mysql-test/r/subselect.result

-35
Original file line numberDiff line numberDiff line change
@@ -4155,41 +4155,6 @@ SELECT ((a1,a2) IN (SELECT * FROM t2 WHERE b2 > 0)) IS NULL FROM t1;
41554155
0
41564156
0
41574157
DROP TABLE t1, t2;
4158-
create table t1(a int,b int,key(a),key(b));
4159-
insert into t1(a,b) values (1,2),(2,1),(2,3),(3,4),(5,4),(5,5),
4160-
(6,7),(7,4),(5,3);
4161-
5
4162-
4
4163-
3
4164-
2
4165-
1
4166-
26
4167-
25
4168-
24
4169-
23
4170-
22
4171-
21
4172-
20
4173-
19
4174-
18
4175-
17
4176-
16
4177-
15
4178-
14
4179-
13
4180-
12
4181-
11
4182-
10
4183-
9
4184-
8
4185-
7
4186-
6
4187-
5
4188-
4
4189-
3
4190-
2
4191-
1
4192-
drop table t1;
41934158
CREATE TABLE t1 (s1 BINARY(5), s2 VARBINARY(5));
41944159
INSERT INTO t1 VALUES (0x41,0x41), (0x42,0x42), (0x43,0x43);
41954160
SELECT s1, s2 FROM t1 WHERE s2 IN (SELECT s1 FROM t1);

mysql-test/r/subselect_notembedded.result

+32-97
Original file line numberDiff line numberDiff line change
@@ -4,101 +4,36 @@ purge master logs before adddate(current_timestamp(), interval -4 day);
44
create table t1(a int,b int,key(a),key(b));
55
insert into t1(a,b) values (1,2),(2,1),(2,3),(3,4),(5,4),(5,5),
66
(6,7),(7,4),(5,3);
7-
select sum(a),a from t1 where a> (
8-
select sum(a) from t1 where a> ( select sum(a) from t1 where a> (
9-
select sum(a) from t1 where a> ( select sum(a) from t1 where a> (
10-
select sum(a) from t1 where a> ( select sum(a) from t1 where a> (
11-
select sum(a) from t1 where a> ( select sum(a) from t1 where a> (
12-
select sum(a) from t1 where a> ( select sum(a) from t1 where a> (
13-
select sum(a) from t1 where a> ( select sum(a) from t1
14-
)group by b limit 1)group by b limit 1
15-
)group by b limit 1)group by b limit 1)group by b limit 1
16-
)group by b limit 1)group by b limit 1)group by b limit 1
17-
)group by b limit 1)group by b limit 1)group by b limit 1)
18-
group by a;
19-
sum(a) a
20-
select sum(a),a from t1 where a> (
21-
select sum(a) from t1 where a> ( select sum(a) from t1 where a> (
22-
select sum(a) from t1 where a> ( select sum(a) from t1 where a> (
23-
select sum(a) from t1 where a> ( select sum(a) from t1 where a> (
24-
select sum(a) from t1 where a> ( select sum(a) from t1 where a> (
25-
select sum(a) from t1 where a> ( select sum(a) from t1 where a> (
26-
select sum(a) from t1 where a> ( select sum(a) from t1 where a> (
27-
select sum(a) from t1 where a> ( select sum(a) from t1 where a> (
28-
select sum(a) from t1 where a> ( select sum(a) from t1 where a> (
29-
select sum(a) from t1 where a> ( select sum(a) from t1 where a> (
30-
select sum(a) from t1 where a> ( select sum(a) from t1 where a> (
31-
select sum(a) from t1 where a> ( select sum(a) from t1 where a> (
32-
select sum(a) from t1 where a> ( select sum(a) from t1 where a> (
33-
select sum(a) from t1 where a> ( select sum(a) from t1 where a> (
34-
select sum(a) from t1 where a> ( select sum(a) from t1 where a> (
35-
select sum(a) from t1 where a> ( select sum(a) from t1 where a> (
36-
select sum(a) from t1
37-
)group by b limit 1)group by b limit 1)group by b limit 1
38-
)group by b limit 1)group by b limit 1)group by b limit 1
39-
)group by b limit 1)group by b limit 1)group by b limit 1
40-
)group by b limit 1)group by b limit 1)group by b limit 1
41-
)group by b limit 1)group by b limit 1)group by b limit 1
42-
)group by b limit 1)group by b limit 1)group by b limit 1
43-
)group by b limit 1)group by b limit 1)group by b limit 1
44-
)group by b limit 1)group by b limit 1)group by b limit 1
45-
)group by b limit 1)group by b limit 1)group by b limit 1
46-
)group by b limit 1)group by b limit 1)group by b limit 1)
47-
group by a;
48-
ERROR HY000: Thread stack overrun detected
49-
explain select sum(a),a from t1 where a> (
50-
select sum(a) from t1 where a> ( select sum(a) from t1 where a> (
51-
select sum(a) from t1 where a> ( select sum(a) from t1 where a> (
52-
select sum(a) from t1 where a> ( select sum(a) from t1 where a> (
53-
select sum(a) from t1 where a> ( select sum(a) from t1 where a> (
54-
select sum(a) from t1 where a> ( select sum(a) from t1 where a> (
55-
select sum(a) from t1 where a> ( select sum(a) from t1
56-
)group by b limit 1)group by b limit 1
57-
)group by b limit 1)group by b limit 1)group by b limit 1
58-
)group by b limit 1)group by b limit 1)group by b limit 1
59-
)group by b limit 1)group by b limit 1)group by b limit 1)
60-
group by a;
61-
id select_type table type possible_keys key key_len ref rows Extra
62-
1 PRIMARY t1 index a a 5 NULL 9 Using where; Using index
63-
2 SUBQUERY t1 index a b 5 NULL 9 Using where; Using filesort
64-
3 SUBQUERY t1 index a b 5 NULL 9 Using where; Using filesort
65-
4 SUBQUERY t1 index a b 5 NULL 9 Using where; Using filesort
66-
5 SUBQUERY t1 index a b 5 NULL 9 Using where; Using filesort
67-
6 SUBQUERY t1 index a b 5 NULL 9 Using where; Using filesort
68-
7 SUBQUERY t1 index a b 5 NULL 9 Using where; Using filesort
69-
8 SUBQUERY t1 index a b 5 NULL 9 Using where; Using filesort
70-
9 SUBQUERY t1 index a b 5 NULL 9 Using where; Using filesort
71-
10 SUBQUERY t1 index a b 5 NULL 9 Using where; Using filesort
72-
11 SUBQUERY t1 index a b 5 NULL 9 Using where; Using filesort
73-
12 SUBQUERY t1 range a a 5 NULL 1 Using where; Using temporary; Using filesort
74-
13 SUBQUERY t1 index NULL a 5 NULL 9 Using index
75-
explain select sum(a),a from t1 where a> (
76-
select sum(a) from t1 where a> ( select sum(a) from t1 where a> (
77-
select sum(a) from t1 where a> ( select sum(a) from t1 where a> (
78-
select sum(a) from t1 where a> ( select sum(a) from t1 where a> (
79-
select sum(a) from t1 where a> ( select sum(a) from t1 where a> (
80-
select sum(a) from t1 where a> ( select sum(a) from t1 where a> (
81-
select sum(a) from t1 where a> ( select sum(a) from t1 where a> (
82-
select sum(a) from t1 where a> ( select sum(a) from t1 where a> (
83-
select sum(a) from t1 where a> ( select sum(a) from t1 where a> (
84-
select sum(a) from t1 where a> ( select sum(a) from t1 where a> (
85-
select sum(a) from t1 where a> ( select sum(a) from t1 where a> (
86-
select sum(a) from t1 where a> ( select sum(a) from t1 where a> (
87-
select sum(a) from t1 where a> ( select sum(a) from t1 where a> (
88-
select sum(a) from t1 where a> ( select sum(a) from t1 where a> (
89-
select sum(a) from t1 where a> ( select sum(a) from t1 where a> (
90-
select sum(a) from t1 where a> ( select sum(a) from t1 where a> (
91-
select sum(a) from t1
92-
)group by b limit 1)group by b limit 1)group by b limit 1
93-
)group by b limit 1)group by b limit 1)group by b limit 1
94-
)group by b limit 1)group by b limit 1)group by b limit 1
95-
)group by b limit 1)group by b limit 1)group by b limit 1
96-
)group by b limit 1)group by b limit 1)group by b limit 1
97-
)group by b limit 1)group by b limit 1)group by b limit 1
98-
)group by b limit 1)group by b limit 1)group by b limit 1
99-
)group by b limit 1)group by b limit 1)group by b limit 1
100-
)group by b limit 1)group by b limit 1)group by b limit 1
101-
)group by b limit 1)group by b limit 1)group by b limit 1)
102-
group by a;
103-
ERROR HY000: Thread stack overrun detected
7+
5
8+
4
9+
3
10+
2
11+
1
12+
26
13+
25
14+
24
15+
23
16+
22
17+
21
18+
20
19+
19
20+
18
21+
17
22+
16
23+
15
24+
14
25+
13
26+
12
27+
11
28+
10
29+
9
30+
8
31+
7
32+
6
33+
5
34+
4
35+
3
36+
2
37+
1
10438
drop table t1;
39+
End of 5.1 tests

mysql-test/t/change_user.test

+7
Original file line numberDiff line numberDiff line change
@@ -4,17 +4,24 @@
44

55
--echo Bug#20023
66
SELECT @@session.sql_big_selects;
7+
# The exact value depends on the server build flags
8+
--replace_result 4294967295 HA_POS_ERROR 18446744073709551615 HA_POS_ERROR
79
SELECT @@global.max_join_size;
810
--echo change_user
911
--change_user
1012
SELECT @@session.sql_big_selects;
13+
# The exact value depends on the server build flags
14+
--replace_result 4294967295 HA_POS_ERROR 18446744073709551615 HA_POS_ERROR
1115
SELECT @@global.max_join_size;
1216
SET @@global.max_join_size = 10000;
1317
SET @@session.max_join_size = default;
1418
--echo change_user
1519
--change_user
1620
SELECT @@session.sql_big_selects;
21+
# May produce a warning depending on server build flags
22+
--disable_warnings
1723
SET @@global.max_join_size = -1;
24+
--enable_warnings
1825
SET @@session.max_join_size = default;
1926
--echo change_user
2027
--change_user

mysql-test/t/subselect.test

-46
Original file line numberDiff line numberDiff line change
@@ -3015,52 +3015,6 @@ INSERT INTO t2 VALUES (103, 203);
30153015
SELECT ((a1,a2) IN (SELECT * FROM t2 WHERE b2 > 0)) IS NULL FROM t1;
30163016
DROP TABLE t1, t2;
30173017

3018-
#
3019-
# Bug31048: Many nested subqueries may cause server crash.
3020-
#
3021-
create table t1(a int,b int,key(a),key(b));
3022-
insert into t1(a,b) values (1,2),(2,1),(2,3),(3,4),(5,4),(5,5),
3023-
(6,7),(7,4),(5,3);
3024-
3025-
let $nesting= 26;
3026-
let $should_work_nesting= 5;
3027-
let $start= select sum(a),a from t1 where a> ( select sum(a) from t1 ;
3028-
let $end= )group by a ;
3029-
let $start_app= where a> ( select sum(a) from t1 ;
3030-
let $end_pre= )group by b limit 1 ;
3031-
3032-
--disable_result_log
3033-
--disable_query_log
3034-
# At least 4 level nesting should work without errors
3035-
while ($should_work_nesting)
3036-
{
3037-
--echo $should_work_nesting
3038-
eval $start $end;
3039-
eval explain $start $end;
3040-
let $start= $start
3041-
$start_app;
3042-
let $end= $end_pre
3043-
$end;
3044-
dec $should_work_nesting;
3045-
}
3046-
# Other may fail with the 'stack overrun error'
3047-
while ($nesting)
3048-
{
3049-
--echo $nesting
3050-
--error 0,1436
3051-
eval $start $end;
3052-
--error 0,1436
3053-
eval explain $start $end;
3054-
let $start= $start
3055-
$start_app;
3056-
let $end= $end_pre
3057-
$end;
3058-
dec $nesting;
3059-
}
3060-
--enable_result_log
3061-
--enable_query_log
3062-
drop table t1;
3063-
30643018
#
30653019
# Bug #28076: inconsistent binary/varbinary comparison
30663020
#

0 commit comments

Comments
 (0)