mirror of
https://github.com/MariaDB/server.git
synced 2025-01-17 04:22:27 +01:00
merge
sql/sql_union.cc: Auto merged
This commit is contained in:
commit
7b44d753d0
3 changed files with 26 additions and 1 deletions
|
@ -1239,3 +1239,15 @@ insert into t2 values (1);
|
|||
update t1 set s1 = s1 + 1 where 1 = (select x.s1 as A from t2 WHERE t2.s1 > t1.s1 order by A);
|
||||
ERROR 42S02: Unknown table 'x' in field list
|
||||
DROP TABLE t1, t2;
|
||||
create table t1 (a int) type=innodb;
|
||||
create table t2 (a int) type=innodb;
|
||||
create table t3 (a int) type=innodb;
|
||||
insert into t1 values (1),(2),(3),(4);
|
||||
insert into t2 values (10),(20),(30),(40);
|
||||
insert into t3 values (1),(2),(10),(50);
|
||||
select a from t3 where t3.a in (select a from t1 where a <= 3 union select * from t2 where a <= 30);
|
||||
a
|
||||
1
|
||||
2
|
||||
10
|
||||
drop table t1,t2;
|
||||
|
|
|
@ -841,3 +841,15 @@ insert into t2 values (1);
|
|||
update t1 set s1 = s1 + 1 where 1 = (select x.s1 as A from t2 WHERE t2.s1 > t1.s1 order by A);
|
||||
DROP TABLE t1, t2;
|
||||
|
||||
#
|
||||
# UNION unlocking test
|
||||
#
|
||||
create table t1 (a int) type=innodb;
|
||||
create table t2 (a int) type=innodb;
|
||||
create table t3 (a int) type=innodb;
|
||||
insert into t1 values (1),(2),(3),(4);
|
||||
insert into t2 values (10),(20),(30),(40);
|
||||
insert into t3 values (1),(2),(10),(50);
|
||||
select a from t3 where t3.a in (select a from t1 where a <= 3 union select * from t2 where a <= 30);
|
||||
drop table t1,t2;
|
||||
|
||||
|
|
|
@ -354,7 +354,8 @@ int st_select_lex_unit::exec()
|
|||
global_parameters->order_list.elements,
|
||||
(ORDER*)global_parameters->order_list.first,
|
||||
(ORDER*) NULL, NULL, (ORDER*) NULL,
|
||||
thd->options, result, this, fake_select, 0);
|
||||
thd->options | SELECT_NO_UNLOCK,
|
||||
result, this, fake_select, 0);
|
||||
if (found_rows_for_union && !res)
|
||||
thd->limit_found_rows = (ulonglong)table->file->records;
|
||||
fake_select->exclude();
|
||||
|
|
Loading…
Reference in a new issue