Fossil SCM
Update the built-in SQLite to version 3.7.9 plus the 8-byte alignment fix in branch-3.7.9.
Commit
0c8d1ca9cd383a48378bf577272366236bf623e2
Parent
24e298edd02f9b8…
2 files changed
+13
-10
+2
-2
+13
-10
| --- src/sqlite3.c | ||
| +++ src/sqlite3.c | ||
| @@ -649,11 +649,11 @@ | ||
| 649 | 649 | ** [sqlite3_libversion_number()], [sqlite3_sourceid()], |
| 650 | 650 | ** [sqlite_version()] and [sqlite_source_id()]. |
| 651 | 651 | */ |
| 652 | 652 | #define SQLITE_VERSION "3.7.9" |
| 653 | 653 | #define SQLITE_VERSION_NUMBER 3007009 |
| 654 | -#define SQLITE_SOURCE_ID "2011-10-29 19:25:08 5b82ec6fbbd2f4195ad06dd911de3817373ad5bf" | |
| 654 | +#define SQLITE_SOURCE_ID "2011-11-14 02:53:54 54cc11981127b52145e39f551d958580b1d45169" | |
| 655 | 655 | |
| 656 | 656 | /* |
| 657 | 657 | ** CAPI3REF: Run-Time Library Version Numbers |
| 658 | 658 | ** KEYWORDS: sqlite3_version, sqlite3_sourceid |
| 659 | 659 | ** |
| @@ -1286,11 +1286,11 @@ | ||
| 1286 | 1286 | ** |
| 1287 | 1287 | ** ^The [SQLITE_FCNTL_WIN32_AV_RETRY] opcode is used to configure automatic |
| 1288 | 1288 | ** retry counts and intervals for certain disk I/O operations for the |
| 1289 | 1289 | ** windows [VFS] in order to work to provide robustness against |
| 1290 | 1290 | ** anti-virus programs. By default, the windows VFS will retry file read, |
| 1291 | -** file write, and file delete opertions up to 10 times, with a delay | |
| 1291 | +** file write, and file delete operations up to 10 times, with a delay | |
| 1292 | 1292 | ** of 25 milliseconds before the first retry and with the delay increasing |
| 1293 | 1293 | ** by an additional 25 milliseconds with each subsequent retry. This |
| 1294 | 1294 | ** opcode allows those to values (10 retries and 25 milliseconds of delay) |
| 1295 | 1295 | ** to be adjusted. The values are changed for all database connections |
| 1296 | 1296 | ** within the same process. The argument is a pointer to an array of two |
| @@ -82100,23 +82100,26 @@ | ||
| 82100 | 82100 | ** Allocate the index structure. |
| 82101 | 82101 | */ |
| 82102 | 82102 | nName = sqlite3Strlen30(zName); |
| 82103 | 82103 | nCol = pList->nExpr; |
| 82104 | 82104 | pIndex = sqlite3DbMallocZero(db, |
| 82105 | - sizeof(Index) + /* Index structure */ | |
| 82106 | - sizeof(tRowcnt)*(nCol+1) + /* Index.aiRowEst */ | |
| 82107 | - sizeof(int)*nCol + /* Index.aiColumn */ | |
| 82108 | - sizeof(char *)*nCol + /* Index.azColl */ | |
| 82109 | - sizeof(u8)*nCol + /* Index.aSortOrder */ | |
| 82110 | - nName + 1 + /* Index.zName */ | |
| 82111 | - nExtra /* Collation sequence names */ | |
| 82105 | + sizeof(Index) + /* Index structure */ | |
| 82106 | + ROUND8(sizeof(tRowcnt)*(nCol+1)) + /* Index.aiRowEst */ | |
| 82107 | + sizeof(char *)*nCol + /* Index.azColl */ | |
| 82108 | + sizeof(int)*nCol + /* Index.aiColumn */ | |
| 82109 | + sizeof(u8)*nCol + /* Index.aSortOrder */ | |
| 82110 | + nName + 1 + /* Index.zName */ | |
| 82111 | + nExtra /* Collation sequence names */ | |
| 82112 | 82112 | ); |
| 82113 | 82113 | if( db->mallocFailed ){ |
| 82114 | 82114 | goto exit_create_index; |
| 82115 | 82115 | } |
| 82116 | 82116 | pIndex->aiRowEst = (tRowcnt*)(&pIndex[1]); |
| 82117 | - pIndex->azColl = (char**)(&pIndex->aiRowEst[nCol+1]); | |
| 82117 | + pIndex->azColl = (char**) | |
| 82118 | + ((char*)pIndex->aiRowEst + ROUND8(sizeof(tRowcnt)*nCol+1)); | |
| 82119 | + assert( EIGHT_BYTE_ALIGNMENT(pIndex->aiRowEst) ); | |
| 82120 | + assert( EIGHT_BYTE_ALIGNMENT(pIndex->azColl) ); | |
| 82118 | 82121 | pIndex->aiColumn = (int *)(&pIndex->azColl[nCol]); |
| 82119 | 82122 | pIndex->aSortOrder = (u8 *)(&pIndex->aiColumn[nCol]); |
| 82120 | 82123 | pIndex->zName = (char *)(&pIndex->aSortOrder[nCol]); |
| 82121 | 82124 | zExtra = (char *)(&pIndex->zName[nName+1]); |
| 82122 | 82125 | memcpy(pIndex->zName, zName, nName+1); |
| 82123 | 82126 |
| --- src/sqlite3.c | |
| +++ src/sqlite3.c | |
| @@ -649,11 +649,11 @@ | |
| 649 | ** [sqlite3_libversion_number()], [sqlite3_sourceid()], |
| 650 | ** [sqlite_version()] and [sqlite_source_id()]. |
| 651 | */ |
| 652 | #define SQLITE_VERSION "3.7.9" |
| 653 | #define SQLITE_VERSION_NUMBER 3007009 |
| 654 | #define SQLITE_SOURCE_ID "2011-10-29 19:25:08 5b82ec6fbbd2f4195ad06dd911de3817373ad5bf" |
| 655 | |
| 656 | /* |
| 657 | ** CAPI3REF: Run-Time Library Version Numbers |
| 658 | ** KEYWORDS: sqlite3_version, sqlite3_sourceid |
| 659 | ** |
| @@ -1286,11 +1286,11 @@ | |
| 1286 | ** |
| 1287 | ** ^The [SQLITE_FCNTL_WIN32_AV_RETRY] opcode is used to configure automatic |
| 1288 | ** retry counts and intervals for certain disk I/O operations for the |
| 1289 | ** windows [VFS] in order to work to provide robustness against |
| 1290 | ** anti-virus programs. By default, the windows VFS will retry file read, |
| 1291 | ** file write, and file delete opertions up to 10 times, with a delay |
| 1292 | ** of 25 milliseconds before the first retry and with the delay increasing |
| 1293 | ** by an additional 25 milliseconds with each subsequent retry. This |
| 1294 | ** opcode allows those to values (10 retries and 25 milliseconds of delay) |
| 1295 | ** to be adjusted. The values are changed for all database connections |
| 1296 | ** within the same process. The argument is a pointer to an array of two |
| @@ -82100,23 +82100,26 @@ | |
| 82100 | ** Allocate the index structure. |
| 82101 | */ |
| 82102 | nName = sqlite3Strlen30(zName); |
| 82103 | nCol = pList->nExpr; |
| 82104 | pIndex = sqlite3DbMallocZero(db, |
| 82105 | sizeof(Index) + /* Index structure */ |
| 82106 | sizeof(tRowcnt)*(nCol+1) + /* Index.aiRowEst */ |
| 82107 | sizeof(int)*nCol + /* Index.aiColumn */ |
| 82108 | sizeof(char *)*nCol + /* Index.azColl */ |
| 82109 | sizeof(u8)*nCol + /* Index.aSortOrder */ |
| 82110 | nName + 1 + /* Index.zName */ |
| 82111 | nExtra /* Collation sequence names */ |
| 82112 | ); |
| 82113 | if( db->mallocFailed ){ |
| 82114 | goto exit_create_index; |
| 82115 | } |
| 82116 | pIndex->aiRowEst = (tRowcnt*)(&pIndex[1]); |
| 82117 | pIndex->azColl = (char**)(&pIndex->aiRowEst[nCol+1]); |
| 82118 | pIndex->aiColumn = (int *)(&pIndex->azColl[nCol]); |
| 82119 | pIndex->aSortOrder = (u8 *)(&pIndex->aiColumn[nCol]); |
| 82120 | pIndex->zName = (char *)(&pIndex->aSortOrder[nCol]); |
| 82121 | zExtra = (char *)(&pIndex->zName[nName+1]); |
| 82122 | memcpy(pIndex->zName, zName, nName+1); |
| 82123 |
| --- src/sqlite3.c | |
| +++ src/sqlite3.c | |
| @@ -649,11 +649,11 @@ | |
| 649 | ** [sqlite3_libversion_number()], [sqlite3_sourceid()], |
| 650 | ** [sqlite_version()] and [sqlite_source_id()]. |
| 651 | */ |
| 652 | #define SQLITE_VERSION "3.7.9" |
| 653 | #define SQLITE_VERSION_NUMBER 3007009 |
| 654 | #define SQLITE_SOURCE_ID "2011-11-14 02:53:54 54cc11981127b52145e39f551d958580b1d45169" |
| 655 | |
| 656 | /* |
| 657 | ** CAPI3REF: Run-Time Library Version Numbers |
| 658 | ** KEYWORDS: sqlite3_version, sqlite3_sourceid |
| 659 | ** |
| @@ -1286,11 +1286,11 @@ | |
| 1286 | ** |
| 1287 | ** ^The [SQLITE_FCNTL_WIN32_AV_RETRY] opcode is used to configure automatic |
| 1288 | ** retry counts and intervals for certain disk I/O operations for the |
| 1289 | ** windows [VFS] in order to work to provide robustness against |
| 1290 | ** anti-virus programs. By default, the windows VFS will retry file read, |
| 1291 | ** file write, and file delete operations up to 10 times, with a delay |
| 1292 | ** of 25 milliseconds before the first retry and with the delay increasing |
| 1293 | ** by an additional 25 milliseconds with each subsequent retry. This |
| 1294 | ** opcode allows those to values (10 retries and 25 milliseconds of delay) |
| 1295 | ** to be adjusted. The values are changed for all database connections |
| 1296 | ** within the same process. The argument is a pointer to an array of two |
| @@ -82100,23 +82100,26 @@ | |
| 82100 | ** Allocate the index structure. |
| 82101 | */ |
| 82102 | nName = sqlite3Strlen30(zName); |
| 82103 | nCol = pList->nExpr; |
| 82104 | pIndex = sqlite3DbMallocZero(db, |
| 82105 | sizeof(Index) + /* Index structure */ |
| 82106 | ROUND8(sizeof(tRowcnt)*(nCol+1)) + /* Index.aiRowEst */ |
| 82107 | sizeof(char *)*nCol + /* Index.azColl */ |
| 82108 | sizeof(int)*nCol + /* Index.aiColumn */ |
| 82109 | sizeof(u8)*nCol + /* Index.aSortOrder */ |
| 82110 | nName + 1 + /* Index.zName */ |
| 82111 | nExtra /* Collation sequence names */ |
| 82112 | ); |
| 82113 | if( db->mallocFailed ){ |
| 82114 | goto exit_create_index; |
| 82115 | } |
| 82116 | pIndex->aiRowEst = (tRowcnt*)(&pIndex[1]); |
| 82117 | pIndex->azColl = (char**) |
| 82118 | ((char*)pIndex->aiRowEst + ROUND8(sizeof(tRowcnt)*nCol+1)); |
| 82119 | assert( EIGHT_BYTE_ALIGNMENT(pIndex->aiRowEst) ); |
| 82120 | assert( EIGHT_BYTE_ALIGNMENT(pIndex->azColl) ); |
| 82121 | pIndex->aiColumn = (int *)(&pIndex->azColl[nCol]); |
| 82122 | pIndex->aSortOrder = (u8 *)(&pIndex->aiColumn[nCol]); |
| 82123 | pIndex->zName = (char *)(&pIndex->aSortOrder[nCol]); |
| 82124 | zExtra = (char *)(&pIndex->zName[nName+1]); |
| 82125 | memcpy(pIndex->zName, zName, nName+1); |
| 82126 |
+2
-2
| --- src/sqlite3.h | ||
| +++ src/sqlite3.h | ||
| @@ -107,11 +107,11 @@ | ||
| 107 | 107 | ** [sqlite3_libversion_number()], [sqlite3_sourceid()], |
| 108 | 108 | ** [sqlite_version()] and [sqlite_source_id()]. |
| 109 | 109 | */ |
| 110 | 110 | #define SQLITE_VERSION "3.7.9" |
| 111 | 111 | #define SQLITE_VERSION_NUMBER 3007009 |
| 112 | -#define SQLITE_SOURCE_ID "2011-10-29 19:25:08 5b82ec6fbbd2f4195ad06dd911de3817373ad5bf" | |
| 112 | +#define SQLITE_SOURCE_ID "2011-11-14 02:53:54 54cc11981127b52145e39f551d958580b1d45169" | |
| 113 | 113 | |
| 114 | 114 | /* |
| 115 | 115 | ** CAPI3REF: Run-Time Library Version Numbers |
| 116 | 116 | ** KEYWORDS: sqlite3_version, sqlite3_sourceid |
| 117 | 117 | ** |
| @@ -744,11 +744,11 @@ | ||
| 744 | 744 | ** |
| 745 | 745 | ** ^The [SQLITE_FCNTL_WIN32_AV_RETRY] opcode is used to configure automatic |
| 746 | 746 | ** retry counts and intervals for certain disk I/O operations for the |
| 747 | 747 | ** windows [VFS] in order to work to provide robustness against |
| 748 | 748 | ** anti-virus programs. By default, the windows VFS will retry file read, |
| 749 | -** file write, and file delete opertions up to 10 times, with a delay | |
| 749 | +** file write, and file delete operations up to 10 times, with a delay | |
| 750 | 750 | ** of 25 milliseconds before the first retry and with the delay increasing |
| 751 | 751 | ** by an additional 25 milliseconds with each subsequent retry. This |
| 752 | 752 | ** opcode allows those to values (10 retries and 25 milliseconds of delay) |
| 753 | 753 | ** to be adjusted. The values are changed for all database connections |
| 754 | 754 | ** within the same process. The argument is a pointer to an array of two |
| 755 | 755 |
| --- src/sqlite3.h | |
| +++ src/sqlite3.h | |
| @@ -107,11 +107,11 @@ | |
| 107 | ** [sqlite3_libversion_number()], [sqlite3_sourceid()], |
| 108 | ** [sqlite_version()] and [sqlite_source_id()]. |
| 109 | */ |
| 110 | #define SQLITE_VERSION "3.7.9" |
| 111 | #define SQLITE_VERSION_NUMBER 3007009 |
| 112 | #define SQLITE_SOURCE_ID "2011-10-29 19:25:08 5b82ec6fbbd2f4195ad06dd911de3817373ad5bf" |
| 113 | |
| 114 | /* |
| 115 | ** CAPI3REF: Run-Time Library Version Numbers |
| 116 | ** KEYWORDS: sqlite3_version, sqlite3_sourceid |
| 117 | ** |
| @@ -744,11 +744,11 @@ | |
| 744 | ** |
| 745 | ** ^The [SQLITE_FCNTL_WIN32_AV_RETRY] opcode is used to configure automatic |
| 746 | ** retry counts and intervals for certain disk I/O operations for the |
| 747 | ** windows [VFS] in order to work to provide robustness against |
| 748 | ** anti-virus programs. By default, the windows VFS will retry file read, |
| 749 | ** file write, and file delete opertions up to 10 times, with a delay |
| 750 | ** of 25 milliseconds before the first retry and with the delay increasing |
| 751 | ** by an additional 25 milliseconds with each subsequent retry. This |
| 752 | ** opcode allows those to values (10 retries and 25 milliseconds of delay) |
| 753 | ** to be adjusted. The values are changed for all database connections |
| 754 | ** within the same process. The argument is a pointer to an array of two |
| 755 |
| --- src/sqlite3.h | |
| +++ src/sqlite3.h | |
| @@ -107,11 +107,11 @@ | |
| 107 | ** [sqlite3_libversion_number()], [sqlite3_sourceid()], |
| 108 | ** [sqlite_version()] and [sqlite_source_id()]. |
| 109 | */ |
| 110 | #define SQLITE_VERSION "3.7.9" |
| 111 | #define SQLITE_VERSION_NUMBER 3007009 |
| 112 | #define SQLITE_SOURCE_ID "2011-11-14 02:53:54 54cc11981127b52145e39f551d958580b1d45169" |
| 113 | |
| 114 | /* |
| 115 | ** CAPI3REF: Run-Time Library Version Numbers |
| 116 | ** KEYWORDS: sqlite3_version, sqlite3_sourceid |
| 117 | ** |
| @@ -744,11 +744,11 @@ | |
| 744 | ** |
| 745 | ** ^The [SQLITE_FCNTL_WIN32_AV_RETRY] opcode is used to configure automatic |
| 746 | ** retry counts and intervals for certain disk I/O operations for the |
| 747 | ** windows [VFS] in order to work to provide robustness against |
| 748 | ** anti-virus programs. By default, the windows VFS will retry file read, |
| 749 | ** file write, and file delete operations up to 10 times, with a delay |
| 750 | ** of 25 milliseconds before the first retry and with the delay increasing |
| 751 | ** by an additional 25 milliseconds with each subsequent retry. This |
| 752 | ** opcode allows those to values (10 retries and 25 milliseconds of delay) |
| 753 | ** to be adjusted. The values are changed for all database connections |
| 754 | ** within the same process. The argument is a pointer to an array of two |
| 755 |