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
65253483
Commit
65253483
authored
Oct 15, 2008
by
Davi Arnaut
Browse files
Options
Browse Files
Download
Plain Diff
Merge mysql-5.0-bugteam into mysql-5.1-bugteam.
parents
e6fa9496
3ad228d7
Changes
6
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
56 additions
and
4 deletions
+56
-4
mysql-test/r/limit.result
mysql-test/r/limit.result
+3
-0
mysql-test/r/sp.result
mysql-test/r/sp.result
+13
-0
mysql-test/t/limit.test
mysql-test/t/limit.test
+8
-0
mysql-test/t/sp.test
mysql-test/t/sp.test
+22
-0
sql/item.cc
sql/item.cc
+2
-1
sql/sql_lex.cc
sql/sql_lex.cc
+8
-3
No files found.
mysql-test/r/limit.result
View file @
65253483
...
@@ -111,3 +111,6 @@ set @a=-14632475938453979136;
...
@@ -111,3 +111,6 @@ set @a=-14632475938453979136;
execute s using @a, @a;
execute s using @a, @a;
ERROR HY000: Incorrect arguments to EXECUTE
ERROR HY000: Incorrect arguments to EXECUTE
End of 5.0 tests
End of 5.0 tests
select 1 as a limit 4294967296,10;
a
End of 5.1 tests
mysql-test/r/sp.result
View file @
65253483
...
@@ -6846,6 +6846,19 @@ select substr(`str`, `pos`+ 1 ) into `str`;
...
@@ -6846,6 +6846,19 @@ select substr(`str`, `pos`+ 1 ) into `str`;
end $
end $
call `p2`('s s s s s s');
call `p2`('s s s s s s');
drop procedure `p2`;
drop procedure `p2`;
drop table if exists t1;
drop procedure if exists p1;
create procedure p1() begin select * from t1; end$
call p1$
ERROR 42S02: Table 'test.t1' doesn't exist
create table t1 (a integer)$
call p1$
a
alter table t1 add b integer;
call p1$
a
drop table t1;
drop procedure p1;
# ------------------------------------------------------------------
# ------------------------------------------------------------------
# -- End of 5.0 tests
# -- End of 5.0 tests
# ------------------------------------------------------------------
# ------------------------------------------------------------------
...
...
mysql-test/t/limit.test
View file @
65253483
...
@@ -95,3 +95,11 @@ set @a=-14632475938453979136;
...
@@ -95,3 +95,11 @@ set @a=-14632475938453979136;
execute
s
using
@
a
,
@
a
;
execute
s
using
@
a
,
@
a
;
--
echo
End
of
5.0
tests
--
echo
End
of
5.0
tests
#
# Bug#37075: offset of limit clause might be truncated to 0 on 32-bits server w/o big tables
#
select
1
as
a
limit
4294967296
,
10
;
--
echo
End
of
5.1
tests
mysql-test/t/sp.test
View file @
65253483
...
@@ -8041,6 +8041,28 @@ delimiter ;$
...
@@ -8041,6 +8041,28 @@ delimiter ;$
call `
p2
`('s s s s s s');
call `
p2
`('s s s s s s');
drop procedure `
p2
`
;
drop procedure `
p2
`
;
#
# Bug#38823: Invalid memory access when a SP statement does wildcard expansion
#
--
disable_warnings
drop
table
if
exists
t1
;
drop
procedure
if
exists
p1
;
--
enable_warnings
delimiter
$
;
create
procedure
p1
()
begin
select
*
from
t1
;
end
$
--
error
ER_NO_SUCH_TABLE
call
p1
$
create
table
t1
(
a
integer
)
$
call
p1
$
alter
table
t1
add
b
integer
;
call
p1
$
delimiter
;
$
drop
table
t1
;
drop
procedure
p1
;
--
echo
# ------------------------------------------------------------------
--
echo
# ------------------------------------------------------------------
--
echo
# -- End of 5.0 tests
--
echo
# -- End of 5.0 tests
--
echo
# ------------------------------------------------------------------
--
echo
# ------------------------------------------------------------------
...
...
sql/item.cc
View file @
65253483
...
@@ -1805,7 +1805,8 @@ Item_field::Item_field(THD *thd, Name_resolution_context *context_arg,
...
@@ -1805,7 +1805,8 @@ Item_field::Item_field(THD *thd, Name_resolution_context *context_arg,
be allocated in the statement memory, not in table memory (the table
be allocated in the statement memory, not in table memory (the table
structure can go away and pop up again between subsequent executions
structure can go away and pop up again between subsequent executions
of a prepared statement or after the close_tables_for_reopen() call
of a prepared statement or after the close_tables_for_reopen() call
in mysql_multi_update_prepare()).
in mysql_multi_update_prepare() or due to wildcard expansion in stored
procedures).
*/
*/
{
{
if
(
db_name
)
if
(
db_name
)
...
...
sql/sql_lex.cc
View file @
65253483
...
@@ -2404,8 +2404,13 @@ void st_select_lex_unit::set_limit(st_select_lex *sl)
...
@@ -2404,8 +2404,13 @@ void st_select_lex_unit::set_limit(st_select_lex *sl)
if
(
val
!=
(
ulonglong
)
select_limit_val
)
if
(
val
!=
(
ulonglong
)
select_limit_val
)
select_limit_val
=
HA_POS_ERROR
;
select_limit_val
=
HA_POS_ERROR
;
#endif
#endif
offset_limit_cnt
=
(
ha_rows
)(
sl
->
offset_limit
?
sl
->
offset_limit
->
val_uint
()
:
val
=
sl
->
offset_limit
?
sl
->
offset_limit
->
val_uint
()
:
ULL
(
0
);
ULL
(
0
));
offset_limit_cnt
=
(
ha_rows
)
val
;
#ifndef BIG_TABLES
/* Check for truncation. */
if
(
val
!=
(
ulonglong
)
offset_limit_cnt
)
offset_limit_cnt
=
HA_POS_ERROR
;
#endif
select_limit_cnt
=
select_limit_val
+
offset_limit_cnt
;
select_limit_cnt
=
select_limit_val
+
offset_limit_cnt
;
if
(
select_limit_cnt
<
select_limit_val
)
if
(
select_limit_cnt
<
select_limit_val
)
select_limit_cnt
=
HA_POS_ERROR
;
// no limit
select_limit_cnt
=
HA_POS_ERROR
;
// no limit
...
...
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