matrixone icon indicating copy to clipboard operation
matrixone copied to clipboard

[Bug]: alias are case insensitive in create table as select.

Open Ariznawlll opened this issue 1 year ago • 1 comments

Is there an existing issue for the same bug?

  • [X] I have checked the existing issues.

Branch Name

main

Commit ID

1e530c4286d1ea371e7edda46cb830efcb3ba7a4

Other Environment Information

- Hardware parameters:
- OS type:
- Others:

Actual Behavior

image

要与mysql保持一致.

Expected Behavior

No response

Steps to Reproduce

drop table if exists alias01;
create table alias01 (col1 int, col2 decimal);
insert into alias01 values (1,2);
insert into alias01 values (2,3);
drop table if exists alias02;
create table alias02 (NewCol int) as select * from alias01;
show create table alias02;
select * from alias02;
drop table alias01;

Additional information

No response

Ariznawlll avatar Mar 13 '24 11:03 Ariznawlll

@ck89119 plz cc

YANGGMM avatar Mar 14 '24 02:03 YANGGMM

有个global var: lower_case_table_names控制parse时是否把表/列名改成小写,当前默认值为1,即默认全部改成小写。 image

改成0以后就和mysql一致了 image

至于默认值为什么为1,我也不清楚当时的场景和考量。

ck89119 avatar Mar 14 '24 07:03 ck89119

@dengn 你看下呢

ck89119 avatar Mar 14 '24 07:03 ck89119

ok. @yangj1211 pay attention for case sensitivity when you edit docs for CTS.

dengn avatar Mar 19 '24 01:03 dengn

Hello @Ariznawlll. The bug issue in the BVT test code has not been removed,issues automatically open.

matrix-meow avatar Mar 19 '24 01:03 matrix-meow