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

The negative result of the bitwise operator

    XMLWordPrintable

Details

    • Bug
    • Status: Closed (View Workflow)
    • Minor
    • Resolution: Not a Bug
    • 10.9.4
    • N/A
    • Data types
    • None
    • mariadb docker

    Description

      Consider the following statements:

      SELECT -5 & -4; – expected: -8, actual: 18446744073709551608
      SELECT '-5' | '-4'; – expected: -3, actual: 18446744073709551615
      SELECT '5' ^ '-4'; – expected: -7, actual: 18446744073709551609
      SELECT ~5; – expected: -6, actual: 18446744073709551610
      SELECT -3 > ('5' ^ '-4'); – expected: 1, actual: 0

      The result should be negative, but it actually becomes a large value, We think this should be a spillover issue.

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

      Attachments

        Activity

          People

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