Changeset: b3dcba788f77 for MonetDB
URL: https://dev.monetdb.org/hg/MonetDB/rev/b3dcba788f77
Modified Files:
        sql/storage/store.c
Branch: default
Log Message:

Merge with Dec2025 branch.


diffs (70 lines):

diff --git a/ctest/tools/monetdbe/Tests/example_backup.bat 
b/ctest/tools/monetdbe/Tests/example_backup.bat
deleted file mode 100644
--- a/ctest/tools/monetdbe/Tests/example_backup.bat
+++ /dev/null
@@ -1,2 +0,0 @@
-@echo off
-example_backup.exe > nul
diff --git a/ctest/tools/monetdbe/Tests/example_backup.sh 
b/ctest/tools/monetdbe/Tests/example_backup.sh
--- a/ctest/tools/monetdbe/Tests/example_backup.sh
+++ b/ctest/tools/monetdbe/Tests/example_backup.sh
@@ -1,2 +1,4 @@
 #!/bin/sh
-example_backup > /dev/null
+f=$(mktemp)
+trap "rm -f $f" EXIT
+example_backup $f > /dev/null
diff --git a/ctest/tools/monetdbe/Tests/example_copy.bat 
b/ctest/tools/monetdbe/Tests/example_copy.bat
deleted file mode 100644
--- a/ctest/tools/monetdbe/Tests/example_copy.bat
+++ /dev/null
@@ -1,2 +0,0 @@
-@echo off
-example_copy.exe > nul
diff --git a/ctest/tools/monetdbe/example_backup.c 
b/ctest/tools/monetdbe/example_backup.c
--- a/ctest/tools/monetdbe/example_backup.c
+++ b/ctest/tools/monetdbe/example_backup.c
@@ -14,7 +14,7 @@
 #define error(msg) do{fprintf(stderr, "Failure: %s\n", msg); return 
-1;}while(0)
 
 int
-main(void)
+main(int argc, char **argv)
 {
        char* err = NULL;
        monetdbe_database mdbe;
@@ -29,7 +29,7 @@ main(void)
        if ((err = monetdbe_query(mdbe, "INSERT INTO test VALUES (TRUE, 42, 42, 
42, 42, 42, 42.42, 42.42, 'Hello'), (NULL, NULL, NULL, NULL, NULL, NULL, NULL, 
NULL, 'World')", NULL, NULL)) != NULL)
                error(err);
 
-       err = monetdbe_dump_database(mdbe, "/tmp/backup");
+       err = monetdbe_dump_database(mdbe, argc > 1 ? argv[1] : "/tmp/backup");
        if (err)
                error(err);
        if (monetdbe_close(mdbe))
diff --git a/sql/storage/store.c b/sql/storage/store.c
--- a/sql/storage/store.c
+++ b/sql/storage/store.c
@@ -78,10 +78,11 @@ store_oldest_pending(sqlstore *store)
        return store->oldest_pending;
 }
 
+static sqlid highest_id; /* highest id doled out by bootstrap_create_column */
 static inline bool
 instore(sqlid id)
 {
-       if (id >= 2000 && id <= 2171)
+       if (id >= 2000 && id <= highest_id)
                return true;
        return false;
 }
@@ -1628,6 +1629,9 @@ bootstrap_create_column(sql_trans *tr, s
        sqlstore *store = tr->store;
        sql_column *col = ZNEW(sql_column);
 
+       if (id > highest_id)
+               highest_id = id;
+
        if ((sqlid) ATOMIC_GET(&store->obj_id) <= id)
                ATOMIC_SET(&store->obj_id, id + 1);
        TRC_DEBUG(SQL_STORE, "Create column: %s\n", name);
_______________________________________________
checkin-list mailing list -- [email protected]
To unsubscribe send an email to [email protected]

Reply via email to