summaryrefslogtreecommitdiff
path: root/mysql-test/t/subselect_notembedded.test
diff options
context:
space:
mode:
authorunknown <msvensson@pilot.mysql.com>2008-04-03 11:50:43 +0200
committerunknown <msvensson@pilot.mysql.com>2008-04-03 11:50:43 +0200
commit3ad402570dcc61e01979db294938123ea9eb4c46 (patch)
treeabcc5a4053c601e7cce25995bc6169db4e48d8c2 /mysql-test/t/subselect_notembedded.test
parenta3880c31bb5f39b4d04ed4b97e0717d192af11a3 (diff)
parent505b93e98d3b2f3a8d529a875710ad71d12194bb (diff)
downloadmariadb-git-3ad402570dcc61e01979db294938123ea9eb4c46.tar.gz
Merge pilot.mysql.com:/data/msvensson/mysql/mysql-5.1-rpl
into pilot.mysql.com:/data/msvensson/mysql/mysql-5.1-mtr BitKeeper/etc/ignore: auto-union BitKeeper/deleted/.del-rpl_row_charset.test: Auto merged CMakeLists.txt: Auto merged configure.in: Auto merged client/mysqltest.c: Auto merged mysql-test/extra/binlog_tests/blackhole.test: Auto merged mysql-test/include/commit.inc: Auto merged mysql-test/include/mix1.inc: Auto merged mysql-test/lib/mtr_report.pm: Auto merged mysql-test/r/commit_1innodb.result: Auto merged mysql-test/r/create.result: Auto merged mysql-test/r/ctype_big5.result: Auto merged mysql-test/r/drop.result: Auto merged mysql-test/r/group_by.result: Auto merged mysql-test/r/information_schema.result: Auto merged mysql-test/r/loaddata.result: Auto merged mysql-test/r/mysqlbinlog.result: Auto merged mysql-test/r/partition_error.result: Auto merged mysql-test/r/query_cache.result: Auto merged mysql-test/r/sp.result: Auto merged mysql-test/r/view.result: Auto merged mysql-test/r/warnings.result: Auto merged mysql-test/suite/binlog/r/binlog_row_mix_innodb_myisam.result: Auto merged mysql-test/suite/binlog/r/binlog_stm_blackhole.result: Auto merged mysql-test/suite/binlog/r/binlog_stm_mix_innodb_myisam.result: Auto merged mysql-test/suite/binlog/r/binlog_unsafe.result: Auto merged mysql-test/suite/binlog/t/binlog_unsafe.test: Auto merged mysql-test/suite/federated/federated.result: Auto merged mysql-test/suite/federated/federated.test: Auto merged mysql-test/suite/parts/r/partition_alter1_myisam.result: Auto merged mysql-test/suite/parts/r/partition_alter2_myisam.result: Auto merged mysql-test/suite/rpl/r/rpl_row_basic_11bugs.result: Auto merged mysql-test/suite/rpl/r/rpl_row_log.result: Auto merged mysql-test/suite/rpl/r/rpl_row_log_innodb.result: Auto merged mysql-test/suite/rpl/t/disabled.def: Auto merged mysql-test/suite/rpl/t/rpl_flushlog_loop.test: Auto merged mysql-test/suite/rpl_ndb/r/rpl_ndb_log.result: Auto merged mysql-test/suite/rpl_ndb/t/rpl_ndb_transaction.test: Auto merged mysql-test/t/create.test: Auto merged mysql-test/t/csv.test: Auto merged mysql-test/t/disabled.def: Auto merged mysql-test/t/distinct.test: Auto merged mysql-test/t/drop.test: Auto merged mysql-test/t/group_by.test: Auto merged mysql-test/t/innodb.test: Auto merged mysql-test/t/loaddata.test: Auto merged mysql-test/t/partition_error.test: Auto merged mysql-test/t/query_cache.test: Auto merged mysql-test/t/sp.test: Auto merged mysql-test/t/view.test: Auto merged mysql-test/t/warnings.test: Auto merged sql/ha_ndbcluster.cc: Auto merged BitKeeper/deleted/.del-combinations: Delete: mysql-test/suite/binlog/combinations mysql-test/r/partition_not_windows.result: Use remote mysql-test/r/partition_symlink.result: Use remote mysql-test/r/symlink.result: SCCS merged mysql-test/suite/parts/inc/partition_basic.inc: SCCS merged mysql-test/suite/parts/inc/partition_check_drop.inc: Use remote mysql-test/suite/parts/inc/partition_layout_check1.inc: Use remote mysql-test/suite/parts/inc/partition_layout_check2.inc: Use remote mysql-test/suite/parts/r/partition_basic_innodb.result: Use remote mysql-test/suite/parts/r/partition_basic_myisam.result: Use remote mysql-test/suite/parts/r/partition_engine_myisam.result: Use remote mysql-test/suite/parts/t/partition_sessions.test: SCCS merged mysql-test/t/partition.test: SCCS merged mysql-test/t/partition_not_windows.test: Use remote mysql-test/t/partition_symlink.test: Use remote mysql-test/t/symlink.test: Use remote mysql-test/suite/binlog/r/binlog_multi_engine.result: Manual merge, name of binlog file changed mysql-test/suite/rpl/t/rpl_row_mysqlbinlog.test: Manual merge mysys/my_init.c: Manual merge
Diffstat (limited to 'mysql-test/t/subselect_notembedded.test')
-rw-r--r--mysql-test/t/subselect_notembedded.test126
1 files changed, 39 insertions, 87 deletions
diff --git a/mysql-test/t/subselect_notembedded.test b/mysql-test/t/subselect_notembedded.test
index 040c90452b9..2f1cc261f56 100644
--- a/mysql-test/t/subselect_notembedded.test
+++ b/mysql-test/t/subselect_notembedded.test
@@ -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