[MDEV-28939] bigint does not work in where clause Created: 2022-06-24  Updated: 2022-08-02  Resolved: 2022-08-02

Status: Closed
Project: MariaDB Server
Component/s: Storage Engine - InnoDB
Affects Version/s: 10.6.8
Fix Version/s: N/A

Type: Bug Priority: Major
Reporter: Eunbi Jang Assignee: Unassigned
Resolution: Incomplete Votes: 0
Labels: None
Environment:

Linux


Attachments: PNG File bug2.png     PNG File 디비 버그.png    

 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



 Comments   
Comment by Sergei Golubchik [ 2022-07-04 ]

Can you show the definition of your view and tables, please?

Generated at Thu Feb 08 10:04:37 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.