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
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
mariadb
Commits
4d32be13
Commit
4d32be13
authored
Mar 18, 2009
by
Bernt M. Johnsen
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Bug#43329 prepared for commit on 5.0
parent
81e4e1e7
Changes
2
Show 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 @
4d32be13
...
@@ -1447,12 +1447,12 @@ SELECT a FROM t1
...
@@ -1447,12 +1447,12 @@ SELECT a FROM t1
UNION
UNION
SELECT a FROM t1
SELECT a FROM t1
) alias;
) alias;
SELECT a INTO OUTFILE 'union.out.file' FROM (
SELECT a INTO OUTFILE '
<MYSQLTEST_VARDIR>/tmp/
union.out.file' FROM (
SELECT a FROM t1
SELECT a FROM t1
UNION
UNION
SELECT a FROM t1 WHERE 0
SELECT a FROM t1 WHERE 0
) alias;
) alias;
SELECT a INTO DUMPFILE '
union.out.file2
' FROM (
SELECT a INTO DUMPFILE '
<MYSQLTEST_VARDIR>/tmp/union.out.file
' FROM (
SELECT a FROM t1
SELECT a FROM t1
UNION
UNION
SELECT a FROM t1 WHERE 0
SELECT a FROM t1 WHERE 0
...
@@ -1465,21 +1465,21 @@ SELECT a INTO @v FROM t1
...
@@ -1465,21 +1465,21 @@ SELECT a INTO @v FROM t1
SELECT a FROM (
SELECT a FROM (
SELECT a FROM t1
SELECT a FROM t1
UNION
UNION
SELECT a INTO OUTFILE '
union.out.file3
' FROM t1
SELECT a INTO OUTFILE '
<MYSQLTEST_VARDIR>/tmp/union.out.file
' FROM t1
) alias;
) alias;
SELECT a FROM (
SELECT a FROM (
SELECT a FROM t1
SELECT a FROM t1
UNION
UNION
SELECT a INTO DUMPFILE '
union.out.file4
' FROM t1
SELECT a INTO DUMPFILE '
<MYSQLTEST_VARDIR>/tmp/union.out.file
' FROM t1
) alias;
) alias;
SELECT a FROM t1 UNION SELECT a INTO @v FROM t1;
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 '
<MYSQLTEST_VARDIR>/tmp/union.out.file
' FROM t1;
SELECT a FROM t1 UNION SELECT a INTO
OUTFILE 'union.out.file6
' 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;
SELECT a INTO @v FROM t1 UNION SELECT a FROM t1;
ERROR HY000: Incorrect usage of UNION and INTO
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
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
ERROR HY000: Incorrect usage of UNION and INTO
DROP TABLE t1;
DROP TABLE t1;
CREATE TABLE t1 (a INT);
CREATE TABLE t1 (a INT);
...
...
mysql-test/t/union.test
View file @
4d32be13
...
@@ -933,17 +933,25 @@ SELECT a INTO @v FROM (
...
@@ -933,17 +933,25 @@ SELECT a INTO @v FROM (
SELECT
a
FROM
t1
SELECT
a
FROM
t1
)
alias
;
)
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
SELECT
a
FROM
t1
UNION
UNION
SELECT
a
FROM
t1
WHERE
0
SELECT
a
FROM
t1
WHERE
0
)
alias
;
)
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
SELECT
a
FROM
t1
UNION
UNION
SELECT
a
FROM
t1
WHERE
0
SELECT
a
FROM
t1
WHERE
0
)
alias
;
)
alias
;
--
remove_file
$outfile
#
#
# INTO will not be allowed in subqueries in version 5.1 and above.
# INTO will not be allowed in subqueries in version 5.1 and above.
...
@@ -954,27 +962,42 @@ SELECT a FROM (
...
@@ -954,27 +962,42 @@ SELECT a FROM (
SELECT
a
INTO
@
v
FROM
t1
SELECT
a
INTO
@
v
FROM
t1
)
alias
;
)
alias
;
SELECT
a
FROM
(
--
replace_result
$MYSQLTEST_VARDIR
<
MYSQLTEST_VARDIR
>
eval
SELECT
a
FROM
(
SELECT
a
FROM
t1
SELECT
a
FROM
t1
UNION
UNION
SELECT
a
INTO
OUTFILE
'
union.out.file3
'
FROM
t1
SELECT
a
INTO
OUTFILE
'
$outfile
'
FROM
t1
)
alias
;
)
alias
;
--
remove_file
$outfile
SELECT
a
FROM
(
--
replace_result
$MYSQLTEST_VARDIR
<
MYSQLTEST_VARDIR
>
eval
SELECT
a
FROM
(
SELECT
a
FROM
t1
SELECT
a
FROM
t1
UNION
UNION
SELECT
a
INTO
DUMPFILE
'
union.out.file4
'
FROM
t1
SELECT
a
INTO
DUMPFILE
'
$outfile
'
FROM
t1
)
alias
;
)
alias
;
--
remove_file
$outfile
SELECT
a
FROM
t1
UNION
SELECT
a
INTO
@
v
FROM
t1
;
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
--
error
ER_WRONG_USAGE
SELECT
a
INTO
@
v
FROM
t1
UNION
SELECT
a
FROM
t1
;
SELECT
a
INTO
@
v
FROM
t1
UNION
SELECT
a
FROM
t1
;
--
replace_result
$MYSQLTEST_VARDIR
<
MYSQLTEST_VARDIR
>
--
error
ER_WRONG_USAGE
--
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
--
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
;
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