当我尝试基于int列上的垃圾条件选择行时,我得到了不应返回的行。知道为什么会这样吗?
命令: select * from t where id='1asdasdaasdasdasd';
响应 Row with id=1
表结构:
CREATE TABLE t (
`id` int(11) NOT NULL AUTO_INCREMENT,
PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=8 DEFAULT CHARSET=utf8mb4
SQL模式:ONLY_FULL_GROUP_BY,NO_UNSIGNED_SUBTRACTION,NO_AUTO_VALUE_ON_ZERO,STRICT_TRANS_TABLES,STRICT_ALL_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,HIGH_NOT_PRECEDENCE