+2002-01-03 Ken Raeburn <raeburn@mit.edu>
+
+ * btree/bt_put.c (__bt_put): Correctly handle writing out the key
+ or data size on a big-endian 64-bit platform.
+
2001-10-24 Ezra Peisach <epeisach@mit.edu>
* configure.in: Add optional argument to AC_DEFINE to provide
dflags = 0;
if (key->size + data->size > t->bt_ovflsize) {
if (key->size > t->bt_ovflsize) {
+ u_int32_t yuck_this_is_gross_code;
storekey: if (__ovfl_put(t, key, &pg) == RET_ERROR)
return (RET_ERROR);
tkey.data = kb;
tkey.size = NOVFLSIZE;
memmove(kb, &pg, sizeof(db_pgno_t));
+ yuck_this_is_gross_code = key->size;
+ if (yuck_this_is_gross_code != key->size)
+ abort ();
memmove(kb + sizeof(db_pgno_t),
- &key->size, sizeof(u_int32_t));
+ &yuck_this_is_gross_code, sizeof(u_int32_t));
dflags |= P_BIGKEY;
key = &tkey;
}
if (key->size + data->size > t->bt_ovflsize) {
+ u_int32_t yuck_this_is_gross_code = data->size;
if (__ovfl_put(t, data, &pg) == RET_ERROR)
return (RET_ERROR);
tdata.data = db;
tdata.size = NOVFLSIZE;
memmove(db, &pg, sizeof(db_pgno_t));
+ if (yuck_this_is_gross_code != data->size)
+ abort ();
memmove(db + sizeof(db_pgno_t),
- &data->size, sizeof(u_int32_t));
+ &yuck_this_is_gross_code, sizeof(u_int32_t));
dflags |= P_BIGDATA;
data = &tdata;
}
+2002-01-04 Ken Raeburn <raeburn@mit.edu>
+
+ * run.test (test8): If test reports an error, exit with error
+ indication.
+
+ * dbtest.c (compare): Exit with error indication if comparison
+ fails.
+
2000-06-26 Ken Raeburn <raeburn@mit.edu>
* dbtest.c (err): Add format attribute to decl, for typechecking
register size_t len;
register u_char *p1, *p2;
- if (db1->size != db2->size)
+ if (db1->size != db2->size) {
printf("compare failed: key->data len %lu != data len %lu\n",
(u_long) db1->size, (u_long) db2->size);
+ exit (1);
+ }
len = MIN(db1->size, db2->size);
for (p1 = db1->data, p2 = db2->data; len--;)
# Make sure that overflow pages are reused.
test8()
{
- echo "Test 8: btree, hash: repeated small key, big data pairs"
+ echo "Test 8: btree: repeated small key, big data pairs"
rm -f $TMP1
echo "" |
awk 'BEGIN {
printf("r\nkkey1\nr\nkkey2\n");
}
}' > $TMP1
- $PROG btree $TMP1
-# $PROG hash $TMP1
+ $PROG btree $TMP1 || exit 1
+# $PROG hash $TMP1 || exit 1
# No explicit test for success.
}