Skip to content

lpad/rpad return wrong result if it need return null for not null input #9465

@windtalker

Description

@windtalker

Bug Report

Please answer these questions before submitting your issue. Thanks!

In

if (target_len < 0 || (data_len < static_cast<ColumnString::Offset>(target_len) && pad_len == 0))
{
return true;
}

And
if (target_len < 0 || (data_len < static_cast<ColumnString::Offset>(target_len) && pad_len == 0))
{
return true;
}

It returns true(which means the result is null) without adding the tailing \0

1. Minimal reproduce step (Required)

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

3. What did you see instead (Required)

4. What is your TiFlash version? (Required)

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions