From f0f97fefc6b64fde1c793c6f85eaab7de5fbcf4c Mon Sep 17 00:00:00 2001 From: Marc Delisle Date: Thu, 30 Aug 2007 16:35:47 +0000 Subject: [PATCH] bug #1783667 NO_AUTO_VALUE_ON_ZERO and MySQL version --- ChangeLog | 4 ++++ libraries/export/sql.php | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index 23ab760f1..6c0ecc971 100644 --- a/ChangeLog +++ b/ChangeLog @@ -5,6 +5,10 @@ phpMyAdmin - ChangeLog $Id$ $HeadURL: https://phpmyadmin.svn.sourceforge.net/svnroot/phpmyadmin/trunk/phpMyAdmin/ChangeLog $ +2.11.1.0 (not yet released) + +- bug #1783667 [export] NO_AUTO_VALUE_ON_ZERO and MySQL version + 2.11.0.0 (2007-08-21) + [import] support handling of DELIMITER to mimic mysql CLI, thanks to fb1 diff --git a/libraries/export/sql.php b/libraries/export/sql.php index 2161c10fc..ab87ee10f 100644 --- a/libraries/export/sql.php +++ b/libraries/export/sql.php @@ -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'])) {