1
0
mirror of https://github.com/sqlite/sqlite.git synced 2025-12-07 20:22:20 +03:00

Add the (deliberately undocumented) sqlite_log() SQL function as a built-in.

FossilOrigin-Name: f7806e03995b314771aa72a08ce55d56d60096cf
This commit is contained in:
drh
2011-04-25 18:03:10 +00:00
parent 9a3baf10ca
commit 3ca84ef623
3 changed files with 23 additions and 7 deletions

View File

@@ -1,5 +1,5 @@
C Invoke\sthe\sunix\sopen()\ssystem\scall\sthrough\sa\swrapper\sto\savoid\sproblems\s\nresulting\sfrom\sdiffering\sdeclarations\sto\sthat\sfunction\sin\svarious\ssystems.
D 2011-04-25T18:01:27.439
C Add\sthe\s(deliberately\sundocumented)\ssqlite_log()\sSQL\sfunction\sas\sa\sbuilt-in.
D 2011-04-25T18:03:10.263
F Makefile.arm-wince-mingw32ce-gcc d6df77f1f48d690bd73162294bbba7f59507c72f
F Makefile.in 7a4d9524721d40ef9ee26f93f9bd6a51dba106f2
F Makefile.linux-gcc 91d710bdc4998cb015f39edf3cb314ec4f4d7e23
@@ -133,7 +133,7 @@ F src/delete.c 7a24fcc9a31664d145acb97ce56b6d9f249a25e4
F src/expr.c e3cf0957c6b8faaaf7386a3bc69e53c0dc9705be
F src/fault.c 160a0c015b6c2629d3899ed2daf63d75754a32bb
F src/fkey.c a43ba8a005fb5efd1deeee06853e3a6120d46a91
F src/func.c 3a8cb2fb2de3e3aed7f39106daf4878d9d17fcce
F src/func.c 6d907d397c9e6eded680f8946499efdf224d34bd
F src/global.c 02335177cf6946fe5525c6f0755cf181140debf3
F src/hash.c 458488dcc159c301b8e7686280ab209f1fb915af
F src/hash.h 2894c932d84d9f892d4b4023a75e501f83050970
@@ -930,7 +930,7 @@ F tool/speedtest8.c 2902c46588c40b55661e471d7a86e4dd71a18224
F tool/speedtest8inst1.c 293327bc76823f473684d589a8160bde1f52c14e
F tool/split-sqlite3c.tcl d9be87f1c340285a3e081eb19b4a247981ed290c
F tool/vdbe-compress.tcl d70ea6d8a19e3571d7ab8c9b75cba86d1173ff0f
P ddeea5ab5f6c0c4a86cdfbbb9f24d9d54bf8d301
R c3c570e59b4504f5792e40be1884b2ad
P 4c7ff4dd352276e9c01cc536e188cbcd69396952
R 02826977cda64533dcdcab57c0092168
U drh
Z 99b5b07687fe54475ef75b698d77b786
Z ae88889f134cbeb0e55dabbab9faed47

View File

@@ -1 +1 @@
4c7ff4dd352276e9c01cc536e188cbcd69396952
f7806e03995b314771aa72a08ce55d56d60096cf

View File

@@ -774,6 +774,21 @@ static void sourceidFunc(
sqlite3_result_text(context, sqlite3_sourceid(), -1, SQLITE_STATIC);
}
/*
** Implementation of the sqlite_log() function. This is a wrapper around
** sqlite3_log(). The return value is NULL. The function exists purely for
** its side-effects.
*/
static void logFunc(
sqlite3_context *context,
int argc,
sqlite3_value **argv
){
UNUSED_PARAMETER(argc);
UNUSED_PARAMETER(context);
sqlite3_log(sqlite3_value_int(argv[0]), "%s", sqlite3_value_text(argv[1]));
}
/*
** Implementation of the sqlite_compileoption_used() function.
** The result is an integer that identifies if the compiler option
@@ -1541,6 +1556,7 @@ void sqlite3RegisterGlobalFunctions(void){
FUNCTION(nullif, 2, 0, 1, nullifFunc ),
FUNCTION(sqlite_version, 0, 0, 0, versionFunc ),
FUNCTION(sqlite_source_id, 0, 0, 0, sourceidFunc ),
FUNCTION(sqlite_log, 2, 0, 0, logFunc ),
#ifndef SQLITE_OMIT_COMPILEOPTION_DIAGS
FUNCTION(sqlite_compileoption_used,1, 0, 0, compileoptionusedFunc ),
FUNCTION(sqlite_compileoption_get, 1, 0, 0, compileoptiongetFunc ),