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
Remove variable-length arrays (-Wvla)
This commit is contained in:
@ -604,11 +604,13 @@ int PrimitiveProcessor::convertToRegexp(idb_regex_t* regex, const p_DataValue* s
|
||||
bool PrimitiveProcessor::isLike(const p_DataValue* dict, const idb_regex_t* regex) throw()
|
||||
{
|
||||
#ifdef POSIX_REGEX
|
||||
char cBuf[dict->len + 1];
|
||||
char* cBuf = new char[dict->len + 1];
|
||||
memcpy(cBuf, dict->data, dict->len);
|
||||
cBuf[dict->len] = '\0';
|
||||
|
||||
return (regexec(®ex->regex, cBuf, 0, NULL, 0) == 0);
|
||||
bool ret = (regexec(®ex->regex, cBuf, 0, NULL, 0) == 0);
|
||||
delete [] cBuf;
|
||||
return ret;
|
||||
#else
|
||||
/* Note, the passed-in pointers are effectively begin() and end() iterators */
|
||||
return regex_match(dict->data, dict->data + dict->len, regex->regex);
|
||||
|
@ -53,6 +53,7 @@ using namespace boost;
|
||||
#include "blockcacheclient.h"
|
||||
#include "MonitorProcMem.h"
|
||||
#include "threadnaming.h"
|
||||
#include "vlarray.h"
|
||||
|
||||
#define MAX64 0x7fffffffffffffffLL
|
||||
#define MIN64 0x8000000000000000LL
|
||||
@ -589,7 +590,7 @@ void BatchPrimitiveProcessor::addToJoiner(ByteStream& bs)
|
||||
// properly-named functions for clarity.
|
||||
if (typelessJoin[joinerNum])
|
||||
{
|
||||
vector<pair<TypelessData, uint32_t> > tmpBuckets[processorThreads];
|
||||
utils::VLArray<vector<pair<TypelessData, uint32_t> > > tmpBuckets(processorThreads);
|
||||
TypelessData tlLargeKey;
|
||||
uint8_t nullFlag;
|
||||
PoolAllocator &storedKeyAllocator = storedKeyAllocators[joinerNum];
|
||||
@ -652,7 +653,7 @@ void BatchPrimitiveProcessor::addToJoiner(ByteStream& bs)
|
||||
uint64_t nullValue = joinNullValues[joinerNum];
|
||||
bool &l_doMatchNulls = doMatchNulls[joinerNum];
|
||||
joblist::JoinType joinType = joinTypes[joinerNum];
|
||||
vector<pair<uint64_t, uint32_t> > tmpBuckets[processorThreads];
|
||||
utils::VLArray<vector<pair<uint64_t, uint32_t> > > tmpBuckets(processorThreads);
|
||||
|
||||
if (joinType & MATCHNULLS)
|
||||
{
|
||||
|
Reference in New Issue
Block a user