diff options
author | monty@narttu.mysql.fi <> | 2003-04-23 21:52:16 +0300 |
---|---|---|
committer | monty@narttu.mysql.fi <> | 2003-04-23 21:52:16 +0300 |
commit | f6a43bd567f932995289ed179d18e5923873680b (patch) | |
tree | acef6d0c7b21d3c5a8a9cdc9c5f1eb4f1774857b /mysql-test/r/update.result | |
parent | 52ebc0e883e6c924f2d3cdd6d7e55508e6352320 (diff) | |
download | mariadb-git-f6a43bd567f932995289ed179d18e5923873680b.tar.gz |
Fixes for valgrind
Added optimzation for clustered index
Fixed bug in UPDATE ... ORDER BY
Fixed handling of UPDATE ... LIMIT
Diffstat (limited to 'mysql-test/r/update.result')
-rw-r--r-- | mysql-test/r/update.result | 40 |
1 files changed, 33 insertions, 7 deletions
diff --git a/mysql-test/r/update.result b/mysql-test/r/update.result index db209c5855c..86647e845a9 100644 --- a/mysql-test/r/update.result +++ b/mysql-test/r/update.result @@ -102,13 +102,39 @@ 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; +create table t1 (a int not null, b int not null, key (a)); +insert into t1 values (1,1),(1,2),(1,3),(3,1),(3,2),(3,3),(3,1),(3,2),(3,3),(2,1),(2,2),(2,3); +SET @tmp=0; +update t1 set b=(@tmp:=@tmp+1) order by a; +update t1 set b=99 where a=1 order by b asc limit 1; +select * from t1 order by a,b; a b -1 4 1 2 -1 4 +1 3 +1 99 +2 4 +2 5 +2 6 +3 7 +3 8 +3 9 +3 10 +3 11 +3 12 +update t1 set b=100 where a=1 order by b desc limit 2; +update t1 set a=a+10+b where a=1 order by b; +select * from t1 order by a,b; +a b +2 4 +2 5 +2 6 +3 7 +3 8 +3 9 +3 10 +3 11 +3 12 +13 2 +111 100 +111 100 drop table t1; |