SQLite

Check-in [8af8c153]
Login

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:Raise an error if a schema name is attached to the table-alias name of a subquery or view. See forum post 021a33600b for the bug report.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA3-256: 8af8c153f8c3fe16db1c2280571e005838c4ea3c48929ad7660a1686e49ed255
User & Date: drh 2021-12-24 13:30:22
Context
2021-12-24
19:44
Fix a minor problem in the CLI introduced by [d156123885abe6bf], apparently. (check-in: 37e6e10f user: drh tags: trunk)
13:30
Raise an error if a schema name is attached to the table-alias name of a subquery or view. See forum post 021a33600b for the bug report. (check-in: 8af8c153 user: drh tags: trunk)
2021-12-23
00:16
Reduce the size of the compiled binary by a couple of hundred bytes by using a thigher packing of a transformation table in date.c. Suggested by forum post 4f6efbb2a9. (check-in: c75ba4fa user: drh tags: trunk)
Changes
Hide Diffs Unified Diffs Ignore Whitespace Patch

Changes to src/resolve.c.

316
317
318
319
320
321
322

323
324
325
326
327
328
329
330
331
              pMatch = pItem;
              pExpr->iColumn = j;
              hit = 1;
            }
          }
          if( hit || zTab==0 ) continue;
        }

        if( zDb && pTab->pSchema!=pSchema ){
          continue;
        }
        if( zTab ){
          const char *zTabName = pItem->zAlias ? pItem->zAlias : pTab->zName;
          assert( zTabName!=0 );
          if( sqlite3StrICmp(zTabName, zTab)!=0 ){
            continue;
          }







>
|
|







316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
              pMatch = pItem;
              pExpr->iColumn = j;
              hit = 1;
            }
          }
          if( hit || zTab==0 ) continue;
        }
        if( zDb ){
          if( pTab->pSchema!=pSchema ) continue;
          if( pSchema==0 && strcmp(zDb,"*")!=0 ) continue;
        }
        if( zTab ){
          const char *zTabName = pItem->zAlias ? pItem->zAlias : pTab->zName;
          assert( zTabName!=0 );
          if( sqlite3StrICmp(zTabName, zTab)!=0 ){
            continue;
          }