You've already forked mariadb-columnstore-engine
mirror of
https://github.com/mariadb-corporation/mariadb-columnstore-engine.git
synced 2025-07-29 08:21:15 +03:00
MCOL-4323: use vlarray.h
This commit is contained in:
@ -5,6 +5,7 @@ using namespace std;
|
||||
#include "functor_str.h"
|
||||
#include "funchelpers.h"
|
||||
#include "functioncolumn.h"
|
||||
#include "vlarray.h"
|
||||
using namespace execplan;
|
||||
|
||||
namespace funcexp
|
||||
@ -51,8 +52,8 @@ string Func_decode::getStrVal(rowgroup::Row& row,
|
||||
|
||||
int nStrLen = str.length();
|
||||
int nPassLen = password.length();
|
||||
char res[nStrLen+1];
|
||||
memset(res,0,nStrLen+1);
|
||||
utils::VLArray<char> res(nStrLen + 1);
|
||||
memset(res.data(),0,nStrLen+1);
|
||||
|
||||
if (!fSeeded)
|
||||
{
|
||||
@ -61,11 +62,11 @@ string Func_decode::getStrVal(rowgroup::Row& row,
|
||||
fSeeded = true;
|
||||
}
|
||||
|
||||
memcpy(res,str.c_str(),nStrLen);
|
||||
sql_crypt.decode(res,nStrLen);
|
||||
memcpy(res.data(),str.c_str(),nStrLen);
|
||||
sql_crypt.decode(res.data(),nStrLen);
|
||||
sql_crypt.reinit();
|
||||
|
||||
return res;
|
||||
return res.data();
|
||||
}
|
||||
|
||||
}
|
||||
|
Reference in New Issue
Block a user