1
0
mirror of https://github.com/sqlite/sqlite.git synced 2025-11-12 13:01:09 +03:00

In the test logic: load the md5sum() SQL function as a separate

autoloaded extension. (CVS 5623)

FossilOrigin-Name: d4438251dd66c4168e09eb421a8c2081228357dd
This commit is contained in:
drh
2008-08-27 15:21:33 +00:00
parent a1fa00d95f
commit 65aa957a88
4 changed files with 18 additions and 14 deletions

View File

@@ -1,5 +1,5 @@
C Use\sa\sbitvec\sobject\sto\sstore\sthe\sset\sof\spages\swith\sthe\s'always-rollback'\sproperty\sfor\sa\stransaction.\s(CVS\s5622) C In\sthe\stest\slogic:\sload\sthe\smd5sum()\sSQL\sfunction\sas\sa\sseparate\nautoloaded\sextension.\s(CVS\s5623)
D 2008-08-27T15:16:34 D 2008-08-27T15:21:34
F Makefile.arm-wince-mingw32ce-gcc fcd5e9cd67fe88836360bb4f9ef4cb7f8e2fb5a0 F Makefile.arm-wince-mingw32ce-gcc fcd5e9cd67fe88836360bb4f9ef4cb7f8e2fb5a0
F Makefile.in 689e14735f862a5553bceef206d8c13e29504e44 F Makefile.in 689e14735f862a5553bceef206d8c13e29504e44
F Makefile.linux-gcc d53183f4aa6a9192d249731c90dbdffbd2c68654 F Makefile.linux-gcc d53183f4aa6a9192d249731c90dbdffbd2c68654
@@ -153,7 +153,7 @@ F src/sqliteLimit.h f435e728c6b620ef7312814d660a81f9356eb5c8
F src/status.c 8caa772cd9310bc297280f7cf0ede4d69ed5b801 F src/status.c 8caa772cd9310bc297280f7cf0ede4d69ed5b801
F src/table.c 22744786199c9195720c15a7a42cb97b2e2728d8 F src/table.c 22744786199c9195720c15a7a42cb97b2e2728d8
F src/tclsqlite.c 420c7936d71f8318ea23b254c0d2cfc365135403 F src/tclsqlite.c 420c7936d71f8318ea23b254c0d2cfc365135403
F src/test1.c f92039530f6a6253ec8d3bfeaa54205a0036bbb6 F src/test1.c bca7922b1eb9e8ca6042651a6974f0e2ad022df7
F src/test2.c eaa77124786649eedf47d3c5e94d8070c0da228f F src/test2.c eaa77124786649eedf47d3c5e94d8070c0da228f
F src/test3.c e85b7ce5c28c3ce7fbdbf7f98e1467b19786c62b F src/test3.c e85b7ce5c28c3ce7fbdbf7f98e1467b19786c62b
F src/test4.c 41056378671e7b00e6305fa9ac6fa27e6f96f406 F src/test4.c 41056378671e7b00e6305fa9ac6fa27e6f96f406
@@ -167,7 +167,7 @@ F src/test_autoext.c f53b0cdf7bf5f08100009572a5d65cdb540bd0ad
F src/test_btree.c 7170e0c922ed3979f2d38f4a3f84728e5740dfc3 F src/test_btree.c 7170e0c922ed3979f2d38f4a3f84728e5740dfc3
F src/test_config.c 224f699a34d45eb8ac5c22a7ad6cdbb8edf0ba28 F src/test_config.c 224f699a34d45eb8ac5c22a7ad6cdbb8edf0ba28
F src/test_devsym.c 6012cb8e3acf812513511025a4fa5d626e0ba19b F src/test_devsym.c 6012cb8e3acf812513511025a4fa5d626e0ba19b
F src/test_func.c 18c727c11461a21bc2ef404a32672517f6eb7587 F src/test_func.c bc648b7747320e037d756acfa1037bd8dedf3f8b
F src/test_hexio.c 2f1122aa3f012fa0142ee3c36ce5c902a70cd12f F src/test_hexio.c 2f1122aa3f012fa0142ee3c36ce5c902a70cd12f
F src/test_loadext.c 97dc8800e46a46ed002c2968572656f37e9c0dd9 F src/test_loadext.c 97dc8800e46a46ed002c2968572656f37e9c0dd9
F src/test_malloc.c 49abbf5d9c71fb06cf7a7cf96f9b9a799b77a421 F src/test_malloc.c 49abbf5d9c71fb06cf7a7cf96f9b9a799b77a421
@@ -623,7 +623,7 @@ F tool/speedtest16.c c8a9c793df96db7e4933f0852abb7a03d48f2e81
F tool/speedtest2.tcl ee2149167303ba8e95af97873c575c3e0fab58ff F tool/speedtest2.tcl ee2149167303ba8e95af97873c575c3e0fab58ff
F tool/speedtest8.c 1dbced29de5f59ba2ebf877edcadf171540374d1 F tool/speedtest8.c 1dbced29de5f59ba2ebf877edcadf171540374d1
F tool/speedtest8inst1.c 293327bc76823f473684d589a8160bde1f52c14e F tool/speedtest8inst1.c 293327bc76823f473684d589a8160bde1f52c14e
P 45fc70bd9264d5bcd72c97017079ced4aac7729f P 9e9325997e11a0368721ed7860f4c37de3502a9b
R c500546293e96bf186a034cac9d9bde9 R 0e2ba4158c241329cb727ca9484e66cb
U danielk1977 U drh
Z d2167933e8c62e7d24268a42c6d01402 Z 84f050fcba2bc26a7dcf8ee114e1c1ce

