Skip to content

Commit ddd5ba3

Browse files
MohanadKh03vuvova
authored andcommitted
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"
1 parent 05813f5 commit ddd5ba3

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

mysql-test/main/lowercase_table2.result

+1-1
Original file line numberDiff line numberDiff line change
@@ -185,7 +185,7 @@ create table myUC (i int);
185185
select TABLE_SCHEMA,TABLE_NAME FROM information_schema.TABLES
186186
where TABLE_SCHEMA ='mysqltest_LC2';
187187
TABLE_SCHEMA TABLE_NAME
188-
mysqltest_lc2 myUC
188+
mysqltest_LC2 myUC
189189
use test;
190190
drop database mysqltest_LC2;
191191
#

sql/sql_show.cc

+1-1
Original file line numberDiff line numberDiff line change
@@ -4348,7 +4348,7 @@ bool get_lookup_field_values(THD *thd, COND *cond, bool fix_table_name_case,
43484348
break;
43494349
}
43504350

4351-
if (lower_case_table_names && !rc)
4351+
if (lower_case_table_names == 1 && !rc)
43524352
{
43534353
/*
43544354
We can safely do in-place upgrades here since all of the above cases

0 commit comments

Comments
 (0)