Fossil SCM
Bring in the SQLite with the TRIGGER name resolution bug fix. This fix is not important to Fossil - we just want to include the latest SQLite code for testing.
Commit
6215d0830374a32d6ea8c764c5fd1b181049e5f4
Parent
8247784beb5b700…
2 files changed
+12
-9
+1
-1
+12
-9
| --- src/sqlite3.c | ||
| +++ src/sqlite3.c | ||
| @@ -189,11 +189,11 @@ | ||
| 189 | 189 | ** [sqlite3_libversion_number()], [sqlite3_sourceid()], |
| 190 | 190 | ** [sqlite_version()] and [sqlite_source_id()]. |
| 191 | 191 | */ |
| 192 | 192 | #define SQLITE_VERSION "3.8.4" |
| 193 | 193 | #define SQLITE_VERSION_NUMBER 3008004 |
| 194 | -#define SQLITE_SOURCE_ID "2014-03-04 04:12:56 3325ad5bdc2f81f63b556d6f4d0589d89b142b2b" | |
| 194 | +#define SQLITE_SOURCE_ID "2014-03-04 13:18:23 9830c343bc954b828f6ca752f8ae63e2c0a980c1" | |
| 195 | 195 | |
| 196 | 196 | /* |
| 197 | 197 | ** CAPI3REF: Run-Time Library Version Numbers |
| 198 | 198 | ** KEYWORDS: sqlite3_version, sqlite3_sourceid |
| 199 | 199 | ** |
| @@ -60825,26 +60825,27 @@ | ||
| 60825 | 60825 | |
| 60826 | 60826 | if( offset+amt<=available ){ |
| 60827 | 60827 | sqlite3VdbeMemRelease(pMem); |
| 60828 | 60828 | pMem->z = &zData[offset]; |
| 60829 | 60829 | pMem->flags = MEM_Blob|MEM_Ephem; |
| 60830 | + pMem->n = (int)amt; | |
| 60830 | 60831 | }else if( SQLITE_OK==(rc = sqlite3VdbeMemGrow(pMem, amt+2, 0)) ){ |
| 60831 | - pMem->flags = MEM_Blob|MEM_Term; | |
| 60832 | - pMem->enc = 0; | |
| 60833 | - pMem->memType = MEM_Blob; | |
| 60834 | 60832 | if( key ){ |
| 60835 | 60833 | rc = sqlite3BtreeKey(pCur, offset, amt, pMem->z); |
| 60836 | 60834 | }else{ |
| 60837 | 60835 | rc = sqlite3BtreeData(pCur, offset, amt, pMem->z); |
| 60838 | 60836 | } |
| 60839 | - pMem->z[amt] = 0; | |
| 60840 | - pMem->z[amt+1] = 0; | |
| 60841 | - if( rc!=SQLITE_OK ){ | |
| 60837 | + if( rc==SQLITE_OK ){ | |
| 60838 | + pMem->z[amt] = 0; | |
| 60839 | + pMem->z[amt+1] = 0; | |
| 60840 | + pMem->flags = MEM_Blob|MEM_Term; | |
| 60841 | + pMem->memType = MEM_Blob; | |
| 60842 | + pMem->n = (int)amt; | |
| 60843 | + }else{ | |
| 60842 | 60844 | sqlite3VdbeMemRelease(pMem); |
| 60843 | 60845 | } |
| 60844 | 60846 | } |
| 60845 | - pMem->n = (int)amt; | |
| 60846 | 60847 | |
| 60847 | 60848 | return rc; |
| 60848 | 60849 | } |
| 60849 | 60850 | |
| 60850 | 60851 | /* This function is only available internally, it is not part of the |
| @@ -64708,11 +64709,11 @@ | ||
| 64708 | 64709 | const UnpackedRecord *pPKey2, /* Right key */ |
| 64709 | 64710 | int bSkip /* If true, skip the first field */ |
| 64710 | 64711 | ){ |
| 64711 | 64712 | u32 d1; /* Offset into aKey[] of next data element */ |
| 64712 | 64713 | int i; /* Index of next field to compare */ |
| 64713 | - int szHdr1; /* Size of record header in bytes */ | |
| 64714 | + u32 szHdr1; /* Size of record header in bytes */ | |
| 64714 | 64715 | u32 idx1; /* Offset of first type in header */ |
| 64715 | 64716 | int rc = 0; /* Return value */ |
| 64716 | 64717 | Mem *pRhs = pPKey2->aMem; /* Next field of pPKey2 to compare */ |
| 64717 | 64718 | KeyInfo *pKeyInfo = pPKey2->pKeyInfo; |
| 64718 | 64719 | const unsigned char *aKey1 = (const unsigned char *)pKey1; |
| @@ -75910,10 +75911,12 @@ | ||
| 75910 | 75911 | pExpr->iTable = 1; |
| 75911 | 75912 | pTab = pParse->pTriggerTab; |
| 75912 | 75913 | }else if( op!=TK_INSERT && sqlite3StrICmp("old",zTab)==0 ){ |
| 75913 | 75914 | pExpr->iTable = 0; |
| 75914 | 75915 | pTab = pParse->pTriggerTab; |
| 75916 | + }else{ | |
| 75917 | + pTab = 0; | |
| 75915 | 75918 | } |
| 75916 | 75919 | |
| 75917 | 75920 | if( pTab ){ |
| 75918 | 75921 | int iCol; |
| 75919 | 75922 | pSchema = pTab->pSchema; |
| 75920 | 75923 |
| --- src/sqlite3.c | |
| +++ src/sqlite3.c | |
| @@ -189,11 +189,11 @@ | |
| 189 | ** [sqlite3_libversion_number()], [sqlite3_sourceid()], |
| 190 | ** [sqlite_version()] and [sqlite_source_id()]. |
| 191 | */ |
| 192 | #define SQLITE_VERSION "3.8.4" |
| 193 | #define SQLITE_VERSION_NUMBER 3008004 |
| 194 | #define SQLITE_SOURCE_ID "2014-03-04 04:12:56 3325ad5bdc2f81f63b556d6f4d0589d89b142b2b" |
| 195 | |
| 196 | /* |
| 197 | ** CAPI3REF: Run-Time Library Version Numbers |
| 198 | ** KEYWORDS: sqlite3_version, sqlite3_sourceid |
| 199 | ** |
| @@ -60825,26 +60825,27 @@ | |
| 60825 | |
| 60826 | if( offset+amt<=available ){ |
| 60827 | sqlite3VdbeMemRelease(pMem); |
| 60828 | pMem->z = &zData[offset]; |
| 60829 | pMem->flags = MEM_Blob|MEM_Ephem; |
| 60830 | }else if( SQLITE_OK==(rc = sqlite3VdbeMemGrow(pMem, amt+2, 0)) ){ |
| 60831 | pMem->flags = MEM_Blob|MEM_Term; |
| 60832 | pMem->enc = 0; |
| 60833 | pMem->memType = MEM_Blob; |
| 60834 | if( key ){ |
| 60835 | rc = sqlite3BtreeKey(pCur, offset, amt, pMem->z); |
| 60836 | }else{ |
| 60837 | rc = sqlite3BtreeData(pCur, offset, amt, pMem->z); |
| 60838 | } |
| 60839 | pMem->z[amt] = 0; |
| 60840 | pMem->z[amt+1] = 0; |
| 60841 | if( rc!=SQLITE_OK ){ |
| 60842 | sqlite3VdbeMemRelease(pMem); |
| 60843 | } |
| 60844 | } |
| 60845 | pMem->n = (int)amt; |
| 60846 | |
| 60847 | return rc; |
| 60848 | } |
| 60849 | |
| 60850 | /* This function is only available internally, it is not part of the |
| @@ -64708,11 +64709,11 @@ | |
| 64708 | const UnpackedRecord *pPKey2, /* Right key */ |
| 64709 | int bSkip /* If true, skip the first field */ |
| 64710 | ){ |
| 64711 | u32 d1; /* Offset into aKey[] of next data element */ |
| 64712 | int i; /* Index of next field to compare */ |
| 64713 | int szHdr1; /* Size of record header in bytes */ |
| 64714 | u32 idx1; /* Offset of first type in header */ |
| 64715 | int rc = 0; /* Return value */ |
| 64716 | Mem *pRhs = pPKey2->aMem; /* Next field of pPKey2 to compare */ |
| 64717 | KeyInfo *pKeyInfo = pPKey2->pKeyInfo; |
| 64718 | const unsigned char *aKey1 = (const unsigned char *)pKey1; |
| @@ -75910,10 +75911,12 @@ | |
| 75910 | pExpr->iTable = 1; |
| 75911 | pTab = pParse->pTriggerTab; |
| 75912 | }else if( op!=TK_INSERT && sqlite3StrICmp("old",zTab)==0 ){ |
| 75913 | pExpr->iTable = 0; |
| 75914 | pTab = pParse->pTriggerTab; |
| 75915 | } |
| 75916 | |
| 75917 | if( pTab ){ |
| 75918 | int iCol; |
| 75919 | pSchema = pTab->pSchema; |
| 75920 |
| --- src/sqlite3.c | |
| +++ src/sqlite3.c | |
| @@ -189,11 +189,11 @@ | |
| 189 | ** [sqlite3_libversion_number()], [sqlite3_sourceid()], |
| 190 | ** [sqlite_version()] and [sqlite_source_id()]. |
| 191 | */ |
| 192 | #define SQLITE_VERSION "3.8.4" |
| 193 | #define SQLITE_VERSION_NUMBER 3008004 |
| 194 | #define SQLITE_SOURCE_ID "2014-03-04 13:18:23 9830c343bc954b828f6ca752f8ae63e2c0a980c1" |
| 195 | |
| 196 | /* |
| 197 | ** CAPI3REF: Run-Time Library Version Numbers |
| 198 | ** KEYWORDS: sqlite3_version, sqlite3_sourceid |
| 199 | ** |
| @@ -60825,26 +60825,27 @@ | |
| 60825 | |
| 60826 | if( offset+amt<=available ){ |
| 60827 | sqlite3VdbeMemRelease(pMem); |
| 60828 | pMem->z = &zData[offset]; |
| 60829 | pMem->flags = MEM_Blob|MEM_Ephem; |
| 60830 | pMem->n = (int)amt; |
| 60831 | }else if( SQLITE_OK==(rc = sqlite3VdbeMemGrow(pMem, amt+2, 0)) ){ |
| 60832 | if( key ){ |
| 60833 | rc = sqlite3BtreeKey(pCur, offset, amt, pMem->z); |
| 60834 | }else{ |
| 60835 | rc = sqlite3BtreeData(pCur, offset, amt, pMem->z); |
| 60836 | } |
| 60837 | if( rc==SQLITE_OK ){ |
| 60838 | pMem->z[amt] = 0; |
| 60839 | pMem->z[amt+1] = 0; |
| 60840 | pMem->flags = MEM_Blob|MEM_Term; |
| 60841 | pMem->memType = MEM_Blob; |
| 60842 | pMem->n = (int)amt; |
| 60843 | }else{ |
| 60844 | sqlite3VdbeMemRelease(pMem); |
| 60845 | } |
| 60846 | } |
| 60847 | |
| 60848 | return rc; |
| 60849 | } |
| 60850 | |
| 60851 | /* This function is only available internally, it is not part of the |
| @@ -64708,11 +64709,11 @@ | |
| 64709 | const UnpackedRecord *pPKey2, /* Right key */ |
| 64710 | int bSkip /* If true, skip the first field */ |
| 64711 | ){ |
| 64712 | u32 d1; /* Offset into aKey[] of next data element */ |
| 64713 | int i; /* Index of next field to compare */ |
| 64714 | u32 szHdr1; /* Size of record header in bytes */ |
| 64715 | u32 idx1; /* Offset of first type in header */ |
| 64716 | int rc = 0; /* Return value */ |
| 64717 | Mem *pRhs = pPKey2->aMem; /* Next field of pPKey2 to compare */ |
| 64718 | KeyInfo *pKeyInfo = pPKey2->pKeyInfo; |
| 64719 | const unsigned char *aKey1 = (const unsigned char *)pKey1; |
| @@ -75910,10 +75911,12 @@ | |
| 75911 | pExpr->iTable = 1; |
| 75912 | pTab = pParse->pTriggerTab; |
| 75913 | }else if( op!=TK_INSERT && sqlite3StrICmp("old",zTab)==0 ){ |
| 75914 | pExpr->iTable = 0; |
| 75915 | pTab = pParse->pTriggerTab; |
| 75916 | }else{ |
| 75917 | pTab = 0; |
| 75918 | } |
| 75919 | |
| 75920 | if( pTab ){ |
| 75921 | int iCol; |
| 75922 | pSchema = pTab->pSchema; |
| 75923 |
+1
-1
| --- 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.8.4" |
| 111 | 111 | #define SQLITE_VERSION_NUMBER 3008004 |
| 112 | -#define SQLITE_SOURCE_ID "2014-03-04 04:12:56 3325ad5bdc2f81f63b556d6f4d0589d89b142b2b" | |
| 112 | +#define SQLITE_SOURCE_ID "2014-03-04 13:18:23 9830c343bc954b828f6ca752f8ae63e2c0a980c1" | |
| 113 | 113 | |
| 114 | 114 | /* |
| 115 | 115 | ** CAPI3REF: Run-Time Library Version Numbers |
| 116 | 116 | ** KEYWORDS: sqlite3_version, sqlite3_sourceid |
| 117 | 117 | ** |
| 118 | 118 |
| --- 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.8.4" |
| 111 | #define SQLITE_VERSION_NUMBER 3008004 |
| 112 | #define SQLITE_SOURCE_ID "2014-03-04 04:12:56 3325ad5bdc2f81f63b556d6f4d0589d89b142b2b" |
| 113 | |
| 114 | /* |
| 115 | ** CAPI3REF: Run-Time Library Version Numbers |
| 116 | ** KEYWORDS: sqlite3_version, sqlite3_sourceid |
| 117 | ** |
| 118 |
| --- 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.8.4" |
| 111 | #define SQLITE_VERSION_NUMBER 3008004 |
| 112 | #define SQLITE_SOURCE_ID "2014-03-04 13:18:23 9830c343bc954b828f6ca752f8ae63e2c0a980c1" |
| 113 | |
| 114 | /* |
| 115 | ** CAPI3REF: Run-Time Library Version Numbers |
| 116 | ** KEYWORDS: sqlite3_version, sqlite3_sourceid |
| 117 | ** |
| 118 |