diff --git a/ChangeLog b/ChangeLog index dc9e8f424..8062bd856 100644 --- a/ChangeLog +++ b/ChangeLog @@ -55,6 +55,8 @@ $HeadURL: https://phpmyadmin.svn.sourceforge.net/svnroot/phpmyadmin/trunk/phpMyA - bug #2953050 [export] export VIEW as SQL includes INSERT statement - bug #2942032 [core] Cannot detect PmaAbsoluteUri correctly on Windows - bug #2961609 [auth] Potential information disclosure at login page +- patch #2961540 [export] Do not export data of MERGE table, + thanks to Dieter Adriaenssens - ruleant 3.3.0.0 (not yet released) + rfe #2308632 [edit] Use hex for (var)binary fields, diff --git a/export.php b/export.php index 5c958b712..5e09a8de1 100644 --- a/export.php +++ b/export.php @@ -438,7 +438,8 @@ if ($export_type == 'server') { break 3; } } - if (isset($GLOBALS[$what . '_data']) && ! $is_view) { + // if this is a view or a merge table, don't export data + if (isset($GLOBALS[$what . '_data']) && !($is_view || (strcasecmp(PMA_Table::sGetStatusInfo($current_db, $table, 'Engine'),'MRG_MYISAM') == 0))) { $local_query = 'SELECT * FROM ' . PMA_backquote($current_db) . '.' . PMA_backquote($table); if (!PMA_exportData($current_db, $table, $crlf, $err_url, $local_query)) { break 3; @@ -486,7 +487,8 @@ if ($export_type == 'server') { break 2; } } - if (isset($GLOBALS[$what . '_data']) && ! $is_view) { + // if this is a view or a merge table, don't export data + if (isset($GLOBALS[$what . '_data']) && !($is_view || (strcasecmp(PMA_Table::sGetStatusInfo($db, $table, 'Engine'),'MRG_MYISAM') == 0))) { $local_query = 'SELECT * FROM ' . PMA_backquote($db) . '.' . PMA_backquote($table); if (!PMA_exportData($db, $table, $crlf, $err_url, $local_query)) { break 2; @@ -534,7 +536,9 @@ if ($export_type == 'server') { } // If this is an export of a single view, we have to export data; // for example, a PDF report - if (isset($GLOBALS[$what . '_data'])) { + // if it is a merge table, no data is exported + $is_merge = ! PMA_Table::isView($db, $table) && (strcasecmp(PMA_Table::sGetStatusInfo($db, $table, 'Engine'),'MRG_MYISAM') == 0); + if (isset($GLOBALS[$what . '_data']) && ! $is_merge) { if (!empty($sql_query)) { // only preg_replace if needed if (!empty($add_query)) { diff --git a/libraries/display_export.lib.php b/libraries/display_export.lib.php index 44c6cbbc1..a6809955d 100644 --- a/libraries/display_export.lib.php +++ b/libraries/display_export.lib.php @@ -104,7 +104,10 @@ echo PMA_pluginGetJavascript($export_list); //]]> - +
';