Merge remote-tracking branch 'origin/QA_4_4' into QA_4_4

This commit is contained in:
Weblate 2015-07-10 08:56:03 +02:00
commit 64f19d56ba
2 changed files with 9 additions and 5 deletions

View File

@ -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;

View File

@ -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