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
3dd2ed30
Commit
3dd2ed30
authored
Sep 19, 2007
by
gkodinov/kgeorge@magare.gmz
Browse files
Options
Browse Files
Download
Plain Diff
Merge gkodinov@bk-internal.mysql.com:/home/bk/mysql-5.1-opt
into magare.gmz:/home/kgeorge/mysql/autopush/B30639-5.1-opt
parents
7c87dc6e
c2abf960
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
40 additions
and
2 deletions
+40
-2
include/config-win.h
include/config-win.h
+2
-0
mysql-test/r/select.result
mysql-test/r/select.result
+17
-0
mysql-test/t/select.test
mysql-test/t/select.test
+10
-0
sql/sql_lex.cc
sql/sql_lex.cc
+11
-2
No files found.
include/config-win.h
View file @
3dd2ed30
...
...
@@ -15,6 +15,8 @@
/* Defines for Win32 to make it compatible for MySQL */
#define BIG_TABLES
#ifdef __WIN2000__
/* We have to do this define before including windows.h to get the AWE API
functions */
...
...
mysql-test/r/select.result
View file @
3dd2ed30
...
...
@@ -4082,3 +4082,20 @@ x
1
DROP VIEW v1, v2, v3;
End of 5.0 tests
create table t1(a INT, KEY (a));
INSERT INTO t1 VALUES (1),(2),(3),(4),(5);
SELECT a FROM t1 ORDER BY a LIMIT 2;
a
1
2
SELECT a FROM t1 ORDER BY a LIMIT 2,4294967296;
a
3
4
5
SELECT a FROM t1 ORDER BY a LIMIT 2,4294967297;
a
3
4
5
DROP TABLE t1;
mysql-test/t/select.test
View file @
3dd2ed30
...
...
@@ -3474,3 +3474,13 @@ DROP VIEW v1, v2, v3;
--
enable_ps_protocol
--
echo
End
of
5.0
tests
#
# Bug #30639: limit offset,rowcount wraps when rowcount >= 2^32 in windows
#
create
table
t1
(
a
INT
,
KEY
(
a
));
INSERT
INTO
t1
VALUES
(
1
),(
2
),(
3
),(
4
),(
5
);
SELECT
a
FROM
t1
ORDER
BY
a
LIMIT
2
;
SELECT
a
FROM
t1
ORDER
BY
a
LIMIT
2
,
4294967296
;
SELECT
a
FROM
t1
ORDER
BY
a
LIMIT
2
,
4294967297
;
DROP
TABLE
t1
;
sql/sql_lex.cc
View file @
3dd2ed30
...
...
@@ -2397,10 +2397,19 @@ st_lex::copy_db_to(char **p_db, size_t *p_db_length) const
void
st_select_lex_unit
::
set_limit
(
st_select_lex
*
sl
)
{
ha_rows
select_limit_val
;
ulonglong
val
;
DBUG_ASSERT
(
!
thd
->
stmt_arena
->
is_stmt_prepare
());
select_limit_val
=
(
ha_rows
)(
sl
->
select_limit
?
sl
->
select_limit
->
val_uint
()
:
HA_POS_ERROR
);
val
=
sl
->
select_limit
?
sl
->
select_limit
->
val_uint
()
:
HA_POS_ERROR
;
select_limit_val
=
(
ha_rows
)
val
;
#ifndef BIG_TABLES
/*
Check for overflow : ha_rows can be smaller then ulonglong if
BIG_TABLES is off.
*/
if
(
val
!=
(
ulonglong
)
select_limit_val
)
select_limit_val
=
HA_POS_ERROR
;
#endif
offset_limit_cnt
=
(
ha_rows
)(
sl
->
offset_limit
?
sl
->
offset_limit
->
val_uint
()
:
ULL
(
0
));
select_limit_cnt
=
select_limit_val
+
offset_limit_cnt
;
...
...
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