Merge pull request #1775 from devenbansod/bug4975
Bug#4975-Some Tbl/Db operations don't work on Drizzle
This commit is contained in:
commit
06db60da7d
@ -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;
|
||||
|
||||
@ -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
|
||||
|
||||
Loading…
Reference in New Issue
Block a user