/ Check-in [9034cf7e]
Login

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:Fix the sqlite3TreeViewSelect() routine so that it works with a null pointer to the Select object.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA3-256: 9034cf7efc603864f51e931c7dc4fbbc2d01904e951e78c88d4d80f9936250e8
User & Date: drh 2017-03-13 17:37:13
Context
2017-03-13
18:24
In the output of the ".dump" command in the CLI, quote newline and carriage-return characters using the char() function, so that they do not get eaten by end-of-line processing logic in the OS or in other command-line utilities and/or libraries. check-in: 68f6dc7a user: drh tags: trunk
17:37
Fix the sqlite3TreeViewSelect() routine so that it works with a null pointer to the Select object. check-in: 9034cf7e user: drh tags: trunk
14:30
Fix a segfault that could occur following an OOM error in the flattenSubquery() routine. check-in: c6dda3f7 user: dan tags: trunk
Changes
Hide Diffs Side-by-Side Diffs Ignore Whitespace Patch

Changes to src/treeview.c.

   122    122   
   123    123   /*
   124    124   ** Generate a human-readable description of a Select object.
   125    125   */
   126    126   void sqlite3TreeViewSelect(TreeView *pView, const Select *p, u8 moreToFollow){
   127    127     int n = 0;
   128    128     int cnt = 0;
          129  +  if( p==0 ){
          130  +    sqlite3TreeViewLine(pView, "nil-SELECT");
          131  +    return;
          132  +  } 
   129    133     pView = sqlite3TreeViewPush(pView, moreToFollow);
   130    134     if( p->pWith ){
   131    135       sqlite3TreeViewWith(pView, p->pWith, 1);
   132    136       cnt = 1;
   133    137       sqlite3TreeViewPush(pView, 1);
   134    138     }
   135    139     do{