From ddd5ba3a00ebf164c169efb312ee5f4a624f575c Mon Sep 17 00:00:00 2001 From: Mohanad Date: Fri, 28 Feb 2025 14:43:20 +0200 Subject: [PATCH] MDEV-14432 mysqldump does not preserve case of table names in generated sql inside the get_lookup_field_values when lower_case_table_names's value is 2 this should reserve the case for the table's and database's names so this commit changes the condition to lowercase only when the lower_case_table_name's value is 1 not just 1 and 2 "any value not equal 0" --- mysql-test/main/lowercase_table2.result | 2 +- sql/sql_show.cc | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/mysql-test/main/lowercase_table2.result b/mysql-test/main/lowercase_table2.result index 3a4c46eb776..2b6fb358d39 100644 --- a/mysql-test/main/lowercase_table2.result +++ b/mysql-test/main/lowercase_table2.result @@ -185,7 +185,7 @@ create table myUC (i int); select TABLE_SCHEMA,TABLE_NAME FROM information_schema.TABLES where TABLE_SCHEMA ='mysqltest_LC2'; TABLE_SCHEMA TABLE_NAME -mysqltest_lc2 myUC +mysqltest_LC2 myUC use test; drop database mysqltest_LC2; # diff --git a/sql/sql_show.cc b/sql/sql_show.cc index d70e20fe0b3..78ed924d313 100644 --- a/sql/sql_show.cc +++ b/sql/sql_show.cc @@ -4348,7 +4348,7 @@ bool get_lookup_field_values(THD *thd, COND *cond, bool fix_table_name_case, break; } - if (lower_case_table_names && !rc) + if (lower_case_table_names == 1 && !rc) { /* We can safely do in-place upgrades here since all of the above cases