mirror of
https://github.com/MariaDB/server.git
synced 2025-01-17 20:42:30 +01:00
Test case for the bug #2198: SELECT INTO OUTFILE (with Sub-Select) Problem.
This commit is contained in:
parent
2f7bf967fd
commit
a66924353a
2 changed files with 21 additions and 0 deletions
|
@ -1569,3 +1569,12 @@ INSERT INTO t2 VALUES (100, 200, 'C');
|
||||||
SELECT DISTINCT COLC FROM t1 WHERE COLA = (SELECT COLA FROM t2 WHERE COLB = 200 AND COLC ='C' LIMIT 1);
|
SELECT DISTINCT COLC FROM t1 WHERE COLA = (SELECT COLA FROM t2 WHERE COLB = 200 AND COLC ='C' LIMIT 1);
|
||||||
COLC
|
COLC
|
||||||
DROP TABLE t1, t2;
|
DROP TABLE t1, t2;
|
||||||
|
create table t1 (a int, b decimal(13, 3));
|
||||||
|
insert into t1 values (1, 0.123);
|
||||||
|
select a, (select max(b) from t1) into outfile "subselect.out.file.1" from t1;
|
||||||
|
delete from t1;
|
||||||
|
load data infile "subselect.out.file.1" into table t1;
|
||||||
|
select * from t1;
|
||||||
|
a b
|
||||||
|
1 0.123
|
||||||
|
drop table t1;
|
||||||
|
|
|
@ -1009,3 +1009,15 @@ INSERT INTO t1 VALUES (1,1,'1A3240'), (1,2,'4W2365');
|
||||||
INSERT INTO t2 VALUES (100, 200, 'C');
|
INSERT INTO t2 VALUES (100, 200, 'C');
|
||||||
SELECT DISTINCT COLC FROM t1 WHERE COLA = (SELECT COLA FROM t2 WHERE COLB = 200 AND COLC ='C' LIMIT 1);
|
SELECT DISTINCT COLC FROM t1 WHERE COLA = (SELECT COLA FROM t2 WHERE COLB = 200 AND COLC ='C' LIMIT 1);
|
||||||
DROP TABLE t1, t2;
|
DROP TABLE t1, t2;
|
||||||
|
|
||||||
|
#
|
||||||
|
# Bug 2198
|
||||||
|
#
|
||||||
|
|
||||||
|
create table t1 (a int, b decimal(13, 3));
|
||||||
|
insert into t1 values (1, 0.123);
|
||||||
|
select a, (select max(b) from t1) into outfile "subselect.out.file.1" from t1;
|
||||||
|
delete from t1;
|
||||||
|
load data infile "subselect.out.file.1" into table t1;
|
||||||
|
select * from t1;
|
||||||
|
drop table t1;
|
||||||
|
|
Loading…
Reference in a new issue