Skip to content

[Bug] SELECT @@variables does not return column names due to regression introduced in 2.0.2 when enable_nereids_planner = true #25445

@geoffreytran

Description

@geoffreytran

Search before asking

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

Version

2.0.2

What's Wrong?

With enable_nereids_planner = true when selecting SELECT @@variables, query does not return column names in 2.0.2 compared to previous versions. This causes Mysql clients that check connection information to fail on connect.

When disabling the nereids planner in 2.0.2, the correct column names are returned.

What You Expected?

SELECT @@max_allowed_packet, @@character_set_client, @@character_set_connection, @@license, @@sql_mode, @@lower_case_table_names;

Query Results for Doris <2.0.1.1

@@max_allowed_packet | @@character_set_client | @@character_set_connection | @@license | @@sql_mode | @@lower_case_table_names
1048576 | utf8 | utf8 | Apache License, Version 2.0 |   | 0
Screenshot 2023-10-14 at 6 03 11 PM

We expect to see "@@max_allowed_packet | @@character_set_client | @@character_set_connection | @@license | @@sql_mode | @@lower_case_table_names" returned.

Query Results for Doris 2.0.2 BUG

1048576 | 'utf8' | 'utf8' | 'Apache License, Version 2.0' | '' | 0
1048576 | utf8 | utf8 | Apache License, Version 2.0 |   | 0
Screenshot 2023-10-14 at 6 04 09 PM

How to Reproduce?

Run the following query on Doris 2.0.2:

SELECT @@max_allowed_packet, @@character_set_client, @@character_set_connection, @@license, @@sql_mode, @@lower_case_table_names;

Anything Else?

Temporary workaround is to disable Nereids planner:

SET GLOBAL enable_nereids_planner = false;

Are you willing to submit PR?

  • Yes I am willing to submit a PR!

Code of Conduct

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions