Many hyperlinks are disabled.
Use anonymous login
to enable hyperlinks.
Overview
Comment: | Use the NGQP plan for EXPLAIN QUERY PLAN output. This change causes 207 errors in veryquick.test, many of which are benign. |
---|---|
Downloads: | Tarball | ZIP archive |
Timelines: | family | ancestors | descendants | both | nextgen-query-plan-exp |
Files: | files | file ages | folders |
SHA1: |
f783e8e6b10de44029c7c5f57e4648a4 |
User & Date: | drh 2013-05-22 20:49:02.170 |
Context
2013-05-24
| ||
13:55 | Merge the latest trunk changes into the NGQP branch. (check-in: 7c8f992c04 user: drh tags: nextgen-query-plan-exp) | |
2013-05-22
| ||
20:49 | Use the NGQP plan for EXPLAIN QUERY PLAN output. This change causes 207 errors in veryquick.test, many of which are benign. (check-in: f783e8e6b1 user: drh tags: nextgen-query-plan-exp) | |
17:01 | Allow the rowid at the end of an index to be used in a constraint on that index. (check-in: 9bf0524df7 user: drh tags: nextgen-query-plan-exp) | |
Changes
Changes to src/where.c.
︙ | |||
4164 4165 4166 4167 4168 4169 4170 | 4164 4165 4166 4167 4168 4169 4170 4171 4172 4173 4174 4175 4176 4177 4178 4179 4180 4181 4182 4183 4184 4185 4186 4187 4188 4189 4190 4191 4192 4193 4194 4195 4196 4197 4198 4199 4200 4201 4202 | - + - - - + + + - + - + - + | ** ** "a=? AND b>?" ** ** The returned pointer points to memory obtained from sqlite3DbMalloc(). ** It is the responsibility of the caller to free the buffer when it is ** no longer required. */ |
︙ | |||
4211 4212 4213 4214 4215 4216 4217 | 4211 4212 4213 4214 4215 4216 4217 4218 4219 4220 4221 4222 4223 4224 4225 4226 4227 4228 4229 4230 4231 4232 4233 4234 4235 4236 4237 4238 4239 4240 4241 4242 4243 4244 4245 4246 4247 4248 4249 4250 4251 4252 4253 4254 4255 4256 4257 4258 4259 4260 4261 4262 4263 4264 4265 4266 4267 4268 4269 4270 4271 4272 4273 4274 4275 4276 4277 4278 4279 4280 4281 4282 4283 4284 4285 4286 4287 4288 | - + + + + - - - + + + - - + + + + - + - + - + - - + - + | SrcList *pTabList, /* Table list this loop refers to */ WhereLevel *pLevel, /* Scan to write OP_Explain opcode for */ int iLevel, /* Value for "level" column of output */ int iFrom, /* Value for "from" column of output */ u16 wctrlFlags /* Flags passed to sqlite3WhereBegin() */ ){ if( pParse->explain==2 ){ |
︙ | |||
5259 5260 5261 5262 5263 5264 5265 | 5263 5264 5265 5266 5267 5268 5269 5270 5271 5272 5273 5274 5275 5276 5277 5278 | - + + | p->pNextLoop = pNext; *ppPrev = p; p->aTerm = paTerm; if( p->nTerm ){ memcpy(p->aTerm, pTemplate->aTerm, p->nTerm*sizeof(p->aTerm[0])); } if( (p->wsFlags & WHERE_VIRTUALTABLE)==0 ){ |
︙ | |||
5306 5307 5308 5309 5310 5311 5312 5313 5314 5315 5316 5317 5318 5319 | 5311 5312 5313 5314 5315 5316 5317 5318 5319 5320 5321 5322 5323 5324 5325 | + | if( pNew->wsFlags & WHERE_BTM_LIMIT ){ opMask = WO_LT|WO_LE; }else if( pProbe->tnum<=0 || (pSrc->jointype & JT_LEFT)!=0 ){ opMask = WO_EQ|WO_IN|WO_GT|WO_GE|WO_LT|WO_LE; }else{ opMask = WO_EQ|WO_IN|WO_ISNULL|WO_GT|WO_GE|WO_LT|WO_LE; } if( pProbe->bUnordered ) opMask &= ~(WO_GT|WO_GE|WO_LT|WO_LE); if( pNew->u.btree.nEq < pProbe->nColumn ){ iCol = pProbe->aiColumn[pNew->u.btree.nEq]; iRowEst = pProbe->aiRowEst[pNew->u.btree.nEq+1]; }else{ iCol = -1; iRowEst = 1; |
︙ | |||
5468 5469 5470 5471 5472 5473 5474 5475 5476 5477 5478 5479 5480 5481 | 5474 5475 5476 5477 5478 5479 5480 5481 5482 5483 5484 5485 5486 5487 5488 | + | /* Generate auto-index WhereLoops */ WhereClause *pWC = pBuilder->pWC; WhereTerm *pTerm; WhereTerm *pWCEnd = pWC->a + pWC->nTerm; for(pTerm=pWC->a; rc==SQLITE_OK && pTerm<pWCEnd; pTerm++){ if( termCanDriveIndex(pTerm, pSrc, 0) ){ pNew->u.btree.nEq = 1; pNew->u.btree.pIndex = 0; pNew->nTerm = 1; pNew->aTerm[0] = pTerm; pNew->rSetup = 2*rLogSize*pSrc->pTab->nRowEst; pNew->nOut = (double)10; pNew->rRun = rLogSize + pNew->nOut; pNew->wsFlags = WHERE_TEMP_INDEX; pNew->prereq = mExtra | pTerm->prereqRight; |
︙ | |||
5511 5512 5513 5514 5515 5516 5517 | 5518 5519 5520 5521 5522 5523 5524 5525 5526 5527 5528 5529 5530 5531 5532 | - + | if( x<BMS-1 ){ m &= ~(((Bitmask)1)<<x); } } pNew->wsFlags = (m==0) ? WHERE_IDX_ONLY : 0; /* Full scan via index */ |
︙ | |||
5888 5889 5890 5891 5892 5893 5894 | 5895 5896 5897 5898 5899 5900 5901 5902 5903 5904 5905 5906 5907 5908 5909 5910 5911 | - + - | assert( (pLoop->wsFlags & WHERE_VIRTUALTABLE)==0 ); isUnique = 1; if( pLoop->wsFlags & WHERE_IPK ){ if( (pLoop->wsFlags & WHERE_COLUMN_IN)!=0 ) isUnique = 0; if( pLoop->u.btree.nEq!=1 ) isUnique = 0; pIndex = 0; nColumn = 1; |
︙ |
Changes to test/tester.tcl.
︙ | |||
789 790 791 792 793 794 795 | 789 790 791 792 793 794 795 796 797 798 799 800 801 802 803 804 805 806 807 808 809 810 811 812 813 814 815 816 817 818 819 820 821 822 823 824 | + + + + + + + + + + + + + + - - - + + + + + + + + | db close sqlite3_reset_auto_extension sqlite3_soft_heap_limit 0 set nTest [incr_ntest] set nErr [set_test_counter errors] set nKnown 0 if {[file readable known-problems.txt]} { set fd [open known-problems.txt] set content [read $fd] close $fd foreach x $content {set known_error($x) 1} foreach x [set_test_counter fail_list] { if {[info exists known_error($x)]} {incr nKnown} } } if {$nKnown>0} { puts "[expr {$nErr-$nKnown}] new errors and $nKnown known errors\ out of $nTest tests" } else { |
︙ |