summaryrefslogtreecommitdiff
path: root/libraries/db46/patches/patch.4.6.21.3
diff options
context:
space:
mode:
Diffstat (limited to 'libraries/db46/patches/patch.4.6.21.3')
-rw-r--r--libraries/db46/patches/patch.4.6.21.353
1 files changed, 53 insertions, 0 deletions
diff --git a/libraries/db46/patches/patch.4.6.21.3 b/libraries/db46/patches/patch.4.6.21.3
new file mode 100644
index 0000000000..e23a27a02f
--- /dev/null
+++ b/libraries/db46/patches/patch.4.6.21.3
@@ -0,0 +1,53 @@
+*** sequence/sequence.c.orig 2007-05-17 10:18:04.000000000 -0700
+--- sequence/sequence.c 2008-08-14 12:24:23.000000000 -0700
+***************
+*** 252,257 ****
+--- 252,262 ----
+ if ((ret != DB_NOTFOUND && ret != DB_KEYEMPTY) ||
+ !LF_ISSET(DB_CREATE))
+ goto err;
++ if (IS_REP_CLIENT(dbenv) &&
++ !F_ISSET(dbp, DB_AM_NOT_DURABLE)) {
++ ret = __db_rdonly(dbenv, "DB_SEQUENCE->open");
++ goto err;
++ }
+ ret = 0;
+
+ rp = &seq->seq_record;
+***************
+*** 304,310 ****
+ */
+ rp = seq->seq_data.data;
+ if (rp->seq_version == DB_SEQUENCE_OLDVER) {
+! oldver: rp->seq_version = DB_SEQUENCE_VERSION;
+ if (__db_isbigendian()) {
+ if (IS_DB_AUTO_COMMIT(dbp, txn)) {
+ if ((ret =
+--- 309,320 ----
+ */
+ rp = seq->seq_data.data;
+ if (rp->seq_version == DB_SEQUENCE_OLDVER) {
+! oldver: if (IS_REP_CLIENT(dbenv) &&
+! !F_ISSET(dbp, DB_AM_NOT_DURABLE)) {
+! ret = __db_rdonly(dbenv, "DB_SEQUENCE->open");
+! goto err;
+! }
+! rp->seq_version = DB_SEQUENCE_VERSION;
+ if (__db_isbigendian()) {
+ if (IS_DB_AUTO_COMMIT(dbp, txn)) {
+ if ((ret =
+***************
+*** 713,718 ****
+--- 723,734 ----
+
+ MUTEX_LOCK(dbenv, seq->mtx_seq);
+
++ if (handle_check && IS_REP_CLIENT(dbenv) &&
++ !F_ISSET(dbp, DB_AM_NOT_DURABLE)) {
++ ret = __db_rdonly(dbenv, "DB_SEQUENCE->get");
++ goto err;
++ }
++
+ if (rp->seq_min + delta > rp->seq_max) {
+ __db_errx(dbenv, "Sequence overflow");
+ ret = EINVAL;