Uploaded image for project: 'MariaDB Connector/ODBC'
  1. MariaDB Connector/ODBC
  2. ODBC-70

SQL_C_TIMESTAMP to DATETIME columns stored '1970-01-01 00:00:00' for value '0000-00-00 00:00:00'

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed (View Workflow)
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 2.0.12
    • Fix Version/s: 3.0.7, 2.0.19
    • Component/s: General
    • Labels:
      None
    • Environment:
      Windows 64-bit, Linux 64-bit

      Description

      If we bind parameter (to Aurora database via MariaDB ODBC driver) of C type SQL_C_TIMESTAMP to a DATETIME column in the table, we are seeing data loaded is '1970-01-01 00:00:00' for value '0000-00-00 00:00:00' in the SQL_TIMESTAMP_STRUCT.

      Same if we try to insert in a TIMESTAMP column (instead of DATETIME) of the table, then value is stored properly as '0000-00-00 00:00:00'.

      Also, instead of SQL_C_TIMESTAMP, if we bind as SQL_C_CHAR with same value to DATETIME column, then as well value is correctly stored as '0000-00-00 00:00:00'.

        Attachments

          Activity

            People

            Assignee:
            Lawrin Lawrin Novitsky
            Reporter:
            rdhuvad Rahul Dhuvad
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved:

                Git Integration