Changeset: e2c3c933fb78 for MonetDB URL: https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=e2c3c933fb78 Modified Files: monetdb5/mal/mal_client.h sql/backends/monet5/sql_execute.c sql/backends/monet5/sql_scenario.c Branch: default Log Message:
Merge with Apr2019 branch. diffs (74 lines): diff --git a/monetdb5/mal/mal_client.h b/monetdb5/mal/mal_client.h --- a/monetdb5/mal/mal_client.h +++ b/monetdb5/mal/mal_client.h @@ -191,8 +191,8 @@ typedef struct CLIENT { size_t blocksize; protocol_version protocol; - bool filetrans; /* whether the client can read files for us */ - const char *query; /* string, identify whatever we're working on */ + bool filetrans; /* whether the client can read files for us */ + char *query; /* string, identify whatever we're working on */ } *Client, ClientRec; mal_export void MCinit(void); diff --git a/sql/backends/monet5/sql_execute.c b/sql/backends/monet5/sql_execute.c --- a/sql/backends/monet5/sql_execute.c +++ b/sql/backends/monet5/sql_execute.c @@ -759,7 +759,7 @@ SQLengineIntern(Client c, backend *be) if (oldlang == 'X') { /* return directly from X-commands */ sqlcleanup(be->mvc, 0); - q = (char *) c->query; + q = c->query; c->query = NULL; GDKfree(q); return MAL_SUCCEED; @@ -781,7 +781,7 @@ SQLengineIntern(Client c, backend *be) goto cleanup_engine; } sqlcleanup(be->mvc, 0); - q = (char *) c->query; + q = c->query; c->query = NULL; GDKfree(q); return MAL_SUCCEED; @@ -829,7 +829,7 @@ cleanup_engine: MSresetInstructions(c->curprg->def, 1); freeVariables(c, c->curprg->def, NULL, be->vtop); be->language = oldlang; - q = (char *) c->query; + q = c->query; c->query = NULL; GDKfree(q); /* diff --git a/sql/backends/monet5/sql_scenario.c b/sql/backends/monet5/sql_scenario.c --- a/sql/backends/monet5/sql_scenario.c +++ b/sql/backends/monet5/sql_scenario.c @@ -1036,10 +1036,9 @@ SQLparser(Client c) char *q = NULL; /* clean up old stuff */ - msg = (char *) c->query; + q = c->query; c->query = NULL; - GDKfree(msg); /* may be NULL */ - msg = NULL; + GDKfree(q); /* may be NULL */ be = (backend *) c->sqlcontext; if (be == 0) { @@ -1335,8 +1334,12 @@ SQLparser(Client c) } } finalize: - if (msg) + if (msg) { sqlcleanup(m, 0); + q = c->query; + c->query = NULL; + GDKfree(q); + } return msg; } _______________________________________________ checkin-list mailing list checkin-list@monetdb.org https://www.monetdb.org/mailman/listinfo/checkin-list