Changeset: 1ec6dd9873b8 for MonetDB
URL: https://dev.monetdb.org/hg/MonetDB/rev/1ec6dd9873b8
Branch: Jan2022-strimps-integration
Log Message:
Merge with Jan2022
diffs (45 lines):
diff --git a/sql/server/rel_schema.c b/sql/server/rel_schema.c
--- a/sql/server/rel_schema.c
+++ b/sql/server/rel_schema.c
@@ -1295,15 +1295,11 @@ rel_create_table(sql_query *query, int t
if ((temp != SQL_PERSIST && tt == tt_table && commit_action ==
CA_COMMIT) || temp == SQL_DECLARE)
commit_action = CA_DELETE;
- if (temp != SQL_DECLARED_TABLE) {
- if (temp != SQL_PERSIST && tt == tt_table) {
- if (temp == SQL_LOCAL_TEMP || temp == SQL_GLOBAL_TEMP) {
- if (sname && strcmp(sname, "tmp") != 0)
- return sql_error(sql, 02,
SQLSTATE(3F000) "%s TABLE: %s temporary tables should be stored in the 'tmp'
schema",
-
action, (temp == SQL_LOCAL_TEMP) ? "local" : "global");
- s = mvc_bind_schema(sql, "tmp");
- }
- }
+ if (temp == SQL_LOCAL_TEMP || temp == SQL_GLOBAL_TEMP) {
+ if (sname && strcmp(sname, "tmp") != 0)
+ return sql_error(sql, 02, SQLSTATE(3F000) "%s TABLE: %s
temporary tables should be stored in the 'tmp' schema",
+ action, (temp ==
SQL_LOCAL_TEMP) ? "local" : "global");
+ s = tmp_schema(sql);
}
if (global && mvc_bind_table(sql, s, name)) {
@@ -1379,7 +1375,7 @@ rel_create_table(sql_query *query, int t
if (!sq)
return NULL;
- if ((tt == tt_merge_table || tt == tt_remote || tt ==
tt_replica_table) && with_data)
+ if (tt != tt_table && with_data)
return sql_error(sql, 02, SQLSTATE(42000) "%s TABLE:
cannot create %s 'with data'", action,
TABLE_TYPE_DESCRIPTION(tt, properties));
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
@@ -117,7 +117,7 @@ tmp_schema(mvc *sql)
\
EXTRA; \
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"); \
+ next = tmp_schema(sql); \
CALL; \
} \
if (!res) { /* then current session's schema */ \
_______________________________________________
checkin-list mailing list
[email protected]
https://www.monetdb.org/mailman/listinfo/checkin-list