rfe #1778337 [core] Try moving tables by RENAME and fail to CREATE/INSERT if that fails.
This commit is contained in:
@@ -17,6 +17,7 @@ $HeadURL: https://phpmyadmin.svn.sourceforge.net/svnroot/phpmyadmin/trunk/phpMyA
|
||||
+ [core] Remove config data from session as it brings chicken-egg problem.
|
||||
+ [core] Cookie path now honors PmaAbsoluteUri.
|
||||
+ rfe #2393597 [core] phpMyAdmin honors https in PmaAbsoluteUri.
|
||||
+ rfe #1778337 [core] Try moving tables by RENAME and fail to CREATE/INSERT if that fails.
|
||||
|
||||
3.3.0.0 (not yet released)
|
||||
+ rfe #2308632 [edit] Use hex for (var)binary fields,
|
||||
|
@@ -565,12 +565,6 @@ class PMA_Table
|
||||
|
||||
/**
|
||||
* Copies or renames table
|
||||
* @todo use RENAME for move operations
|
||||
* - would work only if the databases are on the same filesystem,
|
||||
* how can we check that? try the operation and
|
||||
* catch an error?
|
||||
* - for views, only if MYSQL > 50013
|
||||
* - still have to handle pmadb synch.
|
||||
*
|
||||
* @author Michal Cihar <michal@cihar.com>
|
||||
*/
|
||||
@@ -578,6 +572,16 @@ class PMA_Table
|
||||
{
|
||||
global $err_url;
|
||||
|
||||
/* Try moving table directly */
|
||||
if ($move && $what == 'data') {
|
||||
$tbl = new PMA_Table($source_table, $source_db);
|
||||
$result = $tbl->rename($target_table, $target_db, PMA_Table::isView($source_db, $source_table));
|
||||
if ($result) {
|
||||
$GLOBALS['message'] = $tbl->getLastMessage();
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
// set export settings we need
|
||||
$GLOBALS['sql_backquotes'] = 1;
|
||||
$GLOBALS['asfile'] = 1;
|
||||
|
Reference in New Issue
Block a user