/ 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 Unified Diffs Show Whitespace Changes Patch

Changes to src/test_bestindex.c.

325
326
327
328
329
330
331

332
333
334
335
336
337
338
        }else
        if( sqlite3_stricmp("idxnum", zCmd)==0 ){
          rc = Tcl_GetIntFromObj(interp, p, &pIdxInfo->idxNum);
        }else
        if( sqlite3_stricmp("idxstr", zCmd)==0 ){
          sqlite3_free(pIdxInfo->idxStr);
          pIdxInfo->idxStr = sqlite3_mprintf("%s", Tcl_GetString(p));

        }else
        if( sqlite3_stricmp("rows", zCmd)==0 ){
          rc = Tcl_GetWideIntFromObj(interp, p, &pIdxInfo->estimatedRows);
        }else
        if( sqlite3_stricmp("use", zCmd)==0 
         || sqlite3_stricmp("omit", zCmd)==0 
        ){







>







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