[MCOL-4306] Using EQUALS in a WHERE clause on a specific column returns no results Created: 2020-09-11 Updated: 2021-04-19 Resolved: 2020-09-25 |
|
| Status: | Closed |
| Project: | MariaDB ColumnStore |
| Component/s: | PrimProc |
| Affects Version/s: | 1.5.3 |
| Fix Version/s: | 5.4.1 |
| Type: | Bug | Priority: | Blocker |
| Reporter: | Nick (Inactive) | Assignee: | Daniel Lee (Inactive) |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | None | ||
| Description |
|
We have a breaking issue with Columnstore. It was working fine earlier today but all the sudden, queries that are executed using equals in the code column are returning 0 results. Here is one of the query examples showing the issue: MariaDB [AAA]> SELECT ANI_Digits,Call_Date,Call_Direction,DATE_FORMAT( '2008-12-31 ' + INTERVAL Call_Duration SECOND, '%H:%i:%s' ) as Call_Duration,ROUND( ( Call_Duration / 60.0) , 2 ) AS Minutes, Call_Time,Dialed_Digits,Extension,HSITE,ITrun,Location_Code,NPA,NXX,Outgoing_Trunk,code FROM foo WHERE Call_Date BETWEEN '2019-04-10 12:00:00' AND '2019-04-12 12:18:00' LIMIT 5; MariaDB [AAA]> SELECT ANI_Digits,Call_Date,Call_Direction,DATE_FORMAT( '2008-12-31 ' + INTERVAL Call_Duration SECOND, '%H:%i:%s' ) as Call_Duration,ROUND( ( Call_Duration / 60.0) , 2 ) AS Minutes, Call_Time,Dialed_Digits,Extension,HSITE,ITrun,Location_Code,NPA,NXX,Outgoing_Trunk,code FROM foo WHERE Call_Date BETWEEN '2019-04-10 12:00:00' AND '2019-04-12 12:18:00' AND code='yyy' LIMIT 5; Empty set (0.011 sec) I confirmed that there are no extra spaces in the value. Whats odd is it does return results if I use LIKE with no wild cards: MariaDB [AAA]> SELECT ANI_Digits,Call_Date,Call_Direction,DATE_FORMAT( '2008-12-31 ' + INTERVAL Call_Duration SECOND, '%H:%i:%s' ) as Call_Duration,ROUND( ( Call_Duration / 60.0) , 2 ) AS Minutes, Call_Time,Dialed_Digits,Extension,HSITE,ITrun,Location_Code,NPA,NXX,Outgoing_Trunk,code FROM foo WHERE Call_Date BETWEEN '2019-04-10 12:00:00' AND '2019-04-12 12:18:00' AND code LIKE 'yyy' LIMIT 5; I was able to reproduce with the prcedure provided by the customer in the Case. MariaDB [foo]> LOAD DATA INFILE 'foo_data' Records: 7001 Deleted: 0 Skipped: 0 Warnings: 0 MariaDB [foo]> SELECT code FROM foo WHERE code LIKE 'yyy' LIMIT 1; MariaDB [foo]> SELECT code FROM foo WHERE code = 'yyy' LIMIT 1; |
| Comments |
| Comment by Mike Archipley [ 2020-09-15 ] | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Hi David, Regards, | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Comment by Todd Stoffel (Inactive) [ 2020-09-20 ] | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
We are going to need the DDL and the version before we can reproduce. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Comment by David Hall (Inactive) [ 2020-09-22 ] | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
I have re-created the test from the sample data. The bug is reproducible. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Comment by David Hall (Inactive) [ 2020-09-22 ] | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Added check for string types. We should not be comparing strings as signed int | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Comment by Daniel Lee (Inactive) [ 2020-09-25 ] | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Build verified: 5.4.1 ( Drone #759) Reproduced the issue in 1.5.3-1 MariaDB [mytest]> SELECT ANI_Digits,Call_Date,Call_Direction,DATE_FORMAT( '2008-12-31 ' + INTERVAL Call_Duration SECOND, '%H:%i:%s' ) as Call_Duration,ROUND( ( Call_Duration / 60.0) , 2 ) AS Minutes, Call_Time,Dialed_Digits,Extension,Hub_Site,Incoming_Trunk,Location_Code,NPA,NXX,Outgoing_Trunk,Site_Code FROM avaya WHERE Call_Date BETWEEN '2020-01-02 00:00:00' AND '2020-01-03 00:00:00' LIMIT 5;
-----------
----------- MariaDB [mytest]> SELECT ANI_Digits,Call_Date,Call_Direction,DATE_FORMAT( '2008-12-31 ' + INTERVAL Call_Duration SECOND, '%H:%i:%s' ) as Call_Duration,ROUND( ( Call_Duration / 60.0) , 2 ) AS Minutes, Call_Time,Dialed_Digits,Extension,Hub_Site,Incoming_Trunk,Location_Code,NPA,NXX,Outgoing_Trunk,Site_Code FROM avaya WHERE Call_Date BETWEEN '2020-01-02 00:00:00' AND '2020-01-03 00:00:00' AND Site_Code='kch' LIMIT 5;
-----------
----------- MariaDB [mytest]> SELECT ANI_Digits,Call_Date,Call_Direction,DATE_FORMAT( '2008-12-31 ' + INTERVAL Call_Duration SECOND, '%H:%i:%s' ) as Call_Duration,ROUND( ( Call_Duration / 60.0) , 2 ) AS Minutes, Call_Time,Dialed_Digits,Extension,Hub_Site,Incoming_Trunk,Location_Code,NPA,NXX,Outgoing_Trunk,Site_Code FROM avaya WHERE Call_Date BETWEEN '2020-01-02 00:00:00' AND '2020-01-03 00:00:00' AND Site_Code LIKE 'kch' LIMIT 5;
-----------
----------- |