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

bigint does not work in where clause

    XMLWordPrintable

Details

    • Bug
    • Status: Closed (View Workflow)
    • Major
    • Resolution: Incomplete
    • 10.6.8
    • N/A
    • None
    • Linux

    Description

      In my view(not a table, I use view using csv file and innodb ), there are two BIGINT column, one with index and the other one doesn't have it.
      All values consist of 13 digits.....

      The Column with index has no problem, but when I select value from column which doesn't have index, I got problem.

      1. Using < or =
      I used the number "2147483647" which is max value of INTEGER type.
      > select count ( * ) from my_data where col < 2147483647;
      it returns "2" (right answer)

      but if i use "2147483648" which is bigger than max value of INTEGER type
      > select count ( * ) from my_data where col < 2147483648;
      it returns 0 without warning.

      > select count ( * ) from my_data where col = 2147483648;
      it also returns 0 even i has same data....

      2. Using >
      I used the number "2147483647" which is max value of INTEGER type.
      > select count ( * ) from my_data where col > 2147483647;
      it returns "692" (right answer)

      but if i use "2147483648" which is bigger than max value of INTEGER type
      > select count ( * ) from my_data where col > 2147483648;
      it also returns "692" which is right answer

      However, if i compare value using "case when" or "like" clause they have no problem...
      Also when i use index, it doesn't have any problem....
      Only < and = has problem when i compare value in where clause.

      I think it is kind of bugs but I'm not sure....
      so if anyone knows the reason why i have this problem, please let me know.......

      Thanks
      Jang

      Attachments

        Activity

          People

            Unassigned Unassigned
            ebjang Eunbi Jang
            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.