You've already forked mariadb-columnstore-engine
mirror of
https://github.com/mariadb-corporation/mariadb-columnstore-engine.git
synced 2025-07-30 19:23:07 +03:00
A cleanup for MCOL-4064 Make JOIN collation aware
After creating and populating tables with CHAR(5) case insensitive columns, in a set of consequent joins like: select * from t1, t2 where t1.c1=t2.c1; select * from t1, t2 where t1.c1=t2.c2; select * from t1, t2 where t1.c2=t2.c1; select * from t1, t2 where t1.c2=t2.c2; only the first join worked reliably case insensitively. Removing the remaining pieces of the code that used order_swap() to compare short CHAR columns, and using Charset::strnncollsp() instead. This fixes the issue.
This commit is contained in:
@ -30,6 +30,7 @@
|
||||
#include "lbidlist.h"
|
||||
#include "spinlock.h"
|
||||
#include "vlarray.h"
|
||||
#include "mcs_string.h"
|
||||
|
||||
|
||||
using namespace std;
|
||||
@ -1127,15 +1128,16 @@ void TupleJoiner::updateCPData(const Row& r)
|
||||
|
||||
if (r.isCharType(colIdx))
|
||||
{
|
||||
datatypes::Charset cs(r.getCharset(col));
|
||||
int64_t val = r.getIntField(colIdx);
|
||||
|
||||
if (order_swap(val) < order_swap((int64_t) min) ||
|
||||
if (datatypes::TCharShort::strnncollsp(cs, val, min) < 0 ||
|
||||
((int64_t) min) == numeric_limits<int64_t>::max())
|
||||
{
|
||||
min = val;
|
||||
}
|
||||
|
||||
if (order_swap(val) > order_swap((int64_t) max) ||
|
||||
if (datatypes::TCharShort::strnncollsp(cs, val, max) > 0 ||
|
||||
((int64_t) max) == numeric_limits<int64_t>::min())
|
||||
{
|
||||
max = val;
|
||||
|
Reference in New Issue
Block a user