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
Merge branch 'develop-1.2' into develop-merge-up-20190514
This commit is contained in:
@ -89,11 +89,13 @@ std::string Func_insert::getStrVal(rowgroup::Row& row,
|
||||
execplan::CalpontSystemCatalog::ColType&)
|
||||
{
|
||||
string tstr;
|
||||
string tnewstr;
|
||||
stringValue(fp[0], row, isNull, tstr);
|
||||
if (isNull)
|
||||
{
|
||||
return "";
|
||||
}
|
||||
|
||||
string tnewstr;
|
||||
stringValue(fp[3], row, isNull, tnewstr);
|
||||
if (isNull)
|
||||
return "";
|
||||
|
@ -103,8 +103,6 @@ std::string Func_lpad::getStrVal(rowgroup::Row& row,
|
||||
value += 0.5;
|
||||
else if (value < 0)
|
||||
value -= 0.5;
|
||||
else if (value < 0)
|
||||
value -= 0.5;
|
||||
|
||||
int64_t ret = (int64_t) value;
|
||||
|
||||
|
@ -82,7 +82,7 @@ typedef unsigned char uchar;
|
||||
|
||||
char* PrintMD5(uchar md5Digest[16]);
|
||||
char* MD5String(const char* szString);
|
||||
char* MD5File(char* szFilename);
|
||||
//char* MD5File(char* szFilename);
|
||||
|
||||
class md5
|
||||
{
|
||||
@ -236,6 +236,7 @@ char* PrintMD5(uchar md5Digest[16])
|
||||
char chBuffer[256];
|
||||
char chEach[10];
|
||||
int nCount;
|
||||
size_t chEachSize = 0;
|
||||
|
||||
memset(chBuffer, 0, 256);
|
||||
memset(chEach, 0, 10);
|
||||
@ -243,7 +244,8 @@ char* PrintMD5(uchar md5Digest[16])
|
||||
for (nCount = 0; nCount < 16; nCount++)
|
||||
{
|
||||
sprintf(chEach, "%02x", md5Digest[nCount]);
|
||||
strncat(chBuffer, chEach, sizeof(chEach));
|
||||
chEachSize = sizeof(chEach);
|
||||
strncat(chBuffer, chEach, chEachSize);
|
||||
}
|
||||
|
||||
return strdup(chBuffer);
|
||||
@ -263,7 +265,9 @@ char* MD5String(const char* szString)
|
||||
|
||||
}
|
||||
|
||||
// MD5File: Performs the MD5 algorithm on a file (binar or text),
|
||||
// this fcn isn't used, so commenting it
|
||||
#if 0
|
||||
// MD5File: Performs the MD5 algorithm on a file (binary or text),
|
||||
// returning the results as a char*. Returns NULL if it fails.
|
||||
char* MD5File(char* szFilename)
|
||||
{
|
||||
@ -295,7 +299,7 @@ char* MD5File(char* szFilename)
|
||||
|
||||
return NULL; // failed
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
// md5::Init
|
||||
// Initializes a new context.
|
||||
|
@ -93,7 +93,7 @@ std::string Func_repeat::getStrVal(rowgroup::Row& row,
|
||||
|
||||
for ( int i = 0 ; i < count ; i ++ )
|
||||
{
|
||||
if (strcat(result, str.c_str()) == NULL)
|
||||
if (strcat(result, str.c_str()) == NULL) //questionable check
|
||||
return "";
|
||||
}
|
||||
|
||||
|
@ -76,7 +76,7 @@ std::string Func_substring_index::getStrVal(rowgroup::Row& row,
|
||||
if ( count > end )
|
||||
return str;
|
||||
|
||||
if (( count < 0 ) && ((count * -1) > end))
|
||||
if (( count < 0 ) && ((count * -1) > (int64_t) end))
|
||||
return str;
|
||||
|
||||
string value = str;
|
||||
@ -99,8 +99,7 @@ std::string Func_substring_index::getStrVal(rowgroup::Row& row,
|
||||
}
|
||||
else
|
||||
{
|
||||
count = count * -1;
|
||||
size_t end = strlen(str.c_str());
|
||||
count = -count;
|
||||
int pointer = end;
|
||||
int start = 0;
|
||||
|
||||
|
Reference in New Issue
Block a user