Changeset: 35b5a15bb288 for MonetDB URL: https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=35b5a15bb288 Modified Files: sql/backends/monet5/sql_user.c sql/server/sql_mvc.c sql/server/sql_mvc.h sql/server/sql_semantic.c Branch: scoping2 Log Message:
Renamed variables diffs (131 lines): diff --git a/sql/backends/monet5/sql_user.c b/sql/backends/monet5/sql_user.c --- a/sql/backends/monet5/sql_user.c +++ b/sql/backends/monet5/sql_user.c @@ -64,7 +64,7 @@ monet5_drop_user(ptr _mvc, str user) static str parse_schema_path_str(mvc *m, str schema_path, bool build) { - list *l = m->search_path; + list *l = m->schema_path; char next_schema[1024]; /* needs one extra character for null terminator */ size_t len = strlen(schema_path), status = outside_str, bp = 0; @@ -72,7 +72,7 @@ parse_schema_path_str(mvc *m, str schema throw(SQL, "sql.schema_path", SQLSTATE(42000) "A schema path cannot be NULL"); if (build) - while (l->t) /* if building, empty search_path list */ + while (l->t) /* if building, empty schema_path list */ (void) list_remove_node(l, l->t); for (size_t i = 0 ; i < len; i++) { @@ -96,9 +96,9 @@ parse_schema_path_str(mvc *m, str schema throw(SQL, "sql.schema_path", SQLSTATE(HY013) MAL_MALLOC_FAIL); } if (strcmp(next_schema, "sys") == 0) - m->search_path_has_sys = 1; + m->schema_path_has_sys = 1; else if (strcmp(next_schema, "tmp") == 0) - m->search_path_has_tmp = 1; + m->schema_path_has_tmp = 1; } bp = 0; diff --git a/sql/server/sql_mvc.c b/sql/server/sql_mvc.c --- a/sql/server/sql_mvc.c +++ b/sql/server/sql_mvc.c @@ -828,20 +828,20 @@ mvc_create(sql_allocator *pa, int client m->label = 0; m->cascade_action = NULL; - if (!(m->search_path = list_create((fdestroy)GDKfree))) { + if (!(m->schema_path = list_create((fdestroy)GDKfree))) { qc_destroy(m->qc); list_destroy(m->global_vars); return NULL; } - if (!(sys_str = _STRDUP("sys")) || !list_append(m->search_path, sys_str)) { + if (!(sys_str = _STRDUP("sys")) || !list_append(m->schema_path, sys_str)) { _DELETE(sys_str); qc_destroy(m->qc); list_destroy(m->global_vars); - list_destroy(m->search_path); + list_destroy(m->schema_path); return NULL; } - m->search_path_has_sys = 1; - m->search_path_has_tmp = 0; + m->schema_path_has_sys = 1; + m->schema_path_has_tmp = 0; store_lock(); m->session = sql_session_create(1 /*autocommit on*/); @@ -849,7 +849,7 @@ mvc_create(sql_allocator *pa, int client if (!m->session) { qc_destroy(m->qc); list_destroy(m->global_vars); - list_destroy(m->search_path); + list_destroy(m->schema_path); return NULL; } @@ -934,7 +934,7 @@ mvc_destroy(mvc *m) store_unlock(); list_destroy(m->global_vars); - list_destroy(m->search_path); + list_destroy(m->schema_path); stack_pop_until(m, 0); if (m->scanner.log) /* close and destroy stream */ diff --git a/sql/server/sql_mvc.h b/sql/server/sql_mvc.h --- a/sql/server/sql_mvc.h +++ b/sql/server/sql_mvc.h @@ -122,8 +122,8 @@ typedef struct mvc { struct symbol *sym; int8_t use_views:1, - search_path_has_sys:1, /* speed up objcect lookup */ - search_path_has_tmp:1; + schema_path_has_sys:1, /* speed up objcect lookup */ + schema_path_has_tmp:1; struct qc *qc; int clientid; /* id of the owner */ @@ -145,7 +145,7 @@ typedef struct mvc { /* during query needed flags */ unsigned int label; /* numbers for relational projection labels */ list *cascade_action; /* protection against recursive cascade actions */ - list *search_path; /* schema search path for object lookup */ + list *schema_path; /* schema search path for object lookup */ } mvc; extern sql_table *mvc_init_create_view(mvc *sql, sql_schema *s, const char *name, const char *query); diff --git a/sql/server/sql_semantic.c b/sql/server/sql_semantic.c --- a/sql/server/sql_semantic.c +++ b/sql/server/sql_semantic.c @@ -118,7 +118,7 @@ tmp_schema(mvc *sql) char *session_schema = cur->base.name; \ \ EXTRA; \ - if (!res && !sql->search_path_has_tmp && strcmp(session_schema, "tmp") != 0) { /* if 'tmp' is not in the search path, search it before all others */ \ + if (!res && !sql->schema_path_has_tmp && strcmp(session_schema, "tmp") != 0) { /* if 'tmp' is not in the search path, search it before all others */ \ next = mvc_bind_schema(sql, "tmp"); \ CALL; \ } \ @@ -128,13 +128,13 @@ tmp_schema(mvc *sql) } \ if (!res) { \ /* object not found yet, look inside search path */ \ - for (node *n = sql->search_path->h ; n && !res ; n = n->next) { \ + for (node *n = sql->schema_path->h ; n && !res ; n = n->next) { \ str p = (str) n->data; \ if (strcmp(session_schema, p) != 0 && (next = mvc_bind_schema(sql, p))) \ CALL; \ } \ } \ - if (!res && !sql->search_path_has_sys && strcmp(session_schema, "sys") != 0) { /* if 'sys' is not in the current path search it next */ \ + if (!res && !sql->schema_path_has_sys && strcmp(session_schema, "sys") != 0) { /* if 'sys' is not in the current path search it next */ \ next = mvc_bind_schema(sql, "sys"); \ CALL; \ } \ _______________________________________________ checkin-list mailing list checkin-list@monetdb.org https://www.monetdb.org/mailman/listinfo/checkin-list