From 74fe4a0e13185cc376a45912ac25829816ca3005 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Michal=20=C4=8Ciha=C5=99?= Date: Fri, 28 Nov 2008 12:28:49 +0000 Subject: [PATCH] bug #2280904 [export] do not include view name in export --- ChangeLog | 1 + libraries/export/sql.php | 7 ++++++- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index db3177b1b2..19f3465158 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 78597fccf6..08f9a1c472 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) { -- 2.11.4.GIT