diff --git a/libraries/plugins/export/ExportSql.class.php b/libraries/plugins/export/ExportSql.class.php index debdc10838..a5a61b27b5 100644 --- a/libraries/plugins/export/ExportSql.class.php +++ b/libraries/plugins/export/ExportSql.class.php @@ -1043,7 +1043,7 @@ class ExportSql extends ExportPlugin // with $GLOBALS['dbi']->numRows() in mysqli $result = $GLOBALS['dbi']->query( 'SHOW TABLE STATUS FROM ' . PMA_Util::backquote($db) - . ' LIKE \'' . PMA_Util::sqlAddSlashes($table, true) . '\'', + . ' WHERE Name = \'' . PMA_Util::sqlAddSlashes($table) . '\'', null, PMA_DatabaseInterface::QUERY_STORE ); diff --git a/test/classes/plugin/export/PMA_ExportSql_test.php b/test/classes/plugin/export/PMA_ExportSql_test.php index 69dcc69e12..df04242dc8 100644 --- a/test/classes/plugin/export/PMA_ExportSql_test.php +++ b/test/classes/plugin/export/PMA_ExportSql_test.php @@ -1178,7 +1178,7 @@ class PMA_ExportSql_Test extends PHPUnit_Framework_TestCase $dbi->expects($this->at(0)) ->method('query') ->with( - 'SHOW TABLE STATUS FROM `db` LIKE \'table\'', null, + 'SHOW TABLE STATUS FROM `db` WHERE Name = \'table\'', null, PMA_DatabaseInterface::QUERY_STORE ) ->will($this->returnValue('res')); @@ -1358,7 +1358,7 @@ class PMA_ExportSql_Test extends PHPUnit_Framework_TestCase $dbi->expects($this->at(0)) ->method('query') ->with( - 'SHOW TABLE STATUS FROM `db` LIKE \'table\'', null, + 'SHOW TABLE STATUS FROM `db` WHERE Name = \'table\'', null, PMA_DatabaseInterface::QUERY_STORE ) ->will($this->returnValue('res')); @@ -1483,7 +1483,7 @@ class PMA_ExportSql_Test extends PHPUnit_Framework_TestCase $dbi->expects($this->at(0)) ->method('query') ->with( - 'SHOW TABLE STATUS FROM `db` LIKE \'table\'', null, + 'SHOW TABLE STATUS FROM `db` WHERE Name = \'table\'', null, PMA_DatabaseInterface::QUERY_STORE ) ->will($this->returnValue('res'));