/ Check-in [7a1add56]
Login
SQLite training in Houston TX on 2019-11-05 (details)
Part of the 2019 Tcl Conference

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

Overview
Comment:Fix a memory leak in the test code on this branch.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | test-bestindex
Files: files | file ages | folders
SHA1: 7a1add56341f43dc41adc7b370e58860f4dd50a3
User & Date: dan 2016-03-01 18:35:55
Context
2016-03-01
22:48
New test cases and infrastructure for testing the xBestIndex method of virtual tables. check-in: 1d41c161 user: drh tags: trunk
18:35
Fix a memory leak in the test code on this branch. Closed-Leaf check-in: 7a1add56 user: dan tags: test-bestindex
18:24
Allow test_bestindex.c to set the omit flag for a constraint. check-in: 759b9d5b user: dan tags: test-bestindex
Changes
Hide Diffs Side-by-Side Diffs Ignore Whitespace Patch

Changes to src/test_bestindex.c.

   325    325           }else
   326    326           if( sqlite3_stricmp("idxnum", zCmd)==0 ){
   327    327             rc = Tcl_GetIntFromObj(interp, p, &pIdxInfo->idxNum);
   328    328           }else
   329    329           if( sqlite3_stricmp("idxstr", zCmd)==0 ){
   330    330             sqlite3_free(pIdxInfo->idxStr);
   331    331             pIdxInfo->idxStr = sqlite3_mprintf("%s", Tcl_GetString(p));
          332  +          pIdxInfo->needToFreeIdxStr = 1;
   332    333           }else
   333    334           if( sqlite3_stricmp("rows", zCmd)==0 ){
   334    335             rc = Tcl_GetWideIntFromObj(interp, p, &pIdxInfo->estimatedRows);
   335    336           }else
   336    337           if( sqlite3_stricmp("use", zCmd)==0 
   337    338            || sqlite3_stricmp("omit", zCmd)==0 
   338    339           ){