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

    • Bug
    • Status: Closed (View Workflow)
    • Major
    • Resolution: Fixed
    • 0.9.4
    • 1.0.0
    • General
    • 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

            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.