This section: https://github.com/vapor/mysql-nio/blob/main/Sources/MySQLNIO/MySQLData.swift#L448-L469 causes a hard crash (i.e. bang operator) when there is data that is malformed at the MySQL level. For example, a datetime that is non-nullable defaults to 0000-00-00 00:00:00.000000 which is 1. obviously invalid as a date and 2. causes the description property to crash.
To Reproduce
Do a SELECT from a table with a column with a date value set to 0000-00-00 00:00:00.000000
Expected behavior
It should not crash and ideally log out some kind of an error
Describe the bug
This section: https://github.com/vapor/mysql-nio/blob/main/Sources/MySQLNIO/MySQLData.swift#L448-L469 causes a hard crash (i.e. bang operator) when there is data that is malformed at the MySQL level. For example, a
datetime
that is non-nullable defaults to0000-00-00 00:00:00.000000
which is 1. obviously invalid as a date and 2. causes thedescription
property to crash.To Reproduce
Do a
SELECT
from a table with a column with a date value set to0000-00-00 00:00:00.000000
Expected behavior
It should not crash and ideally log out some kind of an error
Environment
MySQLNIO v 1.3.2