1
0
mirror of https://github.com/sqlite/sqlite.git synced 2025-08-05 15:55:57 +03:00

Add assert() statements to refute

[forum:/forumpost/9f4e7f58fbb66ddd|forum post 9f4e7f58fbb66ddd].

FossilOrigin-Name: 83a83475c5064ea62016a03e9173ecd2a1fec7f6296f1ee99896fa0a38b4196a
This commit is contained in:
drh
2021-09-13 18:16:15 +00:00
parent 30918bfb0b
commit 82456a661d
4 changed files with 15 additions and 9 deletions

View File

@@ -1066,6 +1066,9 @@ int sqlite3WindowRewrite(Parse *pParse, Select *p){
("New window-function subquery in FROM clause of (%u/%p)\n",
p->selId, p));
p->pSrc = sqlite3SrcListAppend(pParse, 0, 0, 0);
assert( pSub!=0 || p->pSrc==0 ); /* Due to db->mallocFailed test inside
** of sqlite3DbMallocRawNN() called from
** sqlite3SrcListAppend() */
if( p->pSrc ){
Table *pTab2;
p->pSrc->a[0].pSelect = pSub;