summaryrefslogtreecommitdiff
path: root/mysql-test/r/update.result
diff options
context:
space:
mode:
authorunknown <monty@mysql.com>2005-10-25 02:27:40 +0300
committerunknown <monty@mysql.com>2005-10-25 02:27:40 +0300
commit8d6634c9e0c43b2d4ed2b0cc9f90b66c850855ab (patch)
tree56b86b67bce65a21ff4ffd27cd2dd139b110b622 /mysql-test/r/update.result
parent3c02a0534d4b5450b2a5126bbf84428595c4a803 (diff)
downloadmariadb-git-8d6634c9e0c43b2d4ed2b0cc9f90b66c850855ab.tar.gz
Added more tests for new UPDATE ... ORDER BY ... LIMIT optimization
heap/_check.c: Change arguments to ha_key_cmp heap/hp_create.c: Change arguments to ha_key_cmp include/my_base.h: Remove SEARCH_RETURN_B_POS and instead always send an array to ha_key_cmp() as last argument myisam/mi_check.c: Change arguments to ha_key_cmp myisam/mi_rnext_same.c: Change arguments to ha_key_cmp myisam/mi_search.c: Change arguments to ha_key_cmp myisam/mi_write.c: Change arguments to ha_key_cmp myisammrg/myrg_queue.c: Change arguments to ha_key_cmp mysys/my_handler.c: Remove SEARCH_RETURN_B_POS and instead always send an array to ha_key_cmp() as last argument (This removes an if in a loop at the expensive of an int on the stack) sql/records.cc: Simplify new rr_index() code Create common error handling function for rr_() functions. Remove loop from rr_index() as handler::index_next() can never return HA_ERR_RECORD_DELETED sql/sql_load.cc: Simplify sql/sql_update.cc: Simplify code Fixed bug when one is updating an index column that could be used with ORDER BY sql/structs.h: Removed not needed structure element
Diffstat (limited to 'mysql-test/r/update.result')
-rw-r--r--mysql-test/r/update.result31
1 files changed, 23 insertions, 8 deletions
diff --git a/mysql-test/r/update.result b/mysql-test/r/update.result
index cf07487febc..3408766d603 100644
--- a/mysql-test/r/update.result
+++ b/mysql-test/r/update.result
@@ -263,8 +263,8 @@ test
delete from t1 where count(*)=1;
ERROR HY000: Invalid use of group function
drop table t1;
-create table t1 ( a int, index (a) );
-insert into t1 values (0),(0),(0),(0),(0),(0),(0),(0);
+create table t1 ( a int, b int default 0, index (a) );
+insert into t1 (a) values (0),(0),(0),(0),(0),(0),(0),(0);
flush status;
select a from t1 order by a limit 1;
a
@@ -278,15 +278,16 @@ Handler_read_prev 0
Handler_read_rnd 0
Handler_read_rnd_next 0
flush status;
-update t1 set a=unix_timestamp() order by a limit 1;
+update t1 set a=9999 order by a limit 1;
+update t1 set b=9999 order by a limit 1;
show status like 'handler_read%';
Variable_name Value
Handler_read_first 1
Handler_read_key 0
Handler_read_next 0
Handler_read_prev 0
-Handler_read_rnd 1
-Handler_read_rnd_next 0
+Handler_read_rnd 2
+Handler_read_rnd_next 9
flush status;
delete from t1 order by a limit 1;
show status like 'handler_read%';
@@ -318,7 +319,21 @@ Handler_read_next 0
Handler_read_prev 0
Handler_read_rnd 1
Handler_read_rnd_next 9
-select count(*) from t1;
-count(*)
-5
+select * from t1;
+a b
+0 0
+0 0
+0 0
+0 0
+0 0
+update t1 set a=a+10,b=1 order by a limit 3;
+update t1 set a=a+11,b=2 order by a limit 3;
+update t1 set a=a+12,b=3 order by a limit 3;
+select * from t1 order by a;
+a b
+11 2
+21 2
+22 3
+22 3
+23 3
drop table t1;