Skip to content

Tikv conv function inconsistent results with tidb #51877

@yibin87

Description

@yibin87

Bug Report

Please answer these questions before submitting your issue. Thanks!

1. Minimal reproduce step (Required)

set tidb_opt_projection_push_down = 'on';
create table bug15583(b BIT(8), n INT);
insert into bug15583 values(128, 128);
insert into bug15583 values(null, null);
insert into bug15583 values(0, 0);
insert into bug15583 values(255, 255);
select conv(b, 10, 2), conv(b + 0, 10, 2) from bug15583;

2. What did you expect to see? (Required)

conv(b, 10, 2) conv(b + 0, 10, 2)
10000000 10000000
NULL NULL
0 0
11111111 11111111

3. What did you see instead (Required)

conv(b, 10, 2) conv(b + 0, 10, 2)
0 10000000
NULL NULL
0 0
0 11111111

4. What is your TiDB version? (Required)

| Release Version: v7.4.0-alpha-2012-gfe01d11df6-dirty
Edition: Community
Git Commit Hash: fe01d11
Git Branch: div_increase_prec
UTC Build Time: 2024-03-15 08:10:07

Metadata

Metadata

Assignees

Labels

affects-5.4This bug affects the 5.4.x(LTS) versions.affects-6.1This bug affects the 6.1.x(LTS) versions.affects-6.5This bug affects the 6.5.x(LTS) versions.affects-7.1This bug affects the 7.1.x(LTS) versions.affects-7.5This bug affects the 7.5.x(LTS) versions.affects-8.1This bug affects the 8.1.x(LTS) versions.severity/majorsig/executionSIG executiontype/bugThe issue is confirmed as a bug.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions