Skip to content

Commit

Permalink
MDEV-32990 federatedx time_zone round trips
Browse files Browse the repository at this point in the history
Modified `federatedx_io_mysql::actual_query` to set the time zone to '+00:00' only upon establishing a new connection instead of with each query execution.
  • Loading branch information
hsser authored and grooverdan committed Jan 22, 2024
1 parent e8041c7 commit 7e8e51e
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions storage/federatedx/federatedx_io_mysql.cc
Original file line number Diff line number Diff line change
Expand Up @@ -451,11 +451,14 @@ int federatedx_io_mysql::actual_query(const char *buffer, size_t length)
get_port(),
get_socket(), 0))
DBUG_RETURN(ER_CONNECT_TO_FOREIGN_DATA_SOURCE);

if ((error= mysql_real_query(&mysql, STRING_WITH_LEN("set time_zone='+00:00'"))))
DBUG_RETURN(error);

mysql.reconnect= 1;
}

if (!(error= mysql_real_query(&mysql, STRING_WITH_LEN("set time_zone='+00:00'"))))
error= mysql_real_query(&mysql, buffer, (ulong)length);
error= mysql_real_query(&mysql, buffer, (ulong)length);

DBUG_RETURN(error);
}
Expand Down

0 comments on commit 7e8e51e

Please sign in to comment.