Many hyperlinks are disabled.
Use anonymous login
to enable hyperlinks.
Overview
Comment: | Change the names of SRT_DistTable and SRT_Table used by CTE to more meaningful SRT_DistFifo and SRT_Fifo, respectively. Simplify the IgnorableOrderby() macro in the process. |
---|---|
Downloads: | Tarball | ZIP archive |
Timelines: | family | ancestors | descendants | both | trunk |
Files: | files | file ages | folders |
SHA1: |
45d8cc678d128f1dda6469864215a8ed |
User & Date: | drh 2014-03-21 19:56:09.443 |
References
2020-09-17
| ||
00:00 | • New ticket [c51489c3b8] Incorrect result from WITH RECURSIVE using DEFAULT. (artifact: bc4760677c user: drh) | |
Context
2014-03-21
| ||
20:58 | Add the ability to use indices for the first few terms of an ORDER BY clause, then sort in batches to handle the later terms. (check-in: fa06a6fed9 user: drh tags: trunk) | |
19:56 | Change the names of SRT_DistTable and SRT_Table used by CTE to more meaningful SRT_DistFifo and SRT_Fifo, respectively. Simplify the IgnorableOrderby() macro in the process. (check-in: 45d8cc678d user: drh tags: trunk) | |
19:27 | Avoid leaking memory in an obscure case where the flattener adds an ORDER BY clause to the recursive part of a recursive query. (check-in: 1f413aca00 user: dan tags: trunk) | |
Changes
Changes to src/select.c.
︙ | |||
696 697 698 699 700 701 702 | 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 | + - + - - + + | sqlite3VdbeAddOp3(v, OP_IdxDelete, iParm, regResult, nResultCol); break; } #endif /* SQLITE_OMIT_COMPOUND_SELECT */ /* Store the result as data using a unique key. */ case SRT_Fifo: |
︙ | |||
1831 1832 1833 1834 1835 1836 1837 | 1832 1833 1834 1835 1836 1837 1838 1839 1840 1841 1842 1843 1844 1845 1846 | - + | Select *pSetup = p->pPrior; /* The setup query */ int addrTop; /* Top of the loop */ int addrCont, addrBreak; /* CONTINUE and BREAK addresses */ int iCurrent = 0; /* The Current table */ int regCurrent; /* Register holding Current table */ int iQueue; /* The Queue table */ int iDistinct = 0; /* To ensure unique results if UNION */ |
︙ | |||
1863 1864 1865 1866 1867 1868 1869 | 1864 1865 1866 1867 1868 1869 1870 1871 1872 1873 1874 1875 1876 1877 1878 1879 1880 1881 1882 1883 1884 | - + - + - + | iCurrent = pSrc->a[i].iCursor; break; } } /* Allocate cursors numbers for Queue and Distinct. The cursor number for ** the Distinct table must be exactly one greater than Queue in order |
︙ | |||
4484 4485 4486 4487 4488 4489 4490 | 4485 4486 4487 4488 4489 4490 4491 4492 4493 4494 4495 4496 4497 4498 4499 4500 4501 4502 4503 4504 4505 4506 4507 | - + + - - + + | db = pParse->db; if( p==0 || db->mallocFailed || pParse->nErr ){ return 1; } if( sqlite3AuthCheck(pParse, SQLITE_SELECT, 0, 0, 0) ) return 1; memset(&sAggInfo, 0, sizeof(sAggInfo)); |
︙ |
Changes to src/sqliteInt.h.
︙ | |||
2257 2258 2259 2260 2261 2262 2263 | 2257 2258 2259 2260 2261 2262 2263 2264 2265 2266 2267 2268 2269 2270 2271 2272 2273 2274 2275 2276 2277 2278 2279 2280 2281 2282 2283 2284 2285 2286 2287 2288 2289 2290 2291 2292 2293 2294 2295 2296 2297 2298 2299 2300 2301 2302 2303 2304 2305 2306 | - - + + + + - + - + + + + + - + - - - - - - + + + + + + - - - | ** SRT_Coroutine Generate a co-routine that returns a new row of ** results each time it is invoked. The entry point ** of the co-routine is stored in register pDest->iSDParm ** and the result row is stored in pDest->nDest registers ** starting with pDest->iSdst. ** ** SRT_Table Store results in temporary table pDest->iSDParm. |
︙ |