1
0
mirror of https://github.com/MariaDB/server.git synced 2025-08-08 11:22:35 +03:00

Merge 10.5 into 10.6

This commit is contained in:
Marko Mäkelä
2021-05-07 15:00:27 +03:00
110 changed files with 1776 additions and 527 deletions

View File

@@ -54,15 +54,24 @@ char *GetExceptionDesc(PGLOBAL g, unsigned int e);
#endif // SE_CATCH
char *GetJsonNull(void);
int GetDefaultPrec(void);
/***********************************************************************/
/* IsNum: check whether this string is all digits. */
/***********************************************************************/
bool IsNum(PSZ s) {
for (char* p = s; *p; p++)
bool IsNum(PSZ s)
{
char* p = s;
if (*p == '-')
p++;
if (*p == ']')
return false;
else for (; *p; p++)
if (*p == ']')
break;
else if (!isdigit(*p) || *p == '-')
else if (!isdigit(*p))
return false;
return true;
@@ -1257,6 +1266,8 @@ PJVAL JARRAY::GetArrayValue(int i)
{
if (Mvals && i >= 0 && i < Size)
return Mvals[i];
else if (Mvals && i < 0 && i >= -Size)
return Mvals[Size + i];
else
return NULL;
} // end of GetValue
@@ -1755,7 +1766,7 @@ void JVALUE::SetBigint(PGLOBAL g, long long ll)
void JVALUE::SetFloat(PGLOBAL g, double f)
{
F = f;
Nd = 6;
Nd = GetDefaultPrec();
DataType = TYPE_DBL;
} // end of SetFloat