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

LP:769583 - 5.1-micro length of TIME datatype is wrong

    Details

    • Type: Bug
    • Status: Closed
    • Resolution: Not a Bug
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: None
    • Labels:

      Description

      The length of TIME column is reported as 9 in this 5.1-micro, but 8 otherwise.

      To reproduce,
      mysql -uroot -e "select time('01:01:01')"

      It reports :
      Field 1: `time('01:01:01')`
      Catalog: `def`
      Database: ``
      Table: ``
      Org_table: ``
      Type: TIME
      Collation: binary (63)
      Length: 9
      Max_length: 8
      Decimals: 31
      Flags: BINARY

      Length field should be 8, not 9

        Gliffy Diagrams

          Attachments

            Activity

            Hide
            wlad Vladislav Vaintroub added a comment -

            Re: 5.1-micro length of TIME datatype is wrong
            Sorry, the correct command to reproduce is of course
            mysql -uroot -e "select time('01:01:01')" --column-type-info

            I forgot --column-type-info when in the description.

            Show
            wlad Vladislav Vaintroub added a comment - Re: 5.1-micro length of TIME datatype is wrong Sorry, the correct command to reproduce is of course mysql -uroot -e "select time('01:01:01')" --column-type-info I forgot --column-type-info when in the description.
            Hide
            serg Sergei Golubchik added a comment -

            Re: 5.1-micro length of TIME datatype is wrong
            9 is correct, 8 was a bug.

            "length" in the ouput of --column-type-info is the max width of the data. According to the manual, the maximal value for TIME is 838:59:59. Thus 9 is correct.

            Show
            serg Sergei Golubchik added a comment - Re: 5.1-micro length of TIME datatype is wrong 9 is correct, 8 was a bug. "length" in the ouput of --column-type-info is the max width of the data. According to the manual, the maximal value for TIME is 838:59:59. Thus 9 is correct.
            Hide
            ratzpo Rasmus Johansson added a comment -

            Launchpad bug id: 769583

            Show
            ratzpo Rasmus Johansson added a comment - Launchpad bug id: 769583

              People

              • Assignee:
                serg Sergei Golubchik
                Reporter:
                wlad Vladislav Vaintroub
              • Votes:
                0 Vote for this issue
                Watchers:
                0 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: