Renaming tables does not respect `lower_case_table_names` setting #12861

Closed
MPLew-is opened this Issue Dec 30, 2016 · 3 comments

Projects

None yet

2 participants

@MPLew-is
Contributor
MPLew-is commented Dec 30, 2016 edited

This issue is a sort of follow-up to #11816.

Steps to reproduce

  1. On a case-insensitive file system (macOS or Windows when using the OS's default settings) and a MySQL installation using a lower_case_table_names setting of 2, create or import a table that has at least one upper-case letter (the example used in this issue is Testing).
  2. Through phpmyadmin's "Operations" tab (either the "Move table" form or "Rename table to" input under "Table options"), rename the table to any other name also containing at least one upper-case letter (the example used in this issue is Testing 2).

Expected behaviour

The table should be renamed to Testing 2, respecting the input name, since lower-case table names are not being forced by the server installation.

Actual behaviour

The table is renamed to the lower-case version of the input table name, testing 2.

When renaming the table using SQL commands (both from the command line and in the "SQL" tab), the table is renamed as expected. This issue is only present when renaming through the "Operations" tab's "Move table" or "Rename table to" forms. This issue is also not present when copying the table through the "Operations" tab's "Copy table" form.

Server configuration

Operating system: macOS 10.12.2

Web server: Apache 2.4.23

Database: MySQL 5.6.34

PHP version: 5.6.29

phpMyAdmin version: 4.6.5.2

Client configuration

Browser: Safari 10.0.2

Operating system: macOS 10.12.2

@nijel nijel added the bug label Jan 2, 2017
@nijel
Member
nijel commented Jan 2, 2017

Does it happen with patch from #11816 applied?

@MPLew-is
Contributor
MPLew-is commented Jan 4, 2017

@nijel yes, this occurs both with and without the patch applied.

@MPLew-is MPLew-is added a commit to MPLew-is/phpmyadmin that referenced this issue Jan 13, 2017
@MPLew-is MPLew-is Only convert table name to lower-case when installation forces it
Issue #12861

A `lower_case_table_names` setting of `2` does not mean that the table needs to be forced to lower-case
This preserves case unless the `lower_case_table_names` setting is `1`, implying that lower-case should be forced

Signed-off-by: Mike Lewis <mike@mplew.is>
47781e4
@nijel nijel self-assigned this Jan 18, 2017
@nijel nijel added this to the 4.6.6 milestone Jan 18, 2017
@nijel nijel added a commit that referenced this issue Jan 18, 2017
@MPLew-is @nijel MPLew-is + nijel Only convert table name to lower-case when installation forces it
Issue #12861

A `lower_case_table_names` setting of `2` does not mean that the table needs to be forced to lower-case
This preserves case unless the `lower_case_table_names` setting is `1`, implying that lower-case should be forced

Signed-off-by: Mike Lewis <mike@mplew.is>
3bf78af
@nijel nijel added a commit that referenced this issue Jan 18, 2017
@nijel nijel Share code for getting lower_case_table_names value
Issue #12861

Signed-off-by: Michal Čihař <michal@cihar.com>
89357ee
@nijel nijel added a commit that referenced this issue Jan 18, 2017
@nijel nijel Changelog entry for #12861 and #12891
Signed-off-by: Michal Čihař <michal@cihar.com>
f1aefb1
@nijel
Member
nijel commented Jan 18, 2017

Fixed by 3bf78af, cherrypicked from #12891.

@nijel nijel closed this Jan 18, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment