From: drh Date: Mon, 27 May 2002 03:25:51 +0000 (+0000) Subject: Fix the "alias.*" bug found by Bernie Cosell and reported on the newsgroup. (CVS... X-Git-Tag: version-3.6.10~5482 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=c754fa54860f7975c9a62c36511198cac4a4b116;p=thirdparty%2Fsqlite.git Fix the "alias.*" bug found by Bernie Cosell and reported on the newsgroup. (CVS 593) FossilOrigin-Name: f562d542304c0c1b18b0cee78b1ecc353327a02e --- diff --git a/manifest b/manifest index 85667fe53f..8ba7a8470e 100644 --- a/manifest +++ b/manifest @@ -1,5 +1,5 @@ -C Bug\sfixes\sand\sadditional\stest\scases\sfor\sthe\sdistinct-NULL\spatch.\s(CVS\s592) -D 2002-05-27T01:04:51 +C Fix\sthe\s"alias.*"\sbug\sfound\sby\sBernie\sCosell\sand\sreported\son\sthe\snewsgroup.\s(CVS\s593) +D 2002-05-27T03:25:52 F Makefile.in 6291a33b87d2a395aafd7646ee1ed562c6f2c28c F Makefile.template 4e11752e0b5c7a043ca50af4296ec562857ba495 F README a4c0ba11354ef6ba0776b400d057c59da47a4cc0 @@ -37,7 +37,7 @@ F src/pager.h 6fddfddd3b73aa8abc081b973886320e3c614f0e F src/parse.y c681da701bf142967325b8791f22418e2d81552d F src/printf.c d8032ee18b860c812eeff596c9bebfdacb7930fd F src/random.c 19e8e00fe0df32a742f115773f57651be327cabe -F src/select.c 9b404b6eeb3428896fdbddc6e1ace68ee931ec17 +F src/select.c f3c814e8fd4e6fbdd3fb8207e6c073bacc4761b8 F src/shell.c 1d22fe870ee852cfb975fd000dbe3973713d0a15 F src/shell.tcl 27ecbd63dd88396ad16d81ab44f73e6c0ea9d20e F src/sqlite.h.in 0038faa6d642de06b91143ee65a131bd831d020b @@ -86,7 +86,7 @@ F test/printf.test 3cb415073754cb8ff076f26173143c3cd293a9da F test/quick.test 6f023c7a73fc413e6d65b7a1879c79764038dc05 F test/quote.test 08f23385c685d3dc7914ec760d492cacea7f6e3d F test/rowid.test 4c55943300cddf73dd0f88d40a268cab14c83274 -F test/select1.test 4e1ac9cc3cbf5b3ceae388fb3d4ca1b9f9a1cc15 +F test/select1.test 1842aa108d0d780b71fd1250d3518188498d737b F test/select2.test aceea74fd895b9d007512f72499db589735bd8e4 F test/select3.test 9469c332250a75a0ef1771fb5da62dc04ec77f18 F test/select4.test 2ea8c7b7feceb853da167a39e4cce996a5c3ad88 @@ -135,7 +135,7 @@ F www/speed.tcl da8afcc1d3ccc5696cfb388a68982bc3d9f7f00f F www/sqlite.tcl 8b5884354cb615049aed83039f8dfe1552a44279 F www/tclsqlite.tcl 1db15abeb446aad0caf0b95b8b9579720e4ea331 F www/vdbe.tcl 2013852c27a02a091d39a766bc87cff329f21218 -P d9e48cd5180e2aae7672b9d54e18c37d0fe5258a -R fc93e940356a8b3ec291e98d6e7a4c6b +P 0e268d0c0faa02c3f95e1567cf631b7a04bfbdf0 +R 8c1d70156583ffb3a3f61c616d535c5f U drh -Z b54c0b1652f6c89ad5dde6fb5c2177ec +Z 0d522217ffc292b5873b9c11d67f0320 diff --git a/manifest.uuid b/manifest.uuid index c1e4a62103..351d325b34 100644 --- a/manifest.uuid +++ b/manifest.uuid @@ -1 +1 @@ -0e268d0c0faa02c3f95e1567cf631b7a04bfbdf0 \ No newline at end of file +f562d542304c0c1b18b0cee78b1ecc353327a02e \ No newline at end of file diff --git a/src/select.c b/src/select.c index 3be8650cef..8a36bc02ab 100644 --- a/src/select.c +++ b/src/select.c @@ -12,7 +12,7 @@ ** This file contains C code routines that are called by the parser ** to handle SELECT statements in SQLite. ** -** $Id: select.c,v 1.86 2002/05/26 20:54:34 drh Exp $ +** $Id: select.c,v 1.87 2002/05/27 03:25:52 drh Exp $ */ #include "sqliteInt.h" @@ -676,8 +676,9 @@ static int fillInColumnList(Parse *pParse, Select *p){ if( zTabName==0 || zTabName[0]==0 ){ zTabName = pTab->zName; } - if( pName && (zTabName==0 || zTabName[0]==0 || - sqliteStrNICmp(pName->z, zTabName, pName->n)!=0) ){ + if( pName && (zTabName==0 || zTabName[0]==0 || + sqliteStrNICmp(pName->z, zTabName, pName->n)!=0 || + zTabName[pName->n]!=0) ){ continue; } tableSeen = 1; diff --git a/test/select1.test b/test/select1.test index 8a59498a01..f3ab52029f 100644 --- a/test/select1.test +++ b/test/select1.test @@ -11,7 +11,7 @@ # This file implements regression tests for SQLite library. The # focus of this file is testing the SELECT statement. # -# $Id: select1.test,v 1.27 2002/05/27 01:04:51 drh Exp $ +# $Id: select1.test,v 1.28 2002/05/27 03:25:52 drh Exp $ set testdir [file dirname $argv0] source $testdir/tester.tcl @@ -627,6 +627,11 @@ do_test select1-11.15 { SELECT y.*, t3.* FROM t3, (SELECT max(a), max(b) FROM t4) AS y } } {y.max(a) 3 y.max(b) 4 t3.a 1 t3.b 2} +do_test select1-11.16 { + execsql2 { + SELECT y.* FROM t3 as y, t4 as z + } +} {y.a 1 y.b 2} # Tests of SELECT statements without a FROM clause. #