1 |
arfrever 11/02/27 18:21:04 |
2 |
|
3 |
Added: sqlite-3.7.5-SQLITE_OMIT_WAL.patch |
4 |
Log: |
5 |
Fix building with SQLITE_OMIT_WAL defined (bug #353967). |
6 |
|
7 |
(Portage version: 2.2.0_alpha25_p9/cvs/Linux x86_64) |
8 |
|
9 |
Revision Changes Path |
10 |
1.1 dev-db/sqlite/files/sqlite-3.7.5-SQLITE_OMIT_WAL.patch |
11 |
|
12 |
file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-db/sqlite/files/sqlite-3.7.5-SQLITE_OMIT_WAL.patch?rev=1.1&view=markup |
13 |
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-db/sqlite/files/sqlite-3.7.5-SQLITE_OMIT_WAL.patch?rev=1.1&content-type=text/plain |
14 |
|
15 |
Index: sqlite-3.7.5-SQLITE_OMIT_WAL.patch |
16 |
=================================================================== |
17 |
http://www.sqlite.org/src/ci/b9b48dd8dd |
18 |
|
19 |
--- src/pager.c |
20 |
+++ src/pager.c |
21 |
@@ -2851,6 +2851,28 @@ |
22 |
return rc; |
23 |
} |
24 |
|
25 |
+/* |
26 |
+** Update the value of the change-counter at offsets 24 and 92 in |
27 |
+** the header and the sqlite version number at offset 96. |
28 |
+** |
29 |
+** This is an unconditional update. See also the pager_incr_changecounter() |
30 |
+** routine which only updates the change-counter if the update is actually |
31 |
+** needed, as determined by the pPager->changeCountDone state variable. |
32 |
+*/ |
33 |
+static void pager_write_changecounter(PgHdr *pPg){ |
34 |
+ u32 change_counter; |
35 |
+ |
36 |
+ /* Increment the value just read and write it back to byte 24. */ |
37 |
+ change_counter = sqlite3Get4byte((u8*)pPg->pPager->dbFileVers)+1; |
38 |
+ put32bits(((char*)pPg->pData)+24, change_counter); |
39 |
+ |
40 |
+ /* Also store the SQLite version number in bytes 96..99 and in |
41 |
+ ** bytes 92..95 store the change counter for which the version number |
42 |
+ ** is valid. */ |
43 |
+ put32bits(((char*)pPg->pData)+92, change_counter); |
44 |
+ put32bits(((char*)pPg->pData)+96, SQLITE_VERSION_NUMBER); |
45 |
+} |
46 |
+ |
47 |
#ifndef SQLITE_OMIT_WAL |
48 |
/* |
49 |
** This function is invoked once for each page that has already been |
50 |
@@ -2921,29 +2943,6 @@ |
51 |
return rc; |
52 |
} |
53 |
|
54 |
- |
55 |
-/* |
56 |
-** Update the value of the change-counter at offsets 24 and 92 in |
57 |
-** the header and the sqlite version number at offset 96. |
58 |
-** |
59 |
-** This is an unconditional update. See also the pager_incr_changecounter() |
60 |
-** routine which only updates the change-counter if the update is actually |
61 |
-** needed, as determined by the pPager->changeCountDone state variable. |
62 |
-*/ |
63 |
-static void pager_write_changecounter(PgHdr *pPg){ |
64 |
- u32 change_counter; |
65 |
- |
66 |
- /* Increment the value just read and write it back to byte 24. */ |
67 |
- change_counter = sqlite3Get4byte((u8*)pPg->pPager->dbFileVers)+1; |
68 |
- put32bits(((char*)pPg->pData)+24, change_counter); |
69 |
- |
70 |
- /* Also store the SQLite version number in bytes 96..99 and in |
71 |
- ** bytes 92..95 store the change counter for which the version number |
72 |
- ** is valid. */ |
73 |
- put32bits(((char*)pPg->pData)+92, change_counter); |
74 |
- put32bits(((char*)pPg->pData)+96, SQLITE_VERSION_NUMBER); |
75 |
-} |
76 |
- |
77 |
/* |
78 |
** This function is a wrapper around sqlite3WalFrames(). As well as logging |
79 |
** the contents of the list of pages headed by pList (connected by pDirty), |