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

SELECT DATE_FORMAT(..., %h) gives incorrect result with cursor protocol

    XMLWordPrintable

Details

    • Bug
    • Status: Open (View Workflow)
    • Major
    • Resolution: Unresolved
    • 10.5, 10.6, 10.11, 11.1, 11.2, 11.4, 11.5
    • 10.5, 10.6, 10.11, 11.1, 11.2, 11.4, 11.5
    • None
    • None

    Description

      SELECT DATE_FORMAT(..., %h) gives incorrect result with cursor protocol. Problem repeats only with option %h (hour with 2 digits between 01-12).
      Case: (run MTR test with --cursor-protocol):

      CREATE VIEW v AS SELECT DATE_FORMAT(TIME'-01:01:01','%h');
      SELECT * FROM v;
      DROP VIEW v;
      

      Expected result:

      DATE_FORMAT(TIME'-01:01:01','%h')
      -01
      

      Actual result:

      DATE_FORMAT(TIME'-01:01:01','%h')
      -0
      

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              lstartseva Lena Startseva
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:

                Git Integration

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