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

The use of string types in the IN keyword

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed (View Workflow)
    • Priority: Minor
    • Resolution: Not a Bug
    • Affects Version/s: 10.9.4
    • Fix Version/s: N/A
    • Component/s: Data types
    • Labels:
      None
    • Environment:
      mariadb docker

      Description

      Consider the following statements:

      SELECT "1gbnn" IN (1) – expected: 0, actual: 1
      SELECT '1' IN (1) – expected: 0, actual: 1
      SELECT "a" IN (0); – expected: 0, actual: 1
      SELECT 1 IN('1'); – expected: 0, actual: 1

      for keyword IN, We expect that strings should not be converted to numeric values. however, in actual execution, string is converted to a numeric type.

      database version: 10.9.4-MariaDB-1:10.9.4+maria~ubu2204

        Attachments

          Activity

            People

            Assignee:
            serg Sergei Golubchik
            Reporter:
            undefined 王瑞丰
            Votes:
            0 Vote for this issue
            Watchers:
            2 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.