Commit Graph

79 Commits

Author SHA1 Message Date
drh
902e2602c2 Add IS NOT DISTINCT FROM and IS DISTINCT FROM binary operators which are
equivalent to IS and IS NOT, respectively, for compatability with PostgreSQL
and hence standard SQL.

FossilOrigin-Name: db27611e172102483eaede3981d473e3d5bf93d98bc68f480398b1573876349d
2022-05-12 11:45:20 +00:00
drh
7d44b22d45 Fix test cases so that they all still work even with -DSQLITE_DQS=0.
FossilOrigin-Name: 4883776669ee2f2310ea82b0d6df4d008eebaa7cb252102539cf21a635402ebb
2022-01-16 19:11:13 +00:00
drh
aef8167421 Fix the sqlite3ExprImpliesNonNullRow() routine so that it correctly
handles a numeric comparison of two AND subexpressions.

FossilOrigin-Name: 07e504d5174a1a8b1aa05ec5b44ac81ab3ea706c5a098caa88deb3d489cec8fb
2020-01-01 16:43:41 +00:00
mistachkin
6bd4140d33 More tests pursuant to ticket [36fae083b450e3af857a459e20].
FossilOrigin-Name: c26f236da61aef7c7a8fe38f1c7f33eea894c8fae38de6a085d4cce933a70502
2018-02-26 17:03:03 +00:00
drh
1fcfa7240f Always interpret non-zero floating-point values as true even if their
integer part is zero.  Fix for ticket [36fae083b450e3af857a459e20].

FossilOrigin-Name: a983fa857048c748112c2f805f13aadeae43b43b3d27fa55433a3699b51c9a0e
2018-02-26 15:27:31 +00:00
drh
09952c6490 Improved implementation of 64-bit signed integer multiply that correctly
detects overflow (and promotes to floating-point) in some corner cases.
Fix for ticket [1ec41379c9c1e400]

FossilOrigin-Name: db3ebd7c52cfc5fcc7be00f52e9d7c84719f7b93
2016-09-20 22:04:05 +00:00
drh
7693c42f1a In the expression-tree comparison routine, do not compiler Expr.iColumn
and Expr.iTable for TK_STRING expressions.

FossilOrigin-Name: b67bb16c72c3e015ea82665ada9b5d3289ef6fb2
2015-04-17 19:41:37 +00:00
drh
2a3d1d17fd Avoid a NULL pointer deference when processing the IS operator if the
right-hand side is an illegal "#ID" style variable.
Fix for ticket [8c32a33a53092c85a15b]

FossilOrigin-Name: ffe7573636c8057614b02f0a85559e1857fd04e4
2014-10-02 21:52:35 +00:00
dan
33f5379c43 Changes to various test scripts so that they pass on windows.
FossilOrigin-Name: 1586244b6d86d5a98af8c6f7a8324672e02df9c3
2011-05-05 19:44:22 +00:00
drh
158b9cb965 Fix all known instances of signed-integer overflow. Within SQL expressions,
integer overflow now forces coercion to floating point.  The shift operators
work with any integer right-hand operand with negative values reversing
the direction of the shift.

FossilOrigin-Name: abf21394124a0af46f072793718964cee2ce55d0
2011-03-05 20:59:46 +00:00
shaneh
5f1d6b616e Changes to remove sqlite3FitsIn64Bits().
FossilOrigin-Name: 43fef1cab6315f837782ea601d5a2aeb9843ab3c
2010-09-30 16:51:25 +00:00
drh
6f94702f20 Add test cases for the IS and IS NOT operator.
FossilOrigin-Name: 101ed58cf4a1dfe53031b98cfc7ed01e86b4c7b6
2009-09-23 13:39:56 +00:00
shane
fbd60f826d Changes to completely remove all floating point ops if SQLITE_OMIT_FLOATING_POINT defined. Note that w/o fp, date/time, round, nan, etc. are all gone or limited in functionality. Updated some of the test scripts to support missing fp and 64-bit functionality. Ticket #3029. (CVS 6250)
FossilOrigin-Name: 5cef400023205b55152b91441acc78f9cd8d58a9
2009-02-04 03:59:25 +00:00
drh
04bbcd5ce9 Fix a bug in the multi-index OR cost estimator. Remove leftover "breakpoint"
commands from test scripts. (CVS 6086)

FossilOrigin-Name: b090d5736d7eaec17a39d3133e1587b1d2a42acb
2008-12-30 17:55:00 +00:00
drh
9d8b3072ce Enhanced test coverage. (CVS 5598)
FossilOrigin-Name: cc36b4e016a1f519ca81d591de3a551ee8aa6813
2008-08-22 16:29:51 +00:00
drh
61669b3824 Implicit string->numeric conversion should go to an integer value when
possible.  Ticket #3257. (CVS 5502)

