Fossil SCM

Update the built-in SQLite again, this time to beta-test the recent fix to ambiguous column name detection.

drh 2025-10-31 17:22 trunk
Commit fb173ae1a86bc712d440b74900e1a91d83ca4864197c722fe8c87a6b61339d47
2 files changed +16 -12 +2 -2
+16 -12
--- extsrc/sqlite3.c
+++ extsrc/sqlite3.c
@@ -16,11 +16,11 @@
1616
** if you want a wrapper to interface SQLite with your choice of programming
1717
** language. The code for the "sqlite3" command-line shell is also in a
1818
** separate file. This file contains only code for the core SQLite library.
1919
**
2020
** The content in this amalgamation comes from Fossil check-in
21
-** c1aa52361b8ede611f64b96f2394174389ce with changes in files:
21
+** 38c993c8b7137d6d5623d387292639634297 with changes in files:
2222
**
2323
**
2424
*/
2525
#ifndef SQLITE_AMALGAMATION
2626
#define SQLITE_CORE 1
@@ -467,14 +467,14 @@
467467
** [sqlite3_libversion_number()], [sqlite3_sourceid()],
468468
** [sqlite_version()] and [sqlite_source_id()].
469469
*/
470470
#define SQLITE_VERSION "3.51.0"
471471
#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"
473473
#define SQLITE_SCM_BRANCH "trunk"
474474
#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"
476476
477477
/*
478478
** CAPI3REF: Run-Time Library Version Numbers
479479
** KEYWORDS: sqlite3_version sqlite3_sourceid
480480
**
@@ -109475,14 +109475,17 @@
109475109475
}
109476109476
if( bRowid==0 ){
109477109477
if( cnt>0 ){
109478109478
if( pItem->fg.isUsing==0
109479109479
|| sqlite3IdListIndex(pItem->u3.pUsing, zCol)<0
109480
+ || pMatch==pItem
109480109481
){
109481109482
/* 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. */
109484109487
sqlite3ExprListDelete(db, pFJMatch);
109485109488
pFJMatch = 0;
109486109489
}else
109487109490
if( (pItem->fg.jointype & JT_RIGHT)==0 ){
109488109491
/* An INNER or LEFT JOIN. Use the left-most table */
@@ -230407,12 +230410,13 @@
230407230410
#endif
230408230411
230409230412
/*
230410230413
** Names of allowed datatypes
230411230414
*/
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
+};
230414230418
230415230419
/*
230416230420
** Structure used to hold the sqlite3_carray_bind() information
230417230421
*/
230418230422
typedef struct carray_bind carray_bind;
@@ -230527,11 +230531,11 @@
230527230531
sqlite3_int64 x = 0;
230528230532
switch( i ){
230529230533
case CARRAY_COLUMN_POINTER: return SQLITE_OK;
230530230534
case CARRAY_COLUMN_COUNT: x = pCur->iCnt; break;
230531230535
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);
230533230537
return SQLITE_OK;
230534230538
}
230535230539
default: {
230536230540
switch( pCur->eType ){
230537230541
case CARRAY_INT32: {
@@ -230615,14 +230619,14 @@
230615230619
if( idxNum<3 ){
230616230620
pCur->eType = CARRAY_INT32;
230617230621
}else{
230618230622
unsigned char i;
230619230623
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;
230622230626
}
230623
- if( i>=sizeof(azType)/sizeof(azType[0]) ){
230627
+ if( i>=sizeof(azCarrayType)/sizeof(azCarrayType[0]) ){
230624230628
pVtabCursor->pVtab->zErrMsg = sqlite3_mprintf(
230625230629
"unknown datatype: %Q", zType);
230626230630
return SQLITE_ERROR;
230627230631
}else{
230628230632
pCur->eType = i;
@@ -260277,11 +260281,11 @@
260277260281
int nArg, /* Number of args */
260278260282
sqlite3_value **apUnused /* Function arguments */
260279260283
){
260280260284
assert( nArg==0 );
260281260285
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);
260283260287
}
260284260288
260285260289
/*
260286260290
** Implementation of fts5_locale(LOCALE, TEXT) function.
260287260291
**
260288260292
--- 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
--- extsrc/sqlite3.h
+++ extsrc/sqlite3.h
@@ -146,14 +146,14 @@
146146
** [sqlite3_libversion_number()], [sqlite3_sourceid()],
147147
** [sqlite_version()] and [sqlite_source_id()].
148148
*/
149149
#define SQLITE_VERSION "3.51.0"
150150
#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"
152152
#define SQLITE_SCM_BRANCH "trunk"
153153
#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"
155155
156156
/*
157157
** CAPI3REF: Run-Time Library Version Numbers
158158
** KEYWORDS: sqlite3_version sqlite3_sourceid
159159
**
160160
--- 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

Keyboard Shortcuts

Open search /
Next entry (timeline) j
Previous entry (timeline) k
Open focused entry Enter
Show this help ?
Toggle theme Top nav button