normalize timestamp data on servers with different tz - 1388870

This commit is contained in:
Frank Cizmich
2014-12-01 15:50:19 -02:00
parent 732a3fa9cc
commit 62d84e5dba
6 changed files with 13 additions and 13 deletions

View File

@@ -5714,8 +5714,8 @@ sub make_row_checksum {
$query = join(', ',
map {
my $col = $_;
if ( $col =~ m/\+ 0/ ) {
my ($real_col) = /^(\S+)/;
if ( $col =~ m/UNIX_TIMESTAMP/ ) {
my ($real_col) = /^UNIX_TIMESTAMP\((.+?)\)/;
$col .= " AS $real_col";
}
elsif ( $col =~ m/TRIM/ ) {
@@ -5815,7 +5815,7 @@ sub get_checksum_columns {
my $type = $tbl_struct->{type_for}->{$_};
my $result = $q->quote($_);
if ( $type eq 'timestamp' ) {
$result .= ' + 0';
$result = "UNIX_TIMESTAMP($result)";
}
elsif ( $float_precision && $type =~ m/float|double/ ) {
$result = "ROUND($result, $float_precision)";