FossilOrigin-Name: da0e4bff30a77f72ae283406b547401c2ebb42c5
2008-07-30 13:27:10 +00:00
drh
85e9e22b33 Increased test coverage. (CVS 5414)
FossilOrigin-Name: 7cf91e08c08ce515c24c738c7d079f5b81eebee6
2008-07-15 00:27:34 +00:00
drh
c4dd3fd280 Changes to lemon to generate additional comments in the output file and
to remove unreachable code.  Additional test cases for improved test
coverage. (CVS 4736)

FossilOrigin-Name: 2a0bc1e186532a0bfe36ca18fda74a5e7a199227
2008-01-22 01:48:05 +00:00
drh
91fd4d46ad Miscellaneous code simplifications and cleanup and test coverage
enhancements. (CVS 4730)

FossilOrigin-Name: af129b6d158cc90ce9752dd6383c1de47f7b3e43
2008-01-19 20:11:25 +00:00
danielk1977
24acd8f939 Use 1<<$x instead of pow(2,$x) in the test suite code. (CVS 4715)
FossilOrigin-Name: 3a289b6d28bcf399845586b15f100d7c3a78b550
2008-01-16 18:20:41 +00:00
danielk1977
880c15beb9 Fix a bug in jrnlTruncate(). And other coverage improvements. (CVS 4367)
FossilOrigin-Name: 02b751fb9dbc683b1b77a2ed3cdeb4190f7339e0
2007-09-01 18:24:55 +00:00
danielk1977
b8cdbec246 Allow sqlite3GetInt32 to recognize 10-digit decimal numbers as 32-bit. (CVS 4362)
FossilOrigin-Name: 7571345d2078fb52029f9b9924d833ec36d443e6
2007-09-01 10:01:12 +00:00
danielk1977
42d4ef2acc Fix for #2444: Avoid SIGFPE on 64-bit platforms when evaluating expressions like ((1<<63)/-1). (CVS 4130)
FossilOrigin-Name: c6dfd9e43449b0b3528281d9e2e4971c6ba86ab5
2007-06-26 11:13:25 +00:00
drh
217f49093c Rework the string to integer conversion logic to address tickets
#2344 and #2454. (CVS 4123)

FossilOrigin-Name: 5b3a490649ab88c168e3e5bf2efbc7f61b1b954d
2007-06-25 17:28:00 +00:00
drh
53c1402157 Add some UTF-8 test infrastructure. Treat NaN as NULL. The printf routines
print infinity as "Inf" not as "NaN".  Ticket #2345. (CVS 3972)

FossilOrigin-Name: ffe615a71107a38b6f60c7baf4284a5b0aecdc22
2007-05-10 17:23:11 +00:00
danielk1977
4b5710e486 Avoid evaluating (INT_MIN/-1) with 32 bit signed numbers. It can cause SIGFPE. (CVS 3945)
FossilOrigin-Name: 2f186e916c982cde557e0bc1b925b10e6d58f8a1
2007-05-08 13:57:34 +00:00
drh
05f7c19a6e Test coverage improvements. Over 90% of branches are now executed in
both directions. (CVS 3820)

FossilOrigin-Name: a776d93ccae3bfa6e992cdd1387571dd21561f98
2007-04-06 02:32:33 +00:00
drh
9645d8d4b3 Remove use of the "clock" command in the test suite so that the tests
will run in Tcl8.5.  Ticket #1445. (CVS 3380)

FossilOrigin-Name: bedbac54db173ceb74bd78acd021209f28aa30a8
2006-09-01 15:49:05 +00:00
drh
57bacb2282 Ignore leading spaces on text to numeric conversions. Ticket #1662.
Fixes to test cases broken by the recent changes to round(). (CVS 3118)

FossilOrigin-Name: cdca3383c54b33aeafbbdbbb4ae7c90796cf66e5
2006-03-03 19:12:29 +00:00
danielk1977
c4da5b9f2c Fix more problems with malloc() and IO failures. (CVS 2985)
FossilOrigin-Name: 29281dea81c909b70b2d914d7061a6df8f388195
2006-01-21 12:08:54 +00:00
danielk1977
dba99bcc96 Fix some memory leaks caused by obscure syntax errors in SQL. (CVS 2882)
FossilOrigin-Name: 6593199a4d0d0e1f9cc2f48d30327b1c03a8170e
2006-01-07 14:02:26 +00:00
drh
8a51256c0c Create separate affinities for INTEGER and REAL. (CVS 2766)
FossilOrigin-Name: ce06c123d0c5663dbaf263c2e0aaf5d9cdeb2ccd
2005-11-14 22:29:05 +00:00
drh
8df447f0e6 Omit the SQLITE_AFF_INTEGER type affinity. All numeric values are now
of type real, though an integer representation is still sometimes used
internally for efficiency. (CVS 2753)

