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

Wrong data inserted into TIME field if bound as TIMESTAMP, and date fields contain data

Details

    • Bug
    • Status: Closed (View Workflow)
    • Major
    • Resolution: Fixed
    • 3.0.6, 2.0.18
    • 3.0.7, 2.0.19
    • General
    • None

    Description

      If parameter for inserting value into time field is bound like SQLBindParameter(Stmt, 1, SQL_PARAM_INPUT, SQL_C_TIMESTAMP, SQL_TIME,...), i.e. passed via timestamp structure, and date fields are not empty(it seems like day field is important), the inserted value will be different from the value in time fields of the parameter

      Attachments

        Activity

          The fix and the testcase have been pushed into odbc-3.0 as 79efd0e
          The patch also enforces some time validity checks for such parameters, as required by the specks. i.e. time should be between 00:00:00 and 23:59:59, and fractional part should be zero, and if timestamp struct bound for SQL_DATE sql type, then all time fields should be zero

          Lawrin Lawrin Novitsky added a comment - The fix and the testcase have been pushed into odbc-3.0 as 79efd0e The patch also enforces some time validity checks for such parameters, as required by the specks. i.e. time should be between 00:00:00 and 23:59:59, and fractional part should be zero, and if timestamp struct bound for SQL_DATE sql type, then all time fields should be zero

          People

            Lawrin Lawrin Novitsky
            Lawrin Lawrin Novitsky
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Git Integration

                Error rendering 'com.xiplink.jira.git.jira_git_plugin:git-issue-webpanel'. Please contact your Jira administrators.