Disable auto increment in copy table (bug #3363142)
This commit is contained in:
parent
5fa9f84de0
commit
6027d181a4
|
@ -667,6 +667,7 @@ if (!defined("DRIVER")) {
|
||||||
* @return bool
|
* @return bool
|
||||||
*/
|
*/
|
||||||
function copy_tables($tables, $views, $target) {
|
function copy_tables($tables, $views, $target) {
|
||||||
|
queries("SET sql_mode = 'NO_AUTO_VALUE_ON_ZERO'");
|
||||||
foreach ($tables as $table) {
|
foreach ($tables as $table) {
|
||||||
$name = ($target == DB ? table("copy_$table") : idf_escape($target) . "." . table($table));
|
$name = ($target == DB ? table("copy_$table") : idf_escape($target) . "." . table($table));
|
||||||
if (!queries("DROP TABLE IF EXISTS $name")
|
if (!queries("DROP TABLE IF EXISTS $name")
|
||||||
|
|
Loading…
Reference in a new issue