The (unsupported) soundex() function returns '?000' when given a NULL.
Ticket #1845. (CVS 3233)
FossilOrigin-Name: 9372481f233e1563b5ee137535f0fbf19851ffad
diff --git a/manifest b/manifest
index fe2d455..8c5936a 100644
--- a/manifest
+++ b/manifest
@@ -1,5 +1,5 @@
-C The\soptimizer\srecognizes\sMATCH\soperators\sand\sallows\svirtual-tables\sto\smake\nuse\sof\sthem.\s(CVS\s3232)
-D 2006-06-13T17:39:00
+C The\s(unsupported)\ssoundex()\sfunction\sreturns\s'?000'\swhen\sgiven\sa\sNULL.\nTicket\s#1845.\s(CVS\s3233)
+D 2006-06-13T19:26:11
F Makefile.in 56fd6261e83f60724e6dcd764e06ab68cbd53909
F Makefile.linux-gcc 74ba0eadf88748a9ce3fd03d2a3ede2e6715baec
F README 9c4e2d6706bdcc3efdd773ce752a8cdab4f90028
@@ -43,7 +43,7 @@
F src/delete.c f9a8c7837adb4bb4810a698a041a88d5ec7bfa9a
F src/experimental.c 1b2d1a6cd62ecc39610e97670332ca073c50792b
F src/expr.c 8c873e05436ca8ee0ac4c7825d35ff898abb9c89
-F src/func.c 16eaca47b4d5c66f750e0b2d8814387d70f0d5b2
+F src/func.c 01e559893b5e43bea85135ad3e481d86c447942a
F src/hash.c 449f3d6620193aa557f5d86cbc5cc6b87702b185
F src/hash.h 1b3f7e2609141fd571f62199fc38687d262e9564
F src/insert.c 2c3eeb4bcde13c1006824ef14953c2fdad31cf36
@@ -363,7 +363,7 @@
F www/vdbe.tcl 87a31ace769f20d3627a64fa1fade7fed47b90d0
F www/version3.tcl 890248cf7b70e60c383b0e84d77d5132b3ead42b
F www/whentouse.tcl 97e2b5cd296f7d8057e11f44427dea8a4c2db513
-P 815b84d5273b42978edcee0d4afe7f91a7933f4e
-R fa210e05061370c7e0ab1d80526752c9
+P 136bed496b89943522310ec511199b78198d0844
+R 4d340ce3b4963ceb6566edfe12edcd3d
U drh
-Z 0393cac6dbaee2c659fa623848ca0a40
+Z 16c6d69d2baed957168638e44a48c1df
diff --git a/manifest.uuid b/manifest.uuid
index 94d6966..4a18b88 100644
--- a/manifest.uuid
+++ b/manifest.uuid
@@ -1 +1 @@
-136bed496b89943522310ec511199b78198d0844
\ No newline at end of file
+9372481f233e1563b5ee137535f0fbf19851ffad
\ No newline at end of file
diff --git a/src/func.c b/src/func.c
index 2affd84..9d62e54 100644
--- a/src/func.c
+++ b/src/func.c
@@ -16,7 +16,7 @@
** sqliteRegisterBuildinFunctions() found at the bottom of the file.
** All other code has file scope.
**
-** $Id: func.c,v 1.129 2006/06/13 17:39:00 drh Exp $
+** $Id: func.c,v 1.130 2006/06/13 19:26:11 drh Exp $
*/
#include "sqliteInt.h"
#include <ctype.h>
@@ -655,6 +655,7 @@
};
assert( argc==1 );
zIn = (u8*)sqlite3_value_text(argv[0]);
+ if( zIn==0 ) zIn = "";
for(i=0; zIn[i] && !isalpha(zIn[i]); i++){}
if( zIn[i] ){
zResult[0] = toupper(zIn[i]);