Merge pull request #863 from hpoettker/PT-2378_table_sync_with_more_fp_precision

PT-2378 - extended FP precision in pt-table-sync
This commit is contained in:
Sveta Smirnova
2025-01-14 18:06:55 +03:00
committed by GitHub
20 changed files with 194 additions and 17 deletions

View File

@@ -78,7 +78,10 @@ sub quote_val {
&& !$args{is_char}; # unless is_char is true
# https://bugs.launchpad.net/percona-toolkit/+bug/1229861
return $val if $args{is_float};
if ( $args{is_float} ) {
return sprintf("%.17g", $val) if $val - "$val" != 0;
return $val;
}
# Quote and return non-numeric vals.
$val =~ s/(['\\])/\\$1/g;