Fossil SCM
Update the built-in SQLite again, this time to beta-test the recent fix to ambiguous column name detection.
Commit
fb173ae1a86bc712d440b74900e1a91d83ca4864197c722fe8c87a6b61339d47
Parent
8690598e51c6394…
2 files changed
+16
-12
+2
-2
+16
-12
| --- extsrc/sqlite3.c | ||
| +++ extsrc/sqlite3.c | ||
| @@ -16,11 +16,11 @@ | ||
| 16 | 16 | ** if you want a wrapper to interface SQLite with your choice of programming |
| 17 | 17 | ** language. The code for the "sqlite3" command-line shell is also in a |
| 18 | 18 | ** separate file. This file contains only code for the core SQLite library. |
| 19 | 19 | ** |
| 20 | 20 | ** The content in this amalgamation comes from Fossil check-in |
| 21 | -** c1aa52361b8ede611f64b96f2394174389ce with changes in files: | |
| 21 | +** 38c993c8b7137d6d5623d387292639634297 with changes in files: | |
| 22 | 22 | ** |
| 23 | 23 | ** |
| 24 | 24 | */ |
| 25 | 25 | #ifndef SQLITE_AMALGAMATION |
| 26 | 26 | #define SQLITE_CORE 1 |
| @@ -467,14 +467,14 @@ | ||
| 467 | 467 | ** [sqlite3_libversion_number()], [sqlite3_sourceid()], |
| 468 | 468 | ** [sqlite_version()] and [sqlite_source_id()]. |
| 469 | 469 | */ |
| 470 | 470 | #define SQLITE_VERSION "3.51.0" |
| 471 | 471 | #define SQLITE_VERSION_NUMBER 3051000 |
| 472 | -#define SQLITE_SOURCE_ID "2025-10-31 13:44:51 c1aa52361b8ede611f64b96f2394174389ce531b1d86b9cfec91d3b03c94f6ea" | |
| 472 | +#define SQLITE_SOURCE_ID "2025-10-31 16:07:31 38c993c8b7137d6d5623d387292639634297c17da11befec9029f12a16a472f8" | |
| 473 | 473 | #define SQLITE_SCM_BRANCH "trunk" |
| 474 | 474 | #define SQLITE_SCM_TAGS "" |
| 475 | -#define SQLITE_SCM_DATETIME "2025-10-31T13:44:51.646Z" | |
| 475 | +#define SQLITE_SCM_DATETIME "2025-10-31T16:07:31.438Z" | |
| 476 | 476 | |
| 477 | 477 | /* |
| 478 | 478 | ** CAPI3REF: Run-Time Library Version Numbers |
| 479 | 479 | ** KEYWORDS: sqlite3_version sqlite3_sourceid |
| 480 | 480 | ** |
| @@ -109475,14 +109475,17 @@ | ||
| 109475 | 109475 | } |
| 109476 | 109476 | if( bRowid==0 ){ |
| 109477 | 109477 | if( cnt>0 ){ |
| 109478 | 109478 | if( pItem->fg.isUsing==0 |
| 109479 | 109479 | || sqlite3IdListIndex(pItem->u3.pUsing, zCol)<0 |
| 109480 | + || pMatch==pItem | |
| 109480 | 109481 | ){ |
| 109481 | 109482 | /* Two or more tables have the same column name which is |
| 109482 | - ** not joined by USING. This is an error. Signal as much | |
| 109483 | - ** by clearing pFJMatch and letting cnt go above 1. */ | |
| 109483 | + ** not joined by USING. Or, a single table has two columns | |
| 109484 | + ** that match a USING term (if pMatch==pItem). These are both | |
| 109485 | + ** "ambiguous column name" errors. Signal as much by clearing | |
| 109486 | + ** pFJMatch and letting cnt go above 1. */ | |
| 109484 | 109487 | sqlite3ExprListDelete(db, pFJMatch); |
| 109485 | 109488 | pFJMatch = 0; |
| 109486 | 109489 | }else |
| 109487 | 109490 | if( (pItem->fg.jointype & JT_RIGHT)==0 ){ |
| 109488 | 109491 | /* An INNER or LEFT JOIN. Use the left-most table */ |
| @@ -230407,12 +230410,13 @@ | ||
| 230407 | 230410 | #endif |
| 230408 | 230411 | |
| 230409 | 230412 | /* |
| 230410 | 230413 | ** Names of allowed datatypes |
| 230411 | 230414 | */ |
| 230412 | -static const char *azType[] = { "int32", "int64", "double", "char*", | |
| 230413 | - "struct iovec" }; | |
| 230415 | +static const char *azCarrayType[] = { | |
| 230416 | + "int32", "int64", "double", "char*", "struct iovec" | |
| 230417 | +}; | |
| 230414 | 230418 | |
| 230415 | 230419 | /* |
| 230416 | 230420 | ** Structure used to hold the sqlite3_carray_bind() information |
| 230417 | 230421 | */ |
| 230418 | 230422 | typedef struct carray_bind carray_bind; |
| @@ -230527,11 +230531,11 @@ | ||
| 230527 | 230531 | sqlite3_int64 x = 0; |
| 230528 | 230532 | switch( i ){ |
| 230529 | 230533 | case CARRAY_COLUMN_POINTER: return SQLITE_OK; |
| 230530 | 230534 | case CARRAY_COLUMN_COUNT: x = pCur->iCnt; break; |
| 230531 | 230535 | case CARRAY_COLUMN_CTYPE: { |
| 230532 | - sqlite3_result_text(ctx, azType[pCur->eType], -1, SQLITE_STATIC); | |
| 230536 | + sqlite3_result_text(ctx, azCarrayType[pCur->eType], -1, SQLITE_STATIC); | |
| 230533 | 230537 | return SQLITE_OK; |
| 230534 | 230538 | } |
| 230535 | 230539 | default: { |
| 230536 | 230540 | switch( pCur->eType ){ |
| 230537 | 230541 | case CARRAY_INT32: { |
| @@ -230615,14 +230619,14 @@ | ||
| 230615 | 230619 | if( idxNum<3 ){ |
| 230616 | 230620 | pCur->eType = CARRAY_INT32; |
| 230617 | 230621 | }else{ |
| 230618 | 230622 | unsigned char i; |
| 230619 | 230623 | const char *zType = (const char*)sqlite3_value_text(argv[2]); |
| 230620 | - for(i=0; i<sizeof(azType)/sizeof(azType[0]); i++){ | |
| 230621 | - if( sqlite3_stricmp(zType, azType[i])==0 ) break; | |
| 230624 | + for(i=0; i<sizeof(azCarrayType)/sizeof(azCarrayType[0]); i++){ | |
| 230625 | + if( sqlite3_stricmp(zType, azCarrayType[i])==0 ) break; | |
| 230622 | 230626 | } |
| 230623 | - if( i>=sizeof(azType)/sizeof(azType[0]) ){ | |
| 230627 | + if( i>=sizeof(azCarrayType)/sizeof(azCarrayType[0]) ){ | |
| 230624 | 230628 | pVtabCursor->pVtab->zErrMsg = sqlite3_mprintf( |
| 230625 | 230629 | "unknown datatype: %Q", zType); |
| 230626 | 230630 | return SQLITE_ERROR; |
| 230627 | 230631 | }else{ |
| 230628 | 230632 | pCur->eType = i; |
| @@ -260277,11 +260281,11 @@ | ||
| 260277 | 260281 | int nArg, /* Number of args */ |
| 260278 | 260282 | sqlite3_value **apUnused /* Function arguments */ |
| 260279 | 260283 | ){ |
| 260280 | 260284 | assert( nArg==0 ); |
| 260281 | 260285 | UNUSED_PARAM2(nArg, apUnused); |
| 260282 | - sqlite3_result_text(pCtx, "fts5: 2025-10-30 11:39:49 c833f26a6780f919551e50c67d308e96293cec8481899354411d805617481f24", -1, SQLITE_TRANSIENT); | |
| 260286 | + sqlite3_result_text(pCtx, "fts5: 2025-10-31 16:07:31 38c993c8b7137d6d5623d387292639634297c17da11befec9029f12a16a472f8", -1, SQLITE_TRANSIENT); | |
| 260283 | 260287 | } |
| 260284 | 260288 | |
| 260285 | 260289 | /* |
| 260286 | 260290 | ** Implementation of fts5_locale(LOCALE, TEXT) function. |
| 260287 | 260291 | ** |
| 260288 | 260292 |
| --- extsrc/sqlite3.c | |
| +++ extsrc/sqlite3.c | |
| @@ -16,11 +16,11 @@ | |
| 16 | ** if you want a wrapper to interface SQLite with your choice of programming |
| 17 | ** language. The code for the "sqlite3" command-line shell is also in a |
| 18 | ** separate file. This file contains only code for the core SQLite library. |
| 19 | ** |
| 20 | ** The content in this amalgamation comes from Fossil check-in |
| 21 | ** c1aa52361b8ede611f64b96f2394174389ce with changes in files: |
| 22 | ** |
| 23 | ** |
| 24 | */ |
| 25 | #ifndef SQLITE_AMALGAMATION |
| 26 | #define SQLITE_CORE 1 |
| @@ -467,14 +467,14 @@ | |
| 467 | ** [sqlite3_libversion_number()], [sqlite3_sourceid()], |
| 468 | ** [sqlite_version()] and [sqlite_source_id()]. |
| 469 | */ |
| 470 | #define SQLITE_VERSION "3.51.0" |
| 471 | #define SQLITE_VERSION_NUMBER 3051000 |
| 472 | #define SQLITE_SOURCE_ID "2025-10-31 13:44:51 c1aa52361b8ede611f64b96f2394174389ce531b1d86b9cfec91d3b03c94f6ea" |
| 473 | #define SQLITE_SCM_BRANCH "trunk" |
| 474 | #define SQLITE_SCM_TAGS "" |
| 475 | #define SQLITE_SCM_DATETIME "2025-10-31T13:44:51.646Z" |
| 476 | |
| 477 | /* |
| 478 | ** CAPI3REF: Run-Time Library Version Numbers |
| 479 | ** KEYWORDS: sqlite3_version sqlite3_sourceid |
| 480 | ** |
| @@ -109475,14 +109475,17 @@ | |
| 109475 | } |
| 109476 | if( bRowid==0 ){ |
| 109477 | if( cnt>0 ){ |
| 109478 | if( pItem->fg.isUsing==0 |
| 109479 | || sqlite3IdListIndex(pItem->u3.pUsing, zCol)<0 |
| 109480 | ){ |
| 109481 | /* Two or more tables have the same column name which is |
| 109482 | ** not joined by USING. This is an error. Signal as much |
| 109483 | ** by clearing pFJMatch and letting cnt go above 1. */ |
| 109484 | sqlite3ExprListDelete(db, pFJMatch); |
| 109485 | pFJMatch = 0; |
| 109486 | }else |
| 109487 | if( (pItem->fg.jointype & JT_RIGHT)==0 ){ |
| 109488 | /* An INNER or LEFT JOIN. Use the left-most table */ |
| @@ -230407,12 +230410,13 @@ | |
| 230407 | #endif |
| 230408 | |
| 230409 | /* |
| 230410 | ** Names of allowed datatypes |
| 230411 | */ |
| 230412 | static const char *azType[] = { "int32", "int64", "double", "char*", |
| 230413 | "struct iovec" }; |
| 230414 | |
| 230415 | /* |
| 230416 | ** Structure used to hold the sqlite3_carray_bind() information |
| 230417 | */ |
| 230418 | typedef struct carray_bind carray_bind; |
| @@ -230527,11 +230531,11 @@ | |
| 230527 | sqlite3_int64 x = 0; |
| 230528 | switch( i ){ |
| 230529 | case CARRAY_COLUMN_POINTER: return SQLITE_OK; |
| 230530 | case CARRAY_COLUMN_COUNT: x = pCur->iCnt; break; |
| 230531 | case CARRAY_COLUMN_CTYPE: { |
| 230532 | sqlite3_result_text(ctx, azType[pCur->eType], -1, SQLITE_STATIC); |
| 230533 | return SQLITE_OK; |
| 230534 | } |
| 230535 | default: { |
| 230536 | switch( pCur->eType ){ |
| 230537 | case CARRAY_INT32: { |
| @@ -230615,14 +230619,14 @@ | |
| 230615 | if( idxNum<3 ){ |
| 230616 | pCur->eType = CARRAY_INT32; |
| 230617 | }else{ |
| 230618 | unsigned char i; |
| 230619 | const char *zType = (const char*)sqlite3_value_text(argv[2]); |
| 230620 | for(i=0; i<sizeof(azType)/sizeof(azType[0]); i++){ |
| 230621 | if( sqlite3_stricmp(zType, azType[i])==0 ) break; |
| 230622 | } |
| 230623 | if( i>=sizeof(azType)/sizeof(azType[0]) ){ |
| 230624 | pVtabCursor->pVtab->zErrMsg = sqlite3_mprintf( |
| 230625 | "unknown datatype: %Q", zType); |
| 230626 | return SQLITE_ERROR; |
| 230627 | }else{ |
| 230628 | pCur->eType = i; |
| @@ -260277,11 +260281,11 @@ | |
| 260277 | int nArg, /* Number of args */ |
| 260278 | sqlite3_value **apUnused /* Function arguments */ |
| 260279 | ){ |
| 260280 | assert( nArg==0 ); |
| 260281 | UNUSED_PARAM2(nArg, apUnused); |
| 260282 | sqlite3_result_text(pCtx, "fts5: 2025-10-30 11:39:49 c833f26a6780f919551e50c67d308e96293cec8481899354411d805617481f24", -1, SQLITE_TRANSIENT); |
| 260283 | } |
| 260284 | |
| 260285 | /* |
| 260286 | ** Implementation of fts5_locale(LOCALE, TEXT) function. |
| 260287 | ** |
| 260288 |
| --- extsrc/sqlite3.c | |
| +++ extsrc/sqlite3.c | |
| @@ -16,11 +16,11 @@ | |
| 16 | ** if you want a wrapper to interface SQLite with your choice of programming |
| 17 | ** language. The code for the "sqlite3" command-line shell is also in a |
| 18 | ** separate file. This file contains only code for the core SQLite library. |
| 19 | ** |
| 20 | ** The content in this amalgamation comes from Fossil check-in |
| 21 | ** 38c993c8b7137d6d5623d387292639634297 with changes in files: |
| 22 | ** |
| 23 | ** |
| 24 | */ |
| 25 | #ifndef SQLITE_AMALGAMATION |
| 26 | #define SQLITE_CORE 1 |
| @@ -467,14 +467,14 @@ | |
| 467 | ** [sqlite3_libversion_number()], [sqlite3_sourceid()], |
| 468 | ** [sqlite_version()] and [sqlite_source_id()]. |
| 469 | */ |
| 470 | #define SQLITE_VERSION "3.51.0" |
| 471 | #define SQLITE_VERSION_NUMBER 3051000 |
| 472 | #define SQLITE_SOURCE_ID "2025-10-31 16:07:31 38c993c8b7137d6d5623d387292639634297c17da11befec9029f12a16a472f8" |
| 473 | #define SQLITE_SCM_BRANCH "trunk" |
| 474 | #define SQLITE_SCM_TAGS "" |
| 475 | #define SQLITE_SCM_DATETIME "2025-10-31T16:07:31.438Z" |
| 476 | |
| 477 | /* |
| 478 | ** CAPI3REF: Run-Time Library Version Numbers |
| 479 | ** KEYWORDS: sqlite3_version sqlite3_sourceid |
| 480 | ** |
| @@ -109475,14 +109475,17 @@ | |
| 109475 | } |
| 109476 | if( bRowid==0 ){ |
| 109477 | if( cnt>0 ){ |
| 109478 | if( pItem->fg.isUsing==0 |
| 109479 | || sqlite3IdListIndex(pItem->u3.pUsing, zCol)<0 |
| 109480 | || pMatch==pItem |
| 109481 | ){ |
| 109482 | /* Two or more tables have the same column name which is |
| 109483 | ** not joined by USING. Or, a single table has two columns |
| 109484 | ** that match a USING term (if pMatch==pItem). These are both |
| 109485 | ** "ambiguous column name" errors. Signal as much by clearing |
| 109486 | ** pFJMatch and letting cnt go above 1. */ |
| 109487 | sqlite3ExprListDelete(db, pFJMatch); |
| 109488 | pFJMatch = 0; |
| 109489 | }else |
| 109490 | if( (pItem->fg.jointype & JT_RIGHT)==0 ){ |
| 109491 | /* An INNER or LEFT JOIN. Use the left-most table */ |
| @@ -230407,12 +230410,13 @@ | |
| 230410 | #endif |
| 230411 | |
| 230412 | /* |
| 230413 | ** Names of allowed datatypes |
| 230414 | */ |
| 230415 | static const char *azCarrayType[] = { |
| 230416 | "int32", "int64", "double", "char*", "struct iovec" |
| 230417 | }; |
| 230418 | |
| 230419 | /* |
| 230420 | ** Structure used to hold the sqlite3_carray_bind() information |
| 230421 | */ |
| 230422 | typedef struct carray_bind carray_bind; |
| @@ -230527,11 +230531,11 @@ | |
| 230531 | sqlite3_int64 x = 0; |
| 230532 | switch( i ){ |
| 230533 | case CARRAY_COLUMN_POINTER: return SQLITE_OK; |
| 230534 | case CARRAY_COLUMN_COUNT: x = pCur->iCnt; break; |
| 230535 | case CARRAY_COLUMN_CTYPE: { |
| 230536 | sqlite3_result_text(ctx, azCarrayType[pCur->eType], -1, SQLITE_STATIC); |
| 230537 | return SQLITE_OK; |
| 230538 | } |
| 230539 | default: { |
| 230540 | switch( pCur->eType ){ |
| 230541 | case CARRAY_INT32: { |
| @@ -230615,14 +230619,14 @@ | |
| 230619 | if( idxNum<3 ){ |
| 230620 | pCur->eType = CARRAY_INT32; |
| 230621 | }else{ |
| 230622 | unsigned char i; |
| 230623 | const char *zType = (const char*)sqlite3_value_text(argv[2]); |
| 230624 | for(i=0; i<sizeof(azCarrayType)/sizeof(azCarrayType[0]); i++){ |
| 230625 | if( sqlite3_stricmp(zType, azCarrayType[i])==0 ) break; |
| 230626 | } |
| 230627 | if( i>=sizeof(azCarrayType)/sizeof(azCarrayType[0]) ){ |
| 230628 | pVtabCursor->pVtab->zErrMsg = sqlite3_mprintf( |
| 230629 | "unknown datatype: %Q", zType); |
| 230630 | return SQLITE_ERROR; |
| 230631 | }else{ |
| 230632 | pCur->eType = i; |
| @@ -260277,11 +260281,11 @@ | |
| 260281 | int nArg, /* Number of args */ |
| 260282 | sqlite3_value **apUnused /* Function arguments */ |
| 260283 | ){ |
| 260284 | assert( nArg==0 ); |
| 260285 | UNUSED_PARAM2(nArg, apUnused); |
| 260286 | sqlite3_result_text(pCtx, "fts5: 2025-10-31 16:07:31 38c993c8b7137d6d5623d387292639634297c17da11befec9029f12a16a472f8", -1, SQLITE_TRANSIENT); |
| 260287 | } |
| 260288 | |
| 260289 | /* |
| 260290 | ** Implementation of fts5_locale(LOCALE, TEXT) function. |
| 260291 | ** |
| 260292 |
+2
-2
| --- extsrc/sqlite3.h | ||
| +++ extsrc/sqlite3.h | ||
| @@ -146,14 +146,14 @@ | ||
| 146 | 146 | ** [sqlite3_libversion_number()], [sqlite3_sourceid()], |
| 147 | 147 | ** [sqlite_version()] and [sqlite_source_id()]. |
| 148 | 148 | */ |
| 149 | 149 | #define SQLITE_VERSION "3.51.0" |
| 150 | 150 | #define SQLITE_VERSION_NUMBER 3051000 |
| 151 | -#define SQLITE_SOURCE_ID "2025-10-31 13:44:51 c1aa52361b8ede611f64b96f2394174389ce531b1d86b9cfec91d3b03c94f6ea" | |
| 151 | +#define SQLITE_SOURCE_ID "2025-10-31 16:07:31 38c993c8b7137d6d5623d387292639634297c17da11befec9029f12a16a472f8" | |
| 152 | 152 | #define SQLITE_SCM_BRANCH "trunk" |
| 153 | 153 | #define SQLITE_SCM_TAGS "" |
| 154 | -#define SQLITE_SCM_DATETIME "2025-10-31T13:44:51.646Z" | |
| 154 | +#define SQLITE_SCM_DATETIME "2025-10-31T16:07:31.438Z" | |
| 155 | 155 | |
| 156 | 156 | /* |
| 157 | 157 | ** CAPI3REF: Run-Time Library Version Numbers |
| 158 | 158 | ** KEYWORDS: sqlite3_version sqlite3_sourceid |
| 159 | 159 | ** |
| 160 | 160 |
| --- extsrc/sqlite3.h | |
| +++ extsrc/sqlite3.h | |
| @@ -146,14 +146,14 @@ | |
| 146 | ** [sqlite3_libversion_number()], [sqlite3_sourceid()], |
| 147 | ** [sqlite_version()] and [sqlite_source_id()]. |
| 148 | */ |
| 149 | #define SQLITE_VERSION "3.51.0" |
| 150 | #define SQLITE_VERSION_NUMBER 3051000 |
| 151 | #define SQLITE_SOURCE_ID "2025-10-31 13:44:51 c1aa52361b8ede611f64b96f2394174389ce531b1d86b9cfec91d3b03c94f6ea" |
| 152 | #define SQLITE_SCM_BRANCH "trunk" |
| 153 | #define SQLITE_SCM_TAGS "" |
| 154 | #define SQLITE_SCM_DATETIME "2025-10-31T13:44:51.646Z" |
| 155 | |
| 156 | /* |
| 157 | ** CAPI3REF: Run-Time Library Version Numbers |
| 158 | ** KEYWORDS: sqlite3_version sqlite3_sourceid |
| 159 | ** |
| 160 |
| --- extsrc/sqlite3.h | |
| +++ extsrc/sqlite3.h | |
| @@ -146,14 +146,14 @@ | |
| 146 | ** [sqlite3_libversion_number()], [sqlite3_sourceid()], |
| 147 | ** [sqlite_version()] and [sqlite_source_id()]. |
| 148 | */ |
| 149 | #define SQLITE_VERSION "3.51.0" |
| 150 | #define SQLITE_VERSION_NUMBER 3051000 |
| 151 | #define SQLITE_SOURCE_ID "2025-10-31 16:07:31 38c993c8b7137d6d5623d387292639634297c17da11befec9029f12a16a472f8" |
| 152 | #define SQLITE_SCM_BRANCH "trunk" |
| 153 | #define SQLITE_SCM_TAGS "" |
| 154 | #define SQLITE_SCM_DATETIME "2025-10-31T16:07:31.438Z" |
| 155 | |
| 156 | /* |
| 157 | ** CAPI3REF: Run-Time Library Version Numbers |
| 158 | ** KEYWORDS: sqlite3_version sqlite3_sourceid |
| 159 | ** |
| 160 |