From fd7ebbf696c8dcc25095e3b9d0b1e3a313994907 Mon Sep 17 00:00:00 2001 From: drh Date: Mon, 11 Oct 2010 13:12:04 +0000 Subject: [PATCH] Make APIs added since version 3.6.0 accessible to loadable extensions. FossilOrigin-Name: 76c64a35567880b49af076df61c9fee76e934f14 --- manifest | 26 ++++++++++++++++++-------- manifest.uuid | 2 +- src/loadext.c | 25 +++++++++++++++++++++++++ src/sqlite3ext.h | 42 ++++++++++++++++++++++++++++++++++++++++++ 4 files changed, 86 insertions(+), 9 deletions(-) diff --git a/manifest b/manifest index 055e81af07..49aea430a3 100644 --- a/manifest +++ b/manifest @@ -1,5 +1,8 @@ -C Add\stests\sto\se_createtable.test. -D 2010-10-08T16:09:44 +-----BEGIN PGP SIGNED MESSAGE----- +Hash: SHA1 + +C Make\sAPIs\sadded\ssince\sversion\s3.6.0\saccessible\sto\sloadable\sextensions. +D 2010-10-11T13:12:05 F Makefile.arm-wince-mingw32ce-gcc d6df77f1f48d690bd73162294bbba7f59507c72f F Makefile.in b01fdfcfecf8a0716c29867a67959f6148b79961 F Makefile.linux-gcc 91d710bdc4998cb015f39edf3cb314ec4f4d7e23 @@ -139,7 +142,7 @@ F src/insert.c a4995747c062256582a90b4f87f716e11b067050 F src/journal.c 552839e54d1bf76fb8f7abe51868b66acacf6a0e F src/legacy.c a199d7683d60cef73089e892409113e69c23a99f F src/lempar.c 7f026423f4d71d989e719a743f98a1cbd4e6d99e -F src/loadext.c 6d422ea91cf3d2d00408c5a8f2391cd458da85f8 +F src/loadext.c a3e276c19545527116ee72c5fe3f20efea03ed3e F src/main.c da74b2269470d97a702d2956eeeb691a5e3a68c3 F src/malloc.c 3d7284cd9346ab6e3945535761e68c23c6cf40ef F src/mem0.c 6a55ebe57c46ca1a7d98da93aaa07f99f1059645 @@ -176,7 +179,7 @@ F src/rowset.c 69afa95a97c524ba6faf3805e717b5b7ae85a697 F src/select.c 6a5c72fb0e8dc7f6133f5a9d7a747130ef0a00ea F src/shell.c 8517fc1f9c59ae4007e6cc8b9af91ab231ea2056 F src/sqlite.h.in a5b50e1bc4d4d9a3cc95386747220a839d0c40f7 -F src/sqlite3ext.h 69dfb8116af51b84a029cddb3b35062354270c89 +F src/sqlite3ext.h c90bd5507099f62043832d73f6425d8d5c5da754 F src/sqliteInt.h c63b0340dfdfde18ff255ddccf004edd2d073288 F src/sqliteLimit.h a17dcd3fb775d63b64a43a55c54cb282f9726f44 F src/status.c 496913d4e8441195f6f2a75b1c95993a45b9b30b @@ -873,7 +876,14 @@ F tool/speedtest2.tcl ee2149167303ba8e95af97873c575c3e0fab58ff F tool/speedtest8.c 2902c46588c40b55661e471d7a86e4dd71a18224 F tool/speedtest8inst1.c 293327bc76823f473684d589a8160bde1f52c14e F tool/vdbe-compress.tcl d70ea6d8a19e3571d7ab8c9b75cba86d1173ff0f -P 2677848087c9c090efb17c1893e77d6136a9111d -R 6e044b7c4a85e0cb47fea90114e6a2e3 -U dan -Z dc00dd7a16b0fb33265130607425eef7 +P 38bec827f1a0603ad36d1dc1bc83430ae370df38 +R 38c22a66befb43f7bd355826b118a4a3 +U drh +Z 954d001875450ed8c3f608965f41e88c +-----BEGIN PGP SIGNATURE----- +Version: GnuPG v1.4.6 (GNU/Linux) + +iD8DBQFMsw0ooxKgR168RlERAhBlAJwLm6pZql1nAtpJpykn/5McubBGzgCgh6f3 +1HwXUMGcGCSYygVUckTLoSk= +=mjo3 +-----END PGP SIGNATURE----- diff --git a/manifest.uuid b/manifest.uuid index a4d6b03bee..9c7579e1f3 100644 --- a/manifest.uuid +++ b/manifest.uuid @@ -1 +1 @@ -38bec827f1a0603ad36d1dc1bc83430ae370df38 \ No newline at end of file +76c64a35567880b49af076df61c9fee76e934f14 \ No newline at end of file diff --git a/src/loadext.c b/src/loadext.c index 835b8a84ea..8193618146 100644 --- a/src/loadext.c +++ b/src/loadext.c @@ -327,6 +327,31 @@ static const sqlite3_api_routines sqlite3Apis = { sqlite3_next_stmt, sqlite3_sql, sqlite3_status, + + /* + ** Added for 3.7.4 + */ + sqlite3_backup_finish, + sqlite3_backup_init, + sqlite3_backup_pagecount, + sqlite3_backup_remaining, + sqlite3_backup_step, + sqlite3_compileoption_get, + sqlite3_compileoption_used, + sqlite3_create_function_v2, + sqlite3_db_config, + sqlite3_db_mutex, + sqlite3_db_status, + sqlite3_extended_errcode, + sqlite3_log, + sqlite3_soft_heap_limit64, + sqlite3_sourceid, + sqlite3_stmt_status, + sqlite3_strnicmp, + sqlite3_unlock_notify, + sqlite3_wal_autocheckpoint, + sqlite3_wal_checkpoint, + sqlite3_wal_hook, }; /* diff --git a/src/sqlite3ext.h b/src/sqlite3ext.h index 0d37bbe01e..e45e691fd6 100644 --- a/src/sqlite3ext.h +++ b/src/sqlite3ext.h @@ -191,6 +191,27 @@ struct sqlite3_api_routines { sqlite3_stmt *(*next_stmt)(sqlite3*,sqlite3_stmt*); const char *(*sql)(sqlite3_stmt*); int (*status)(int,int*,int*,int); + int (*backup_finish)(sqlite3_backup*); + sqlite3_backup *(*backup_init)(sqlite3*,const char*,sqlite3*,const char*); + int (*backup_pagecount)(sqlite3_backup*); + int (*backup_remaining)(sqlite3_backup*); + int (*backup_step)(sqlite3_backup*,int); + const char *(*compileoption_get)(int); + int (*compileoption_used)(const char*); + int (*create_function_v2)(sqlite3*,const char*,int,int,void*,void (*xFunc)(sqlite3_context*,int,sqlite3_value**),void (*xStep)(sqlite3_context*,int,sqlite3_value**),void (*xFinal)(sqlite3_context*),void(*xDestroy)(void*)); + int (*db_config)(sqlite3*,int,...); + sqlite3_mutex *(*db_mutex)(sqlite3*); + int (*db_status)(sqlite3*,int,int*,int*,int); + int (*extended_errcode)(sqlite3*); + void (*log)(int,const char*,...); + sqlite3_int64 (*soft_heap_limit64)(sqlite3_int64); + const char *(*sourceid)(void); + int (*stmt_status)(sqlite3_stmt*,int,int); + int (*strnicmp)(const char*,const char*,int); + int (*unlock_notify)(sqlite3*,void(*)(void**,int),void*); + int (*wal_autocheckpoint)(sqlite3*,int); + int (*wal_checkpoint)(sqlite3*,const char*); + void *(*wal_hook)(sqlite3*,int(*)(void*,sqlite3*,const char*,int),void*); }; /* @@ -370,6 +391,27 @@ struct sqlite3_api_routines { #define sqlite3_next_stmt sqlite3_api->next_stmt #define sqlite3_sql sqlite3_api->sql #define sqlite3_status sqlite3_api->status +#define sqlite3_backup_finish sqlite3_api->backup_finish +#define sqlite3_backup_init sqlite3_api->backup_init +#define sqlite3_backup_pagecount sqlite3_api->backup_pagecount +#define sqlite3_backup_remaining sqlite3_api->backup_remaining +#define sqlite3_backup_step sqlite3_api->backup_step +#define sqlite3_compileoption_get sqlite3_api->compileoption_get +#define sqlite3_compileoption_used sqlite3_api->compileoption_used +#define sqlite3_create_function_v2 sqlite3_api->create_function_v2 +#define sqlite3_db_config sqlite3_api->db_config +#define sqlite3_db_mutex sqlite3_api->db_mutex +#define sqlite3_db_status sqlite3_api->db_status +#define sqlite3_extended_errcode sqlite3_api->extended_errcode +#define sqlite3_log sqlite3_api->log +#define sqlite3_soft_heap_limit64 sqlite3_api->soft_heap_limit64 +#define sqlite3_sourceid sqlite3_api->sourceid +#define sqlite3_stmt_status sqlite3_api->stmt_status +#define sqlite3_strnicmp sqlite3_api->strnicmp +#define sqlite3_unlock_notify sqlite3_api->unlock_notify +#define sqlite3_wal_autocheckpoint sqlite3_api->wal_autocheckpoint +#define sqlite3_wal_checkpoint sqlite3_api->wal_checkpoint +#define sqlite3_wal_hook sqlite3_api->wal_hook #endif /* SQLITE_CORE */ #define SQLITE_EXTENSION_INIT1 const sqlite3_api_routines *sqlite3_api = 0;