Skip to content
/ mysql Public

A simple test of MySQL's timestamp precision when using Spring Data.

Notifications You must be signed in to change notification settings

kgyovai/mysql

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

MySQL Spring Data Instant Test

The purpose of this repository is to provide a simple way of testing the precision of timestamps persisted by MySQL using Spring Data (JPA).

To test a specific version of MySQL

docker pull mysql:<version>

docker run -e MYSQL_DATABASE=test -e MYSQL_USER=test -e MYSQL_PASSWORD=test -e MYSQL_ROOT_PASSWORD=root -p 33060:33060 -p 3306:3306 -d mysql:<version>

Then execute the test

./gradlew test

If the test passes, then the database should provide nanosecond level precision as shown below.

image

If the test fails, then the database likely truncated the precision at seconds.

About

A simple test of MySQL's timestamp precision when using Spring Data.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages