Changeset: cabc2db814c9 for MonetDB
URL: https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=cabc2db814c9
Modified Files:
        sql/storage/store.c
Branch: default
Log Message:

Merged with Oct2020


diffs (68 lines):

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
@@ -346,8 +346,6 @@ CMDqgramnormalize(str *res, str *Input)
  * =========================================================================
  */
 
-#define PARAMS(proto) proto
-
 /*
  * Data on one input string being compared.
  */
@@ -417,9 +415,7 @@ struct partition {
        cause suboptimal diff output.  It cannot cause incorrect diff
        output.  */
 
-static int diag PARAMS((int, int, int, int, int, struct partition *, int, 
struct string_data *, int *, int *));
-
-static int
+static inline int
 diag(int xoff, int xlim, int yoff, int ylim, int minimal, struct partition 
*part, int too_expensive, struct string_data *string, int *fdiag, int *bdiag)
 {
        int *const fd = fdiag;  /* Give the compiler a chance. */
@@ -602,9 +598,7 @@ diag(int xoff, int xlim, int yoff, int y
        If MINIMAL is nonzero, find a minimal difference no matter how
        expensive it is.  */
 
-static void compareseq PARAMS((int, int, int, int, int, int, int, struct 
string_data *, int*, int*));
-
-static void
+static inline void
 compareseq(int xoff, int xlim, int yoff, int ylim, int minimal, int max_edits, 
int too_expensive, struct string_data *string, int *fdiag, int *bdiag) /* 
compareseq stops when edits > max_edits */
 {
        const char *const xv = string[0].data;  /* Help the compiler.  */
diff --git a/sql/server/sql_partition.c b/sql/server/sql_partition.c
--- a/sql/server/sql_partition.c
+++ b/sql/server/sql_partition.c
@@ -352,8 +352,12 @@ initialize_sql_parts(mvc *sql, sql_table
                                                memcpy(nv->value, 
VALget(&vvalue), vvalue.len);
                                                nv->length = vvalue.len;
                                        }
-                                       list_append(p->part.values, nv);
                                        VALclear(&vvalue);
+                                       if (list_append_sorted(p->part.values, 
nv, &found, sql_values_list_element_validate_and_insert)) {
+                                               res = createException(SQL, 
"sql.partition",
+                                                                               
        SQLSTATE(42000) "Internal error while bootstrapping partitioned 
tables");
+                                               goto finish;
+                                       }
                                        if (!ok) {
                                                res = createException(SQL, 
"sql.partition",
                                                                                
          SQLSTATE(42000) "Internal error while bootstrapping partitioned 
tables");
diff --git a/sql/storage/store.c b/sql/storage/store.c
--- a/sql/storage/store.c
+++ b/sql/storage/store.c
@@ -833,12 +833,7 @@ load_value_partition(sql_trans *tr, sql_
                                nextv->value = sa_alloc(tr->sa, vvalue.len);
                                memcpy(nextv->value, VALget(&vvalue), 
vvalue.len);
                                nextv->length = vvalue.len;
-                               if (list_append_sorted(vals, nextv, empty, 
sql_values_list_element_validate_and_insert) != NULL) {
-                                       VALclear(&vvalue);
-                                       table_funcs.rids_destroy(rs);
-                                       list_destroy(vals);
-                                       return -i - 1;
-                               }
+                               list_append(vals, nextv);
                        }
                }
                VALclear(&vvalue);
_______________________________________________
checkin-list mailing list
checkin-list@monetdb.org
https://www.monetdb.org/mailman/listinfo/checkin-list

Reply via email to