summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--doc/doc-txt/ChangeLog4
-rw-r--r--doc/doc-txt/NewStuff10
-rw-r--r--doc/doc-txt/OptionLists.txt3
-rw-r--r--src/OS/Makefile-HP-UX5
-rw-r--r--src/src/globals.c6
-rw-r--r--src/src/globals.h6
-rw-r--r--src/src/lookups/sqlite.c3
-rw-r--r--src/src/readconf.c5
8 files changed, 34 insertions, 8 deletions
diff --git a/doc/doc-txt/ChangeLog b/doc/doc-txt/ChangeLog
index 2be9f29b6..2f3153030 100644
--- a/doc/doc-txt/ChangeLog
+++ b/doc/doc-txt/ChangeLog
@@ -1,4 +1,4 @@
-$Cambridge: exim/doc/doc-txt/ChangeLog,v 1.201 2005/08/08 10:32:58 ph10 Exp $
+$Cambridge: exim/doc/doc-txt/ChangeLog,v 1.202 2005/08/08 10:48:26 ph10 Exp $
Change log file for Exim from version 4.21
-------------------------------------------
@@ -71,6 +71,8 @@ PH/18 Reversed 4.52/PH/17 because the HP-UX user found it wasn't the cause
of the problem. Specifically, suggested +O2 rather than +O1 for the
HP-UX compiler.
+PH/19 Added sqlite_lock_timeout option (David Woodhouse's patch).
+
Exim version 4.52
-----------------
diff --git a/doc/doc-txt/NewStuff b/doc/doc-txt/NewStuff
index 2d653616d..0a23d2d1b 100644
--- a/doc/doc-txt/NewStuff
+++ b/doc/doc-txt/NewStuff
@@ -1,4 +1,4 @@
-$Cambridge: exim/doc/doc-txt/NewStuff,v 1.61 2005/08/02 15:19:20 ph10 Exp $
+$Cambridge: exim/doc/doc-txt/NewStuff,v 1.62 2005/08/08 10:48:26 ph10 Exp $
New Features in Exim
--------------------
@@ -42,6 +42,14 @@ PH/01 Support for SQLite database lookups has been added. This is another
The only character affected by the ${quote_sqlite: operator is a single
quote, which it doubles.
+ The SQLite library handles multiple simultaneous accesses to the database
+ internally. Multiple readers are permitted, but only one process can
+ update at once. Attempts to access the database while it is being updated
+ are rejected after a timeout period, during which the SQLite library
+ waits for the lock to be released. In Exim, the default timeout is set
+ to 5 seconds, but it can be changed by means of the sqlite_lock_timeout
+ option.
+
Note that you must set LOOKUP_SQLITE=yes in Local/Makefile in order to
obtain SQLite support, and you will also need to add -lsqlite3 to the
EXTRALIBS setting. And of course, you have to install SQLite on your
diff --git a/doc/doc-txt/OptionLists.txt b/doc/doc-txt/OptionLists.txt
index 53b76d304..22b83e728 100644
--- a/doc/doc-txt/OptionLists.txt
+++ b/doc/doc-txt/OptionLists.txt
@@ -1,4 +1,4 @@
-$Cambridge: exim/doc/doc-txt/OptionLists.txt,v 1.9 2005/06/21 14:14:55 ph10 Exp $
+$Cambridge: exim/doc/doc-txt/OptionLists.txt,v 1.10 2005/08/08 10:48:26 ph10 Exp $
LISTS OF EXIM OPTIONS
---------------------
@@ -474,6 +474,7 @@ socket string* unset lmtp
spamd_address string + main 4.50 with content scan
split_spool_directory boolean false main 1.70
spool_directory string ++ main
+sqlite_lock_timeout time 5s main 4.53
srv_fail_domains domain list unset dnslookup 4.43
strip_excess_angle_brackets boolean false main
strip_trailing_dot boolean false main
diff --git a/src/OS/Makefile-HP-UX b/src/OS/Makefile-HP-UX
index d0c29f9f9..a28c7ed31 100644
--- a/src/OS/Makefile-HP-UX
+++ b/src/OS/Makefile-HP-UX
@@ -1,10 +1,13 @@
-# $Cambridge: exim/src/OS/Makefile-HP-UX,v 1.3 2005/08/08 10:32:58 ph10 Exp $
+# $Cambridge: exim/src/OS/Makefile-HP-UX,v 1.4 2005/08/08 10:48:27 ph10 Exp $
# Exim: OS-specific make file for HP-UX later than 9
# HP ANSI C compiler
#CC=cc
#CFLAGS=+O2 +Onolimit -z -D_XOPEN_SOURCE_EXTENDED
+# Users of the A.06.00 compiler might need to use +O1 rather than +O2 as
+# there have been some problems reported with this compiler with +O2 set.
+
# gcc
CFLAGS=-O -Wl,-z -D_XOPEN_SOURCE_EXTENDED
diff --git a/src/src/globals.c b/src/src/globals.c
index c233e76bd..fabfe1c24 100644
--- a/src/src/globals.c
+++ b/src/src/globals.c
@@ -1,4 +1,4 @@
-/* $Cambridge: exim/src/src/globals.c,v 1.33 2005/08/02 15:19:20 ph10 Exp $ */
+/* $Cambridge: exim/src/src/globals.c,v 1.34 2005/08/08 10:48:27 ph10 Exp $ */
/*************************************************
* Exim - an Internet mail transport agent *
@@ -87,6 +87,10 @@ uschar *oracle_servers = NULL;
uschar *pgsql_servers = NULL;
#endif
+#ifdef LOOKUP_SQLITE
+int sqlite_lock_timeout = 5;
+#endif
+
#ifdef SUPPORT_MOVE_FROZEN_MESSAGES
BOOL move_frozen_messages = FALSE;
#endif
diff --git a/src/src/globals.h b/src/src/globals.h
index 484a8d4f9..3126f276b 100644
--- a/src/src/globals.h
+++ b/src/src/globals.h
@@ -1,4 +1,4 @@
-/* $Cambridge: exim/src/src/globals.h,v 1.24 2005/08/02 15:19:20 ph10 Exp $ */
+/* $Cambridge: exim/src/src/globals.h,v 1.25 2005/08/08 10:48:27 ph10 Exp $ */
/*************************************************
* Exim - an Internet mail transport agent *
@@ -51,6 +51,10 @@ extern uschar *oracle_servers; /* List of servers and connect info */
extern uschar *pgsql_servers; /* List of servers and connect info */
#endif
+#ifdef LOOKUP_SQLITE
+extern int sqlite_lock_timeout; /* Internal lock waiting timeout */
+#endif
+
#ifdef SUPPORT_MOVE_FROZEN_MESSAGES
extern BOOL move_frozen_messages; /* Get them out of the normal directory */
#endif
diff --git a/src/src/lookups/sqlite.c b/src/src/lookups/sqlite.c
index af4c0eac6..bb024b50e 100644
--- a/src/src/lookups/sqlite.c
+++ b/src/src/lookups/sqlite.c
@@ -1,4 +1,4 @@
-/* $Cambridge: exim/src/src/lookups/sqlite.c,v 1.1 2005/08/01 13:20:28 ph10 Exp $ */
+/* $Cambridge: exim/src/src/lookups/sqlite.c,v 1.2 2005/08/08 10:48:27 ph10 Exp $ */
/*************************************************
* Exim - an Internet mail transport agent *
@@ -36,6 +36,7 @@ if (ret != 0)
debug_printf("Error opening database: %s\n", *errmsg);
}
+sqlite3_busy_timeout(db, 1000 * sqlite_lock_timeout);
return db;
}
diff --git a/src/src/readconf.c b/src/src/readconf.c
index 1cc95b90d..220438ada 100644
--- a/src/src/readconf.c
+++ b/src/src/readconf.c
@@ -1,4 +1,4 @@
-/* $Cambridge: exim/src/src/readconf.c,v 1.11 2005/06/27 14:29:43 ph10 Exp $ */
+/* $Cambridge: exim/src/src/readconf.c,v 1.12 2005/08/08 10:48:27 ph10 Exp $ */
/*************************************************
* Exim - an Internet mail transport agent *
@@ -339,6 +339,9 @@ static optionlist optionlist_config[] = {
#endif
{ "split_spool_directory", opt_bool, &split_spool_directory },
{ "spool_directory", opt_stringptr, &spool_directory },
+#ifdef LOOKUP_SQLITE
+ { "sqlite_lock_timeout", opt_int, &sqlite_lock_timeout },
+#endif
#ifdef EXPERIMENTAL_SRS
{ "srs_config", opt_stringptr, &srs_config },
{ "srs_hashlength", opt_int, &srs_hashlength },