You've already forked mariadb-columnstore-engine
mirror of
https://github.com/mariadb-corporation/mariadb-columnstore-engine.git
synced 2025-08-08 14:22:09 +03:00
MCOL-1246 Fix string matching for whitespace
For equality string matches other engines ignore trailing whitespace (this does not apply to LIKE matches). So we should do the same. This patch trims whitespace for MIN/MAX extent elimination checks, fixed width columns and dictionary columns during equality matches against constants (SELECT * FROM t1 WHERE b = 'ABC').
This commit is contained in:
@@ -21,6 +21,7 @@
|
||||
|
||||
#include <iostream>
|
||||
#include <boost/scoped_array.hpp>
|
||||
#include <boost/algorithm/string/trim.hpp>
|
||||
#include <sys/types.h>
|
||||
using namespace std;
|
||||
|
||||
@@ -164,7 +165,10 @@ void PrimitiveProcessor::p_TokenByScan(const TokenByScanRequestHeader *h,
|
||||
string arg_utf8;
|
||||
|
||||
if (eqFilter) {
|
||||
bool gotIt = eqFilter->find(string(sig, siglen)) != eqFilter->end();
|
||||
// MCOL-1246 Trim whitespace before match
|
||||
string strData(sig, siglen);
|
||||
boost::trim_right(strData);
|
||||
bool gotIt = eqFilter->find(strData) != eqFilter->end();
|
||||
if ((h->COP1 == COMPARE_EQ && gotIt) || (h->COP1 == COMPARE_NE &&
|
||||
!gotIt))
|
||||
goto store;
|
||||
|
Reference in New Issue
Block a user