]> git.joonet.de Git - adminer.git/commitdiff
Disable auto increment in copy table (bug #3363142)
authorJakub Vrana <jakub@vrana.cz>
Tue, 12 Jul 2011 13:14:15 +0000 (15:14 +0200)
committerJakub Vrana <jakub@vrana.cz>
Tue, 12 Jul 2011 13:14:15 +0000 (15:14 +0200)
adminer/drivers/mysql.inc.php

index df617f0fbbfca8c68d8aa9a3c6dfa19f7248428d..962346d4c6ea077475e976344e1eceabd21e8f74 100644 (file)
@@ -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")