Overview
SHA1 Hash: | 2be82dcc2aba6fdcb5fed4ca4eebaf216403eb64 |
---|---|
Date: | 2008-12-07 18:48:09 |
User: | drh |
Comment: | The server now issues error messages in the synchronization
protocol when a database error occurs during sync.
Ticket |
Timelines: | ancestors | descendants | both | trunk |
Other Links: | files | ZIP archive | manifest |
Tags And Properties
- branch=trunk inherited from [a28c83647d]
- sym-trunk inherited from [a28c83647d]
Changes
[hide diffs]Modified src/db.c from [3391579825] to [d80fba43ab].
@@ -66,10 +66,15 @@ va_list ap; char *z; va_start(ap, zFormat); z = vmprintf(zFormat, ap); va_end(ap); + if( g.xferPanic ){ + cgi_reset_content(); + @ error Database\serror:\s%F(z) + cgi_reply(); + } if( g.cgiPanic ){ g.cgiPanic = 0; cgi_printf("<h1>Database Error</h1>\n" "<pre>%h</pre>", z); cgi_reply();
Modified src/main.c from [3a813bc47a] to [ae77223909].
@@ -72,10 +72,11 @@ const char *zContentType; /* The content type of the input HTTP request */ int iErrPriority; /* Priority of current error message */ char *zErrMsg; /* Text of an error message */ Blob cgiIn; /* Input to an xfer www method */ int cgiPanic; /* Write error messages to CGI */ + int xferPanic; /* Write error messages in XFER protocol */ int fullHttpReply; /* True for full HTTP reply. False for CGI reply */ Th_Interp *interp; /* The TH1 interpreter */ FILE *httpIn; /* Accept HTTP input from here */ FILE *httpOut; /* Send HTTP output here */ int xlinkClusterOnly; /* Set when cloning. Only process clusters */
Modified src/xfer.c from [9bceefbd60] to [bf89ac3d22].
@@ -539,10 +539,11 @@ cgi_set_content_type(g.zContentType); blob_zero(&xfer.err); xfer.pIn = &g.cgiIn; xfer.pOut = cgi_output_blob(); xfer.mxSend = db_get_int("max-download", 5000000); + g.xferPanic = 1; db_begin_transaction(); db_multi_exec( "CREATE TEMP TABLE onremote(rid INTEGER PRIMARY KEY);" );