The branch, QA_3_3 has been updated via b3c041bb997b939f96c58a330f9ea9168aef738b (commit) from a99858b16a40bcfceec01667eb2814a1acf45f6d (commit)
- Log ----------------------------------------------------------------- commit b3c041bb997b939f96c58a330f9ea9168aef738b Author: Ankit Gupta ankitgupta3@users.sourceforge.net Date: Thu Apr 8 10:32:13 2010 -0400
patch #2983492 When asking to synchronize Structure and Data, only Structure is done
-----------------------------------------------------------------------
Summary of changes: ChangeLog | 2 ++ libraries/server_synchronize.lib.php | 16 +++++++++------- 2 files changed, 11 insertions(+), 7 deletions(-)
diff --git a/ChangeLog b/ChangeLog index 52370e5..718ac6b 100644 --- a/ChangeLog +++ b/ChangeLog @@ -8,6 +8,8 @@ $HeadURL: https://phpmyadmin.svn.sourceforge.net/svnroot/phpmyadmin/trunk/phpMyA 3.3.3.0 (not yet released) - patch #2982480 [navi] Do not group if there would be one table in group, thanks to Lorikeet Lee. +- patch #2983492 [sync] When asking to synchronize Structure and Data, + only Structure is done, thanks to Ankit Gupta - ankitgupta3
3.3.2.0 (not yet released) - patch #2969449 [core] Name for MERGE engine varies depending on the diff --git a/libraries/server_synchronize.lib.php b/libraries/server_synchronize.lib.php index 8978cc6..79948b9 100644 --- a/libraries/server_synchronize.lib.php +++ b/libraries/server_synchronize.lib.php @@ -671,11 +671,11 @@ function PMA_createTargetTables($src_db, $trg_db, $src_link, $trg_link, &$uncomm function PMA_populateTargetTables($src_db, $trg_db, $src_link, $trg_link, $uncommon_tables, $table_index, $uncommon_tables_fields, $display) { $display = false; // todo: maybe display some of the queries if they are not too numerous - $unbuffered_result = PMA_DBI_try_query('SELECT * FROM ' . PMA_backquote($src_db) . '.' . PMA_backquote($uncommon_tables[$table_index]), $src_link, PMA_DBI_QUERY_UNBUFFERED); if (false !== $unbuffered_result) { + $insert_query = 'INSERT INTO ' . PMA_backquote($trg_db) . '.' .PMA_backquote($uncommon_tables[$table_index]) . ' VALUES'; while ($one_row = PMA_DBI_fetch_row($unbuffered_result)) { - $insert_query = 'INSERT INTO ' . PMA_backquote($trg_db) . '.' .PMA_backquote($uncommon_tables[$table_index]) . ' VALUES('; + $insert_query .= '('; $key_of_last_value = count($one_row) - 1; foreach($one_row as $key => $value) { $insert_query .= "'" . PMA_sqlAddslashes($value) . "'"; @@ -683,12 +683,14 @@ function PMA_populateTargetTables($src_db, $trg_db, $src_link, $trg_link, $uncom $insert_query .= ","; } } - $insert_query .= ');'; - if ($display == true) { - PMA_displayQuery($insert_query); - } - PMA_DBI_try_query($insert_query, $trg_link, 0); + $insert_query .= '),'; + } + $insert_query = substr($insert_query, 0, -1); + $insert_query .= ';'; + if ($display == true) { + PMA_displayQuery($insert_query); } + PMA_DBI_try_query($insert_query, $trg_link, 0); } } /**
hooks/post-receive