FossilOrigin-Name: e0d6f61c7de2c03b8fd17ef37cf1a0add36ee618
2005-11-01 15:48:24 +00:00
drh
b127612933 Fix the shift operators so that they work with 64-bit quantities. (CVS 2752)
FossilOrigin-Name: 0d3357b5f65887f7db03db2ae021f28f480f90e4
2005-10-29 15:48:30 +00:00
drh
f14fd03899 Additional tests for better coverage. (CVS 2602)
FossilOrigin-Name: 4281a838f2f531af24b008d2834e8318798472c5
2005-08-19 03:03:51 +00:00
drh
70031fa396 Add the SQLITE_CASE_SENSITIVE_LIKE compile-time option. (CVS 2539)
FossilOrigin-Name: b72bff81f9937378417a0af0610d8558279b67a7
2005-07-08 13:53:21 +00:00
danielk1977
576ec6b32a Improve test coverage for minimum feature builds. (CVS 2254)
FossilOrigin-Name: 9c4d0e13e8c5f3fc4d7fd8f495898372293f7fad
2005-01-21 11:55:25 +00:00
danielk1977
3e8c37e7f8 Modify test scripts to work when SQLITE_OMIT_SUBQUERY (along with other OMIT macros) is defined. (CVS 2251)
FossilOrigin-Name: bb0254ab14417f0ab40f10f37cb63a60507f070a
2005-01-21 03:12:14 +00:00
drh
48e5aa2769 Test coverage improvements on tokenize.c. (CVS 2196)
FossilOrigin-Name: 5767850ccadb3b53d14bca547e50f65de1d3092e
2005-01-11 17:46:41 +00:00
danielk1977
7c6303c042 Add the ESCAPE clause to the LIKE operator. Not fully tested yet. (CVS 2107)
FossilOrigin-Name: 49268c2b7a84c4c618214dac8bef0f541440fe6b
2004-11-17 16:41:29 +00:00
drh
7b4e7268f1 Add test cases for escape characters in the GLOB operator. (CVS 2101)
FossilOrigin-Name: bb2d9ff881e4c6fe0cf60a13609d39426346fa9d
2004-11-15 01:40:47 +00:00
danielk1977
ae381aa1b6 Fix expr.test so that it works when the date-time functions are compiled out of the library. (CVS 2086)
FossilOrigin-Name: 540ce7de1b3f1882c40d4e20d3986775e1dcf77a
2004-11-10 12:34:20 +00:00
danielk1977
7977a17f06 Port the "DEFAULT CURRENT_TIME" etc. functionality from an earlier fork of sqlite. (CVS 2082)
FossilOrigin-Name: 0d27c8ff48f327ad82dd5b5b3b47b8d221f119b7
2004-11-09 12:44:37 +00:00
drh
92febd92ad Tcl interface transfers values directly between SQLite and Tcl_Objs, without
at translation to strings. (CVS 1898)

FossilOrigin-Name: e97c331362545ce21117776c7b61d3488668f2bf
2004-08-20 18:34:20 +00:00
drh
ef4ac8f9df Change the name of the TCL command from "sqlite" to "sqlite3" so that both
SQLite version 2 and SQLite version 3 can be used by Tcl at the same time. (CVS 1626)

FossilOrigin-Name: d705d051bed2b92b6c3bbcc75fe5b056633b9c31
2004-06-19 00:16:31 +00:00
danielk1977
3f6b087471 Use the faster LIKE function from sqlite v2. Add special user functions to
test builds to test the auxdata APIs. (CVS 1610)

FossilOrigin-Name: b9493c5facea4d24a6cbc4f6fa2f75dc2399a11d
2004-06-17 05:36:44 +00:00
drh
df0148931d Remove the sqlite3_libencoding() api and the ISO8859 encoding option. (CVS 1523)
FossilOrigin-Name: b53640ed2232aaf173a71636073477d80407d11f
2004-06-02 00:41:09 +00:00
danielk1977
96fc5fe6a5 Various minor fixes and updates to make more test cases pass. (CVS 1370)
FossilOrigin-Name: dbe8385ecf1df8bf0b1baf5e811ec5a1de5c4c42
2004-05-13 11:34:16 +00:00
drh
79f14b7240 A vdbe stack element might have a string value even after a call to
Integerify().  Ticket #641. (CVS 1283)

FossilOrigin-Name: 3cac4b7b526d6c5dbf394009b534707bcb65b0da
2004-03-03 01:51:24 +00:00
drh
319e4e7484 All LIKE and GLOB operators to use function notation. "A LIKE B" can be
expressed as "LIKE(B,A)". (CVS 1108)

FossilOrigin-Name: 95b27ebd1322a877112dee514dffddb0937e45fa
2003-09-30 01:54:13 +00:00