From 5681db5084ac785a2304c8028baea3cabcb73c76 Mon Sep 17 00:00:00 2001 From: Smita Kumari Date: Thu, 14 Aug 2014 20:55:02 +0530 Subject: [PATCH] fix bug #4516 Signed-off-by: Smita Kumari --- libraries/plugins/export/ExportSql.class.php | 2 +- test/classes/plugin/export/PMA_ExportSql_test.php | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) 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'));