Many hyperlinks are disabled.
Use anonymous login
to enable hyperlinks.
Overview
Comment: | Remove the sqlite3ota_open_v2() API. Add a new parameter to sqlite3ota_open() instead. |
---|---|
Downloads: | Tarball | ZIP archive |
Timelines: | family | ancestors | descendants | both | trunk |
Files: | files | file ages | folders |
SHA1: |
c74e0bc481ce995f83ca8384e05dfbe0 |
User & Date: | dan 2015-05-19 17:48:11.466 |
Context
2015-05-19
| ||
19:44 | Ensure that when the VM applies TEXT affinity to a value it discards any existing REAL or INTEGER value. Fix for [34cd55d6]. (check-in: f5d0ce8079 user: dan tags: trunk) | |
17:48 | Remove the sqlite3ota_open_v2() API. Add a new parameter to sqlite3ota_open() instead. (check-in: c74e0bc481 user: dan tags: trunk) | |
16:50 | Merge the ota-update branch with trunk. (check-in: 08e2864ed7 user: dan tags: trunk) | |
Changes
Changes to ext/ota/sqlite3ota.c.
︙ | ︙ | |||
2656 2657 2658 2659 2660 2661 2662 | static void otaDeleteVfs(sqlite3ota *p){ if( p->zVfsName ){ sqlite3ota_destroy_vfs(p->zVfsName); p->zVfsName = 0; } } | > > > | | 2656 2657 2658 2659 2660 2661 2662 2663 2664 2665 2666 2667 2668 2669 2670 2671 2672 2673 | static void otaDeleteVfs(sqlite3ota *p){ if( p->zVfsName ){ sqlite3ota_destroy_vfs(p->zVfsName); p->zVfsName = 0; } } /* ** Open and return a new OTA handle. */ sqlite3ota *sqlite3ota_open( const char *zTarget, const char *zOta, const char *zState ){ sqlite3ota *p; int nTarget = strlen(zTarget); int nOta = strlen(zOta); |
︙ | ︙ | |||
2772 2773 2774 2775 2776 2777 2778 | otaFreeState(pState); } return p; } | < < < < < < < < < < < < < < < < < < < < < | 2775 2776 2777 2778 2779 2780 2781 2782 2783 2784 2785 2786 2787 2788 | otaFreeState(pState); } return p; } /* ** Return the database handle used by pOta. */ sqlite3 *sqlite3ota_db(sqlite3ota *pOta, int bOta){ sqlite3 *db = 0; if( pOta ){ db = (bOta ? pOta->dbOta : pOta->dbMain); |
︙ | ︙ |
Changes to ext/ota/sqlite3ota.h.
︙ | ︙ | |||
257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 | ** Argument zTarget is the path to the target database. Argument zOta is ** the path to the OTA database. Each call to this function must be matched ** by a call to sqlite3ota_close(). When opening the databases, OTA passes ** the SQLITE_CONFIG_URI flag to sqlite3_open_v2(). So if either zTarget ** or zOta begin with "file:", it will be interpreted as an SQLite ** database URI, not a regular file name. ** ** By default, OTA uses the default VFS to access the files on disk. To ** use a VFS other than the default, an SQLite "file:" URI containing a ** "vfs=..." option may be passed as the zTarget option. ** ** IMPORTANT NOTE FOR ZIPVFS USERS: The OTA extension works with all of ** SQLite's built-in VFSs, including the multiplexor VFS. However it does ** not work out of the box with zipvfs. Refer to the comment describing ** the zipvfs_create_vfs() API below for details on using OTA with zipvfs. */ | > > > > > > > > > > > > > > < < < < < < < < < < < < < < < < < < < < < < < < < < < | | | 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 | ** Argument zTarget is the path to the target database. Argument zOta is ** the path to the OTA database. Each call to this function must be matched ** by a call to sqlite3ota_close(). When opening the databases, OTA passes ** the SQLITE_CONFIG_URI flag to sqlite3_open_v2(). So if either zTarget ** or zOta begin with "file:", it will be interpreted as an SQLite ** database URI, not a regular file name. ** ** If the zState argument is passed a NULL value, the OTA extension stores ** the current state of the update (how many rows have been updated, which ** indexes are yet to be updated etc.) within the OTA database itself. This ** can be convenient, as it means that the OTA application does not need to ** organize removing a separate state file after the update is concluded. ** Or, if zState is non-NULL, it must be a path to a database file in which ** the OTA extension can store the state of the update. ** ** When resuming an OTA update, the zState argument must be passed the same ** value as when the OTA update was started. ** ** Once the OTA update is finished, the OTA extension does not ** automatically remove any zState database file, even if it created it. ** ** By default, OTA uses the default VFS to access the files on disk. To ** use a VFS other than the default, an SQLite "file:" URI containing a ** "vfs=..." option may be passed as the zTarget option. ** ** IMPORTANT NOTE FOR ZIPVFS USERS: The OTA extension works with all of ** SQLite's built-in VFSs, including the multiplexor VFS. However it does ** not work out of the box with zipvfs. Refer to the comment describing ** the zipvfs_create_vfs() API below for details on using OTA with zipvfs. */ sqlite3ota *sqlite3ota_open( const char *zTarget, const char *zOta, const char *zState ); /* ** Internally, each OTA connection uses a separate SQLite database ** connection to access the target and ota update databases. This |
︙ | ︙ |
Changes to ext/ota/test_ota.c.
︙ | ︙ | |||
120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 | int objc, Tcl_Obj *CONST objv[] ){ sqlite3ota *pOta = 0; const char *zCmd; const char *zTarget; const char *zOta; if( objc!=4 && objc!=5 ){ Tcl_WrongNumArgs(interp, 1, objv, "NAME TARGET-DB OTA-DB ?STATE-DB?"); return TCL_ERROR; } zCmd = Tcl_GetString(objv[1]); zTarget = Tcl_GetString(objv[2]); zOta = Tcl_GetString(objv[3]); | > > < | < < < < | 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 | int objc, Tcl_Obj *CONST objv[] ){ sqlite3ota *pOta = 0; const char *zCmd; const char *zTarget; const char *zOta; const char *zStateDb = 0; if( objc!=4 && objc!=5 ){ Tcl_WrongNumArgs(interp, 1, objv, "NAME TARGET-DB OTA-DB ?STATE-DB?"); return TCL_ERROR; } zCmd = Tcl_GetString(objv[1]); zTarget = Tcl_GetString(objv[2]); zOta = Tcl_GetString(objv[3]); if( objc==5 ) zStateDb = Tcl_GetString(objv[4]); pOta = sqlite3ota_open(zTarget, zOta, zStateDb); Tcl_CreateObjCommand(interp, zCmd, test_sqlite3ota_cmd, (ClientData)pOta, 0); Tcl_SetObjResult(interp, objv[1]); return TCL_OK; } /* ** Tclcmd: sqlite3ota_create_vfs ?-default? NAME PARENT |
︙ | ︙ |