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

Append value sorted at the right place


diffs (34 lines):

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
[email protected]
https://www.monetdb.org/mailman/listinfo/checkin-list

Reply via email to