Closed
Description
Bug Report
Please answer these questions before submitting your issue. Thanks!
- What did you do?
Create a table and insert some values, the table schema:
mysql> show create table item1 \G;
*************************** 1. row ***************************
Table: item1
Create Table: CREATE TABLE `item1` (
`i_id` int(11) NOT NULL,
`i_im_id` int(11) DEFAULT NULL,
`i_name` varchar(24) DEFAULT NULL,
`i_price` decimal(5,2) DEFAULT NULL,
`i_data` varchar(50) DEFAULT NULL,
PRIMARY KEY (`i_id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1
then select
mysql> select count(*) from item1 where i_data ;
+----------+
| count(*) |
+----------+
| 14769 |
+----------+
1 row in set, 65535 warnings (0.05 sec)
- What did you expect to see?
Like MySQL 5.7, the warning message should be:
mysql> show warnings;
+---------+------+-----------------------------------------------------------------------------------------+
| Level | Code | Message |
+---------+------+-----------------------------------------------------------------------------------------+
| Warning | 1292 | Truncated incorrect INTEGER value: 'i9pT0zpXTxFYTxMtHP6h3VVZL5y7Pr2zC6ttY5C5QXMg6t8KY' |
| Warning | 1292 | Truncated incorrect INTEGER value: 'uOa4vwxAYTZjkRv5K4kyWsSFuctocROdPAW47hw2vnnp' |
| Warning | 1292 | Truncated incorrect INTEGER value: 'tQabPDFTPjGr5hAkFnAQMlIIPR7C4pBnTAGrmm0a0T8' |
| Warning | 1292 | Truncated incorrect INTEGER value: 'j3B7JLBhCe5xNmj1KSxL2avY0j6xyyUuemQeR5xCxdgM' |
| Warning | 1292 | Truncated incorrect INTEGER value: 'O5lYdP5HWrloobWqyiYdp6XvqAZPxuodqFmTB' |
- What did you see instead?
But got:
| Warning | 1105 | Data Truncated |
| Warning | 1105 | Data Truncated |
| Warning | 1105 | Data Truncated |
| Warning | 1105 | Data Truncated |
| Warning | 1105 | Data Truncated |
| Warning | 1105 | Data Truncated |
| Warning | 1105 | Data Truncated |
- What version of TiDB are you using (
tidb-server -V
or runselect tidb_version();
on TiDB)?