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/t/update.test | |
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/t/update.test')
-rw-r--r-- | mysql-test/t/update.test | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/mysql-test/t/update.test b/mysql-test/t/update.test index 76a27b62206..359ae815197 100644 --- a/mysql-test/t/update.test +++ b/mysql-test/t/update.test @@ -81,9 +81,13 @@ 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; +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; +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; drop table t1; |