1
0
mirror of https://github.com/MariaDB/server.git synced 2025-07-30 16:24:05 +03:00

Fix for BUG#8726: In JOIN::optimize on ER_TOO_BIG_SELECT error set JOIN::error to -1 to cause

the error to be sent to the client.


mysql-test/r/select_safe.result:
  Testcase for BUG#8726
mysql-test/t/select_safe.test:
  Testcase for BUG#8726
sql/sql_select.cc:
  Fix for BUG#8726: On ER_TOO_BIG_SELECT set JOIN::error to -1 to cause the error to be sent to the client.
This commit is contained in:
unknown
2005-02-28 20:21:21 +03:00
parent 79cdcc7bb3
commit d2ead18b69
3 changed files with 36 additions and 1 deletions

View File

@ -66,4 +66,24 @@ SET MAX_SEEKS_FOR_KEY=DEFAULT;
drop table t1;
# BUG#8726
create table t1 (a int);
insert into t1 values (1),(2),(3),(4),(5);
insert into t1 select * from t1;
insert into t1 select * from t1;
insert into t1 select * from t1;
set local max_join_size=8;
--error 1104
select * from (select * from t1) x;
set local max_join_size=1;
--error 1104
select * from (select * from t1 a, t1 b) x;
set local max_join_size=1;
--error 1104
select * from (select 1 union select 2 union select 3) x;
drop table t1;
SET SQL_SAFE_UPDATES=0,SQL_SELECT_LIMIT=DEFAULT, SQL_MAX_JOIN_SIZE=DEFAULT;