bug #3134495 [synchronization] Data containing single quotes prevents sync

This commit is contained in:
Marc Delisle
2011-04-21 09:23:14 -04:00
parent b85821f944
commit 626d6d8557
2 changed files with 4 additions and 2 deletions

View File

@@ -151,6 +151,8 @@
- bug #3208723 [import] Fix import of utf-8 XML files.
- bug #3039384 [auth] Force signon auth on signon URL change.
- bug #3168733 [core] Synchronization does not honor AllowArbitraryServer
- bug #3134495 [synchronization] Data containing single quotes prevents sync,
thanks to jviewer
3.3.11.0 (not yet released)

View File

@@ -571,11 +571,11 @@ function PMA_insertIntoTargetTable($matching_table, $src_db, $trg_db, $src_link,
}
$insert_query .= ") VALUES(";
if (sizeof($table_fields[$matching_table_index]) == 1) {
$insert_query .= "'" . $result[0] . "'";
$insert_query .= "'" . PMA_sqlAddslashes($result[0]) . "'";
} else {
for ($field_index = 0; $field_index < sizeof($table_fields[$matching_table_index]); $field_index++) {
if (isset($result[0][$table_fields[$matching_table_index][$field_index]])) {
$insert_query .= "'" . $result[0][$table_fields[$matching_table_index][$field_index]] . "'";
$insert_query .= "'" . PMA_sqlAddslashes($result[0][$table_fields[$matching_table_index][$field_index]]) . "'";
} else {
$insert_query .= "'NULL'";
}