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

Merge branch 'connect/10.2' into 10.2

This commit is contained in:
Sergei Golubchik
2017-11-22 17:38:30 +01:00
8 changed files with 113 additions and 78 deletions

View File

@@ -1507,23 +1507,16 @@ static my_bool CheckMemory(PGLOBAL g, UDF_INIT *initid, UDF_ARGS *args, uint n,
ml += g->More;
if (ml > g->Sarea_Size) {
#if !defined(DEVELOPMENT)
if (trace)
#endif
htrc("Freeing Sarea at %p size=%d\n", g->Sarea, g->Sarea_Size);
FreeSarea(g);
free(g->Sarea);
if (!(g->Sarea = PlugAllocMem(g, ml))) {
if (AllocSarea(g, ml)) {
char errmsg[MAX_STR];
snprintf(errmsg, sizeof(errmsg)-1, MSG(WORK_AREA), g->Message);
strcpy(g->Message, errmsg);
g->Sarea_Size = 0;
return true;
} // endif Alloc
} // endif SareaAlloc
g->Sarea_Size = ml;
g->Createas = 0;
g->Xchk = NULL;
initid->max_length = rl;