The branch, master has been updated via 57c5abf579d7ee37eeea5c44c2c62360bd5fe529 (commit) via 8277c92e25ce1001c6b0479e91698bcf5c02c618 (commit) via 5f4604c9bb4de2cdc2bf6b61f0ac55c898dd964e (commit) from d9d5abee089ee2570220a04a0aa8e664ab4334dd (commit)
- Log ----------------------------------------------------------------- commit 57c5abf579d7ee37eeea5c44c2c62360bd5fe529 Merge: d9d5abee089ee2570220a04a0aa8e664ab4334dd 8277c92e25ce1001c6b0479e91698bcf5c02c618 Author: Dieter Adriaenssens ruleant@users.sourceforge.net Date: Sun Nov 14 18:28:10 2010 +0100
Merge branch 'QA_3_3'
-----------------------------------------------------------------------
Summary of changes: ChangeLog | 2 ++ db_operations.php | 22 ++++++++++++++++++++++ libraries/js_escape.lib.php | 1 + 3 files changed, 25 insertions(+), 0 deletions(-)
diff --git a/ChangeLog b/ChangeLog index c5e8414..d3bd70e 100644 --- a/ChangeLog +++ b/ChangeLog @@ -122,6 +122,8 @@ 3.3.9.0 (not yet released) - bug [doc] Fix references to MySQL doc - patch #3101490 Default function for TIMESTAMP, thanks to jirand - jirand +- bug #3103853 [js] Double quotes were not escaped in generated js +- bug #3077463 [core] Events were not copied when copying/renaming database
3.3.8.0 (2010-10-25) - bug #3059311 [import] BIGINT field type added to table analysis diff --git a/db_operations.php b/db_operations.php index 288de7b..b5d7f5a 100644 --- a/db_operations.php +++ b/db_operations.php @@ -215,6 +215,28 @@ 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); + // Duplicate the bookmarks for this db (done once for each db) if (! $_error && $db != $newname) { $get_fields = array('user', 'label', 'query'); diff --git a/libraries/js_escape.lib.php b/libraries/js_escape.lib.php index 5ddb604..0773eec 100644 --- a/libraries/js_escape.lib.php +++ b/libraries/js_escape.lib.php @@ -59,6 +59,7 @@ function PMA_escapeJsString($string) "\000" => '', '\' => '\\', ''' => '\'', + '"' => '"', "\n" => '\n', "\r" => '\r'))); }
hooks/post-receive