patch #3458944 copy table data missing SET SQL_MODE='NO_AUTO_VALUE_ON_ZERO'

This commit is contained in:
Glenn
2011-12-29 09:37:43 -05:00
committed by Marc Delisle
parent f7a9d2a36a
commit 8697ec3d48
2 changed files with 5 additions and 0 deletions

View File

@@ -775,6 +775,10 @@ class PMA_Table
// Copy the data unless this is a VIEW
if (($what == 'data' || $what == 'dataonly') && ! PMA_Table::_isView($target_db,$target_table)) {
$sql_set_mode = "SET SQL_MODE='NO_AUTO_VALUE_ON_ZERO'";
PMA_DBI_query($sql_set_mode);
$GLOBALS['sql_query'] .= "\n\n" . $sql_set_mode . ';';
$sql_insert_data =
'INSERT INTO ' . $target . ' SELECT * FROM ' . $source;
PMA_DBI_query($sql_insert_data);