diff --git a/libraries/Table.class.php b/libraries/Table.class.php index 6ce4c6fe0a..6ed9afb344 100644 --- a/libraries/Table.class.php +++ b/libraries/Table.class.php @@ -1065,9 +1065,11 @@ class PMA_Table if (($what == 'data' || $what == 'dataonly') && ! PMA_Table::isView($target_db, $target_table) ) { - $sql_set_mode = "SET SQL_MODE='NO_AUTO_VALUE_ON_ZERO'"; - $GLOBALS['dbi']->query($sql_set_mode); - $GLOBALS['sql_query'] .= "\n\n" . $sql_set_mode . ';'; + if (! PMA_DRIZZLE) { + $sql_set_mode = "SET SQL_MODE='NO_AUTO_VALUE_ON_ZERO'"; + $GLOBALS['dbi']->query($sql_set_mode); + $GLOBALS['sql_query'] .= "\n\n" . $sql_set_mode . ';'; + } $sql_insert_data = 'INSERT INTO ' . $target . ' SELECT * FROM ' . $source; diff --git a/libraries/operations.lib.php b/libraries/operations.lib.php index 220fe42477..40b38a17a9 100644 --- a/libraries/operations.lib.php +++ b/libraries/operations.lib.php @@ -336,8 +336,10 @@ function PMA_createDbBeforeCopy() // Set the SQL mode to NO_AUTO_VALUE_ON_ZERO to prevent MySQL from creating // export statements it cannot import - $sql_set_mode = "SET SQL_MODE='NO_AUTO_VALUE_ON_ZERO'"; - $GLOBALS['dbi']->query($sql_set_mode); + if (! PMA_DRIZZLE) { + $sql_set_mode = "SET SQL_MODE='NO_AUTO_VALUE_ON_ZERO'"; + $GLOBALS['dbi']->query($sql_set_mode); + } // rebuild the database list because PMA_Table::moveCopy // checks in this list if the target db exists