bug #1783667 NO_AUTO_VALUE_ON_ZERO and MySQL version

This commit is contained in:
Marc Delisle
2007-08-30 16:35:47 +00:00
parent 445e24b83d
commit 470cdda266
2 changed files with 5 additions and 1 deletions

View File

@@ -219,7 +219,7 @@ function PMA_exportHeader()
/* 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;
$head .= $crlf . (PMA_MYSQL_INT_VERSION >= 40101 ? 'SET SQL_MODE="NO_AUTO_VALUE_ON_ZERO";' . $crlf : '');
}
if (isset($GLOBALS['sql_use_transaction'])) {