{"action":"created","issue":{"url":"https://api.github.com/repos/phpmyadmin/phpmyadmin/issues/13178","repository_url":"https://api.github.com/repos/phpmyadmin/phpmyadmin","labels_url":"https://api.github.com/repos/phpmyadmin/phpmyadmin/issues/13178/labels{/name}","comments_url":"https://api.github.com/repos/phpmyadmin/phpmyadmin/issues/13178/comments","events_url":"https://api.github.com/repos/phpmyadmin/phpmyadmin/issues/13178/events","html_url":"https://github.com/phpmyadmin/phpmyadmin/issues/13178","id":220753020,"number":13178,"title":"Issues with uppercase table and database names","user":{"login":"stevenwdv","id":27223270,"avatar_url":"https://avatars1.githubusercontent.com/u/27223270?v=4","gravatar_id":"","url":"https://api.github.com/users/stevenwdv","html_url":"https://github.com/stevenwdv","followers_url":"https://api.github.com/users/stevenwdv/followers","following_url":"https://api.github.com/users/stevenwdv/following{/other_user}","gists_url":"https://api.github.com/users/stevenwdv/gists{/gist_id}","starred_url":"https://api.github.com/users/stevenwdv/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/stevenwdv/subscriptions","organizations_url":"https://api.github.com/users/stevenwdv/orgs","repos_url":"https://api.github.com/users/stevenwdv/repos","events_url":"https://api.github.com/users/stevenwdv/events{/privacy}","received_events_url":"https://api.github.com/users/stevenwdv/received_events","type":"User","site_admin":false},"labels":[{"id":238295702,"url":"https://api.github.com/repos/phpmyadmin/phpmyadmin/labels/bug","name":"bug","color":"fc2929","default":true}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2017-04-10T19:57:44Z","updated_at":"2017-07-26T11:11:48Z","closed_at":null,"body":"### Steps to reproduce\r\nSet `lower_case_table_names = 1` in `my.ini`\r\n\r\n#### Option 1:\r\n1. Create a database `UPPERCASE`\r\n2. Create a new table `test` in the database\r\n3. PHPMyAdmin tries to load database `UPPERCASE` instead of `uppercase` (`lower_case_table_names = 1`); you are 'redirected' to something like `db_structure.php?server=1&db=UPPERCASE&table=test`. This does not happen when using the navigation panel afterwards (which displays lowercase names)\r\n4. The following error messages appear:\r\n```\r\nWarning in .\\libraries\\controllers\\table\\TableStructureController.php#1299\r\n Illegal string offset 'Data_length'\r\n\r\nBacktrace\r\n\r\n.\\libraries\\controllers\\table\\TableStructureController.php#1255: PMA\\libraries\\controllers\\table\\TableStructureController->getTableStats()\r\n.\\libraries\\controllers\\table\\TableStructureController.php#353: PMA\\libraries\\controllers\\table\\TableStructureController->displayStructure(\r\narray,\r\narray,\r\narray,\r\nboolean false,\r\narray,\r\narray,\r\n)\r\n.\\tbl_structure.php#47: PMA\\libraries\\controllers\\table\\TableStructureController->indexAction()\r\n```\r\n```\r\nWarning in .\\libraries\\controllers\\table\\TableStructureController.php#1302\r\n Illegal string offset 'Index_length'\r\n\r\nBacktrace\r\n\r\n.\\libraries\\controllers\\table\\TableStructureController.php#1255: PMA\\libraries\\controllers\\table\\TableStructureController->getTableStats()\r\n.\\libraries\\controllers\\table\\TableStructureController.php#353: PMA\\libraries\\controllers\\table\\TableStructureController->displayStructure(\r\narray,\r\narray,\r\narray,\r\nboolean false,\r\narray,\r\narray,\r\n)\r\n.\\tbl_structure.php#47: PMA\\libraries\\controllers\\table\\TableStructureController->indexAction()\r\n```\r\n```\r\nWarning in .\\libraries\\controllers\\table\\TableStructureController.php#1314\r\n Illegal string offset 'Data_length'\r\n\r\nBacktrace\r\n\r\n.\\libraries\\controllers\\table\\TableStructureController.php#1255: PMA\\libraries\\controllers\\table\\TableStructureController->getTableStats()\r\n.\\libraries\\controllers\\table\\TableStructureController.php#353: PMA\\libraries\\controllers\\table\\TableStructureController->displayStructure(\r\narray,\r\narray,\r\narray,\r\nboolean false,\r\narray,\r\narray,\r\n)\r\n.\\tbl_structure.php#47: PMA\\libraries\\controllers\\table\\TableStructureController->indexAction()\r\n```\r\n```\r\nWarning in .\\libraries\\controllers\\table\\TableStructureController.php#1318\r\n Illegal string offset 'Index_length'\r\n\r\nBacktrace\r\n\r\n.\\libraries\\controllers\\table\\TableStructureController.php#1255: PMA\\libraries\\controllers\\table\\TableStructureController->getTableStats()\r\n.\\libraries\\controllers\\table\\TableStructureController.php#353: PMA\\libraries\\controllers\\table\\TableStructureController->displayStructure(\r\narray,\r\narray,\r\narray,\r\nboolean false,\r\narray,\r\narray,\r\n)\r\n.\\tbl_structure.php#47: PMA\\libraries\\controllers\\table\\TableStructureController->indexAction()\r\n```\r\n```\r\nWarning in .\\libraries\\controllers\\table\\TableStructureController.php#1336\r\n Illegal string offset 'Data_length'\r\n\r\nBacktrace\r\n\r\n.\\libraries\\controllers\\table\\TableStructureController.php#1255: PMA\\libraries\\controllers\\table\\TableStructureController->getTableStats()\r\n.\\libraries\\controllers\\table\\TableStructureController.php#353: PMA\\libraries\\controllers\\table\\TableStructureController->displayStructure(\r\narray,\r\narray,\r\narray,\r\nboolean false,\r\narray,\r\narray,\r\n)\r\n.\\tbl_structure.php#47: PMA\\libraries\\controllers\\table\\TableStructureController->indexAction()\r\n```\r\n```\r\nWarning in .\\libraries\\controllers\\table\\TableStructureController.php#1337\r\n Illegal string offset 'Index_length'\r\n\r\nBacktrace\r\n\r\n.\\libraries\\controllers\\table\\TableStructureController.php#1255: PMA\\libraries\\controllers\\table\\TableStructureController->getTableStats()\r\n.\\libraries\\controllers\\table\\TableStructureController.php#353: PMA\\libraries\\controllers\\table\\TableStructureController->displayStructure(\r\narray,\r\narray,\r\narray,\r\nboolean false,\r\narray,\r\narray,\r\n)\r\n.\\tbl_structure.php#47: PMA\\libraries\\controllers\\table\\TableStructureController->indexAction()\r\n```\r\n```\r\nWarning in .\\libraries\\controllers\\table\\TableStructureController.php#1342\r\n Illegal string offset 'Data_length'\r\n\r\nBacktrace\r\n\r\n.\\libraries\\controllers\\table\\TableStructureController.php#1255: PMA\\libraries\\controllers\\table\\TableStructureController->getTableStats()\r\n.\\libraries\\controllers\\table\\TableStructureController.php#353: PMA\\libraries\\controllers\\table\\TableStructureController->displayStructure(\r\narray,\r\narray,\r\narray,\r\nboolean false,\r\narray,\r\narray,\r\n)\r\n.\\tbl_structure.php#47: PMA\\libraries\\controllers\\table\\TableStructureController->indexAction()\r\n```\r\n```\r\nWarning in .\\libraries\\controllers\\table\\TableStructureController.php#1342\r\n Illegal string offset 'Index_length'\r\n\r\nBacktrace\r\n\r\n.\\libraries\\controllers\\table\\TableStructureController.php#1255: PMA\\libraries\\controllers\\table\\TableStructureController->getTableStats()\r\n.\\libraries\\controllers\\table\\TableStructureController.php#353: PMA\\libraries\\controllers\\table\\TableStructureController->displayStructure(\r\narray,\r\narray,\r\narray,\r\nboolean false,\r\narray,\r\narray,\r\n)\r\n.\\tbl_structure.php#47: PMA\\libraries\\controllers\\table\\TableStructureController->indexAction()\r\n```\r\n```\r\nWarning in .\\templates\\table\\structure\\display_table_stats.phtml#4\r\n Illegal string offset 'TABLE_COMMENT'\r\n\r\nBacktrace\r\n\r\n.\\libraries\\Template.php#152: include(.\\templates\\table\\structure\\display_table_stats.phtml)\r\n.\\libraries\\controllers\\table\\TableStructureController.php#1379: PMA\\libraries\\Template->render(array)\r\n.\\libraries\\controllers\\table\\TableStructureController.php#1255: PMA\\libraries\\controllers\\table\\TableStructureController->getTableStats()\r\n.\\libraries\\controllers\\table\\TableStructureController.php#353: PMA\\libraries\\controllers\\table\\TableStructureController->displayStructure(\r\narray,\r\narray,\r\narray,\r\nboolean false,\r\narray,\r\narray,\r\n)\r\n.\\tbl_structure.php#47: PMA\\libraries\\controllers\\table\\TableStructureController->indexAction()\r\n```\r\n```\r\nWarning in .\\templates\\table\\structure\\display_table_stats.phtml#6\r\n Illegal string offset 'TABLE_COMMENT'\r\n\r\nBacktrace\r\n\r\n.\\libraries\\Template.php#152: include(.\\templates\\table\\structure\\display_table_stats.phtml)\r\n.\\libraries\\controllers\\table\\TableStructureController.php#1379: PMA\\libraries\\Template->render(array)\r\n.\\libraries\\controllers\\table\\TableStructureController.php#1255: PMA\\libraries\\controllers\\table\\TableStructureController->getTableStats()\r\n.\\libraries\\controllers\\table\\TableStructureController.php#353: PMA\\libraries\\controllers\\table\\TableStructureController->displayStructure(\r\narray,\r\narray,\r\narray,\r\nboolean false,\r\narray,\r\narray,\r\n)\r\n.\\tbl_structure.php#47: PMA\\libraries\\controllers\\table\\TableStructureController->indexAction()\r\n```\r\n\r\n#### Option 2:\r\n1. Create a database `lowercase`\r\n2. Create a table `TEST`\r\n3. PHPMyAdmin again tries to load `TEST` instead of `test`\r\n4. The same error messages appear\r\n\r\n#### Additional info\r\nPHPMyAdmin also throws an error when loading the structure of a table in an uppercase database or the structure of an uppercase table in an uppercase/lowercase database which was created with `lower_case_table_names = 2` (so the table/database has an **actual** uppercase name).\r\n\r\nE.g. there is a database called `UPPERCASE` with a table `test`, then `tbl_structure.php?db=UPPERCASE&table=test` throws an error.\r\n\r\nThis *only* and always happens hen loading up the table with `lower_case_table_names = 1`\r\n\r\nHowever, `INFORMATION_SCHEMA` does *not* seem to be affected by this.\r\n\r\nThis also happens when trying to load table `test` while it's actually called `TEST` if `lower_case_table_names = 1`.\r\n\r\nI couldn't test with `lower_case_table_names = 0`, because MariaDB does not support this on Windows.\r\n\r\n### Expected behavior\r\n1. PHPMyAdmin should use a lowercase name when loading a table after creating, because `lower_case_table_names = 1`\r\n2. No error messages should appear *anyway*, even when the URL contains an uppercase name (I use collation `utf8mb4_general_ci`). Especially not if the name *actually* contains uppercase characters.\r\n\r\n### Actual behavior\r\n1. Names are not corrected\r\n2. Error messages appear when loading uppercase tables/databases (table structure) with `lower_case_table_names = 1` set\r\n\r\n### Summary of error messages:\r\n1. Set `lower_case_table_names = 2`\r\n2. Create an uppercase table `TEST` in database `lowercase`\r\n\r\n`lower_case_table_names`-->|`1`|`2`\r\n---|---|---\r\n`tbl_structure.php?db=lowercase&table=test`|Error in Microsoft Edge (redirects to `TEST`), Works in Firefox|**Error!**\r\n`tbl_structure.php?db=lowercase&table=TEST`|**Error!**|Works\r\n\r\n\r\n### Server configuration\r\n**Operating system**: Windows 10 x64\r\n\r\n**Web server:** Apache 2.4.25 x86\r\n\r\n**Database:** MariaDB 10.2.5 RC x64\r\n\r\n**PHP version:** 7.1.1 x86\r\n\r\n**phpMyAdmin version:** 4.7.0\r\n\r\n### Client configuration\r\n**Browser:** Microsoft Edge 14, Mozilla Firefox 52.0.2\r\n\r\n**Operating system:** Windows 10 x64"},"comment":{"url":"https://api.github.com/repos/phpmyadmin/phpmyadmin/issues/comments/318023230","html_url":"https://github.com/phpmyadmin/phpmyadmin/issues/13178#issuecomment-318023230","issue_url":"https://api.github.com/repos/phpmyadmin/phpmyadmin/issues/13178","id":318023230,"user":{"login":"pashaaa","id":3613259,"avatar_url":"https://avatars2.githubusercontent.com/u/3613259?v=4","gravatar_id":"","url":"https://api.github.com/users/pashaaa","html_url":"https://github.com/pashaaa","followers_url":"https://api.github.com/users/pashaaa/followers","following_url":"https://api.github.com/users/pashaaa/following{/other_user}","gists_url":"https://api.github.com/users/pashaaa/gists{/gist_id}","starred_url":"https://api.github.com/users/pashaaa/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pashaaa/subscriptions","organizations_url":"https://api.github.com/users/pashaaa/orgs","repos_url":"https://api.github.com/users/pashaaa/repos","events_url":"https://api.github.com/users/pashaaa/events{/privacy}","received_events_url":"https://api.github.com/users/pashaaa/received_events","type":"User","site_admin":false},"created_at":"2017-07-26T11:11:48Z","updated_at":"2017-07-26T11:11:48Z","body":"after click on structure,(table and db is lower case)\r\n\r\n\r\n    Server: localhost via TCP/IP\r\n    Server type: MariaDB\r\n    Server version: 10.1.21-MariaDB - mariadb.org binary distribution\r\n    Protocol version: 10\r\n    User: root@localhost\r\n    Server charset: UTF-8 Unicode (utf8)\r\n\r\nWeb server\r\n\r\n    Apache/2.4.25 (Win32) OpenSSL/1.0.2j PHP/7.1.1\r\n    Database client version: libmysql - mysqlnd 5.0.12-dev - 20150407 - $Id: b396954eeb2d1d9ed7902b8bae237b287f21ad9e $\r\n    PHP extension: mysqliDocumentation curlDocumentation mbstringDocumentation\r\n    PHP version: 7.1.1\r\n\r\n\r\n\r\n\r\n```\r\nWarning in .\\libraries\\controllers\\table\\TableStructureController.php#1299\r\nIllegal string offset 'Data_length'\r\n\r\nBacktrace\r\n\r\n.\\libraries\\controllers\\table\\TableStructureController.php#1255: PMA\\libraries\\controllers\\table\\TableStructureController->getTableStats()\r\n.\\libraries\\controllers\\table\\TableStructureController.php#353: PMA\\libraries\\controllers\\table\\TableStructureController->displayStructure(\r\narray,\r\narray,\r\narray,\r\n,\r\narray,\r\narray,\r\n)\r\n.\\tbl_structure.php#47: PMA\\libraries\\controllers\\table\\TableStructureController->indexAction()\r\n```\r\n\r\n```\r\nWarning in .\\templates\\table\\structure\\display_table_stats.phtml#6\r\nIllegal string offset 'TABLE_COMMENT'\r\n\r\nBacktrace\r\n\r\n.\\libraries\\Template.php#152: include(.\\templates\\table\\structure\\display_table_stats.phtml)\r\n.\\libraries\\controllers\\table\\TableStructureController.php#1379: PMA\\libraries\\Template->render(array)\r\n.\\libraries\\controllers\\table\\TableStructureController.php#1255: PMA\\libraries\\controllers\\table\\TableStructureController->getTableStats()\r\n.\\libraries\\controllers\\table\\TableStructureController.php#353: PMA\\libraries\\controllers\\table\\TableStructureController->displayStructure(\r\narray,\r\narray,\r\narray,\r\n,\r\narray,\r\narray,\r\n)\r\n.\\tbl_structure.php#47: PMA\\libraries\\controllers\\table\\TableStructureController->indexAction()\r\n\r\n```"}}
{"actor":{"display_login":"pashaaa"}}