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

Evaluation of two "!" operators depends on space in beetween

Details

    Description

      The following expressions don't have the expected result (do not ignore the spaces):

       
      MariaDB [(none)]> select (! !0) = (!!0), (! !1) = (!!1);
      +----------------+----------------+
      | (! !0) = (!!0) | (! !1) = (!!1) |
      +----------------+----------------+
      |              0 |              0 |
      +----------------+----------------+
      1 row in set (0.00 sec)
       

      I would expect that the results are both 1. I would expect that the calculation does not depend on existance of spaces between ! and !.

      Changing sql_mode does not change behaviour (HIGH_NOT_PRECEDENCE).

      On a MySQL 4.1 server the result of that query is all 1.

      Attachments

        Activity

          Transition Time In Source Status Execution Times
          Elena Stepanova made transition -
          Open Confirmed
          1d 8m 1
          Sergei Golubchik made transition -
          Confirmed In Progress
          357d 21h 30m 1
          Sergei Golubchik made transition -
          In Progress Stalled
          2s 1
          Sergei Golubchik made transition -
          Stalled In Review
          3h 20m 1
          Alexander Barkov made transition -
          In Review Stalled
          3d 16h 25m 1
          Sergei Golubchik made transition -
          Stalled Closed
          2h 12m 1

          People

            serg Sergei Golubchik
            yablacky L. Schwarz
            Votes:
            0 Vote for this issue
            Watchers:
            6 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.