diff options
author | igor@olga.mysql.com <> | 2007-02-02 15:22:10 -0800 |
---|---|---|
committer | igor@olga.mysql.com <> | 2007-02-02 15:22:10 -0800 |
commit | 215b0a95e165db504bd8275dd0fb7ebd9b8ec91e (patch) | |
tree | c43db5c7b276574cabf4a5f8e38755f9d43e60e7 /mysql-test/r/update.result | |
parent | d1185aaeafb9b34729db600160760a5dd7c59511 (diff) | |
download | mariadb-git-215b0a95e165db504bd8275dd0fb7ebd9b8ec91e.tar.gz |
Fix bug #24035.
This performance degradation for UPDATEs could be observed in the update
statements for which the search key cannot be converted to any valid
value of the type of the search column, like for a the condition
int_fld=99999999999999999999999999, though it can be guaranteed here
that there is no row with such a key value.
Diffstat (limited to 'mysql-test/r/update.result')
-rw-r--r-- | mysql-test/r/update.result | 57 |
1 files changed, 57 insertions, 0 deletions
diff --git a/mysql-test/r/update.result b/mysql-test/r/update.result index 4b7dbb3dbe9..9e2bc52657a 100644 --- a/mysql-test/r/update.result +++ b/mysql-test/r/update.result @@ -377,3 +377,60 @@ create table t1(f1 int, `*f2` int); insert into t1 values (1,1); update t1 set `*f2`=1; drop table t1; +CREATE TABLE t1 ( +request_id int unsigned NOT NULL auto_increment, +user_id varchar(12) default NULL, +time_stamp datetime NOT NULL default '0000-00-00 00:00:00', +ip_address varchar(15) default NULL, +PRIMARY KEY (request_id), +KEY user_id_2 (user_id,time_stamp) +); +INSERT INTO t1 (user_id) VALUES ('user1'); +INSERT INTO t1(user_id) SELECT user_id FROM t1; +INSERT INTO t1(user_id) SELECT user_id FROM t1; +INSERT INTO t1(user_id) SELECT user_id FROM t1; +INSERT INTO t1(user_id) SELECT user_id FROM t1; +INSERT INTO t1(user_id) SELECT user_id FROM t1; +INSERT INTO t1(user_id) SELECT user_id FROM t1; +INSERT INTO t1(user_id) SELECT user_id FROM t1; +INSERT INTO t1(user_id) SELECT user_id FROM t1; +flush status; +SELECT user_id FROM t1 WHERE request_id=9999999999999; +user_id +show status like '%Handler_read%'; +Variable_name Value +Handler_read_first 0 +Handler_read_key 1 +Handler_read_next 0 +Handler_read_prev 0 +Handler_read_rnd 0 +Handler_read_rnd_next 0 +SELECT user_id FROM t1 WHERE request_id=999999999999999999999999999999; +user_id +show status like '%Handler_read%'; +Variable_name Value +Handler_read_first 0 +Handler_read_key 2 +Handler_read_next 0 +Handler_read_prev 0 +Handler_read_rnd 0 +Handler_read_rnd_next 7 +UPDATE t1 SET user_id=null WHERE request_id=9999999999999; +show status like '%Handler_read%'; +Variable_name Value +Handler_read_first 0 +Handler_read_key 3 +Handler_read_next 0 +Handler_read_prev 0 +Handler_read_rnd 0 +Handler_read_rnd_next 14 +UPDATE t1 SET user_id=null WHERE request_id=999999999999999999999999999999; +show status like '%Handler_read%'; +Variable_name Value +Handler_read_first 0 +Handler_read_key 3 +Handler_read_next 0 +Handler_read_prev 0 +Handler_read_rnd 0 +Handler_read_rnd_next 21 +DROP TABLE t1; |