Overview
| SHA1 Hash: | f83aa0de8470748b3cd0bff232aeea3baf8dae53 |
|---|---|
| Date: | 2012-10-30 15:31:31 |
| User: | drh |
| Comment: | Make sure that the optimizer never tries to create an automatic index on a coroutine subquery. |
Tags And Properties
- branch=subquery-as-coroutine inherited from [7af3acbbd4]
- closed added by [dd22f592d8] on 2012-11-05 13:44:24
- sym-subquery-as-coroutine inherited from [7af3acbbd4]
Changes
Changes to src/where.c
1816 return; 1816 return; 1817 } 1817 } 1818 if( (p->cost.plan.wsFlags & WHERE_NOT_FULLSCAN)!=0 1818 if( (p->cost.plan.wsFlags & WHERE_NOT_FULLSCAN)!=0 1819 && (p->cost.plan.wsFlags & WHERE_COVER_SCAN)==0 1819 && (p->cost.plan.wsFlags & WHERE_COVER_SCAN)==0 1820 ){ 1820 ){ 1821 /* We already have some kind of index in use for this query. */ 1821 /* We already have some kind of index in use for this query. */ 1822 return; 1822 return; > 1823 } > 1824 if( pSrc->viaCoroutine ){ > 1825 /* Cannot index a co-routine */ > 1826 return; 1823 } 1827 } 1824 if( pSrc->notIndexed ){ 1828 if( pSrc->notIndexed ){ 1825 /* The NOT INDEXED clause appears in the SQL. */ 1829 /* The NOT INDEXED clause appears in the SQL. */ 1826 return; 1830 return; 1827 } 1831 } 1828 if( pSrc->isCorrelated ){ 1832 if( pSrc->isCorrelated ){ 1829 /* The source is a correlated sub-query. No point in indexing it. */ 1833 /* The source is a correlated sub-query. No point in indexing it. */