/ Check-in [f17e7229]
Login

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

Overview
Comment:Fix harmless compiler warnings in the TCL interface.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA3-256: f17e72291f197a92b3e15e054271b997d45211a5a31ca4ea6c7fbb33026d5f1f
User & Date: drh 2019-08-15 23:11:42
Context
2019-08-16
22:58
Add the ability to unregister a virtual table module by invoking sqlite3_create_module() with a NULL sqlite3_module pointer. check-in: 31e34fa3 user: drh tags: trunk
2019-08-15
23:11
Fix harmless compiler warnings in the TCL interface. check-in: f17e7229 user: drh tags: trunk
21:27
Add the SQLITE_DBCONFIG_ENABLE_VIEW option, together with a "db config" command in the TCL interface that can access that option as well as all the other sqlite3_db_config() boolean options. check-in: 61b4bccd user: drh tags: trunk
Changes
Hide Diffs Side-by-Side Diffs Ignore Whitespace Patch

Changes to src/tclsqlite.c.

  2364   2364       }
  2365   2365       if( objc==2 ){
  2366   2366         /* With no arguments, list all configuration options and with the
  2367   2367         ** current value */
  2368   2368         pResult = Tcl_NewListObj(0,0);
  2369   2369         for(ii=0; ii<sizeof(aDbConfig)/sizeof(aDbConfig[0]); ii++){
  2370   2370           int v = 0;
  2371         -        int rc = sqlite3_db_config(pDb->db, aDbConfig[ii].op, -1, &v);
  2372         -        if( rc!=SQLITE_OK ) continue;
         2371  +        sqlite3_db_config(pDb->db, aDbConfig[ii].op, -1, &v);
  2373   2372           Tcl_ListObjAppendElement(interp, pResult,
  2374   2373              Tcl_NewStringObj(aDbConfig[ii].zName,-1));
  2375   2374           Tcl_ListObjAppendElement(interp, pResult,
  2376   2375              Tcl_NewIntObj(v));
  2377   2376         }
  2378   2377       }else{
  2379   2378         const char *zOpt = Tcl_GetString(objv[2]);
  2380         -      int rc;
  2381   2379         int onoff = -1;
  2382   2380         int v = 0;
  2383   2381         if( zOpt[0]=='-' ) zOpt++;
  2384   2382         for(ii=0; ii<sizeof(aDbConfig)/sizeof(aDbConfig[0]); ii++){
  2385   2383           if( strcmp(aDbConfig[ii].zName, zOpt)==0 ) break;
  2386   2384         }
  2387   2385         if( ii>=sizeof(aDbConfig)/sizeof(aDbConfig[0]) ){
................................................................................
  2390   2388           return TCL_ERROR;
  2391   2389         }
  2392   2390         if( objc==4 ){
  2393   2391           if( Tcl_GetBooleanFromObj(interp, objv[3], &onoff) ){
  2394   2392             return TCL_ERROR;
  2395   2393           }
  2396   2394         }
  2397         -      rc = sqlite3_db_config(pDb->db, aDbConfig[ii].op, onoff, &v);
         2395  +      sqlite3_db_config(pDb->db, aDbConfig[ii].op, onoff, &v);
  2398   2396         pResult = Tcl_NewIntObj(v);
  2399   2397       }
  2400   2398       Tcl_SetObjResult(interp, pResult);
  2401   2399       break;
  2402   2400     }
  2403   2401   
  2404   2402     /*    $db copy conflict-algorithm table filename ?SEPARATOR? ?NULLINDICATOR?