[MCOL-191] REGEXP / RLIKE fail 690 tests of 2038 Created: 2016-06-24  Updated: 2023-07-02  Resolved: 2023-07-02

Status: Closed
Project: MariaDB ColumnStore
Component/s: ExeMgr
Affects Version/s: 1.2.4
Fix Version/s: Icebox

Type: Bug Priority: Minor
Reporter: Justin Swanhart (Inactive) Assignee: alexey vorovich (Inactive)
Resolution: Won't Do Votes: 0
Labels: None

Epic Link: ColumnStore Compatibility Improvements

 Description   

git clone https://github.com/greenlion/columnstore_tests.git
sudo yum install php-cli php-mysql php-pear
cd columnstore_tests
git checkout regex
php run_tests --record # record results against MyISAM table
php run_tests --debug | tee out.txt #compare to CS table
Examine out.txt and you will find that the operator returns wrong results for CS compared to MyISAM in 690 of 2038 tests.



 Comments   
Comment by David Hall (Inactive) [ 2019-07-11 ]

There are certain instances where a numeric value in a column as the patterm gives the wrong answer. The same numeric value given as a constant gives the correct answer.

Ex:
In the following, it is clear there is no "2" in the source string, yet the pattern matches true:
select seq, i2u, -18446744073709551600 REGEXP(i2u) from fact where seq = 44;
-------------------------------------------

seq i2u -18446744073709551600 REGEXP(i2u)

-------------------------------------------

44 2 1

-------------------------------------------

Putting a "2" in as an integer constant matches correctly (that is, false result):
MariaDB [test]> select seq, i2u, -18446744073709551600 REGEXP(2) from fact where seq = 44;
-----------------------------------------

seq i2u -18446744073709551600 REGEXP(2)

-----------------------------------------

44 2 0

-----------------------------------------
1 row in set (0.030 sec)

This seems to only be a problem with single digit numerics.

Since the use case for pattern matching against a pattern made out of numerics is a rare edge case, this is a minor bug.
But, of course, as soon as we ignore the bug, somebody will find the use case for it.

Comment by Todd Stoffel (Inactive) [ 2023-07-02 ]

Test suite is based on php5 and no longer works.

Generated at Thu Feb 08 02:19:11 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.