oceanbase / odc

OceanBase Developer Center(ODC), An open-source, enterprise-grade database tool for collaborative development
https://github.com/oceanbase/odc
Apache License 2.0
539 stars 55 forks source link

[Bug]: char's length is wrong at mock data task panel #194

Open yhilmare opened 1 year ago

yhilmare commented 1 year ago

ODC version

4.2.0

OB version

not related

What happened?

create a table as follow:

create table t4 (
    a char(10 char)
)

attempt to mock data for this table: image (3)

the length of the column a is 40.

What did you expect to happen?

it should be 10.

How can we reproduce it (as minimally and precisely as possible)?

follow 'What happened'

Anything else we need to know?

No response

Cloud

No response

yhilmare commented 1 year ago

This problem is because the column in the ddl of the table is char (10 char), but when listing the column, the front end uses the length of this column (10 char is 40 bytes under the current encoding rule) to display and specify the length range , resulting in configuration errors transmitted to the backend.