The branch, master has been updated via 54a37aee2d93f72513a6ac9d07b8afd14d66d6dd (commit) from 51684a83627eb9675c7185db938a468a94b8657f (commit)
- Log ----------------------------------------------------------------- commit 54a37aee2d93f72513a6ac9d07b8afd14d66d6dd Author: Marc Delisle marc@infomarc.info Date: Tue Jan 11 07:48:12 2011 -0500
Tab characters should be 4 spaces
-----------------------------------------------------------------------
Summary of changes: db_operations.php | 72 ++++++++++++++++++++++++++-------------------------- 1 files changed, 36 insertions(+), 36 deletions(-)
diff --git a/db_operations.php b/db_operations.php index c9aa565..36b479c 100644 --- a/db_operations.php +++ b/db_operations.php @@ -133,10 +133,10 @@ if (strlen($db) && (! empty($db_rename) || ! empty($db_copy))) { // the real views are created after the tables if (PMA_Table::isView($db, $each_table)) { $views[] = $each_table; - // Create stand-in definition to resolve view dependencies - $sql_view_standin = PMA_getTableDefStandIn($db, $each_table, "\n"); - PMA_DBI_query($sql_view_standin); - $GLOBALS['sql_query'] .= "\n" . $sql_view_standin . ';'; + // Create stand-in definition to resolve view dependencies + $sql_view_standin = PMA_getTableDefStandIn($db, $each_table, "\n"); + PMA_DBI_query($sql_view_standin); + $GLOBALS['sql_query'] .= "\n" . $sql_view_standin . ';'; continue; }
@@ -194,19 +194,19 @@ if (strlen($db) && (! empty($db_rename) || ! empty($db_copy))) {
// handle the views if (! $_error) { - // temporarily force to add DROP IF EXIST to CREATE VIEW query, - // to remove stand-in VIEW that was created earlier - $temp_drop_if_exists = $GLOBALS['drop_if_exists']; - $GLOBALS['drop_if_exists'] = 'true'; - - foreach ($views as $view) { - if (! PMA_Table::moveCopy($db, $view, $newname, $view, 'structure', $move, 'db_copy')) { - $_error = true; - break; - } - } - // restore previous value - $GLOBALS['drop_if_exists'] = $temp_drop_if_exists; + // temporarily force to add DROP IF EXIST to CREATE VIEW query, + // to remove stand-in VIEW that was created earlier + $temp_drop_if_exists = $GLOBALS['drop_if_exists']; + $GLOBALS['drop_if_exists'] = 'true'; + + foreach ($views as $view) { + if (! PMA_Table::moveCopy($db, $view, $newname, $view, 'structure', $move, 'db_copy')) { + $_error = true; + break; + } + } + // restore previous value + $GLOBALS['drop_if_exists'] = $temp_drop_if_exists; } unset($view, $views);
@@ -222,27 +222,27 @@ if (strlen($db) && (! empty($db_rename) || ! empty($db_copy))) { unset($GLOBALS['sql_constraints_query_full_db'], $one_query); }
- if (PMA_MYSQL_INT_VERSION >= 50100) { - // here DELIMITER is not used because it's not part of the - // language; each statement is sent one by one - - // to avoid selecting alternatively the current and new db - // we would need to modify the CREATE definitions to qualify - // the db name - $event_names = PMA_DBI_fetch_result('SELECT EVENT_NAME FROM information_schema.EVENTS WHERE EVENT_SCHEMA= '' . PMA_sqlAddslashes($db,true) . '';'); - if ($event_names) { - foreach($event_names as $event_name) { - PMA_DBI_select_db($db); - $tmp_query = PMA_DBI_get_definition($db, 'EVENT', $event_name); - // collect for later display - $GLOBALS['sql_query'] .= "\n" . $tmp_query; - PMA_DBI_select_db($newname); - PMA_DBI_query($tmp_query); - } - } - } - // go back to current db, just in case - PMA_DBI_select_db($db); + if (PMA_MYSQL_INT_VERSION >= 50100) { + // here DELIMITER is not used because it's not part of the + // language; each statement is sent one by one + + // to avoid selecting alternatively the current and new db + // we would need to modify the CREATE definitions to qualify + // the db name + $event_names = PMA_DBI_fetch_result('SELECT EVENT_NAME FROM information_schema.EVENTS WHERE EVENT_SCHEMA= '' . PMA_sqlAddslashes($db,true) . '';'); + if ($event_names) { + foreach($event_names as $event_name) { + PMA_DBI_select_db($db); + $tmp_query = PMA_DBI_get_definition($db, 'EVENT', $event_name); + // collect for later display + $GLOBALS['sql_query'] .= "\n" . $tmp_query; + PMA_DBI_select_db($newname); + PMA_DBI_query($tmp_query); + } + } + } + // go back to current db, just in case + PMA_DBI_select_db($db);
// Duplicate the bookmarks for this db (done once for each db) if (! $_error && $db != $newname) {
hooks/post-receive