mirror of
https://github.com/MariaDB/server.git
synced 2025-07-30 16:24:05 +03:00
Fixed bug in UPDATE .. ORDER BY
Docs/manual.texi: Changelog mysql-test/r/update.result: Test found bug in UPDATE .. ORDER BY mysql-test/t/update.test: Test found bug in UPDATE .. ORDER BY
This commit is contained in:
@ -102,3 +102,13 @@ select status from t1;
|
||||
status
|
||||
1
|
||||
drop table t1;
|
||||
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;
|
||||
select * from t1;
|
||||
a b
|
||||
1 4
|
||||
1 4
|
||||
1 2
|
||||
drop table t1;
|
||||
|
@ -76,3 +76,14 @@ alter table t1 change lfdnr lfdnr int(10) unsigned default 0 not null auto_incre
|
||||
update t1 set status=1 where type='Open';
|
||||
select status from t1;
|
||||
drop table t1;
|
||||
|
||||
#
|
||||
# Test of ORDER BY
|
||||
#
|
||||
|
||||
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;
|
||||
select * from t1;
|
||||
drop table t1;
|
||||
|
Reference in New Issue
Block a user