From 6027d181a4b6db0d90ee5112d2f9be98e397bcd1 Mon Sep 17 00:00:00 2001 From: Jakub Vrana Date: Tue, 12 Jul 2011 15:14:15 +0200 Subject: [PATCH] Disable auto increment in copy table (bug #3363142) --- adminer/drivers/mysql.inc.php | 1 + 1 file changed, 1 insertion(+) diff --git a/adminer/drivers/mysql.inc.php b/adminer/drivers/mysql.inc.php index df617f0f..962346d4 100644 --- a/adminer/drivers/mysql.inc.php +++ b/adminer/drivers/mysql.inc.php @@ -667,6 +667,7 @@ if (!defined("DRIVER")) { * @return bool */ function copy_tables($tables, $views, $target) { + queries("SET sql_mode = 'NO_AUTO_VALUE_ON_ZERO'"); foreach ($tables as $table) { $name = ($target == DB ? table("copy_$table") : idf_escape($target) . "." . table($table)); if (!queries("DROP TABLE IF EXISTS $name")