vitessio / vitess

Vitess is a database clustering system for horizontal scaling of MySQL.
http://vitess.io
Apache License 2.0
18.67k stars 2.1k forks source link

vtgate: Use the time zone setting correctly #16824

Closed systay closed 1 month ago

systay commented 1 month ago

Description

This pull request addresses a critical issue in the handling of time zone settings within our system. The root cause of the problem was that the time zone system setting was not being correctly fetched and interpreted, which led to it being ignored when evaluating the now() function.

Specifically, the issue arose because we were storing the time zone variable value using a literal SQL expression. This meant that when we tried to use this value, it was still in its raw, encoded form, rather than being properly decoded into a usable time zone string.

Related Issue(s)

Fixes #16820

Checklist

vitess-bot[bot] commented 1 month ago

Review Checklist

Hello reviewers! :wave: Please follow this checklist when reviewing this Pull Request.

General

Tests

Documentation

New flags

If a workflow is added or modified:

Backward compatibility

codecov[bot] commented 1 month ago

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Project coverage is 69.51%. Comparing base (95f2e3e) to head (c4d53fd). Report is 2 commits behind head on main.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #16824 +/- ## ========================================== - Coverage 69.51% 69.51% -0.01% ========================================== Files 1569 1569 Lines 202517 202520 +3 ========================================== + Hits 140780 140782 +2 - Misses 61737 61738 +1 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

systay commented 1 month ago

Updated the description 👍