The branch, master has been updated via 1fc253e19e6952437fe980a932cf62e5200988e5 (commit) via b3c041bb997b939f96c58a330f9ea9168aef738b (commit) from 5c032d4110cd618413f88a513443932bce4fa18e (commit)
- Log ----------------------------------------------------------------- commit 1fc253e19e6952437fe980a932cf62e5200988e5 Merge: 5c032d4110cd618413f88a513443932bce4fa18e b3c041bb997b939f96c58a330f9ea9168aef738b Author: Marc Delisle marc@infomarc.info Date: Thu Apr 8 10:32:51 2010 -0400
Merge branch 'QA_3_3'
-----------------------------------------------------------------------
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 5589941..b30051d 100644 --- a/ChangeLog +++ b/ChangeLog @@ -65,6 +65,8 @@ $Id$ 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