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
672a695f
Commit
672a695f
authored
Dec 25, 2002
by
Sinisa@sinisa.nasamreza.org
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
bug fixes and tests ...
parent
7f304a27
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
12 additions
and
5 deletions
+12
-5
mysql-test/r/update.result
mysql-test/r/update.result
+4
-1
mysql-test/t/update.test
mysql-test/t/update.test
+4
-1
sql/sql_union.cc
sql/sql_union.cc
+4
-3
No files found.
mysql-test/r/update.result
View file @
672a695f
...
...
@@ -106,9 +106,12 @@ create table t1 (a int not null, b int not null);
insert into t1 values (1,1),(1,2),(1,3);
update t1 set b=4 where a=1 order by b asc limit 1;
update t1 set b=4 where a=1 order by b desc limit 1;
create table t2 (a int not null, b int not null);
insert into t2 values (1,1),(1,2),(1,3);
select * from t1;
a b
1 4
1 2
1 4
drop table t1;
update t1 set b=(select distinct 1 from (select * from t2) a);
drop table t1,t2;
mysql-test/t/update.test
View file @
672a695f
...
...
@@ -85,5 +85,8 @@ create table t1 (a int not null, b int not null);
insert
into
t1
values
(
1
,
1
),(
1
,
2
),(
1
,
3
);
update
t1
set
b
=
4
where
a
=
1
order
by
b
asc
limit
1
;
update
t1
set
b
=
4
where
a
=
1
order
by
b
desc
limit
1
;
create
table
t2
(
a
int
not
null
,
b
int
not
null
);
insert
into
t2
values
(
1
,
1
),(
1
,
2
),(
1
,
3
);
select
*
from
t1
;
drop
table
t1
;
update
t1
set
b
=
(
select
distinct
1
from
(
select
*
from
t2
)
a
);
drop
table
t1
,
t2
;
sql/sql_union.cc
View file @
672a695f
...
...
@@ -279,9 +279,10 @@ int st_select_lex_unit::exec()
}
if
(
!
thd
->
fatal_error
)
// Check if EOM
{
offset_limit_cnt
=
global_parameters
->
offset_limit
;
select_limit_cnt
=
global_parameters
->
select_limit
+
global_parameters
->
offset_limit
;
SELECT_LEX
*
sl
=
thd
->
lex
.
current_select
->
master_unit
()
->
first_select
();
offset_limit_cnt
=
(
sl
->
braces
)
?
global_parameters
->
offset_limit
:
0
;
select_limit_cnt
=
(
sl
->
braces
)
?
global_parameters
->
select_limit
+
global_parameters
->
offset_limit
:
HA_POS_ERROR
;
if
(
select_limit_cnt
<
global_parameters
->
select_limit
)
select_limit_cnt
=
HA_POS_ERROR
;
// no limit
if
(
select_limit_cnt
==
HA_POS_ERROR
)
...
...
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