From: drh <> Date: Wed, 29 Mar 2023 17:26:16 +0000 (+0000) Subject: Back out elements (1) and (2) from [96ec8306457eebf5]. X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=6387021016cb6c0279924b21ffb359a34f33cd01;p=thirdparty%2Fsqlite.git Back out elements (1) and (2) from [96ec8306457eebf5]. FossilOrigin-Name: d8b17615f129b40b751b1642cdd3482181e7f181bb930a2bd793eec771a7b10e --- diff --git a/ext/rtree/rtreedoc.test b/ext/rtree/rtreedoc.test index 45bda4f49a..b64faa2e99 100644 --- a/ext/rtree/rtreedoc.test +++ b/ext/rtree/rtreedoc.test @@ -250,26 +250,14 @@ do_execsql_test 8.2 { FROM rtI } {integer integer integer integer integer integer} -ifcapable nan_inf { - do_execsql_test 8.3a { - DELETE FROM rtF; - INSERT INTO rtF VALUES( - 1, 'hello world', X'616263', NULL, 44 - ); - SELECT * FROM rtF; - } { - 1 0.0 0.0 NaN 44.0 - } -} else { - do_execsql_test 8.3b { - DELETE FROM rtF; - INSERT INTO rtF VALUES( - 1, 'hello world', X'616263', NULL, 44 - ); - SELECT * FROM rtF; - } { - 1 0.0 0.0 0.0 44.0 - } +do_execsql_test 8.3 { + DELETE FROM rtF; + INSERT INTO rtF VALUES( + 1, 'hello world', X'616263', NULL, 44 + ); + SELECT * FROM rtF; +} { + 1 0.0 0.0 0.0 44.0 } do_execsql_test 8.4 { SELECT @@ -406,29 +394,16 @@ foreach {tn cols lCol} { } # Show the default values have not been modified - ifcapable nan_inf { - do_execsql_test 1.$tn.4a { - INSERT INTO abc DEFAULT VALUES; - SELECT * FROM abc WHERE rowid NOT IN (1,2) - } {3 NaN NaN NaN NaN} - - # Show that there are no NOT NULL constraints - do_execsql_test 1.$tn.5a { - INSERT INTO abc VALUES(NULL, NULL, NULL, NULL, NULL); - SELECT * FROM abc WHERE rowid NOT IN (1,2,3) - } {4 NaN NaN NaN NaN} - } else { - do_execsql_test 1.$tn.4b { - INSERT INTO abc DEFAULT VALUES; - SELECT * FROM abc WHERE rowid NOT IN (1,2) - } {3 0.0 0.0 0.0 0.0} - - # Show that there are no NOT NULL constraints - do_execsql_test 1.$tn.5b { - INSERT INTO abc VALUES(NULL, NULL, NULL, NULL, NULL); - SELECT * FROM abc WHERE rowid NOT IN (1,2,3) - } {4 0.0 0.0 0.0 0.0} - } + do_execsql_test 1.$tn.4 { + INSERT INTO abc DEFAULT VALUES; + SELECT * FROM abc WHERE rowid NOT IN (1,2) + } {3 0.0 0.0 0.0 0.0} + + # Show that there are no NOT NULL constraints + do_execsql_test 1.$tn.5 { + INSERT INTO abc VALUES(NULL, NULL, NULL, NULL, NULL); + SELECT * FROM abc WHERE rowid NOT IN (1,2,3) + } {4 0.0 0.0 0.0 0.0} # EVIDENCE-OF: R-06893-30579 In an RTREE virtual table, the first column # always has a type affinity of INTEGER and all other data columns have diff --git a/ext/rtree/rtreedoc2.test b/ext/rtree/rtreedoc2.test index ebaee07a62..ca0c6b31bd 100644 --- a/ext/rtree/rtreedoc2.test +++ b/ext/rtree/rtreedoc2.test @@ -124,7 +124,7 @@ do_execsql_test 1.0 { CREATE VIRTUAL TABLE rt2 USING rtree(id, x1,x2, y1,y2); CREATE VIRTUAL TABLE rt3 USING rtree(id, x1,x2, y1,y2, z1,z2); - INSERT INTO rt1(id,x1,x2) VALUES(1,0,0); + INSERT INTO rt1 DEFAULT VALUES; INSERT INTO rt2 DEFAULT VALUES; INSERT INTO rt3 DEFAULT VALUES; } @@ -343,3 +343,4 @@ do_test 6.3 { finish_test + diff --git a/manifest b/manifest index 5e1a73fecc..419848b7b2 100644 --- a/manifest +++ b/manifest @@ -1,5 +1,5 @@ -C Merge\srecent\strunk\sfixes\sinto\sthe\snan-inf\sbranch. -D 2023-03-29T16:28:13.253 +C Back\sout\selements\s(1)\sand\s(2)\sfrom\s[96ec8306457eebf5]. +D 2023-03-29T17:26:16.998 F .fossil-settings/empty-dirs dbb81e8fc0401ac46a1491ab34a7f2c7c0452f2f06b54ebb845d024ca8283ef1 F .fossil-settings/ignore-glob 35175cdfcf539b2318cb04a9901442804be81cd677d8b889fcc9149c21f239ea F LICENSE.md df5091916dbb40e6e9686186587125e1b2ff51f022cc334e886c19a0e9982724 @@ -418,8 +418,8 @@ F ext/rtree/rtree_util.tcl db734b4c5e75fed6acc56d9701f2235345acfdec750b5fc7b5879 F ext/rtree/rtreecheck.test 4e859a9cd49d2353ff10c122f72183ec37b400e35d2b0349b2e9696649b6a00e F ext/rtree/rtreecirc.test aec664eb21ae943aeb344191407afff5d392d3ae9d12b9a112ced0d9c5de298e F ext/rtree/rtreeconnect.test 225ad3fcb483d36cbee423a25052a6bbae762c9576ae9268332360c68c170d3d -F ext/rtree/rtreedoc.test 678ce6ec98dd971590523c6222561109979e7af38aa7a8314c3e7fdd4a3a45e7 -F ext/rtree/rtreedoc2.test 69e0c043a8e5d90dbb332b56e4ae22862f7085112c50ca3dbd4e9d4916e3821b +F ext/rtree/rtreedoc.test 27a5703cb1200f6f69051de68da546cef3dfdcf59be73afadfc50b9f9c9960d9 +F ext/rtree/rtreedoc2.test 194ebb7d561452dcdc10bf03f44e30c082c2f0c14efeb07f5e02c7daf8284d93 F ext/rtree/rtreedoc3.test 555a878c4d79c4e37fa439a1c3b02ee65d3ebaf75d9e8d96a9c55d66db3efbf8 F ext/rtree/rtreefuzz001.test 0fc793f67897c250c5fde96cefee455a5e2fb92f4feeabde5b85ea02040790ee F ext/rtree/sqlite3rtree.h 03c8db3261e435fbddcfc961471795cbf12b24e03001d0015b2636b0f3881373 @@ -575,7 +575,7 @@ F src/date.c f21815ca7172ce073db3163ac54c8d9f2841077165c1a6123b4d1c376a0c7ec7 F src/dbpage.c d47549716549311f79dc39fe5c8fb19390a6eb2c960f8e37c89a9c4de0c1052e F src/dbstat.c ec92074baa61d883de58c945162d9e666c13cd7cf3a23bc38b4d1c4d0b2c2bef F src/delete.c a9c6d3f51c0a31e9b831e0a0580a98d702904b42d216fee530940e40dec34873 -F src/expr.c 7feb92a99e2c3472b16d7341fa51a32bebd2c07afe34b86f3ca3b8975e3b0bb9 +F src/expr.c bf74dd13f36dfc57c2a397f3d41cf9ea35ffd17f9baed1db51bd8736b276d4b1 F src/fault.c 460f3e55994363812d9d60844b2a6de88826e007 F src/fkey.c 722f20779f5342a787922deded3628d8c74b5249cab04098cf17ee2f2aaff002 F src/func.c 858f7a1ce2ae27f22564e7336b7f06206c262577c22a8720be45690828a4fe4f @@ -695,13 +695,13 @@ F src/upsert.c 5303dc6c518fa7d4b280ec65170f465c7a70b7ac2b22491598f6d0b4875b3145 F src/utf.c ee39565f0843775cc2c81135751ddd93eceb91a673ea2c57f61c76f288b041a0 F src/util.c be2f2ba283ecfcd39a92c26a4f27ba39d295da35ad29ef551998c174818545ef F src/vacuum.c 84ce7f01f8a7a08748e107a441db83bcec13970190ddcb0c9ff522adbc1c23fd -F src/vdbe.c c62c3fe9dcbff2abed1f778a77859806804f8b07320366540580b3ca35b13977 +F src/vdbe.c 61cb236aef7a578dbd8966f53860e03e986b5c84912ceaf71441a3f64fe07022 F src/vdbe.h 73b904a6b3bb27f308c6cc287a5751ebc7f1f89456be0ed068a12b92844c6e8c F src/vdbeInt.h a4147a4ddf613cb1bcb555ace9e9e74a9c099d65facd88155f191b1fb4d74cfb F src/vdbeapi.c 40c47b1528d308a322203de21d2e0d711753257ed9771771b6129214b1d65932 -F src/vdbeaux.c 7c8ea5a1ba0602332a1e335f95779c1a8d69421fdbc55a634c667bfadbb5d2e1 +F src/vdbeaux.c 0f5201346a83a35a08e833c3a03abe626119c07b7361c28bc6a259b98540f1d6 F src/vdbeblob.c 5e61ce31aca17db8fb60395407457a8c1c7fb471dde405e0cd675974611dcfcd -F src/vdbemem.c b1a053acb5a999e45736c2bfa33508fbb652ffeac5851c386a84be70356e303d +F src/vdbemem.c db0458d11a51f6cfad2333a41e36a3795be0b2f316d070df5d33543a9ac884ac F src/vdbesort.c 43756031ca7430f7aec3ef904824a7883c4ede783e51f280d99b9b65c0796e35 F src/vdbetrace.c fe0bc29ebd4e02c8bc5c1945f1d2e6be5927ec12c06d89b03ef2a4def34bf823 F src/vdbevtab.c aae4bd769410eb7e1d02c42613eec961d514459b1c3c1c63cfc84e92a137daac @@ -813,7 +813,7 @@ F test/bigfile2.test 1b489a3a39ae90c7f027b79110d6b4e1dbc71bfc F test/bigmmap.test 6021e205487347c6d7e5a541aa472a4b8efc4e9f4a3799a823b61a8e6616105d F test/bigrow.test f0aeb7573dcb8caaafea76454be3ade29b7fc747 F test/bigsort.test 997e172009905873c06426145e4b3794c7dfe2d563724cb2fd39d45f319cf3d2 -F test/bind.test 72950d3b68b720d65ba4f611b45858130318f5f17a26fe1fc4384534d99ac28d +F test/bind.test 1e136709b306f7ed3192d349c2930d89df6ab621654ad6f1a72381d3fe76f483 F test/bind2.test 918bc35135f4141809ead7585909cde57d44db90a7a62aef540127148f91aab7 F test/bindxfer.test efecd12c580c14df5f4ad3b3e83c667744a4f7e0 F test/bitvec.test 75894a880520164d73b1305c1c3f96882615e142 @@ -836,9 +836,9 @@ F test/cache.test 13bc046b26210471ca6f2889aceb1ea52dc717de F test/cacheflush.test af25bb1509df04c1da10e38d8f322d66eceedf61 F test/cachespill.test 895997f84a25b323b166aecb69baab2d6380ea98f9e0bcc688c4493c535cfab9 F test/capi2.test 4ee545824adc3eb33bf57ef89f77440b28188ec3da72e5425ff0fcdba32e8d5a -F test/capi3.test 6b6babe2ebc6d634744d747b5927127974d8dec5ae1e7a54e5079590304d8863 +F test/capi3.test 3910a73c38ac76d69778dd9eb481ab7cd6ed59117fc047b4f6056a5c72529de1 F test/capi3b.test efb2b9cfd127efa84433cd7a2d72ce0454ae0dc4 -F test/capi3c.test 5733b14e843b1a203a98f8e411e933dcbe244853c54e658330982ea2a6fd9acb +F test/capi3c.test 31d3a6778f2d06f2d9222bd7660c41a516d1518a059b069e96ebbeadb5a490f7 F test/capi3d.test 8b778794af891b0dca3d900bd345fbc8ebd2aa2aae425a9dccdd10d5233dfbde F test/capi3e.test 3d49c01ef2a1a55f41d73cba2b23b5059ec460fe F test/carray01.test 23ed7074307c4a829ba5ff2970993a9d87db7c5cdbbe1a2cbef672d0df6d6e31 @@ -977,7 +977,7 @@ F test/exclusive.test 7ff63be7503990921838d5c9f77f6e33e68e48ed1a9d48cd28745bf650 F test/exclusive2.test 984090e8e9d1b331d2e8111daf6e5d61dda0bef7 F test/exec.test e949714dc127eaa5ecc7d723efec1ec27118fdd7 F test/exists.test 79a75323c78f02bbe9c251ea502a092f9ef63dac -F test/expr.test 30d038a92a4f6a94cdd9c419e8055b3ac0052fc89bb93f1fa8bd2e139cd62b87 +F test/expr.test 5c06696478212e5a04e04b043f993373f6f8e5ce5a80f5548a84703b123b6caa F test/expr2.test c27327ae9c017a7ff6280123f67aff496f912da74d78c888926d68b46ec75fd8 F test/exprfault.test da33606d799718e2f8e34efd0e5858884a1ad87f608774c552a7f5517cc27181 F test/extension01.test 00d13cec817f331a687a243e0e5a2d87b0e358c9 @@ -1131,10 +1131,10 @@ F test/full.test 6b3c8fb43c6beab6b95438c1675374b95fab245d F test/func.test 4be8bed4be235e333f1e0ea31e32f5be3c9f456c30780363e7fcb15e3ff3e6bc F test/func2.test 772d66227e4e6684b86053302e2d74a2500e1e0f F test/func3.test 600a632c305a88f3946d38f9a51efe145c989b2e13bd2b2a488db47fe76bab6a -F test/func4.test e61ba44570930832bd1259e00720b4dd52376fcc7fd4294cb0da436add9ee57a +F test/func4.test 2285fb5792d593fef442358763f0fd9de806eda47dbc7a5934df57ffdc484c31 F test/func5.test 863e6d1bd0013d09c17236f8a13ea34008dd857d87d85a13a673960e4c25d82a F test/func6.test 9cc9b1f43b435af34fe1416eb1e318c8920448ea7a6962f2121972f5215cb9b0 -F test/func7.test 6b9f37f554d090240a711a37d1a12bef9afdb48dbf922b6bcdc7fc66cad07cf9 +F test/func7.test adbfc910385a6ffd15dc47be3c619ef070c542fcb7488964badb17b2d9a4d080 F test/func8.test c4e2ecacf9f16e47a245e7a25fbabcc7e78f9c7c41a80f158527cdfdc6dd299d F test/fuzz-oss1.test 514dcabb24687818ea949fa6760229eaacad74ca70157743ef36d35bbe01ffb0 F test/fuzz.test 4608c1310cff4c3014a84bcced6278139743e080046e5f6784b0de7b069371d8 @@ -1165,7 +1165,7 @@ F test/hidden.test 23c1393a79e846d68fd902d72c85d5e5dcf98711 F test/hook.test 18cae9140fa7f9a6f346e892a3fe3e31b2ca0be1494cd01b918adb74281016a6 F test/hook2.test b9ff3b8c6519fb67f33192f1afe86e7782ee4ac8 F test/icu.test 716a6b89fbabe5cc63e0cd4c260befb08fd7b9d761f04d43669233292f0753b1 -F test/ieee754.test 073b399ced1e63130191fc2f961392b3a68bdef6f08aecaa08134bb3767d4650 +F test/ieee754.test b0945d12be7d255f3dfa18e2511b17ca37e0edd2b803231c52d05b86c04ab26e F test/imposter1.test c3f1db2d3db2c24611a6596a3fc0ffc14f1466c8 F test/in.test 7399a6562fb09de7f786901f0b24b7bbe7c0b541f29ead9eb13f091edea37da4 F test/in2.test 5d4c61d17493c832f7d2d32bef785119e87bde75 @@ -1218,7 +1218,7 @@ F test/ioerr3.test d3cec5e1a11ad6d27527d0d38573fbff14c71bdd F test/ioerr4.test f130fe9e71008577b342b8874d52984bd04ede2c F test/ioerr5.test 2edfa4fb0f896f733071303b42224df8bedd9da4 F test/ioerr6.test a395a6ab144b26a9e3e21059a1ab6a7149cca65b -F test/istrue.test df34067a471617733407e19d7b3fb608bce6442b45046e56031f646f458644a5 +F test/istrue.test e7f285bb70282625c258e866ce6337d4c762922f5a300e1b50f958aef6e7d9c9 F test/join.test ed1daf99958fed1b9f017e56bae2bb6b49339a1ec0b70b9e8f7259960c6bf387 F test/join2.test 8561fe82ce434ac96de91544072e578dc2cadddf2d9bc9cd802f866a9b92502e F test/join3.test 6f0c774ff1ba0489e6c88a3e77b9d3528fb4fda0 @@ -1330,7 +1330,7 @@ F test/multiplex3.test fac575e0b1b852025575a6a8357701d80933e98b5d2fe6d35ddaa68f9 F test/multiplex4.test e8ae4c4bd70606a5727743241f13b5701990abe4 F test/mutex1.test 4d7ecb155ae5ba9ca6f1817c1c74d51b5bb284d7f599de1859a9f2c9a1ca0d38 F test/mutex2.test bfeaeac2e73095b2ac32285d2756e3a65e681660 -F test/nan.test dfb4e47e1db17ebb8760cc259323629c8afb256b4bc5ed82ff78438e416d4601 +F test/nan.test 437d40e6d0778b050d7750726c0cbd2c9936b81962926e8f8c48ca698f00f4d1 F test/nockpt.test 8c43b25af63b0bd620cf1b003529e37b6f1dc53bd22690e96a1bd73f78dde53a F test/nolock.test f196cf8b8fbea4e2ca345140a2b3f3b0da45c76e F test/normalize.test f23b6c5926c59548635fcf39678ac613e726121e073dd902a3062fbb83903b72 @@ -2051,8 +2051,8 @@ F vsixtest/vsixtest.tcl 6a9a6ab600c25a91a7acc6293828957a386a8a93 F vsixtest/vsixtest.vcxproj.data 2ed517e100c66dc455b492e1a33350c1b20fbcdc F vsixtest/vsixtest.vcxproj.filters 37e51ffedcdb064aad6ff33b6148725226cd608e F vsixtest/vsixtest_TemporaryKey.pfx e5b1b036facdb453873e7084e1cae9102ccc67a0 -P 95c7af79cf55a333d35556877be2d8d4af95161a84fc8bc7c81ee71072bf3e6a 445c75567de9bf9c8075dfc62c60dc4abeefab59c7803a5ef2cc5d69c08d7633 -R 1add760bfe9c24c8779512c4da4f453e +P 248bf629454b56a82dbfb550320900fdb7e575928ece45772afe7ebe8d7f0f81 +R 9d87ab4f5b2c110369afb418d4c850e2 U drh -Z 062ce255902c2b12a71a2d5de337f141 +Z 6d98a63fa967166db5a3bf39868e410c # Remove this line to create a well-formed Fossil manifest. diff --git a/manifest.uuid b/manifest.uuid index ca3d2c8048..91e83b3e9f 100644 --- a/manifest.uuid +++ b/manifest.uuid @@ -1 +1 @@ -248bf629454b56a82dbfb550320900fdb7e575928ece45772afe7ebe8d7f0f81 \ No newline at end of file +d8b17615f129b40b751b1642cdd3482181e7f181bb930a2bd793eec771a7b10e \ No newline at end of file diff --git a/src/expr.c b/src/expr.c index c7687dded5..c17eb0f7ef 100644 --- a/src/expr.c +++ b/src/expr.c @@ -3754,10 +3754,7 @@ static void codeReal(Vdbe *v, const char *z, int negateFlag, int iMem){ if( ALWAYS(z!=0) ){ double value; sqlite3AtoF(z, &value, sqlite3Strlen30(z), SQLITE_UTF8); -#ifndef SQLITE_ENABLE_NAN_INF - assert( !sqlite3IsNaN(value) ); /* The new AtoF never returns NaN unless - ** SQLITE_ENABLE_NAN_INF is on */ -#endif + assert( !sqlite3IsNaN(value) ); /* The new AtoF never returns NaN */ if( negateFlag ) value = -value; sqlite3VdbeAddOp4Dup8(v, OP_Real, 0, iMem, 0, (u8*)&value, P4_REAL); } diff --git a/src/vdbe.c b/src/vdbe.c index 65e3400eae..7c06c407e5 100644 --- a/src/vdbe.c +++ b/src/vdbe.c @@ -1250,10 +1250,12 @@ case OP_Int64: { /* out2 */ case OP_Real: { /* same as TK_FLOAT, out2 */ pOut = out2Prerelease(p, pOp); pOut->flags = MEM_Real; -#ifndef SQLITE_ENABLE_NAN_INF - assert( !sqlite3IsNaN(*pOp->p4.pReal) ); -#endif pOut->u.r = *pOp->p4.pReal; +#ifdef SQLITE_ENABLE_NAN_INF + if( sqlite3IsNaN(pOut->u.r) ) pOut->flags = MEM_Null; +#else + assert( !sqlite3IsNaN(pOut->u.r) ); +#endif break; } #endif @@ -1813,11 +1815,9 @@ fp_math: pOut->u.i = rB; MemSetTypeFlag(pOut, MEM_Int); #else -#ifndef SQLITE_ENABLE_NAN_INF if( sqlite3IsNaN(rB) ){ goto arithmetic_result_is_null; } -#endif pOut->u.r = rB; MemSetTypeFlag(pOut, MEM_Real); #endif diff --git a/src/vdbeaux.c b/src/vdbeaux.c index 7b87db478b..87fd067322 100644 --- a/src/vdbeaux.c +++ b/src/vdbeaux.c @@ -3990,11 +3990,7 @@ static void serialGet( assert( sizeof(x)==8 && sizeof(pMem->u.r)==8 ); swapMixedEndianFloat(x); memcpy(&pMem->u.r, &x, sizeof(x)); -#ifdef SQLITE_ENABLE_NAN_INF - pMem->flags = MEM_Real; -#else pMem->flags = IsNaN(x) ? MEM_Null : MEM_Real; -#endif } } void sqlite3VdbeSerialGet( diff --git a/src/vdbemem.c b/src/vdbemem.c index 46d4846179..58621de89d 100644 --- a/src/vdbemem.c +++ b/src/vdbemem.c @@ -662,11 +662,8 @@ double sqlite3VdbeRealValue(Mem *pMem){ }else if( pMem->flags & (MEM_Str|MEM_Blob) ){ return memRealValue(pMem); }else{ -#ifdef SQLITE_ENABLE_NAN_INF - return NAN; -#else + /* (double)0 In case of SQLITE_OMIT_FLOATING_POINT... */ return (double)0; -#endif } } @@ -967,12 +964,10 @@ void sqlite3VdbeMemSetPointer( */ void sqlite3VdbeMemSetDouble(Mem *pMem, double val){ sqlite3VdbeMemSetNull(pMem); -#ifndef SQLITE_ENABLE_NAN_INF - /* When SQLITE_ENABLE_NAN_INF is omitted, NaN converts to NULL */ - if( sqlite3IsNaN(val) ) return; -#endif - pMem->u.r = val; - pMem->flags = MEM_Real; + if( !sqlite3IsNaN(val) ){ + pMem->u.r = val; + pMem->flags = MEM_Real; + } } #endif diff --git a/test/bind.test b/test/bind.test index 4a5cac1510..8cafaab2bc 100644 --- a/test/bind.test +++ b/test/bind.test @@ -224,35 +224,19 @@ do_test bind-4.3 { DELETE FROM t1; } } {} -ifcapable nan_inf { - do_test bind-4.4nan { - sqlite3_bind_double $VM 1 NaN - sqlite3_bind_double $VM 2 1e300 - sqlite3_bind_double $VM 3 -1e-300 - sqlite_step $VM N VALUES COLNAMES - sqlite3_reset $VM - set x [execsql {SELECT rowid, * FROM t1}] - regsub {1e-005} $x {1e-05} y - set y - } {1 NaN(7ffffffffffff) 1e+300 -1e-300} - do_test bind-4.5nan { - execsql {SELECT typeof(a), typeof(b), typeof(c) FROM t1} - } {real real real} -} else { - do_test bind-4.4 { - sqlite3_bind_double $VM 1 NaN - sqlite3_bind_double $VM 2 1e300 - sqlite3_bind_double $VM 3 -1e-300 - sqlite_step $VM N VALUES COLNAMES - sqlite3_reset $VM - set x [execsql {SELECT rowid, * FROM t1}] - regsub {1e-005} $x {1e-05} y - set y - } {1 {} 1e+300 -1e-300} - do_test bind-4.5 { - execsql {SELECT typeof(a), typeof(b), typeof(c) FROM t1} - } {null real real} -} +do_test bind-4.4 { + sqlite3_bind_double $VM 1 NaN + sqlite3_bind_double $VM 2 1e300 + sqlite3_bind_double $VM 3 -1e-300 + sqlite_step $VM N VALUES COLNAMES + sqlite3_reset $VM + set x [execsql {SELECT rowid, * FROM t1}] + regsub {1e-005} $x {1e-05} y + set y +} {1 {} 1e+300 -1e-300} +do_test bind-4.5 { + execsql {SELECT typeof(a), typeof(b), typeof(c) FROM t1} +} {null real real} do_test bind-4.6 { execsql { DELETE FROM t1; diff --git a/test/capi3.test b/test/capi3.test index c0455a667a..40d87ac8e3 100644 --- a/test/capi3.test +++ b/test/capi3.test @@ -607,9 +607,7 @@ do_test capi3-5.5 { check_header $STMT capi3-5.6 {a b c} {VARINT BLOB VARCHAR(16)} check_origin_header $STMT capi3-5.6 {main main main} {t1 t1 t1} {a b c} -ifcapable !nan_inf { - check_data $STMT capi3-5.7 {TEXT TEXT NULL} {0 0 0} {0.0 0.0 0.0} {one two {}} -} +check_data $STMT capi3-5.7 {TEXT TEXT NULL} {0 0 0} {0.0 0.0 0.0} {one two {}} do_test capi3-5.8 { sqlite3_step $STMT diff --git a/test/capi3c.test b/test/capi3c.test index f982179409..247dbf35e5 100644 --- a/test/capi3c.test +++ b/test/capi3c.test @@ -577,9 +577,7 @@ do_test capi3c-5.5 { check_header $STMT capi3c-5.6 {a b c} {VARINT BLOB VARCHAR(16)} check_origin_header $STMT capi3c-5.6 {main main main} {t1 t1 t1} {a b c} -ifcapable !nan_inf { - check_data $STMT capi3c-5.7 {TEXT TEXT NULL} {0 0 0} {0.0 0.0 0.0} {one two {}} -} +check_data $STMT capi3c-5.7 {TEXT TEXT NULL} {0 0 0} {0.0 0.0 0.0} {one two {}} do_test capi3c-5.8 { sqlite3_step $STMT diff --git a/test/expr.test b/test/expr.test index d331c31644..55b1dc9502 100644 --- a/test/expr.test +++ b/test/expr.test @@ -390,13 +390,8 @@ ifcapable floatingpoint { test_expr expr-2.23 {r1=1.23, r2=2.34} {max(r1,r2,r1+r2,r1-r2)} {3.57} test_expr expr-2.24 {r1=25.0, r2=11.0} {r1%r2} 3.0 test_expr expr-2.25 {r1=1.23, r2=NULL} {coalesce(r1+r2,99.0)} 99.0 - ifcapable nan_inf { - test_expr expr-2.26a {r1=1e300, r2=1e300} {coalesce((r1*r2)*0.0,99.0)} -NaN - test_expr expr-2.26b {r1=1e300, r2=-1e300} {coalesce((r1*r2)*0.0,99.0)} -NaN - } else { - test_expr expr-2.26c {r1=1e300, r2=1e300} {coalesce((r1*r2)*0.0,99.0)} 99.0 - test_expr expr-2.26d {r1=1e300, r2=-1e300} {coalesce((r1*r2)*0.0,99.0)} 99.0 - } + test_expr expr-2.26 {r1=1e300, r2=1e300} {coalesce((r1*r2)*0.0,99.0)} 99.0 + test_expr expr-2.26b {r1=1e300, r2=-1e300} {coalesce((r1*r2)*0.0,99.0)} 99.0 test_expr expr-2.27 {r1=1.1, r2=0.0} {r1/r2} {{}} test_expr expr-2.28 {r1=1.1, r2=0.0} {r1%r2} {{}} } diff --git a/test/func4.test b/test/func4.test index 50b6dd3501..924c1fa538 100644 --- a/test/func4.test +++ b/test/func4.test @@ -724,35 +724,33 @@ ifcapable floatingpoint { do_execsql_test func4-6.3.16 { SELECT toreal(x'7ff0000000000000'); } {Inf} - ifcapable !nan_inf { - do_execsql_test func4-6.3.17 { - SELECT toreal(x'fff8000000000000'); - } {{}} - do_execsql_test func4-6.3.18 { - SELECT toreal(x'fff0000000000001'); - } {{}} - do_execsql_test func4-6.3.19 { - SELECT toreal(x'fff7ffffffffffff'); - } {{}} - do_execsql_test func4-6.3.20 { - SELECT toreal(x'7ff0000000000001'); - } {{}} - do_execsql_test func4-6.3.21 { - SELECT toreal(x'7ff7ffffffffffff'); - } {{}} - do_execsql_test func4-6.3.22 { - SELECT toreal(x'fff8000000000001'); - } {{}} - do_execsql_test func4-6.3.23 { - SELECT toreal(x'ffffffffffffffff'); - } {{}} - do_execsql_test func4-6.3.24 { - SELECT toreal(x'7ff8000000000000'); - } {{}} - do_execsql_test func4-6.3.25 { - SELECT toreal(x'7fffffffffffffff'); - } {{}} - } + do_execsql_test func4-6.3.17 { + SELECT toreal(x'fff8000000000000'); + } {{}} + do_execsql_test func4-6.3.18 { + SELECT toreal(x'fff0000000000001'); + } {{}} + do_execsql_test func4-6.3.19 { + SELECT toreal(x'fff7ffffffffffff'); + } {{}} + do_execsql_test func4-6.3.20 { + SELECT toreal(x'7ff0000000000001'); + } {{}} + do_execsql_test func4-6.3.21 { + SELECT toreal(x'7ff7ffffffffffff'); + } {{}} + do_execsql_test func4-6.3.22 { + SELECT toreal(x'fff8000000000001'); + } {{}} + do_execsql_test func4-6.3.23 { + SELECT toreal(x'ffffffffffffffff'); + } {{}} + do_execsql_test func4-6.3.24 { + SELECT toreal(x'7ff8000000000000'); + } {{}} + do_execsql_test func4-6.3.25 { + SELECT toreal(x'7fffffffffffffff'); + } {{}} } set tcl_precision $saved_tcl_precision diff --git a/test/func7.test b/test/func7.test index 5eb8d7936a..bb4f80b325 100644 --- a/test/func7.test +++ b/test/func7.test @@ -165,15 +165,9 @@ do_execsql_test func7-pg-550 { do_execsql_test func7-mysql-100 { SELECT acos(1); } {0.0} -ifcapable nan_inf { - do_execsql_test func7-mysql-110a { - SELECT acos(1.0001); - } {NaN} -} else { - do_execsql_test func7-mysql-110b { - SELECT acos(1.0001); - } {{}} -} +do_execsql_test func7-mysql-110 { + SELECT acos(1.0001); +} {{}} do_execsql_test func7-mysql-120 { SELECT round( acos(0.0), 7); } {1.5707963} @@ -243,15 +237,9 @@ do_execsql_test func7-mysql-300 { do_execsql_test func7-mysql-310 { SELECT sin(pi()) BETWEEN -1.0e-15 AND 1.0e-15; } {1} -ifcapable nan_inf { - do_execsql_test func7-mysql-320a { - SELECT sqrt(4), round(sqrt(20),7), quote(sqrt(-16)); - } {2.0 4.472136 NaN} -} else { - do_execsql_test func7-mysql-320b { - SELECT sqrt(4), round(sqrt(20),7), quote(sqrt(-16)); - } {2.0 4.472136 NULL} -} +do_execsql_test func7-mysql-320 { + SELECT sqrt(4), round(sqrt(20),7), quote(sqrt(-16)); +} {2.0 4.472136 NULL} do_execsql_test func7-mysql-330 { SELECT tan(pi()) BETWEEN -1.0e-15 AND 1.0e-15; } {1} diff --git a/test/ieee754.test b/test/ieee754.test index ba92cbe0ac..bd806d2cf3 100644 --- a/test/ieee754.test +++ b/test/ieee754.test @@ -53,10 +53,8 @@ do_test ieee754-111 { db eval {SELECT ieee754(-1,1024), ieee754(-4503599627370495,972);} ] } {-inf -1.79769313486232e+308} -ifcapable !nan_inf { - do_execsql_test ieee754-112 { - SELECT ieee754(4503599627370495,973) is null; - } {1} -} +do_execsql_test ieee754-112 { + SELECT ieee754(4503599627370495,973) is null; +} {1} finish_test diff --git a/test/istrue.test b/test/istrue.test index 20342598f8..f1ba63248f 100644 --- a/test/istrue.test +++ b/test/istrue.test @@ -135,14 +135,9 @@ foreach {tn val} [list 1 NaN 2 -NaN 3 NaN0 4 -NaN0 5 Inf 6 -Inf] { sqlite3_reset $::STMT sqlite3_finalize $::STMT } {SQLITE_OK} - ifcapable nan_inf { - set res 1 - } else { - set res [expr {$tn in [list 5 6] ? {1} : {0}}] - } do_execsql_test istrue-600.$tn.3 { SELECT x IS TRUE FROM t1; - } $res + } [expr {$tn in [list 5 6] ? {1} : {0}}] do_execsql_test istrue-600.$tn.4 { SELECT x IS FALSE FROM t1; } {0} diff --git a/test/nan.test b/test/nan.test index 0a8b777142..615a4ad227 100644 --- a/test/nan.test +++ b/test/nan.test @@ -24,11 +24,6 @@ set testdir [file dirname $argv0] source $testdir/tester.tcl -ifcapable nan_inf { - finish_test - return -} - # Do not use a codec for tests in this file, as the database file is # manipulated directly using tcl scripts (using the [hexio_write] command). #