]> git.ipfire.org Git - thirdparty/sqlite.git/commitdiff
Add reminder comment that, by definition, these functions won't be called from
authorshearer <shearer@noemail.net>
Fri, 25 Sep 2020 08:17:58 +0000 (08:17 +0000)
committershearer <shearer@noemail.net>
Fri, 25 Sep 2020 08:17:58 +0000 (08:17 +0000)
elsewhere in SQLite. Useful to remember for beginners who may suspect unusued code.

FossilOrigin-Name: 6f5c1fde245e18d80dd5b1d33ad36b8320960dc644c666351b0c9b60d8e545ca

manifest
manifest.uuid
src/func.c

index 9dd94331a19ff67c1b9f0436a0a564528c070896..281db9ab1c74ea221a81018f0bc318a1c3789067 100644 (file)
--- a/manifest
+++ b/manifest
@@ -1,9 +1,10 @@
 B 3d35fa0be866213274fc09250225b345f6b08a9b4ec373d53d95e627e24512be
-C Added\scontext\sto\sexplain\sthat\sthe\stest\scoverage\sis\sabout\sMC/DC\sin\sgeneral,\snot\s\njust\san\sSQLite-specifc\stest\sharness.
-D 2020-09-24T11:41:18.469
+C Add\sreminder\scomment\sthat,\sby\sdefinition,\sthese\sfunctions\swon't\sbe\scalled\sfrom\nelsewhere\sin\sSQLite.\sUseful\sto\sremember\sfor\sbeginners\swho\smay\ssuspect\sunusued\scode.
+D 2020-09-25T08:17:58.869
 F src/btree.h a36f07d3b2a654293b477d80d6f0eff2ce2420dcf964c857eaa44980f1a15a6d
+F src/func.c 01d7b7226a02aaa471f667aad348206c55b59390f50250af84260a13aa77285e
 F src/sqliteInt.h 8cd4cbd10c3263d91a8aa316165f45d8cc9215156e04b635b9a4de8c28c491bb
-P 5c306f42514a42fce40fddbfed83df71c3897cc36843ed4e9e968de85ec80b42
-R 60440bb1c556853c2938c18383760027
+P 770dbedddc7ce7fa2355df5db5f77ef08c53549cf7c85d0496b1978e0612c1ab
+R 32b3794bc09b7ee1f1b6fdb12b6a4308
 U shearer
-Z 7cf7042cafcc05ab5168d6b809815715
+Z 0228ae7c068924d2613f708ab4a2497f
index 0958a509514984434ea626571e3cfa09179aa1a3..f12707871bc93bc18302f3bc41ba6e3477ff48f3 100644 (file)
@@ -1 +1 @@
-770dbedddc7ce7fa2355df5db5f77ef08c53549cf7c85d0496b1978e0612c1ab
\ No newline at end of file
+6f5c1fde245e18d80dd5b1d33ad36b8320960dc644c666351b0c9b60d8e545ca
\ No newline at end of file
index 48b5f5f1984724c24520367eb8f38e0d17d61d02..0950f7984c6de59f74a200e59a8f0277fc483000 100644 (file)
 **
 *************************************************************************
 ** This file contains the C-language implementations for many of the SQL
-** functions of SQLite.  (Some function, and in particular the date and
+** functions of SQLite.  (Some functions, and in particular the date and
 ** time functions, are implemented separately.)
+**
+** Many of these functions are never called from other parts of SQLite.
 */
 #include "sqliteInt.h"
 #include <stdlib.h>
@@ -257,32 +259,6 @@ endInstrOOM:
   goto endInstr;
 }
 
-/*
-** Implementation of the printf() function.
-*/
-static void printfFunc(
-  sqlite3_context *context,
-  int argc,
-  sqlite3_value **argv
-){
-  PrintfArguments x;
-  StrAccum str;
-  const char *zFormat;
-  int n;
-  sqlite3 *db = sqlite3_context_db_handle(context);
-
-  if( argc>=1 && (zFormat = (const char*)sqlite3_value_text(argv[0]))!=0 ){
-    x.nArg = argc-1;
-    x.nUsed = 0;
-    x.apArg = argv+1;
-    sqlite3StrAccumInit(&str, db, 0, 0, db->aLimit[SQLITE_LIMIT_LENGTH]);
-    str.printfFlags = SQLITE_PRINTF_SQLFUNC;
-    sqlite3_str_appendf(&str, zFormat, &x);
-    n = str.nChar;
-    sqlite3_result_text(context, sqlite3StrAccumFinish(&str), n,
-                        SQLITE_DYNAMIC);
-  }
-}
 
 /*
 ** Implementation of the substr() function.
@@ -1969,7 +1945,6 @@ void sqlite3RegisterBuiltinFunctions(void){
     FUNCTION2(typeof,            1, 0, 0, typeofFunc,  SQLITE_FUNC_TYPEOF),
     FUNCTION2(length,            1, 0, 0, lengthFunc,  SQLITE_FUNC_LENGTH),
     FUNCTION(instr,              2, 0, 0, instrFunc        ),
-    FUNCTION(printf,            -1, 0, 0, printfFunc       ),
     FUNCTION(unicode,            1, 0, 0, unicodeFunc      ),
     FUNCTION(char,              -1, 0, 0, charFunc         ),
     FUNCTION(abs,                1, 0, 0, absFunc          ),