diff --git a/ChangeLog b/ChangeLog index db3177b1b..19f346515 100644 --- a/ChangeLog +++ b/ChangeLog @@ -12,6 +12,7 @@ $HeadURL: https://phpmyadmin.svn.sourceforge.net/svnroot/phpmyadmin/trunk/phpMyA thanks to Martin Stricker - martinstricker - bug #2186823 [core] bad session.save_path not detected - bug #2202709 [core] Re-login causes PMA to forget current table name +- bug #2280904 [export] do not include view name in export 3.1.0.0 (not yet released) + [auth] Support for Swekey hardware authentication, diff --git a/libraries/export/sql.php b/libraries/export/sql.php index 78597fccf..08f9a1c47 100644 --- a/libraries/export/sql.php +++ b/libraries/export/sql.php @@ -519,7 +519,12 @@ function PMA_getTableDef($db, $table, $crlf, $error_url, $show_dates = false, $a // Note: SHOW CREATE TABLE, at least in MySQL 5.1.23, does not // produce a displayable result for the default value of a BIT // field, nor does the mysqldump command. See MySQL bug 35796 - $result = PMA_DBI_try_query('SHOW CREATE TABLE ' . PMA_backquote($db) . '.' . PMA_backquote($table)); + /* + * We have to select database and not use database name in SHOW CREATE, + * otherwise CREATE statement can include database name. + */ + PMA_DBI_select_db($db); + $result = PMA_DBI_try_query('SHOW CREATE TABLE ' . PMA_backquote($table)); // an error can happen, for example the table is crashed $tmp_error = PMA_DBI_getError(); if ($tmp_error) {