From 52fa45e149e1a55300f417f819304721465e452c Mon Sep 17 00:00:00 2001 From: Mike Lewis Date: Sat, 21 Jan 2017 15:28:44 -0500 Subject: [PATCH] Use correct-case table name in message for successful rename MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Previously, the name returned was the name used in the request, rather than the name after the correcting for the server’s `lower_case_table_names` setting. Following up on issue #12901 and @b2e2e77. Signed-off-by: Mike Lewis --- libraries/operations.lib.php | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/libraries/operations.lib.php b/libraries/operations.lib.php index 733deb7383..efdf6c1cab 100644 --- a/libraries/operations.lib.php +++ b/libraries/operations.lib.php @@ -2083,8 +2083,15 @@ function PMA_moveOrCopyTable($db, $table) $old = Util::backquote($db) . '.' . Util::backquote($table); $message->addParam($old); + + + $new_name = $_REQUEST['new_name']; + if ($GLOBALS['dbi']->getLowerCaseNames() === '1') { + $new_name = strtolower($new_name); + } + $new = Util::backquote($_REQUEST['target_db']) . '.' - . Util::backquote($_REQUEST['new_name']); + . Util::backquote($new_name); $message->addParam($new); /* Check: Work on new table or on old table? */