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]: alter table cannot find table name with error ERROR 1064 (HY000): SQL parser error: table "tt" does not exist when lower_case_table_names is set to 0, but select works normally #15482

Closed
1 task done
aronchanisme opened this issue Apr 12, 2024 · 26 comments
Assignees
Labels
kind/bug Something isn't working phase/testing severity/s0 Extreme impact: Cause the application to break down and seriously affect the use
Milestone

Comments

@aronchanisme
Copy link
Contributor

aronchanisme commented Apr 12, 2024

Is there an existing issue for the same bug?

  • I have checked the existing issues.

Branch Name

main

Commit ID

b7f90bd

Other Environment Information

- Hardware parameters: 10c 16g
- OS type:

aronchen@momac mo-nightly-regression % sw_vers
ProductName:            macOS
ProductVersion:         13.4
BuildVersion:           22F66
aronchen@momac mo-nightly-regression % uname -a
Darwin momac.local 22.5.0 Darwin Kernel Version 22.5.0: Mon Apr 24 20:52:24 PDT 2023; root:xnu-8796.121.2~5/RELEASE_ARM64_T6000 arm64

- Others:

Actual Behavior

alter table cannot find table name with error ERROR 1064 (HY000): SQL parser error: table "tt" does not exist when lower_case_table_names is set to 0, but select works normally

aronchen@momac etc % cat ./launch/cn.toml 
service-type = "CN"
data-dir = "./mo-data"

[log]
level = "info"

[cn]
uuid = "dd1dccb4-4d3c-41f8-b482-5251dc7a41bf"
port-base = 18000

[cn.frontend]
lowerCaseTableNames = "0"

aronchen@momac etc % pwd 
/data/mo/main/matrixone/etc
aronchen@momac etc % mo_ctl get_branch
2024-04-12 10:53:38.425 UTC+0800    [INFO]    Try get mo branch
2024-04-12 10:53:38.475 UTC+0800    [INFO]    Get branch succeeded, current branch: main
aronchen@momac etc % mo_ctl get_cid
2024-04-12 10:53:40.286 UTC+0800    [INFO]    Try get mo commit id
commit b7f90bda598cd77f5b0ab880f8b3bea906c3122d
Author: iamlinjunhong <49111204+iamlinjunhong@users.noreply.github.com>
Date:   Fri Apr 12 10:08:53 2024 +0800

    fix validate lock service (#15438)
    
    fix validate lock service
    
    Approved by: @zhangxu19830126
2024-04-12 10:53:40.334 UTC+0800    [INFO]    Get commit id succeeded
aronchen@momac etc % mo_ctl start 
2024-04-12 10:53:43.292 UTC+0800    [INFO]    No mo-service is running
2024-04-12 10:53:43.351 UTC+0800    [INFO]    GO memory limit(Mi): 14745
2024-04-12 10:53:43.408 UTC+0800    [INFO]    Starting mo-service: cd /data/mo/main/matrixone/ && GOMEMLIMIT=14745MiB /data/mo/main/matrixone/mo-service -daemon -debug-http :9876 -launch /data/mo/main/matrixone/etc/launch/launch.toml >/data/mo/main/matrixone/logs/stdout-20240412_105343.log 2>/data/mo/main/matrixone/logs/stderr-20240412_105343.log
2024-04-12 10:53:43.571 UTC+0800    [INFO]    Wait for 2 seconds
2024-04-12 10:53:45.701 UTC+0800    [INFO]    At least one mo-service is running. Process info: 
  501 47524     1   0 10:53AM ??         0:00.11 /data/mo/main/matrixone/mo-service -daemon -debug-http :9876 -launch /data/mo/main/matrixone/etc/launch/launch.toml
2024-04-12 10:53:45.727 UTC+0800    [INFO]    List of pid(s): 
47524
2024-04-12 10:53:45.754 UTC+0800    [INFO]    Start succeeded
aronchen@momac etc % mo_ctl connect
2024-04-12 10:59:52.876 UTC+0800    [INFO]    Checking connectivity
2024-04-12 10:59:52.939 UTC+0800    [INFO]    Ok, connecting for user ... 
Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 127
Server version: 8.0.30-MatrixOne-v7905 MatrixOne

Copyright (c) 2000, 2023, Oracle and/or its affiliates.

Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective
owners.

Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.

mysql> select git_version();
+---------------+
| git_version() |
+---------------+
| b7f90bda5     |
+---------------+
1 row in set (0.00 sec)

mysql> show variables like "%lower%";
+------------------------+-------+
| Variable_name          | Value |
+------------------------+-------+
| lower_case_file_system | off   |
| lower_case_table_names | 0     |
+------------------------+-------+
2 rows in set (0.01 sec)

mysql> create table Tt (Aa int);
ERROR 1046 (HY000): not connect to a database
mysql> create database if not exists test;
Query OK, 1 row affected (0.01 sec)

mysql> use test;
Database changed
mysql> create table Tt (Aa int);
Query OK, 0 rows affected (0.02 sec)

mysql> insert into Tt values (1), (2), (3);
Query OK, 3 rows affected (0.00 sec)

mysql> select Aa from Tt;
+------+
| aa   |
+------+
|    1 |
|    2 |
|    3 |
+------+
3 rows in set (0.01 sec)

mysql> create table TT (c1 int);
Query OK, 0 rows affected (0.02 sec)

mysql> show tables;
+----------------+
| Tables_in_test |
+----------------+
| TT             |
| Tt             |
+----------------+
2 rows in set (0.00 sec)

mysql> alter table TT add column c2 int;
ERROR 1064 (HY000): SQL parser error: table "tt" does not exist
mysql> alter table `TT` add column c2 int;
ERROR 1064 (HY000): SQL parser error: table "tt" does not exist
mysql> select * from TT;
Empty set (0.00 sec)

mysql> select * from `TT`;
Empty set (0.00 sec)

mysql> select * from `Tt`;
+------+
| Aa   |
+------+
|    1 |
|    2 |
|    3 |
+------+
3 rows in set (0.00 sec)

Expected Behavior

These 2 alter table statements should work instead of throwing errors.

mysql> alter table TT add column c2 int;
ERROR 1064 (HY000): SQL parser error: table "tt" does not exist
mysql> alter table `TT` add column c2 int;
ERROR 1064 (HY000): SQL parser error: table "tt" does not exist

Steps to Reproduce

Step_1. set lower_case_table_names to "0" via set global sql command

set global lower_case_table_names = 0;

Re-login mo before step 2.

Below are deprecated:
set lower_case_table_names to "0" via conf file under etc/launch/cn.toml

service-type = "CN"
data-dir = "./mo-data"

[log]
level = "info"

[cn]
uuid = "dd1dccb4-4d3c-41f8-b482-5251dc7a41bf"
port-base = 18000

[cn.frontend]
lowerCaseTableNames = "0"

Step_2. Execute below sql statements.

show variables like "%lower%";
create database if not exists test;
use test;
drop table if exists Tt;
drop table if exists TT;
create table Tt (Aa int);
insert into Tt values (1), (2), (3);
select Aa from Tt;
create table TT (c1 int);
show tables;
alter table TT add column c2 int; -- should work
desc TT;
alter table `TT` add column c3 int; -- should work as well
desc TT;
select * from TT;
select * from `TT`;
select * from Tt;
select * from `Tt`;

Additional information

No response

@aronchanisme aronchanisme added kind/bug Something isn't working needs-triage severity/s0 Extreme impact: Cause the application to break down and seriously affect the use labels Apr 12, 2024
@aronchanisme aronchanisme added this to the 1.2.0 milestone Apr 12, 2024
@aronchanisme
Copy link
Contributor Author

aronchanisme commented Apr 12, 2024

1.1-dev has the same issue.

aronchen@momac matrixone % cat ./etc/launch/cn.toml 
service-type = "CN"
data-dir = "./mo-data"

[log]
level = "info"

[cn]
uuid = "dd1dccb4-4d3c-41f8-b482-5251dc7a41bf"
port-base = 18000

[cn.frontend]
lowerCaseTableNames = "0"
aronchen@momac matrixone % mo_ctl get_branch
2024-04-12 11:18:06.418 UTC+0800    [INFO]    Try get mo branch
2024-04-12 11:18:06.474 UTC+0800    [INFO]    Get branch succeeded, current branch: 1.1-dev
aronchen@momac matrixone % mo_ctl get_cid 
2024-04-12 11:18:08.490 UTC+0800    [INFO]    Try get mo commit id
commit e0d9dad9a82214ce72f024c5c02aa46fb4fc4ab1
Author: iamlinjunhong <49111204+iamlinjunhong@users.noreply.github.com>
Date:   Thu Apr 11 23:44:45 2024 +0800

    modify defaultMaxLockRowCount to reduce deadlocks (#15472)
    
    modify defaultMaxLockRowCount to reduce deadlocks
    
    Approved by: @zhangxu19830126, @sukki37
2024-04-12 11:18:08.545 UTC+0800    [INFO]    Get commit id succeeded
aronchen@momac matrixone % mo_ctl restart 
2024-04-12 11:18:13.339 UTC+0800    [INFO]    No mo-service is running
2024-04-12 11:18:13.366 UTC+0800    [INFO]    No need to stop mo-service
2024-04-12 11:18:13.394 UTC+0800    [INFO]    Stop succeeded
2024-04-12 11:18:13.421 UTC+0800    [INFO]    Wait for 2 seconds
2024-04-12 11:18:15.569 UTC+0800    [INFO]    No mo-service is running
2024-04-12 11:18:15.635 UTC+0800    [INFO]    GO memory limit(Mi): 14745
2024-04-12 11:18:15.688 UTC+0800    [INFO]    Starting mo-service: cd /data/mo/1.1-dev/matrixone/ && GOMEMLIMIT=14745MiB /data/mo/1.1-dev/matrixone/mo-service -daemon -debug-http :9876 -launch /data/mo/1.1-dev/matrixone/etc/launch/launch.toml >/data/mo/1.1-dev/matrixone/logs/stdout-20240412_111815.log 2>/data/mo/1.1-dev/matrixone/logs/stderr-20240412_111815.log
2024-04-12 11:18:15.855 UTC+0800    [INFO]    Wait for 2 seconds
2024-04-12 11:18:18.003 UTC+0800    [INFO]    At least one mo-service is running. Process info: 
  501 53039     1   0 11:18AM ??         0:00.12 /data/mo/1.1-dev/matrixone/mo-service -daemon -debug-http :9876 -launch /data/mo/1.1-dev/matrixone/etc/launch/launch.toml
2024-04-12 11:18:18.030 UTC+0800    [INFO]    List of pid(s): 
53039
2024-04-12 11:18:18.059 UTC+0800    [INFO]    Start succeeded
aronchen@momac matrixone %  mo_ctl connect
2024-04-12 11:44:13.716 UTC+0800    [INFO]    Checking connectivity
2024-04-12 11:44:13.787 UTC+0800    [INFO]    Ok, connecting for user ... 
Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 453
Server version: 8.0.30-MatrixOne-v1.1.2 MatrixOne

Copyright (c) 2000, 2023, Oracle and/or its affiliates.

Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective
owners.

Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.

mysql> show variables like "%lower%";
+------------------------+-------+
| Variable_name          | Value |
+------------------------+-------+
| lower_case_file_system | off   |
| lower_case_table_names | 0     |
+------------------------+-------+
2 rows in set (0.00 sec)

mysql> create database if not exists test;
Query OK, 1 row affected (0.01 sec)

mysql> use test;
Database changed
mysql> drop table if exists Tt;
Query OK, 0 rows affected (0.01 sec)

mysql> drop table if exists TT;
Query OK, 0 rows affected (0.00 sec)

mysql> create table Tt (Aa int);
Query OK, 0 rows affected (0.02 sec)

mysql> insert into Tt values (1), (2), (3);
Query OK, 3 rows affected (0.00 sec)

mysql> select Aa from Tt;
+------+
| Aa   |
+------+
|    1 |
|    2 |
|    3 |
+------+
3 rows in set (0.00 sec)

mysql> create table TT (c1 int);
Query OK, 0 rows affected (0.01 sec)

mysql> show tables;
+----------------+
| Tables_in_test |
+----------------+
| Tt             |
| TT             |
+----------------+
2 rows in set (0.00 sec)

mysql> alter table TT add column c2 int; -- should work
ERROR 1064 (HY000): SQL parser error: table "tt" does not exist
mysql> alter table `TT` add column c3 int; -- should work as well
ERROR 1064 (HY000): SQL parser error: table "tt" does not exist
mysql> select * from TT;
Empty set (0.00 sec)

mysql> select * from `TT`;
Empty set (0.00 sec)

mysql> select * from Tt;
+------+
| Aa   |
+------+
|    1 |
|    2 |
|    3 |
+------+
3 rows in set (0.01 sec)

mysql> select * from `Tt`;
+------+
| Aa   |
+------+
|    1 |
|    2 |
|    3 |
+------+
3 rows in set (0.00 sec)

mysql> select git_version();
+---------------+
| git_version() |
+---------------+
| e0d9dad9a     |
+---------------+
1 row in set (0.01 sec)

@nnsgmsone nnsgmsone assigned ouyuanning and unassigned matrix-meow Apr 12, 2024
@nnsgmsone
Copy link
Contributor

bug of parser

@ouyuanning ouyuanning assigned daviszhen and unassigned ouyuanning Apr 12, 2024
@ouyuanning
Copy link
Contributor

可以对一下MySQL, 感觉第二个 create table TT 在已经有table Tt的情况就不应该新建成功了。不然当大小写配置更改之后,都不知道找哪个表了。
可能对于表名来说,不应该大小写敏感。

@aronchanisme aronchanisme changed the title [Bug]: alter table cannot find table name with error ERROR 1064 (HY000): SQL parser error: table "tt" does not exist when lower_case_table_names is set to , but select works normally [Bug]: alter table cannot find table name with error ERROR 1064 (HY000): SQL parser error: table "tt" does not exist when lower_case_table_names is set to 0, but select works normally Apr 15, 2024
@daviszhen daviszhen assigned qingxinhome and unassigned daviszhen Apr 16, 2024
@qingxinhome
Copy link
Contributor

由于大小写配置问题比较复杂, 该问题暂时无法解决,后期需要做一下统筹

@aressu1985 aressu1985 modified the milestones: 1.2.0, 1.3.0-Backlog Apr 24, 2024
@qingxinhome
Copy link
Contributor

由于大小写配置问题比较复杂, 该问题暂时无法解决,后期需要做一下统筹

1 similar comment
@qingxinhome
Copy link
Contributor

由于大小写配置问题比较复杂, 该问题暂时无法解决,后期需要做一下统筹

@dengn dengn modified the milestones: 1.3.0-Backlog, 1.2.1 May 8, 2024
@qingxinhome
Copy link
Contributor

后期处理

3 similar comments
@qingxinhome
Copy link
Contributor

后期处理

@qingxinhome
Copy link
Contributor

后期处理

@qingxinhome
Copy link
Contributor

后期处理

@aressu1985 aressu1985 removed this from the 1.2.1 milestone May 29, 2024
@sukki37 sukki37 modified the milestones: 1.3.0-Backlog, 1.3.0 Jul 2, 2024
@qingxinhome
Copy link
Contributor

not working on it

@qingxinhome
Copy link
Contributor

qingxinhome commented Jul 8, 2024

曹凯帮忙处理吧

@qingxinhome qingxinhome assigned ck89119 and unassigned qingxinhome Jul 8, 2024
@ck89119
Copy link
Contributor

ck89119 commented Jul 8, 2024

sqlExecutor并没有取lower_case_table_names的配置值,而是写死了1

image

@ck89119
Copy link
Contributor

ck89119 commented Jul 8, 2024

待修复

@ck89119
Copy link
Contributor

ck89119 commented Jul 9, 2024

working on it

@ck89119
Copy link
Contributor

ck89119 commented Jul 10, 2024

修复已merge,麻烦验证下 @aronchanisme

@aronchanisme
Copy link
Contributor Author

After refactor, the conf lower_case_table_names is no longer supported to be set via toml conf file, but only available via set [global] lower_case_table_names=0|1 sql command. cc @yangj1211

@aronchanisme
Copy link
Contributor Author

Both 1.2-dev and main passed validation test.

  1. 1.2-dev(6d7ffce38)
github@test0:/data/mo/main/matrixone$ mo_ctl connect
2024-07-10 16:56:58.311 UTC+0800    [INFO]    Checking connectivity
2024-07-10 16:56:58.383 UTC+0800    [INFO]    Ok, connecting for user ... 
Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 4804
Server version: 8.0.30-MatrixOne-v6738 MatrixOne

Copyright (c) 2000, 2024, Oracle and/or its affiliates.

Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective
owners.

Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.

mysql> show databases;
+--------------------+
| Database           |
+--------------------+
| emis               |
| information_schema |
| mo_catalog         |
| mo_debug           |
| mo_task            |
| mysql              |
| system             |
| system_metrics     |
+--------------------+
8 rows in set (0.01 sec)

mysql> select git_version();
+---------------+
| git_version() |
+---------------+
| 6d7ffce38     |
+---------------+
1 row in set (0.00 sec)

mysql> system mo_ctl get_branch
2024-07-10 16:57:10.528 UTC+0800    [INFO]    Try get mo branch
2024-07-10 16:57:10.579 UTC+0800    [INFO]    Get branch succeeded, current branch: 1.2-dev
mysql> system mo_ctl get_cid
2024-07-10 16:57:12.775 UTC+0800    [INFO]    Try get mo commit id
commit 6d7ffce38b83e2b0828c072c97c687de7386d105
Author: XuPeng-SH <xupeng3112@163.com>
Date:   Wed Jul 10 15:59:50 2024 +0800

    1.2 optimize flush and merge prints (#17437)
    
    1.2 optimize flush  and merge prints
    
    Approved by: @triump2020, @sukki37
2024-07-10 16:57:12.823 UTC+0800    [INFO]    Get commit id succeeded
mysql> show variables like "%lower%";
+------------------------+-------+
| Variable_name          | Value |
+------------------------+-------+
| lower_case_file_system | off   |
| lower_case_table_names | 1     |
+------------------------+-------+
2 rows in set (0.00 sec)

mysql> set global lower_case_table_names = 0;
Query OK, 0 rows affected (0.04 sec)

mysql> exit
Bye
^[[A2024-07-10 16:57:37.142 UTC+0800    [INFO]    Connect succeeded and finished. Bye
github@test0:/data/mo/main/matrixone$ mo_ctl connect
2024-07-10 16:57:38.485 UTC+0800    [INFO]    Checking connectivity
2024-07-10 16:57:38.555 UTC+0800    [INFO]    Ok, connecting for user ... 
Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 4812
Server version: 8.0.30-MatrixOne-v6738 MatrixOne

Copyright (c) 2000, 2024, Oracle and/or its affiliates.

Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective
owners.

Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.

mysql> show variables like "%lower%";
+------------------------+-------+
| Variable_name          | Value |
+------------------------+-------+
| lower_case_file_system | off   |
| lower_case_table_names | 0     |
+------------------------+-------+
2 rows in set (0.00 sec)

mysql> create database if not exists test;
Query OK, 1 row affected (0.02 sec)

mysql> use test;
Database changed
mysql> drop table if exists Tt;
Query OK, 0 rows affected (0.01 sec)

mysql> drop table if exists TT;
Query OK, 0 rows affected (0.01 sec)

mysql> create table Tt (Aa int);
Query OK, 0 rows affected (0.03 sec)

mysql> insert into Tt values (1), (2), (3);
Query OK, 3 rows affected (0.01 sec)

mysql> select Aa from Tt;
+------+
| Aa   |
+------+
|    1 |
|    2 |
|    3 |
+------+
3 rows in set (0.00 sec)

mysql> create table TT (c1 int);
Query OK, 0 rows affected (0.02 sec)

mysql> show tables;
+----------------+
| Tables_in_test |
+----------------+
| TT             |
| Tt             |
+----------------+
2 rows in set (0.01 sec)

mysql> alter table TT add column c2 int; -- should work
Query OK, 0 rows affected (0.05 sec)

mysql> alter table `TT` add column c3 int; -- should work as well
Query OK, 0 rows affected (0.03 sec)

mysql> desc TT;
+-------+---------+------+------+---------+-------+---------+
| Field | Type    | Null | Key  | Default | Extra | Comment |
+-------+---------+------+------+---------+-------+---------+
| c1    | INT(32) | YES  |      | null    |       |         |
| c2    | INT(32) | YES  |      | null    |       |         |
| c3    | INT(32) | YES  |      | null    |       |         |
+-------+---------+------+------+---------+-------+---------+
3 rows in set (0.02 sec)

mysql> select * from TT;
Empty set (0.00 sec)

mysql> select * from `TT`;
Empty set (0.00 sec)

mysql> select * from Tt;
+------+
| aa   |
+------+
|    1 |
|    2 |
|    3 |
+------+
3 rows in set (0.01 sec)

mysql> select * from `Tt`;
+------+
| aa   |
+------+
|    1 |
|    2 |
|    3 |
+------+
3 rows in set (0.00 sec)
  1. main(e6ad64ec2)
github@test0:/data/mo/main/matrixone$ mo_ctl connect
2024-07-10 16:53:54.130 UTC+0800    [INFO]    Checking connectivity
2024-07-10 16:53:54.208 UTC+0800    [INFO]    Ok, connecting for user ... 
Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 209
Server version: 8.0.30-MatrixOne-v6642 MatrixOne

Copyright (c) 2000, 2024, Oracle and/or its affiliates.

Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective
owners.

Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.

mysql> system mo_ctl get_cid
2024-07-10 16:53:56.315 UTC+0800    [INFO]    Try get mo commit id
commit e6ad64ec2adf00e3045d12b54b6aecc7f19ec0d1
Author: reusee <reusee@gmail.com>
Date:   Wed Jul 10 16:48:29 2024 +0800

    malloc: add allocated and inuse objects metrics to MetricsAllocator (#17355)
    
    add allocated and inuse objects metrics to MetricsAllocator
    
    Approved by: @fengttt, @aptend
2024-07-10 16:53:56.376 UTC+0800    [INFO]    Get commit id succeeded
mysql> select git_version();
+---------------+
| git_version() |
+---------------+
| e6ad64ec2     |
+---------------+
1 row in set (0.00 sec)

mysql> show variables like "%lower%";
+------------------------+-------+
| Variable_name          | Value |
+------------------------+-------+
| lower_case_file_system | off   |
| lower_case_table_names | 1     |
+------------------------+-------+
2 rows in set (0.00 sec)

mysql> set global lower_case_table_names = 0;
Query OK, 0 rows affected (0.03 sec)

mysql> exit
Bye
2024-07-10 16:54:20.013 UTC+0800    [INFO]    Connect succeeded and finished. Bye
github@test0:/data/mo/main/matrixone$ mo_ctl connect
2024-07-10 16:54:21.035 UTC+0800    [INFO]    Checking connectivity
2024-07-10 16:54:21.103 UTC+0800    [INFO]    Ok, connecting for user ... 
Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 212
Server version: 8.0.30-MatrixOne-v6642 MatrixOne

Copyright (c) 2000, 2024, Oracle and/or its affiliates.

Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective
owners.

Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.

mysql> show variables like "%lower%";
+------------------------+-------+
| Variable_name          | Value |
+------------------------+-------+
| lower_case_file_system | off   |
| lower_case_table_names | 0     |
+------------------------+-------+
2 rows in set (0.00 sec)

mysql> create database if not exists test;
Query OK, 1 row affected (0.02 sec)

mysql> use test;
Database changed
mysql> drop table if exists Tt;
Query OK, 0 rows affected (0.01 sec)

mysql> drop table if exists TT;
Query OK, 0 rows affected (0.00 sec)

mysql> create table Tt (Aa int);
Query OK, 0 rows affected (0.03 sec)

mysql> insert into Tt values (1), (2), (3);
Query OK, 3 rows affected (0.01 sec)

mysql> select Aa from Tt;
+------+
| Aa   |
+------+
|    1 |
|    2 |
|    3 |
+------+
3 rows in set (0.00 sec)

mysql> create table TT (c1 int);
Query OK, 0 rows affected (0.02 sec)

mysql> show tables;
+----------------+
| Tables_in_test |
+----------------+
| TT             |
| Tt             |
+----------------+
2 rows in set (0.01 sec)

mysql> alter table TT add column c2 int; -- should work
Query OK, 0 rows affected (0.04 sec)

mysql> alter table `TT` add column c3 int; -- should work as well
Query OK, 0 rows affected (0.03 sec)

mysql> select * from TT;
Empty set (0.01 sec)

mysql> select * from `TT`;
Empty set (0.01 sec)

mysql> select * from Tt;
+------+
| aa   |
+------+
|    1 |
|    2 |
|    3 |
+------+
3 rows in set (0.01 sec)

mysql> select * from `Tt`;
+------+
| aa   |
+------+
|    1 |
|    2 |
|    3 |
+------+
3 rows in set (0.00 sec)

@aronchanisme
Copy link
Contributor Author

@ck89119 pls kindly help add a bvt case and then get back to me, thx

@aronchanisme aronchanisme assigned ck89119 and unassigned aronchanisme Jul 10, 2024
@sukki37 sukki37 modified the milestones: 1.3.0, 1.2.2 Jul 10, 2024
This was referenced Jul 10, 2024
@ck89119 ck89119 assigned aronchanisme and unassigned ck89119 Jul 12, 2024
@aronchanisme
Copy link
Contributor Author

Closing this thread

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/bug Something isn't working phase/testing severity/s0 Extreme impact: Cause the application to break down and seriously affect the use
Projects
None yet
Development

No branches or pull requests

10 participants