You've already forked phpmyadmin
mirror of
https://github.com/phpmyadmin/phpmyadmin.git
synced 2026-10-28 07:41:55 +03:00
Added SQL_MODE for copy and move operations to prevent import errors
This commit is contained in:
@@ -377,6 +377,11 @@ function PMA_getSqlQueryAndCreateDbBeforeCopy()
|
||||
$GLOBALS['dbi']->query($local_query);
|
||||
$GLOBALS['db'] = $original_db;
|
||||
|
||||
// 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'";
|
||||
PMA_DBI_query($sql_set_mode);
|
||||
|
||||
// rebuild the database list because PMA_Table::moveCopy
|
||||
// checks in this list if the target db exists
|
||||
$GLOBALS['pma']->databases->build();
|
||||
|
||||
Reference in New Issue
Block a user