set global innodb_flush_log_at_trx_commit=0; drop table if exists t; create table t(a int not null auto_increment primary key,b text)engine=innodb; insert into t (b) values ('a'),('b'),('c'),('d'),('e'),('f'); insert into t (b) select b from t; insert into t (b) select b from t; insert into t (b) select b from t; insert into t (b) select b from t; insert into t (b) select b from t; insert into t (b) select b from t; insert into t (b) select b from t; insert into t (b) select b from t; insert into t (b) select b from t; insert into t (b) select b from t; insert into t (b) select b from t; insert into t (b) select b from t; insert into t (b) select b from t; insert into t (b) select b from t; insert into t (b) select b from t; insert into t (b) select b from t; insert into t (b) select b from t; select version(); explain select count(*) from t where a='999999999999'; select count(*) from t where a='999999999999'; update t set b='a' where a='999999999999'; update t set b='a' where a='999999999999'; update t set b='a' where a='999999999999'; update t set b='a' where a=999999999999; update t set b='a' where a=999999999999; update t set b='a' where a=999999999999; /* mysql> mysql> select version(); +----------------------------------+ | version() | +----------------------------------+ | 5.0.56-br20918-enterprise-gpl-nt | +----------------------------------+ 1 row in set (0.00 sec) mysql> explain select count(*) from t where a='999999999999'; +----+-------------+-------+------+---------------+------+---------+------+------+-----------------------------------------------------+ | id | select_type | table | type | possible_keys | key | key_len | ref | rows | Extra | +----+-------------+-------+------+---------------+------+---------+------+------+-----------------------------------------------------+ | 1 | SIMPLE | NULL | NULL | NULL | NULL | NULL | NULL | NULL | Impossible WHERE noticed after reading const tables | +----+-------------+-------+------+---------------+------+---------+------+------+-----------------------------------------------------+ 1 row in set (0.00 sec) mysql> select count(*) from t where a='999999999999'; +----------+ | count(*) | +----------+ | 0 | +----------+ 1 row in set (0.00 sec) mysql> update t set b='a' where a='999999999999'; Query OK, 0 rows affected (1.81 sec) Rows matched: 0 Changed: 0 Warnings: 0 mysql> update t set b='a' where a='999999999999'; Query OK, 0 rows affected (1.84 sec) Rows matched: 0 Changed: 0 Warnings: 0 mysql> update t set b='a' where a='999999999999'; Query OK, 0 rows affected (1.83 sec) Rows matched: 0 Changed: 0 Warnings: 0 mysql> update t set b='a' where a=999999999999; Query OK, 0 rows affected (0.00 sec) Rows matched: 0 Changed: 0 Warnings: 0 mysql> update t set b='a' where a=999999999999; Query OK, 0 rows affected (0.02 sec) Rows matched: 0 Changed: 0 Warnings: 0 mysql> update t set b='a' where a=999999999999; Query OK, 0 rows affected (0.00 sec) Rows matched: 0 Changed: 0 Warnings: 0 mysql> */