Bug #113463 bigint、int、tinyint数据类型bug 8.0版本
Submitted: 19 Dec 2023 16:07 Modified: 20 Dec 2023 11:54
Reporter: kaixing yang Email Updates:
Status: Can't repeat Impact on me:
None 
Category:MySQL Server: Data Types Severity:S3 (Non-critical)
Version:8.0 OS:Any
Assigned to: CPU Architecture:Any
Tags: 数据类型

[19 Dec 2023 16:07] kaixing yang
Description:
bigint、int、tinyint类型在使用where匹配字符串的时候,会把值为0得结果显示出来,与预期不符合,应该是一条都查询不到,这里存在bug

How to repeat:
1、首先创建一张表
create table test (
  id int primary key,
  pro bigint not null
);

或者

create table test (
  id int primary key,
  pro int (10) not null
);

或者

create table test (
  id int primary key,
  pro tinyint(10) not null
);

2、插入三条数据
insert into test values(1,0);
insert into test values(2,0);
insert into test values(3,1);

3、查询表
select * from test where pro='abc';
select * from test where pro='汉字';

4、结果显示bigint类型、int类型、tinyint类型在where后面加字符串匹配,pro字段值等于0时,其结果会被匹配出来

Suggested fix:
bigint、int、tinyint数据类型字段在进行where匹配字符串时,不会把结果为0的匹配出来
[20 Dec 2023 11:54] MySQL Verification Team
Hi Mr. ji,

Thank you for yoru bug report.

We can't repeat your bug report.

You have created  three consecutive times the same table, without dropping them in between. That can not work in any SQL.

Also, we  accept bug reports in English language only.