From 364b26b0dd783cbcc2b1be2113d2cf8cfbde1931 Mon Sep 17 00:00:00 2001 From: Andrea Vallorani Date: Tue, 17 Mar 2015 18:15:13 +0100 Subject: [PATCH 1/2] Bug #4798 Missing column when exporting in sql (2) Export failure when the comments contains reserved keywords (KEY, CONSTRAINT) To resolve, I removed the SQL comment from the current line before checking the presence of reserved keywords. Signed-off-by: Andrea Vallorani --- libraries/plugins/export/ExportSql.class.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/libraries/plugins/export/ExportSql.class.php b/libraries/plugins/export/ExportSql.class.php index 9f1ebb72d970..fcdc52dd77ec 100644 --- a/libraries/plugins/export/ExportSql.class.php +++ b/libraries/plugins/export/ExportSql.class.php @@ -1435,9 +1435,10 @@ public function getTableDef( // lets find first line with constraints $first_occur = -1; for ($i = 0; $i < $sql_count; $i++) { + $sql_line = current(explode(' COMMENT ', $sql_lines[$i], 2)); if (preg_match( '@[\s]+(CONSTRAINT|KEY)@', - $sql_lines[$i] + $sql_line ) && $first_occur == -1) { $first_occur = $i; } From 4b8f3c9e615092ecc71310d1707e1b164ca8c26b Mon Sep 17 00:00:00 2001 From: Marc Delisle Date: Tue, 17 Mar 2015 16:01:37 -0400 Subject: [PATCH 2/2] ChangeLog entry Signed-off-by: Marc Delisle --- ChangeLog | 1 + 1 file changed, 1 insertion(+) diff --git a/ChangeLog b/ChangeLog index 59d7aa94a981..0af052663a62 100644 --- a/ChangeLog +++ b/ChangeLog @@ -4,6 +4,7 @@ phpMyAdmin - ChangeLog 4.3.13.0 (not yet released) - bug #4803 "Show hidden items" is sometimes hidden - bug #4807 Breaks when sorting by multiple columns while using UNION +- bug #4798 Missing column when exporting in sql 4.3.12.0 (2015-03-14) - bug #4746 Right-aligned columns have left-aligned header