Keep 0 in exported auto_increment fields (bug #1440544).

This commit is contained in:
Michal Čihař
2006-10-18 14:39:49 +00:00
parent 8de3d47aa0
commit 0bca319d18
2 changed files with 10 additions and 1 deletions

View File

@@ -19,6 +19,8 @@ $HeadURL$
themes/original/css/theme_right.css.php,
libraries/sql_query_form.lib.php: Let's again obey TextareaRows (bug
#1465906).
* libraries/export/sql.php: Keep 0 in exported auto_increment fields (bug
#1440544).
2006-10-17 Marc Delisle <lem9@users.sourceforge.net>
* export.php: export nothing if no tables are selected

View File

@@ -203,11 +203,18 @@ function PMA_exportHeader()
$head .= $crlf . 'SET FOREIGN_KEY_CHECKS=0;' . $crlf;
}
/* We want exported AUTO_INCREMENT fields to have still same value, do this only for recent MySQL exports */
if (!isset($GLOBALS['sql_compatibility']) || $GLOBALS['sql_compatibility'] == 'NONE') {
$head .= $crlf . 'SET SQL_MODE="NO_AUTO_VALUE_ON_ZERO";' . $crlf;
}
if (isset($GLOBALS['sql_use_transaction'])) {
$head .= $crlf .'SET AUTOCOMMIT=0;' . $crlf
. 'START TRANSACTION;' . $crlf . $crlf;
. 'START TRANSACTION;' . $crlf;
}
$head .= $crlf;
return PMA_exportOutputHandler($head);
}