Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
M
MariaDB
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
nexedi
MariaDB
Commits
a6692435
Commit
a6692435
authored
Jan 19, 2004
by
unknown
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Test case for the bug #2198: SELECT INTO OUTFILE (with Sub-Select) Problem.
parent
2f7bf967
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
21 additions
and
0 deletions
+21
-0
mysql-test/r/subselect.result
mysql-test/r/subselect.result
+9
-0
mysql-test/t/subselect.test
mysql-test/t/subselect.test
+12
-0
No files found.
mysql-test/r/subselect.result
View file @
a6692435
...
@@ -1569,3 +1569,12 @@ INSERT INTO t2 VALUES (100, 200, 'C');
...
@@ -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;
mysql-test/t/subselect.test
View file @
a6692435
...
@@ -1009,3 +1009,15 @@ INSERT INTO t1 VALUES (1,1,'1A3240'), (1,2,'4W2365');
...
@@ -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
;
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment