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
e7f20edf
Commit
e7f20edf
authored
Mar 19, 2009
by
Bernt M. Johnsen
Browse files
Options
Browse Files
Download
Plain Diff
Bug#43329 Prepared for push on 5.1
parents
40f5c12d
b944a179
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
41 additions
and
18 deletions
+41
-18
mysql-test/r/union.result
mysql-test/r/union.result
+8
-8
mysql-test/t/union.test
mysql-test/t/union.test
+33
-10
No files found.
mysql-test/r/union.result
View file @
e7f20edf
...
...
@@ -160,12 +160,12 @@ SELECT a FROM t1
UNION
SELECT a FROM t1
) alias;
SELECT a INTO OUTFILE 'union.out.file' FROM (
SELECT a INTO OUTFILE '
<MYSQLTEST_VARDIR>/tmp/
union.out.file' FROM (
SELECT a FROM t1
UNION
SELECT a FROM t1 WHERE 0
) alias;
SELECT a INTO DUMPFILE '
union.out.file2
' FROM (
SELECT a INTO DUMPFILE '
<MYSQLTEST_VARDIR>/tmp/union.out.file
' FROM (
SELECT a FROM t1
UNION
SELECT a FROM t1 WHERE 0
...
...
@@ -178,21 +178,21 @@ SELECT a INTO @v FROM t1
SELECT a FROM (
SELECT a FROM t1
UNION
SELECT a INTO OUTFILE '
union.out.file3
' FROM t1
SELECT a INTO OUTFILE '
<MYSQLTEST_VARDIR>/tmp/union.out.file
' FROM t1
) alias;
SELECT a FROM (
SELECT a FROM t1
UNION
SELECT a INTO DUMPFILE '
union.out.file4
' FROM t1
SELECT a INTO DUMPFILE '
<MYSQLTEST_VARDIR>/tmp/union.out.file
' FROM t1
) alias;
SELECT a FROM t1 UNION SELECT a INTO @v FROM t1;
SELECT a FROM t1 UNION SELECT a INTO OUTFILE '
union.out.file5
' FROM t1;
SELECT a FROM t1 UNION SELECT a INTO
OUTFILE 'union.out.file6
' FROM t1;
SELECT a FROM t1 UNION SELECT a INTO OUTFILE '
<MYSQLTEST_VARDIR>/tmp/union.out.file
' FROM t1;
SELECT a FROM t1 UNION SELECT a INTO
DUMPFILE '<MYSQLTEST_VARDIR>/tmp/union.out.file
' FROM t1;
SELECT a INTO @v FROM t1 UNION SELECT a FROM t1;
ERROR HY000: Incorrect usage of UNION and INTO
SELECT a INTO OUTFILE '
union.out.file7
' FROM t1 UNION SELECT a FROM t1;
SELECT a INTO OUTFILE '
<MYSQLTEST_VARDIR>/tmp/union.out.file
' FROM t1 UNION SELECT a FROM t1;
ERROR HY000: Incorrect usage of UNION and INTO
SELECT a INTO DUMPFILE '
union.out.file8
' FROM t1 UNION SELECT a FROM t1;
SELECT a INTO DUMPFILE '
<MYSQLTEST_VARDIR>/tmp/union.out.file
' FROM t1 UNION SELECT a FROM t1;
ERROR HY000: Incorrect usage of UNION and INTO
DROP TABLE t1;
CREATE TABLE t1 (
...
...
mysql-test/t/union.test
View file @
e7f20edf
...
...
@@ -105,17 +105,25 @@ SELECT a INTO @v FROM (
SELECT
a
FROM
t1
)
alias
;
SELECT
a
INTO
OUTFILE
'union.out.file'
FROM
(
--
let
$outfile
=
$MYSQLTEST_VARDIR
/
tmp
/
union
.
out
.
file
--
error
0
,
1
--
remove_file
$outfile
--
replace_result
$MYSQLTEST_VARDIR
<
MYSQLTEST_VARDIR
>
eval
SELECT
a
INTO
OUTFILE
'$outfile'
FROM
(
SELECT
a
FROM
t1
UNION
SELECT
a
FROM
t1
WHERE
0
)
alias
;
--
remove_file
$outfile
SELECT
a
INTO
DUMPFILE
'union.out.file2'
FROM
(
--
replace_result
$MYSQLTEST_VARDIR
<
MYSQLTEST_VARDIR
>
eval
SELECT
a
INTO
DUMPFILE
'$outfile'
FROM
(
SELECT
a
FROM
t1
UNION
SELECT
a
FROM
t1
WHERE
0
)
alias
;
--
remove_file
$outfile
#
# INTO will not be allowed in subqueries in version 5.1 and above.
...
...
@@ -126,27 +134,42 @@ SELECT a FROM (
SELECT
a
INTO
@
v
FROM
t1
)
alias
;
SELECT
a
FROM
(
--
replace_result
$MYSQLTEST_VARDIR
<
MYSQLTEST_VARDIR
>
eval
SELECT
a
FROM
(
SELECT
a
FROM
t1
UNION
SELECT
a
INTO
OUTFILE
'
union.out.file3
'
FROM
t1
SELECT
a
INTO
OUTFILE
'
$outfile
'
FROM
t1
)
alias
;
--
remove_file
$outfile
SELECT
a
FROM
(
--
replace_result
$MYSQLTEST_VARDIR
<
MYSQLTEST_VARDIR
>
eval
SELECT
a
FROM
(
SELECT
a
FROM
t1
UNION
SELECT
a
INTO
DUMPFILE
'
union.out.file4
'
FROM
t1
SELECT
a
INTO
DUMPFILE
'
$outfile
'
FROM
t1
)
alias
;
--
remove_file
$outfile
SELECT
a
FROM
t1
UNION
SELECT
a
INTO
@
v
FROM
t1
;
SELECT
a
FROM
t1
UNION
SELECT
a
INTO
OUTFILE
'union.out.file5'
FROM
t1
;
SELECT
a
FROM
t1
UNION
SELECT
a
INTO
OUTFILE
'union.out.file6'
FROM
t1
;
--
replace_result
$MYSQLTEST_VARDIR
<
MYSQLTEST_VARDIR
>
eval
SELECT
a
FROM
t1
UNION
SELECT
a
INTO
OUTFILE
'$outfile'
FROM
t1
;
--
remove_file
$outfile
--
replace_result
$MYSQLTEST_VARDIR
<
MYSQLTEST_VARDIR
>
eval
SELECT
a
FROM
t1
UNION
SELECT
a
INTO
DUMPFILE
'$outfile'
FROM
t1
;
--
remove_file
$outfile
--
error
ER_WRONG_USAGE
SELECT
a
INTO
@
v
FROM
t1
UNION
SELECT
a
FROM
t1
;
--
replace_result
$MYSQLTEST_VARDIR
<
MYSQLTEST_VARDIR
>
--
error
ER_WRONG_USAGE
SELECT
a
INTO
OUTFILE
'union.out.file7'
FROM
t1
UNION
SELECT
a
FROM
t1
;
eval
SELECT
a
INTO
OUTFILE
'$outfile'
FROM
t1
UNION
SELECT
a
FROM
t1
;
--
replace_result
$MYSQLTEST_VARDIR
<
MYSQLTEST_VARDIR
>
--
error
ER_WRONG_USAGE
SELECT
a
INTO
DUMPFILE
'union.out.file8
'
FROM
t1
UNION
SELECT
a
FROM
t1
;
eval
SELECT
a
INTO
DUMPFILE
'$outfile
'
FROM
t1
UNION
SELECT
a
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