Uploaded image for project: 'MariaDB Server'
  1. MariaDB Server
  2. MDEV-10173

Wrong value for decimals in metadata

    XMLWordPrintable

Details

    • Bug
    • Status: Closed (View Workflow)
    • Major
    • Resolution: Not a Bug
    • 10.2(EOL)
    • 10.2.11
    • Server
    • None
    • 10.2.10, 10.2.11

    Description

      This bug occurs when running 10.2 testsuite with Connector/C:
      perl mysql-test-run func_time --ps-protocol

      When a string value, e.g "0" rather than number, is passed to from_unixtime() function the number of decimals is wrong (31 instead of 0). Also length value is not correct.

      How to repeat:

      MariaDB [test]> select from_unixtime(0), from_unixtime("0");
      Field   1:  `from_unixtime(0)`
      Catalog:    `def`
      Database:   ``
      Table:      ``
      Org_table:  ``
      Type:       DATETIME
      Collation:  binary (63)
      Length:     19
      Max_length: 19
      Decimals:   0
      Flags:      BINARY 
       
      Field   2:  `from_unixtime("0")`
      Catalog:    `def`
      Database:   ``
      Table:      ``
      Org_table:  ``
      Type:       DATETIME
      Collation:  binary (63)
      Length:     26  <----- ????
      Max_length: 19
      Decimals:   31 <---- ????
      Flags:      BINARY 
       
       
      +---------------------+---------------------+
      | from_unixtime(0)    | from_unixtime("0")  |
      +---------------------+---------------------+
      | 1970-01-01 01:00:00 | 1970-01-01 01:00:00 |
      +---------------------+---------------------+
      1 row in set (0.00 sec)
      

      Attachments

        Activity

          People

            holyfoot Alexey Botchkov
            georg Georg Richter
            Votes:
            0 Vote for this issue
            Watchers:
            3 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.