MySQL Can Break in 2038!

Опубликовано: 11 Август 2024
на канале: Database Dive
469
9

This SQL tutorial for dummies will walk you through one of the possible bugs in MySQL Server.
This SQL tutorial for beginners will tell you that MySQL has a bunch of data types you can use and one of those is a TIMESTAMP data type.
According to the MySQL documentation, values of a TIMESTAMP data type can range from 1970-01-01 00:00:00 to 2038-01-19 03:14:17.

The MySQL problem and MySQL issue seems to stem from systems that calculate time in Unix terms, and they are reliant on signed 32-bit integers which can only store values up until 2 power 31 - 1. According to sources on the web, that amounts to January 19, 2038, around 3AM UTC, which means that users of MySQL Server cannot store values newer than that.

This MySQL tutorial is hoping that as time goes on, the team behind MySQL/MariaDB will find ways to overcome this problem.
For now, TIMESTAMP is an adequate choice, but if you're worried about storing dates beyond 2038 in MySQL or MariaDB, consider using DATETIME instead.

Enjoyed this SQL tutorial for intermediates about the TIMESTAMP data type in MySQL Server? Make sure to subscribe to this database tutorial channel to see more sql tutorials about MySQL & beyond!

Sources:
https://dev.mysql.com/worklog/task/?i...
  / looming-2038-problem-mysql-prepared-unix-t...  
https://dev.to/xinecraft/did-you-know...
https://dev.mysql.com/doc/refman/8.4/...
https://github.com/laravel/framework/...

Music:
Ocean Drive by Luke Bergs:   / bergscloud  
Creative Commons — Attribution-ShareAlike 3.0 Unported — CC BY-SA 3.0
Free Download / Stream: https://bit.ly/4dO5BD5
Music promoted by Audio Library https://bit.ly/3SyeVCE

#shorts #reels #coding #database #data #mysql #programming