diff --git a/ChangeLog b/ChangeLog index d1ba2716d63d..5251e8e148f8 100644 --- a/ChangeLog +++ b/ChangeLog @@ -68,6 +68,7 @@ explanation 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 diff --git a/libraries/plugins/export/ExportSql.class.php b/libraries/plugins/export/ExportSql.class.php index fcd89ac6f57c..91227abcd8d5 100644 --- a/libraries/plugins/export/ExportSql.class.php +++ b/libraries/plugins/export/ExportSql.class.php @@ -1374,9 +1374,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; }