mirror of
https://github.com/MariaDB/server.git
synced 2025-01-19 13:32:33 +01:00
22 lines
488 B
Text
22 lines
488 B
Text
|
--disable_warnings
|
||
|
drop table if exists t1,t2;
|
||
|
--enable_warnings
|
||
|
|
||
|
#
|
||
|
# Bug#601164: DELETE/UPDATE with ORDER BY index and LIMIT
|
||
|
#
|
||
|
|
||
|
create table t1 (a int, b int, v int as (a+1), index idx(b));
|
||
|
insert into t1(a, b) values
|
||
|
(4, 40), (3, 30), (5, 50), (7, 70), (8, 80), (2, 20), (1, 10);
|
||
|
|
||
|
select * from t1 order by b;
|
||
|
|
||
|
delete from t1 where v > 6 order by b limit 1;
|
||
|
select * from t1 order by b;
|
||
|
|
||
|
update t1 set a=v order by b limit 1;
|
||
|
select * from t1 order by b;
|
||
|
|
||
|
drop table t1;
|