Changeset: fcaf19f905ca for MonetDB
URL: https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=fcaf19f905ca
Modified Files:
        sql/server/rel_dump.c
        sql/server/rel_psm.c
Branch: scoping
Log Message:

Avoid time of check, time of use race condition on rare occasions


diffs (24 lines):

diff --git a/sql/server/rel_dump.c b/sql/server/rel_dump.c
--- a/sql/server/rel_dump.c
+++ b/sql/server/rel_dump.c
@@ -1527,7 +1527,7 @@ rel_read(mvc *sql, char *r, int *pos, li
                        skipWS(r, pos);
                        if (!(s = mvc_bind_schema(sql, sname)))
                                return sql_error(sql, -1, SQLSTATE(3F000) "No 
such schema '%s'\n", sname);
-                       if (!(t = find_table_on_scope(sql, &s, sname, tname)))
+                       if (!(t = mvc_bind_table(sql, s, tname)))
                                return sql_error(sql, -1, SQLSTATE(42S02) 
"Table missing '%s.%s'\n", sname, tname);
                        if (isMergeTable(t))
                                return sql_error(sql, -1, SQLSTATE(42000) 
"Merge tables not supported under remote connections\n");
diff --git a/sql/server/rel_psm.c b/sql/server/rel_psm.c
--- a/sql/server/rel_psm.c
+++ b/sql/server/rel_psm.c
@@ -1325,7 +1325,7 @@ create_trigger(sql_query *query, dlist *
        }
 
        if (!instantiate) {
-               t = find_table_on_scope(sql, &ss, sname, tname);
+               t = mvc_bind_table(sql, ss, tname);
                if (!stack_push_frame(sql, "OLD-NEW"))
                        return sql_error(sql, 02, SQLSTATE(HY013) 
MAL_MALLOC_FAIL);
                /* we need to add the old and new tables */
_______________________________________________
checkin-list mailing list
[email protected]
https://www.monetdb.org/mailman/listinfo/checkin-list

Reply via email to