문제

Before: mysql 5.6. One of the columns in the table is created as follows:

`f_stamp` datetime NOT NULL DEFAULT '0000-00-00 00:00:00'

When i view this field in mysql client or using DataGrip, this field is displayed correctly.

Now: mysql 5.7. The field is not displayed correctly (more precisely, it is causes en error). I delete from mysql config following flags: NO_ZERO_DATE, NP_ZERO_IN_DATE and STRICT_TRANS_TABLES. And now, looking at this field i see:

  1. Using mysql-client: 0000-00-00 00:00:00
  2. DataGrip: null

How to change server's option for support this non-standard datetime value, initialize by '0000-00-00 00:00:00' ?

UPD: https://youtrack.jetbrains.com/issue/DBE-3377

도움이 되었습니까?

해결책

It is the JDBC driver option we changed in DataGrip by default. But you can configure it the way you like:

enter image description here

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 dba.stackexchange
scroll top