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

Fix a bug meant real numbers with a negative sign were being stored as

strings by default (instead of IEEE floats). (CVS 1388)

FossilOrigin-Name: 9321e7426337e04064b5791c48dd5fc3c1eecaa2
This commit is contained in:
danielk1977
2004-05-16 22:55:28 +00:00
parent 96f5b7672d
commit 93edea9380
5 changed files with 17 additions and 15 deletions

View File

@@ -1,5 +1,5 @@
C Fix\sa\sbug\sin\sthe\sBTree\sbalancing\sroutine.\s(CVS\s1387)
D 2004-05-16T16:24:37
C Fix\sa\sbug\smeant\sreal\snumbers\swith\sa\snegative\ssign\swere\sbeing\sstored\sas\nstrings\sby\sdefault\s(instead\sof\sIEEE\sfloats).\s(CVS\s1388)
D 2004-05-16T22:55:28
F Makefile.in ab7b0d5118e2da97bac66be8684a1034e3500f5a
F Makefile.linux-gcc b86a99c493a5bfb402d1d9178dcdc4bd4b32f906
F README f1de682fbbd94899d50aca13d387d1b3fd3be2dd
@@ -31,7 +31,7 @@ F src/copy.c 4d2038602fd0549d80c59bda27d96f13ea9b5e29
F src/date.c 0eb0a89960bb45c7f7e768748605a7a97b0c8064
F src/delete.c ea8212a44b5c0dad8fb1794fe7297654f7ed05f9
F src/encode.c a876af473d1d636faa3dca51c7571f2e007eea37
F src/expr.c 28095b5617883e56dd21c9b4743e839070659a12
F src/expr.c 05fbd5df274b61fd70c216375e2fbd407e475ae7
F src/func.c cfbb7096efb58e2857e3b312a8958a12774b625a
F src/hash.c 440c2f8cb373ee1b4e13a0988489c7cd95d55b6f
F src/hash.h 762d95f1e567664d1eafc1687de755626be962fb
@@ -92,7 +92,7 @@ F test/format3.test 149cc166c97923fa60def047e90dd3fb32bba916
F test/func.test e77f46af34c23081c3aacb84f25238b808bd7202
F test/hook.test 1a67ce0cd64a6455d016962542f2822458dccc49
F test/in.test 0de39b02ceeca90993b096822fb5a884661c5b47
F test/index.test 231ff7a4c9d4d002c07d8383dc44184dad06e6ec
F test/index.test 3d50e19807186682de60c53f507a831c1b4a38a2
F test/insert.test 6ec324659656f4a86e4abfcf1a1fd2795ba6b603
F test/insert2.test c288375a64dad3295044714f0dfed4a193cf067f
F test/interrupt.test 9142ce4448605127640eda5e283952f75f67ed91
@@ -144,7 +144,7 @@ F test/trigger1.test 4538c1c7d6bbca5dfe619ea6e1682b07ece95b21
F test/trigger2.test 0767ab30cb5a2c8402c8524f3d566b410b6f5263
F test/trigger3.test a95ccace88291449f5eae7139ec438a42f90654d
F test/trigger4.test 542afce45774e8f8e1130b96b8675f414d6e4bd8
F test/types.test d30ee85040cec5c12ebd98a6419916cc29a6c11e
F test/types.test 5d877a84e148defced602e401ed6ef07778de237
F test/types2.test bc684cc2a75edb240f9fd49275f3cacb025c0f1e
F test/unique.test 0e38d4cc7affeef2527720d1dafd1f6870f02f2b
F test/update.test b29bd9061a1150426dab6959806fcc73a41b1217
@@ -192,7 +192,7 @@ F www/sqlite.tcl 3c83b08cf9f18aa2d69453ff441a36c40e431604
F www/tclsqlite.tcl b9271d44dcf147a93c98f8ecf28c927307abd6da
F www/vdbe.tcl 9b9095d4495f37697fd1935d10e14c6015e80aa1
F www/whentouse.tcl a8335bce47cc2fddb07f19052cb0cb4d9129a8e4
P 5cba8a510c0aeae740db695e960c60e5f6c303f5
R 25cd950de731900e925b6b5361c9fbb9
U drh
Z fd6768d10af70b66f5ace479a66938d7
P 6c73544bfacb891aae8d6124a2903ccff616494b
R 501dab3e6d7516a92cf6493947aae309
U danielk1977
Z d2d630c4c8ff164b94b4f7249daadaaf

View File

@@ -1 +1 @@
6c73544bfacb891aae8d6124a2903ccff616494b
9321e7426337e04064b5791c48dd5fc3c1eecaa2

View File

@@ -12,7 +12,7 @@
** This file contains routines used for analyzing expressions and
** for generating VDBE code that evaluates expressions in SQLite.
**
** $Id: expr.c,v 1.119 2004/05/16 11:57:28 danielk1977 Exp $
** $Id: expr.c,v 1.120 2004/05/16 22:55:28 danielk1977 Exp $
*/
#include "sqliteInt.h"
#include <ctype.h>
@@ -1170,7 +1170,7 @@ void sqlite3ExprCode(Parse *pParse, Expr *pExpr){
if( pExpr->pLeft->op==TK_INTEGER && sqlite3FitsIn32Bits(z) ){
sqlite3VdbeAddOp(v, OP_Integer, atoi(z), 0);
}else{
sqlite3VdbeAddOp(v, OP_String, 0, 0);
sqlite3VdbeAddOp(v, OP_Real, 0, 0);
}
sqlite3VdbeChangeP3(v, -1, z, p->n+1);
sqliteFree(z);

View File

@@ -11,7 +11,7 @@
# This file implements regression tests for SQLite library. The
# focus of this file is testing the CREATE INDEX statement.
#
# $Id: index.test,v 1.25 2004/05/14 11:00:53 danielk1977 Exp $
# $Id: index.test,v 1.26 2004/05/16 22:55:28 danielk1977 Exp $
set testdir [file dirname $argv0]
source $testdir/tester.tcl
@@ -349,7 +349,7 @@ integrity_check index-11.2
# representations are not retained. i.e. '+1.0' becomes '1'.
do_test index-12.1 {
execsql {
CREATE TABLE t4(a,b);
CREATE TABLE t4(a NUM,b);
INSERT INTO t4 VALUES('0.0',1);
INSERT INTO t4 VALUES('0.00',2);
INSERT INTO t4 VALUES('abc',3);

View File

@@ -12,7 +12,7 @@
# it tests that the different storage classes (integer, real, text etc.)
# all work correctly.
#
# $Id: types.test,v 1.2 2004/05/16 11:15:42 danielk1977 Exp $
# $Id: types.test,v 1.3 2004/05/16 22:55:28 danielk1977 Exp $
set testdir [file dirname $argv0]
source $testdir/tester.tcl
@@ -55,6 +55,8 @@ set values [list \
[list 5.0 INTEGER REAL TEXT REAL] \
[list 5 INTEGER INTEGER TEXT INTEGER] \
[list '5.0' INTEGER REAL TEXT TEXT] \
[list '-5.0' INTEGER REAL TEXT TEXT] \
[list '-5.0' INTEGER REAL TEXT TEXT] \
[list '5' INTEGER INTEGER TEXT TEXT] \
[list 'abc' TEXT TEXT TEXT TEXT] \
[list NULL NULL NULL NULL NULL] \