I create a MyISAM table with some string columns with the latin1_bin collation, insert 122881 records and run a query with a WHERE condition which matches all those records:
It returns all records as expected:
Now I make a ColumnStore table with the same structure and data and run the same SELECT query:
Notice, it returns a wrong result.
Moreover, if I repeat the last query multiple times, it can also return a result like this:
But it never returns the expected result 122881.
The problem happens because this method:
misses these two lines:
Note, the same method of the parent class, i.e. FilterCommand::duplicate(), does have these two lines!
StrFilterCmd::duplicate() fully duplicates FilterCommand::duplicate() with the exeption that the mentioned two members are not coppied.
To fix this problem and to avoid similar bugs in the future, the duplicate code should be removed.
StrFilterCmd::duplicate() should just call the inherited FilterCommand::duplicate(), then additionally copy its specific members.