Skip to content

Commit d360410

Browse files
committed
Known issue: Silent data inconsistency when inserting timestamp literals with fractional seconds and timezone offsets after upgrading from 5.7 to 8.0 (and 8.4)
[MySQL Bug #118011](https://bugs.mysql.com/bug.php?id=118011).
1 parent 0b4f5fe commit d360410

1 file changed

Lines changed: 14 additions & 0 deletions

File tree

articles/mysql/flexible-server/how-to-upgrade-faq.md

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,20 @@ Depending on the workload, slowness or high CPU usage can be observed in version
5252

5353
If the slowness is observed with queries such as update/insert/delete, then enabling **Accelerated Logs** on your server under **Settings** > **Compute + Storage** in the side pane of your server's portal page might help.
5454

55+
### Silent data inconsistency when inserting timestamp literals with fractional seconds and timezone offsets after upgrading from 5.7 to 8.0 (and 8.4)
56+
57+
In MySQL 8.0, timestamp literals that include both fractional seconds and a timezone offset (for example, `'2025-01-01 12:00:00.123+00:00'`) can be silently converted to incorrect values during `INSERT` or `UPDATE` operations. The incorrect value is stored without any error or warning, which can lead to data inconsistency that is difficult to detect after the fact. Customers upgrading from MySQL 5.7 to 8.0 (and 8.4) might encounter this issue if their applications insert datetime values in this format.
58+
59+
This is a known MySQL community bug. For more information, see [MySQL Bug #118011](https://bugs.mysql.com/bug.php?id=118011).
60+
61+
#### Resolution
62+
63+
Until the upstream fix is available, take the following precautions before and after the upgrade:
64+
65+
- Audit your application code for timestamp literals that combine fractional seconds with timezone offsets, and normalize them to UTC (or a single timezone) without an inline offset before insertion.
66+
- Set the session or server `time_zone` explicitly, and write datetime values without an inline offset so the server applies the configured timezone consistently.
67+
- Validate a representative sample of newly inserted rows after the upgrade to confirm that stored values match the expected values.
68+
5569
## Related content
5670

5771
- [Major version upgrade in Azure Database for MySQL](how-to-upgrade.md)

0 commit comments

Comments
 (0)