-C Detect\sinteger\soverflow\sin\sthe\sabs()\sfunction.\s\sThe\srandom()\sfunction\nnow\sprovides\s64\sbits\sof\srandomness\sinstead\sof\sjust\s32.\s\sFix\sbugs\sin\ntesting\slogic\sof\stest4.c.\s(CVS\s3108)
-D 2006-02-23T21:43:56
+C Make\ssure\sthe\srandom()\sfunction\salways\sreturns\sa\svalue\sthat\scan\sbe\spassed\nto\sabs().\s(CVS\s3109)
+D 2006-02-23T21:51:13
F Makefile.in 5d8dff443383918b700e495de42ec65bc1c8865b
F Makefile.linux-gcc 74ba0eadf88748a9ce3fd03d2a3ede2e6715baec
F README 9c4e2d6706bdcc3efdd773ce752a8cdab4f90028
F src/delete.c ca404d5fd5f678e32f2f46377ad802cd0219aa99
F src/experimental.c 1b2d1a6cd62ecc39610e97670332ca073c50792b
F src/expr.c 9c957fabf95ef62288151eecd5c490a629470666
-F src/func.c b1919255cef5580ac1fcd555ee9bb96974bde64d
+F src/func.c 402b305b0f0d8709cce343e74312bcc38ed61f06
F src/hash.c 449f3d6620193aa557f5d86cbc5cc6b87702b185
F src/hash.h 1b3f7e2609141fd571f62199fc38687d262e9564
F src/insert.c 67b3dc11831c58d8703eb502355ad3704ee18f66
F www/vdbe.tcl 87a31ace769f20d3627a64fa1fade7fed47b90d0
F www/version3.tcl a99cf5f6d8bd4d5537584a2b342f0fb9fa601d8b
F www/whentouse.tcl 97e2b5cd296f7d8057e11f44427dea8a4c2db513
-P 614fac906807b8c75e04effc01666874d13ce636
-R f5403923a4dc3e33ec17bd28655d7e3e
+P 942c509595a2a300e798e6b048ad7fc3bc54af43
+R 151d579d1c46dea292a923e2d9c89659
U drh
-Z a926d16e02bacd004ff1a77e6671add9
+Z 630eeabb62dfd30a6a8a8d528960cacb
** sqliteRegisterBuildinFunctions() found at the bottom of the file.
** All other code has file scope.
**
-** $Id: func.c,v 1.123 2006/02/23 21:43:56 drh Exp $
+** $Id: func.c,v 1.124 2006/02/23 21:51:13 drh Exp $
*/
#include "sqliteInt.h"
#include <ctype.h>
){
sqlite_int64 r;
sqlite3Randomness(sizeof(r), &r);
+ if( (r<<1)==0 ) r = 0; /* Prevent 0x8000.... as the result so that we */
+ /* can always do abs() of the result */
sqlite3_result_int64(context, r);
}