bug #2893221 [core] Statement may not be safe to log in statement format
This commit is contained in:
@@ -95,11 +95,11 @@ if (isset($_REQUEST['after_insert'])
|
||||
$meta = PMA_DBI_get_fields_meta($res);
|
||||
// must find a unique condition based on unique key,
|
||||
// not a combination of all fields
|
||||
// (the following is a real assignment)
|
||||
if ($tmp = PMA_getUniqueCondition($res, count($meta), $meta, $row, true)) {
|
||||
$_SESSION['edit_next'] = $tmp;
|
||||
list($unique_condition, $clause_is_unique) = PMA_getUniqueCondition($res, count($meta), $meta, $row, true);
|
||||
if (! empty($unique_condition)) {
|
||||
$_SESSION['edit_next'] = $unique_condition;
|
||||
}
|
||||
unset($tmp);
|
||||
unset($unique_condition, $clause_is_unique);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -298,7 +298,7 @@ foreach ($loop_array as $rowcount => $primary_key) {
|
||||
} else {
|
||||
// build update query
|
||||
$query[] = 'UPDATE ' . PMA_backquote($GLOBALS['db']) . '.' . PMA_backquote($GLOBALS['table'])
|
||||
. ' SET ' . implode(', ', $query_values) . ' WHERE ' . $primary_key . ' LIMIT 1';
|
||||
. ' SET ' . implode(', ', $query_values) . ' WHERE ' . $primary_key . ($_REQUEST['clause_is_unique'] ? '' : ' LIMIT 1');
|
||||
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user