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

test main.func_sformat Locale + test failures under Fedora 39 (fmt-10.0.0+)

Details

    Description

      Locale failure

      CURRENT_TEST: main.func_sformat
      --- /home/buildbot/amd64-fedora-39/build/mysql-test/main/func_sformat.result	2023-11-15 03:59:41.000000000 +0000
      +++ /home/buildbot/amd64-fedora-39/build/mysql-test/main/func_sformat.reject	2023-11-15 17:24:47.059690135 +0000
      @@ -212,7 +212,7 @@
       #
       select sformat('Num {:L}', 13800000000);
       sformat('Num {:L}', 13800000000)
      -Num 13,800,000,000
      +Num 13800000000
       select sformat('Num [{:20}]', 42);
       sformat('Num [{:20}]', 42)
       Num [                  42]
      

      And trivially error message changes in fmt (10.0.0):

      @@ -316,7 +316,7 @@
       sformat('Test {:c}', 'word')
       NULL
       Warnings:
      -Warning	4183	SFORMAT error: invalid type specifier
      +Warning	4183	SFORMAT error: invalid format specifier
       select sformat('Test {one} {two} {three}', 1, 2, 3);
       sformat('Test {one} {two} {three}', 1, 2, 3)
       NULL
      @@ -341,52 +341,52 @@
       sformat('Number {:.2d}', 42)
       NULL
       Warnings:
      -Warning	4183	SFORMAT error: precision not allowed for this argument type
      +Warning	4183	SFORMAT error: invalid format specifier
       select sformat('You scored {:.0%}', 0.25);
       sformat('You scored {:.0%}', 0.25)
       NULL
       Warnings:
      -Warning	4183	SFORMAT error: invalid type specifier
      +Warning	4183	SFORMAT error: invalid format specifier
       select sformat('You scored {:%}', 0.25);
       sformat('You scored {:%}', 0.25)
       NULL
       Warnings:
      -Warning	4183	SFORMAT error: invalid type specifier
      +Warning	4183	SFORMAT error: invalid format specifier
       select sformat('The price is {:f} dollars.', 45);
       sformat('The price is {:f} dollars.', 45)
       NULL
       Warnings:
      -Warning	4183	SFORMAT error: invalid type specifier
      +Warning	4183	SFORMAT error: invalid format specifier
       select sformat('The price is {:.2f} dollars.', 45);
       sformat('The price is {:.2f} dollars.', 45)
       NULL
       Warnings:
      -Warning	4183	SFORMAT error: precision not allowed for this argument type
      +Warning	4183	SFORMAT error: invalid format specifier
       select sformat('We have {:E} chickens.', 5);
       sformat('We have {:E} chickens.', 5)
       NULL
       Warnings:
      -Warning	4183	SFORMAT error: invalid type specifier
      +Warning	4183	SFORMAT error: invalid format specifier
       select sformat('We have {:e} chickens.', 5);
       sformat('We have {:e} chickens.', 5)
       NULL
       Warnings:
      -Warning	4183	SFORMAT error: invalid type specifier
      +Warning	4183	SFORMAT error: invalid format specifier
       select sformat('The universe is {:,} years old.', 13800000000);
       sformat('The universe is {:,} years old.', 13800000000)
       NULL
       Warnings:
      -Warning	4183	SFORMAT error: invalid type specifier
      +Warning	4183	SFORMAT error: invalid format specifier
       select sformat('The universe is {:_} years old.', 13800000000);
       sformat('The universe is {:_} years old.', 13800000000)
       NULL
       Warnings:
      -Warning	4183	SFORMAT error: invalid type specifier
      +Warning	4183	SFORMAT error: invalid format specifier
       select sformat('String {:-}', 'hello');
       sformat('String {:-}', 'hello')
       NULL
       Warnings:
      -Warning	4183	SFORMAT error: format specifier requires numeric argument
      +Warning	4183	SFORMAT error: invalid format specifier
       #
       # Table Format Test Cases
       #
      @@ -416,7 +416,7 @@
       sformat('{:p}', '50')
       NULL
       Warnings:
      -Warning	4183	SFORMAT error: invalid type specifier
      +Warning	4183	SFORMAT error: invalid format specifier
       #
       # ucs2 test
       #
      @@ -449,7 +449,7 @@
       sformat("={:d}=", ?)
       NULL
       Warnings:
      -Warning	4183	SFORMAT error: invalid type specifier
      +Warning	4183	SFORMAT error: invalid format specifier
       #
       # MDEV-26691 SFORMAT: Pass down FLOAT as FLOAT, without upcast to DOUBLE
       #
      

      Attachments

        Issue Links

          Activity

            danblack Daniel Black created issue -
            julien.fritsch Julien Fritsch made changes -
            Field Original Value New Value
            Fix Version/s 10.10 [ 27530 ]
            danblack Daniel Black made changes -
            JIraAutomate JiraAutomate made changes -
            Priority Major [ 3 ] Critical [ 2 ]
            serg Sergei Golubchik made changes -
            serg Sergei Golubchik made changes -
            Status Open [ 1 ] In Progress [ 3 ]
            serg Sergei Golubchik made changes -
            Status In Progress [ 3 ] Stalled [ 10000 ]
            serg Sergei Golubchik made changes -
            Description "The 'L' option uses the current locale setting to insert the appropriate number separator characters. This option is only valid for numeric types."

            So Locale dependent.

            {noformat:title=Locale failure}
            CURRENT_TEST: main.func_sformat
            --- /home/buildbot/amd64-fedora-39/build/mysql-test/main/func_sformat.result 2023-11-15 03:59:41.000000000 +0000
            +++ /home/buildbot/amd64-fedora-39/build/mysql-test/main/func_sformat.reject 2023-11-15 17:24:47.059690135 +0000
            @@ -212,7 +212,7 @@
             #
             select sformat('Num {:L}', 13800000000);
             sformat('Num {:L}', 13800000000)
            -Num 13,800,000,000
            +Num 13800000000
             select sformat('Num [{:20}]', 42);
             sformat('Num [{:20}]', 42)
             Num [ 42]
            {noformat}

            https://fmt.dev/latest/api.html#_CPPv4I0DpEN3fmt6formatENSt6stringERK6Locale13format_stringIDp1TEDpRR1T

            Can be corrected with Locale set as the first arg of {{format}}. This is a 10.0.0 feature of libfmt, that previously seemed to follow a global en_US.UTF-8 setting ([https://fmt.dev/9.1.0/api.html#locale|ref]), and now doesn't.

            So does a system variable need to be created for this?

            Do we need to hardcode the global locale to en_UTF-8 for stable releases?


            And trivially error message changes in fmt (10.0.0):
            {code:diff}
            @@ -316,7 +316,7 @@
             sformat('Test {:c}', 'word')
             NULL
             Warnings:
            -Warning 4183 SFORMAT error: invalid type specifier
            +Warning 4183 SFORMAT error: invalid format specifier
             select sformat('Test {one} {two} {three}', 1, 2, 3);
             sformat('Test {one} {two} {three}', 1, 2, 3)
             NULL
            @@ -341,52 +341,52 @@
             sformat('Number {:.2d}', 42)
             NULL
             Warnings:
            -Warning 4183 SFORMAT error: precision not allowed for this argument type
            +Warning 4183 SFORMAT error: invalid format specifier
             select sformat('You scored {:.0%}', 0.25);
             sformat('You scored {:.0%}', 0.25)
             NULL
             Warnings:
            -Warning 4183 SFORMAT error: invalid type specifier
            +Warning 4183 SFORMAT error: invalid format specifier
             select sformat('You scored {:%}', 0.25);
             sformat('You scored {:%}', 0.25)
             NULL
             Warnings:
            -Warning 4183 SFORMAT error: invalid type specifier
            +Warning 4183 SFORMAT error: invalid format specifier
             select sformat('The price is {:f} dollars.', 45);
             sformat('The price is {:f} dollars.', 45)
             NULL
             Warnings:
            -Warning 4183 SFORMAT error: invalid type specifier
            +Warning 4183 SFORMAT error: invalid format specifier
             select sformat('The price is {:.2f} dollars.', 45);
             sformat('The price is {:.2f} dollars.', 45)
             NULL
             Warnings:
            -Warning 4183 SFORMAT error: precision not allowed for this argument type
            +Warning 4183 SFORMAT error: invalid format specifier
             select sformat('We have {:E} chickens.', 5);
             sformat('We have {:E} chickens.', 5)
             NULL
             Warnings:
            -Warning 4183 SFORMAT error: invalid type specifier
            +Warning 4183 SFORMAT error: invalid format specifier
             select sformat('We have {:e} chickens.', 5);
             sformat('We have {:e} chickens.', 5)
             NULL
             Warnings:
            -Warning 4183 SFORMAT error: invalid type specifier
            +Warning 4183 SFORMAT error: invalid format specifier
             select sformat('The universe is {:,} years old.', 13800000000);
             sformat('The universe is {:,} years old.', 13800000000)
             NULL
             Warnings:
            -Warning 4183 SFORMAT error: invalid type specifier
            +Warning 4183 SFORMAT error: invalid format specifier
             select sformat('The universe is {:_} years old.', 13800000000);
             sformat('The universe is {:_} years old.', 13800000000)
             NULL
             Warnings:
            -Warning 4183 SFORMAT error: invalid type specifier
            +Warning 4183 SFORMAT error: invalid format specifier
             select sformat('String {:-}', 'hello');
             sformat('String {:-}', 'hello')
             NULL
             Warnings:
            -Warning 4183 SFORMAT error: format specifier requires numeric argument
            +Warning 4183 SFORMAT error: invalid format specifier
             #
             # Table Format Test Cases
             #
            @@ -416,7 +416,7 @@
             sformat('{:p}', '50')
             NULL
             Warnings:
            -Warning 4183 SFORMAT error: invalid type specifier
            +Warning 4183 SFORMAT error: invalid format specifier
             #
             # ucs2 test
             #
            @@ -449,7 +449,7 @@
             sformat("={:d}=", ?)
             NULL
             Warnings:
            -Warning 4183 SFORMAT error: invalid type specifier
            +Warning 4183 SFORMAT error: invalid format specifier
             #
             # MDEV-26691 SFORMAT: Pass down FLOAT as FLOAT, without upcast to DOUBLE
             #
            {code}
            {noformat:title=Locale failure}
            CURRENT_TEST: main.func_sformat
            --- /home/buildbot/amd64-fedora-39/build/mysql-test/main/func_sformat.result 2023-11-15 03:59:41.000000000 +0000
            +++ /home/buildbot/amd64-fedora-39/build/mysql-test/main/func_sformat.reject 2023-11-15 17:24:47.059690135 +0000
            @@ -212,7 +212,7 @@
             #
             select sformat('Num {:L}', 13800000000);
             sformat('Num {:L}', 13800000000)
            -Num 13,800,000,000
            +Num 13800000000
             select sformat('Num [{:20}]', 42);
             sformat('Num [{:20}]', 42)
             Num [ 42]
            {noformat}

            And trivially error message changes in fmt (10.0.0):
            {code:diff}
            @@ -316,7 +316,7 @@
             sformat('Test {:c}', 'word')
             NULL
             Warnings:
            -Warning 4183 SFORMAT error: invalid type specifier
            +Warning 4183 SFORMAT error: invalid format specifier
             select sformat('Test {one} {two} {three}', 1, 2, 3);
             sformat('Test {one} {two} {three}', 1, 2, 3)
             NULL
            @@ -341,52 +341,52 @@
             sformat('Number {:.2d}', 42)
             NULL
             Warnings:
            -Warning 4183 SFORMAT error: precision not allowed for this argument type
            +Warning 4183 SFORMAT error: invalid format specifier
             select sformat('You scored {:.0%}', 0.25);
             sformat('You scored {:.0%}', 0.25)
             NULL
             Warnings:
            -Warning 4183 SFORMAT error: invalid type specifier
            +Warning 4183 SFORMAT error: invalid format specifier
             select sformat('You scored {:%}', 0.25);
             sformat('You scored {:%}', 0.25)
             NULL
             Warnings:
            -Warning 4183 SFORMAT error: invalid type specifier
            +Warning 4183 SFORMAT error: invalid format specifier
             select sformat('The price is {:f} dollars.', 45);
             sformat('The price is {:f} dollars.', 45)
             NULL
             Warnings:
            -Warning 4183 SFORMAT error: invalid type specifier
            +Warning 4183 SFORMAT error: invalid format specifier
             select sformat('The price is {:.2f} dollars.', 45);
             sformat('The price is {:.2f} dollars.', 45)
             NULL
             Warnings:
            -Warning 4183 SFORMAT error: precision not allowed for this argument type
            +Warning 4183 SFORMAT error: invalid format specifier
             select sformat('We have {:E} chickens.', 5);
             sformat('We have {:E} chickens.', 5)
             NULL
             Warnings:
            -Warning 4183 SFORMAT error: invalid type specifier
            +Warning 4183 SFORMAT error: invalid format specifier
             select sformat('We have {:e} chickens.', 5);
             sformat('We have {:e} chickens.', 5)
             NULL
             Warnings:
            -Warning 4183 SFORMAT error: invalid type specifier
            +Warning 4183 SFORMAT error: invalid format specifier
             select sformat('The universe is {:,} years old.', 13800000000);
             sformat('The universe is {:,} years old.', 13800000000)
             NULL
             Warnings:
            -Warning 4183 SFORMAT error: invalid type specifier
            +Warning 4183 SFORMAT error: invalid format specifier
             select sformat('The universe is {:_} years old.', 13800000000);
             sformat('The universe is {:_} years old.', 13800000000)
             NULL
             Warnings:
            -Warning 4183 SFORMAT error: invalid type specifier
            +Warning 4183 SFORMAT error: invalid format specifier
             select sformat('String {:-}', 'hello');
             sformat('String {:-}', 'hello')
             NULL
             Warnings:
            -Warning 4183 SFORMAT error: format specifier requires numeric argument
            +Warning 4183 SFORMAT error: invalid format specifier
             #
             # Table Format Test Cases
             #
            @@ -416,7 +416,7 @@
             sformat('{:p}', '50')
             NULL
             Warnings:
            -Warning 4183 SFORMAT error: invalid type specifier
            +Warning 4183 SFORMAT error: invalid format specifier
             #
             # ucs2 test
             #
            @@ -449,7 +449,7 @@
             sformat("={:d}=", ?)
             NULL
             Warnings:
            -Warning 4183 SFORMAT error: invalid type specifier
            +Warning 4183 SFORMAT error: invalid format specifier
             #
             # MDEV-26691 SFORMAT: Pass down FLOAT as FLOAT, without upcast to DOUBLE
             #
            {code}
            serg Sergei Golubchik made changes -
            Component/s Server [ 13907 ]
            Fix Version/s 10.11.7 [ 29519 ]
            Fix Version/s 11.0.5 [ 29520 ]
            Fix Version/s 11.1.4 [ 29024 ]
            Fix Version/s 11.2.3 [ 29521 ]
            Fix Version/s 10.11 [ 27614 ]
            Fix Version/s 11.0 [ 28320 ]
            Fix Version/s 11.1 [ 28549 ]
            Fix Version/s 11.2 [ 28603 ]
            Resolution Fixed [ 1 ]
            Status Stalled [ 10000 ] Closed [ 6 ]
            serg Sergei Golubchik made changes -
            serg Sergei Golubchik made changes -

            People

              serg Sergei Golubchik
              danblack Daniel Black
              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.