Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug] FE lower_case_table_names = 2, but still can't using lower case table name to select INFORMATION_SCHEMA.COLUMNS. #48126

Open
2 of 3 tasks
Titansonia opened this issue Feb 20, 2025 · 4 comments

Comments

@Titansonia
Copy link

Search before asking

  • I had searched in the issues and found no similar issues.

Version

2.1.8

What's Wrong?

  1. I'm using lower_case_table_names = 2 started the FE
Image
  1. created table using:
    CREATE TABLE mysql2doris.test_all_String (
    id INT NOT NULL COMMENT "int",
    _char CHAR(1) DEFAULT "b" COMMENT "你好",
    _varchar VARCHAR(255) DEFAULT "default" COMMENT "你好",
    _binary STRING COMMENT "original: binary",
    _varbinary STRING COMMENT "original: varbinary",
    _tinytext STRING COMMENT "original: tinytext",
    _text STRING COMMENT "original: TEXT",
    _mediumtext STRING COMMENT "original: MEDIUMTEXT",
    _longtext STRING COMMENT "original: longtext",
    _tinyblob STRING COMMENT "original: tinyblob",
    _blob STRING COMMENT "original: BLOB",
    _mediumblob STRING COMMENT "original: MEDIUMBLOB",
    _longblob STRING COMMENT "original: longblob",
    _enum STRING COMMENT "original: ENUM",
    _set STRING COMMENT "original: SET",
    _json STRING COMMENT "original: json",
    )
    UNIQUE KEY(id)
    DISTRIBUTED BY HASH(id) BUCKETS 8
    PROPERTIES(
    "replication_allocation" = "tag.location.default:1"
    );

  2. select the table using lower case table name worked:
    Image

  3. try to select from INFORMATION_SCHEMA.COLUMNS using TABLE_NAME = 'test_all_string'(in lower case), not worked:

Image
  1. using TABLE_NAME = 'test_all_String', worked:
    Image

I think there may be some Compatibility problem in INFORMATION_SCHEMA.COLUMNS table and the lower_case_table_names attribute. In mysql, no such problem. please help check. thx.

What You Expected?

when lower_case_table_names = 2 is set, I can use lower case table names to select INFORMATION_SCHEMA.COLUMNS table where the table names is created by upper case.

How to Reproduce?

No response

Anything Else?

No response

Are you willing to submit PR?

  • Yes I am willing to submit a PR!

Code of Conduct

@Nivane
Copy link
Contributor

Nivane commented Feb 21, 2025

hello @Titansonia

https://doris.apache.org/docs/admin-manual/config/fe-config

lower_case_table_names

Default:0

IsMutable:false

MasterOnly:true

This configuration can only be configured during cluster initialization and cannot be modified during cluster restart and upgrade after initialization is complete.

0: table names are stored as specified and comparisons are case sensitive. 1: table names are stored in lowercase and comparisons are not case sensitive. 2: table names are stored as given but compared in lowercase.

This configuration can only be configured during CLUSTER INITIALIZATION and cannot be modified during CLUSTER RESTART and UPGRADE after INITIALIZATION is COMPLETE.

@Titansonia
Copy link
Author

Titansonia commented Feb 27, 2025

hello @Titansonia

https://doris.apache.org/docs/admin-manual/config/fe-config

lower_case_table_names

Default:0

IsMutable:false

MasterOnly:true

This configuration can only be configured during cluster initialization and cannot be modified during cluster restart and upgrade after initialization is complete.

0: table names are stored as specified and comparisons are case sensitive. 1: table names are stored in lowercase and comparisons are not case sensitive. 2: table names are stored as given but compared in lowercase.

This configuration can only be configured during CLUSTER INITIALIZATION and cannot be modified during CLUSTER RESTART and UPGRADE after INITIALIZATION is COMPLETE.

Hi @Nivane

I think the setting was done in the initialization phase. Here is what I did: In docker, I deleted the container, and then initialized a new container with lower_case_table_names=2 set in the fe.conf

And after fe started, I checked lower_case_table_names in the configuration page in fe localhost page, it is set to 2.

Maybe there are something wrong elsewhere..

@Nivane
Copy link
Contributor

Nivane commented Feb 27, 2025

How many FE nodes and BE nodes are there in the cluster? Was both the FE and BE reinitialized during the cluster initialization?

@Titansonia
Copy link
Author

How many FE nodes and BE nodes are there in the cluster? Was both the FE and BE reinitialized during the cluster initialization?

@Nivane FE 1 node and BE 1 node

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants