Changeset: 50a123e080b0 for MonetDB
URL: https://dev.monetdb.org/hg/MonetDB/rev/50a123e080b0
Modified Files:
gdk/gdk.h
gdk/gdk_utils.c
monetdb5/modules/mal/txtsim.c
sql/storage/store.c
Branch: Aug2024
Log Message:
merged with dec2023
diffs (120 lines):
diff --git a/clients/odbc/driver/ODBCError.c b/clients/odbc/driver/ODBCError.c
--- a/clients/odbc/driver/ODBCError.c
+++ b/clients/odbc/driver/ODBCError.c
@@ -373,27 +373,6 @@ appendODBCError(ODBCError **head, ODBCEr
}
-#if 0 /* unused */
-/*
- * Prepends a valid ODBCError object 'err' to the front of the list
- * of a valid ODBCError object 'head' and return the new head.
- *
- * Precondition: both head and err must be valid (non NULL)
- * Returns: the new head (which is the same as the prepended 'err').
- */
-void
-prependODBCError(ODBCError **head, ODBCError *err)
-{
- assert(head);
- assert(err);
- assert(err->next == NULL);
-
- err->next = *head;
- *head = err;
-}
-#endif
-
-
/*
* Frees the ODBCError object including its linked ODBCError objects.
*
diff --git a/clients/odbc/driver/ODBCError.h b/clients/odbc/driver/ODBCError.h
--- a/clients/odbc/driver/ODBCError.h
+++ b/clients/odbc/driver/ODBCError.h
@@ -110,18 +110,6 @@ int getErrorRecCount(ODBCError *error);
void appendODBCError(ODBCError **head, ODBCError *err);
-#if 0 /* unused */
-/*
- * Prepends a valid ODBCError object 'this' to the front of the list
- * of a valid ODBCError object 'head' and return the new head.
- *
- * Precondition: both head and this must be valid (non NULL)
- * Returns: the new head (which is the same as the prepended 'this').
- */
-void prependODBCError(ODBCError **head, ODBCError *err);
-#endif
-
-
/*
* Frees the ODBCError object including its linked ODBCError objects.
*
diff --git a/gdk/gdk.h b/gdk/gdk.h
--- a/gdk/gdk.h
+++ b/gdk/gdk.h
@@ -1087,7 +1087,7 @@ bat_iterator_nolock(BAT *b)
{
/* does not get matched by bat_iterator_end */
if (b) {
- bool isview = VIEWtparent(b);
+ const bool isview = VIEWtparent(b) != 0;
return (BATiter) {
.b = b,
.h = b->theap,
diff --git a/gdk/gdk_utils.c b/gdk/gdk_utils.c
--- a/gdk/gdk_utils.c
+++ b/gdk/gdk_utils.c
@@ -378,19 +378,7 @@ GDKlog(FILE *lockFile, const char *forma
/*
* @+ Interrupt handling
- * The current version simply catches signals and prints a warning.
- * It should be extended to cope with the specifics of the interrupt
- * received.
*/
-#if 0 /* these are unused */
-static void
-BATSIGignore(int nr)
-{
- (void) nr;
- GDKsyserror("! ERROR signal %d caught by thread %zu\n", nr, (size_t)
MT_getpid());
-}
-#endif
-
#ifdef WIN32
static void
BATSIGabort(int nr)
diff --git a/monetdb5/modules/mal/txtsim.c b/monetdb5/modules/mal/txtsim.c
--- a/monetdb5/modules/mal/txtsim.c
+++ b/monetdb5/modules/mal/txtsim.c
@@ -247,7 +247,7 @@ levenshtein(int *res, const char *x, con
throw(MAL, "txtsim.levenshtein", "Illegal unicode code point");
}
-/* Levenshtein OP but with column externaly allocated */
+/* Levenshtein OP but with column externally allocated */
static inline int
levenshtein2(const char *x, const char *y, const size_t xlen, const size_t
ylen,
unsigned int *column, const int insdel_cost,
diff --git a/sql/storage/store.c b/sql/storage/store.c
--- a/sql/storage/store.c
+++ b/sql/storage/store.c
@@ -6330,6 +6330,7 @@ sql_trans_alter_null(sql_trans *tr, sql_
if ((res = new_column(tr, col, &dup)))
return res;
+ col = dup;
dup->null = isnull;
/* disallow concurrent updates on the column if not null is set
*/
@@ -6340,7 +6341,7 @@ sql_trans_alter_null(sql_trans *tr, sql_
return res;
if ((res = store_reset_sql_functions(tr, col->t->base.id))) /*
reset sql functions depending on the table */
return res;
- if (isNew(col) || isnull)
+ if (isNew(col) || isnull) /* new ie can still change, or
persistent only widen semantics */
store->storage_api.col_not_null(tr, col, !isnull);
}
return res;
_______________________________________________
checkin-list mailing list -- [email protected]
To unsubscribe send an email to [email protected]