View File

@@ -1 +1 @@
9e9325997e11a0368721ed7860f4c37de3502a9b d4438251dd66c4168e09eb421a8c2081228357dd

View File

@@ -13,7 +13,7 @@
** is not included in the SQLite library. It is used for automated ** is not included in the SQLite library. It is used for automated
** testing of the SQLite library. ** testing of the SQLite library.
** **
** $Id: test1.c,v 1.319 2008/08/20 14:49:25 danielk1977 Exp $ ** $Id: test1.c,v 1.320 2008/08/27 15:21:34 drh Exp $
*/ */
#include "sqliteInt.h" #include "sqliteInt.h"
#include "tcl.h" #include "tcl.h"
@@ -929,7 +929,6 @@ static int test_create_function(
){ ){
int rc; int rc;
sqlite3 *db; sqlite3 *db;
extern void Md5_Register(sqlite3*);
if( argc!=2 ){ if( argc!=2 ){
Tcl_AppendResult(interp, "wrong # args: should be \"", argv[0], Tcl_AppendResult(interp, "wrong # args: should be \"", argv[0],

View File

@@ -12,7 +12,7 @@
** Code for testing all sorts of SQLite interfaces. This code ** Code for testing all sorts of SQLite interfaces. This code
** implements new SQL functions used by the test scripts. ** implements new SQL functions used by the test scripts.
** **
** $Id: test_func.c,v 1.11 2008/08/26 14:42:15 drh Exp $ ** $Id: test_func.c,v 1.12 2008/08/27 15:21:35 drh Exp $
*/ */
#include "sqlite3.h" #include "sqlite3.h"
#include "tcl.h" #include "tcl.h"
@@ -316,13 +316,11 @@ static int registerTestFunctions(sqlite3 *db){
{ "test_counter", 1, SQLITE_UTF8, counterFunc}, { "test_counter", 1, SQLITE_UTF8, counterFunc},
}; };
int i; int i;
extern int Md5_Register(sqlite3*);
for(i=0; i<sizeof(aFuncs)/sizeof(aFuncs[0]); i++){ for(i=0; i<sizeof(aFuncs)/sizeof(aFuncs[0]); i++){
sqlite3_create_function(db, aFuncs[i].zName, aFuncs[i].nArg, sqlite3_create_function(db, aFuncs[i].zName, aFuncs[i].nArg,
aFuncs[i].eTextRep, 0, aFuncs[i].xFunc, 0, 0); aFuncs[i].eTextRep, 0, aFuncs[i].xFunc, 0, 0);
} }
Md5_Register(db);
return SQLITE_OK; return SQLITE_OK;
} }
@@ -339,7 +337,11 @@ static int autoinstall_test_funcs(
int objc, int objc,
Tcl_Obj *CONST objv[] Tcl_Obj *CONST objv[]
){ ){
extern int Md5_Register(sqlite3*);
int rc = sqlite3_auto_extension((void*)registerTestFunctions); int rc = sqlite3_auto_extension((void*)registerTestFunctions);
if( rc==SQLITE_OK ){
rc = sqlite3_auto_extension((void*)Md5_Register);
}
Tcl_SetObjResult(interp, Tcl_NewIntObj(rc)); Tcl_SetObjResult(interp, Tcl_NewIntObj(rc));
return TCL_OK; return TCL_OK;
} }
@@ -453,10 +455,13 @@ int Sqlitetest_func_Init(Tcl_Interp *interp){
{ "abuse_create_function", abuse_create_function }, { "abuse_create_function", abuse_create_function },
}; };
int i; int i;
extern int Md5_Register(sqlite3*);
for(i=0; i<sizeof(aObjCmd)/sizeof(aObjCmd[0]); i++){ for(i=0; i<sizeof(aObjCmd)/sizeof(aObjCmd[0]); i++){
Tcl_CreateObjCommand(interp, aObjCmd[i].zName, aObjCmd[i].xProc, 0, 0); Tcl_CreateObjCommand(interp, aObjCmd[i].zName, aObjCmd[i].xProc, 0, 0);
} }
sqlite3_initialize(); sqlite3_initialize();
sqlite3_auto_extension((void*)registerTestFunctions); sqlite3_auto_extension((void*)registerTestFunctions);
sqlite3_auto_extension((void*)Md5_Register);
return TCL_OK; return TCL_OK;
} }