Uploaded image for project: 'MariaDB Connector/C++'
  1. MariaDB Connector/C++
  2. CONCPP-62

Statement would return incorrect fractional part for (DATE)TIME values

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed (View Workflow)
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 0.9.4
    • Fix Version/s: 1.0.0
    • Component/s: General
    • Labels:
      None

      Description

      The scenario
      stmt->execute("CREATE TABLE concpp62(ts TIMESTAMP(6))");
      stmt->execute("INSERT INTO concpp62(ts) values('2015-01-20 16:14:36.709649')");

      res.reset(stmt->executeQuery("SELECT ts, TIME(ts) from bug68523"));
      ASSERT(res->next());

      ASSERT_EQUALS(res->getString(1), "2015-01-20 16:14:36.709649");
      ASSERT_EQUALS(res->getString(2), "16:14:36.709649");

      The result was nanoseconds instead of microseconds in fractional part in this case.
      Both the testcase and fix have been already pushed in the commit 43d72ad

        Attachments

          Activity

            People

            Assignee:
            Lawrin Lawrin Novitsky
            Reporter:
            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.