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
e6150c72
Commit
e6150c72
authored
Feb 04, 2005
by
timour@mysql.com
Browse files
Options
Browse Files
Download
Plain Diff
Merge mysql.com:/home/timka/mysql/src/4.1-dbg
into mysql.com:/home/timka/mysql/src/4.1-bug-8023
parents
9eacf61d
2ad4cb38
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
24 additions
and
4 deletions
+24
-4
mysql-test/r/limit.result
mysql-test/r/limit.result
+9
-0
mysql-test/t/limit.test
mysql-test/t/limit.test
+10
-0
sql/sql_yacc.yy
sql/sql_yacc.yy
+5
-4
No files found.
mysql-test/r/limit.result
View file @
e6150c72
...
...
@@ -67,3 +67,12 @@ SELECT * FROM t1;
id id2
3 0
DROP TABLE t1;
create table t1 (a integer);
insert into t1 values (1);
select 1 as a from t1 union all select 1 from dual limit 1;
a
1
(select 1 as a from t1) union all (select 1 from dual) limit 1;
a
1
drop table t1;
mysql-test/t/limit.test
View file @
e6150c72
...
...
@@ -49,3 +49,13 @@ SELECT * FROM t1;
DELETE
FROM
t1
WHERE
id2
=
0
ORDER
BY
id
desc
LIMIT
1
;
SELECT
*
FROM
t1
;
DROP
TABLE
t1
;
#
# Bug#8023 - limit on UNION with from DUAL, causes syntax error
#
create
table
t1
(
a
integer
);
insert
into
t1
values
(
1
);
# both queries must return one row
select
1
as
a
from
t1
union
all
select
1
from
dual
limit
1
;
(
select
1
as
a
from
t1
)
union
all
(
select
1
from
dual
)
limit
1
;
drop
table
t1
;
sql/sql_yacc.yy
View file @
e6150c72
...
...
@@ -2455,10 +2455,11 @@ select_into:
select_from:
FROM join_table_list where_clause group_clause having_clause
opt_order_clause opt_limit_clause procedure_clause
| FROM DUAL_SYM /* oracle compatibility: oracle always requires FROM
clause, and DUAL is system table without fields.
Is "SELECT 1 FROM DUAL" any better than
"SELECT 1" ? Hmmm :) */
| FROM DUAL_SYM opt_limit_clause
/* oracle compatibility: oracle always requires FROM clause,
and DUAL is system table without fields.
Is "SELECT 1 FROM DUAL" any better than "SELECT 1" ?
Hmmm :) */
;
select_options:
...
...
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