Changeset: 8052feda5004 for MonetDB
URL: https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=8052feda5004
Modified Files:
        configure.ag
        sql/backends/monet5/sql_gencode.c
Branch: default
Log Message:

merged


diffs (50 lines):

diff --git a/configure.ag b/configure.ag
--- a/configure.ag
+++ b/configure.ag
@@ -2489,8 +2489,7 @@ stpcpy(char *restrict dst, const char *r
 }
 @%:@endif
 
-@%:@ifndef HAVE_STPCPY
-#ifndef HAVE_STRNCASECMP
+@%:@ifndef HAVE_STRNCASECMP
 #ifdef WIN32
 #ifndef strncasecmp
 #define strncasecmp _strnicmp
@@ -2515,7 +2514,6 @@ strncasecmp(const char *s1, const char *
        return 0;
 }
 #endif
-#endif
 @%:@endif
 
 @%:@if defined(HAVE___INT128)
diff --git a/sql/backends/monet5/sql_gencode.c 
b/sql/backends/monet5/sql_gencode.c
--- a/sql/backends/monet5/sql_gencode.c
+++ b/sql/backends/monet5/sql_gencode.c
@@ -1177,7 +1177,10 @@ mal_function_find_implementation_address
        m->type = Q_PARSE;
        m->user_id = m->role_id = USER_MONETDB;
 
-       if (!(m->session = sql_session_create(0, 0))) {
+       store_lock();
+       m->session = sql_session_create(0, 0);
+       store_unlock();
+       if (!m->session) {
                (void) sql_error(o, 02, SQLSTATE(HY013) MAL_MALLOC_FAIL);
                goto bailout;
        }
@@ -1220,8 +1223,11 @@ mal_function_find_implementation_address
 bailout:
        if (m) {
                bstream_destroy(m->scanner.rs);
-               if (m->session)
-                       sql_session_destroy(m->session); 
+               if (m->session) {
+                       store_lock();
+                       sql_session_destroy(m->session);
+                       store_unlock();
+               }
                if (m->sa)
                        sa_destroy(m->sa);
                _DELETE(m);
_______________________________________________
checkin-list mailing list
checkin-list@monetdb.org
https://www.monetdb.org/mailman/listinfo/checkin-list

Reply via email to