Commit Graph

92 Commits

Author SHA1 Message Date
drh 8dc09a0616 Fix the group_concat() function so that it inserts the separator string
even if the initial content strings are empty.  Ticket #3806. (CVS 6510)

FossilOrigin-Name: b83fbf15a3920755ed77dc9c91b4f00a86ddb9ac
2009-04-15 15:16:53 +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 07d3117aed Make group_concat() a 1- or 2-value function, as the documentation says it
should be.  Use the md5sum() function to verify ticket #3179, not
group_concat().  This undoes the ill-advised group_concat() change of
check-in (5233). (CVS 6233)

FossilOrigin-Name: f2ae82c4d46c2eca30fc60a50ab5064728f20739
2009-02-02 21:57:05 +00:00
drh a605fe8d8b Change the replace() function to return a copy of its first argument when
the 2nd argument is an empty string.  Ticket #3624. (CVS 6226)

FossilOrigin-Name: ffebf10f6fb2c7f3083992e2c712682b4cdcc6f0
2009-02-01 18:08:40 +00:00
drh dfbc3a8a3b Better error message when coalesce() has too few arguments. Ticket #3623. (CVS 6222)
FossilOrigin-Name: 9cd43c82a3c123829806aa7bf14efdd29f4424d8
2009-01-31 22:28:48 +00:00
shane eec556d3b7 Added SQLITE_OMIT_DEPRECATED compile time option to leave out deprecated functions. Updated test scripts to skip tests of deprecated functions if they are compiled out. (CVS 5808)
FossilOrigin-Name: ba3711acee6f4659bbf133a23d8f9f37e14d0f38
2008-10-12 00:27:53 +00:00
danielk1977 de3e41e304 Fix (make test) with SQLITE_OMIT_COMPOUND_SELECT. Ticket #3235. (CVS 5530)
FossilOrigin-Name: 9ca975c8fdeaae7d5af8fe62e097d8d251362cfe
2008-08-04 03:51:24 +00:00
shane 2a5fc4d6f5 Omit calls to test_destructor16() if SQLITE_OMIT_UTF16 defined. (CVS 5508)
FossilOrigin-Name: 2d5cec53c2f31875d198d81ac4fd54e7066ea0ff
2008-07-31 01:47:11 +00:00
drh 06a0a81c38 More improvements to the 64-bit integer conversion testing in func.test. (CVS 5427)
FossilOrigin-Name: 632bb3c73443606bd2c7a5eadf0f4b8971a2b41e
2008-07-16 18:20:09 +00:00
drh 01859b0b07 Fix a test in func.test so that it works on machines that lack long double. (CVS 5425)
FossilOrigin-Name: 8686959d4289dc0bf9e1c353b948f26cca5a9a65
2008-07-16 18:04:36 +00:00
drh 85e9e22b33 Increased test coverage. (CVS 5414)
FossilOrigin-Name: 7cf91e08c08ce515c24c738c7d079f5b81eebee6
2008-07-15 00:27:34 +00:00
drh 24b58dd717 Additional test cases added on the sqlite3_create_function() interface. (CVS 5349)
FossilOrigin-Name: 4e941f3d43556d8a503bb96e8a74451de36d243e
2008-07-07 14:50:14 +00:00
drh 3780b5de7e Unset global TCL variables in the func.test script prior to use to avoid
conflicts from other scripts. (CVS 5251)

FossilOrigin-Name: 9b04e10f6c00c36652444206d1d8868a560eb56e
2008-06-19 18:39:11 +00:00
drh a2baf3a2e5 Make sure aggregate functions can take any number of arguments up to the
limit imposed by SQLITE_LIMIT_FUNCTION_ARGS.  Ticket #3179.  Modify
the group_concat() function to take an unlimited number of arguments in
order to facilitate testing this behavior. (CVS 5233)

FossilOrigin-Name: 70c6739f4e84b3433e14960346b54d0e9e0bb9c6
2008-06-18 15:34:09 +00:00
drh 10dfbbb580 Add tests to verify that strings may use embedded zero characters.
Ticket #3056. (CVS 5018)

FossilOrigin-Name: bb0f9e92e427d4ae8ea143d3d3773c9552e63565
2008-04-16 12:58:53 +00:00
drh 191b54cb5d Fix a code generator bug caused by the new CSE optimization. Add test cases
to prevent a recurrence. (CVS 5011)

FossilOrigin-Name: d04246a46399e839e70b1bd57e209f80143f0d5b
2008-04-15 12:14:21 +00:00
drh 00e087b24b Enhanced testing and documentation of sqlite3_result_error_code().
Ticket #2940. (CVS 4983)

FossilOrigin-Name: 5be56dbe879f89351239accf5069e4cb166e0792
2008-04-10 17:14:07 +00:00
drh 2dca868075 Make sure the text result of an aggregate function has the correct
encoding.  Ticket #3009. (CVS 4903)

FossilOrigin-Name: 13e388cecf53d680a79ef29ff4e82e59de8f1264
2008-03-21 17:13:13 +00:00
drh bb4957f858 Initial implementation of per-connection limits and the sqlite3_limit() API.
The sqllimits1.test script crashes.  SQLITE_LIMIT_PAGE_COUNT and
SQLITE_LIMIT_VDBE_OP are currently ignored. (CVS 4897)

FossilOrigin-Name: 60c77882b2de9f6a45f8bd87c9c6a0cc613f8373
2008-03-20 14:03:29 +00:00
drh da84ca8de9 Create the test_destructor16() test SQL function to enhance test coverage.
Prior to check-in (4883), the test_destructor() function was sufficient,
but we now need separate functions since the implementation is restricted
to using the published API. (CVS 4884)

FossilOrigin-Name: bb7218657f3b06d810ad710fe64e5c9984aa518c
2008-03-19 16:35:24 +00:00
drh 2dcef11bb9 Continuing work toward converting the VM to a register machine. (CVS 4708)
FossilOrigin-Name: 426f31ecdd05d1179a2e49c2ca1666011cede9c6
2008-01-12 19:03:48 +00:00
drh ade8648301 Add the {quote: StrAccum} object
for accumulating strings.  Revamp xprintf to use
the new object.  Rewrite the group_concat() function to use the new object.
Productize and test the group_concat() function. (CVS 4578)

FossilOrigin-Name: 221aee72be040769e8026b91648f03c6366a8821
2007-11-28 22:36:40 +00:00
drh a4e5d58f02 Simplify the mem3.c memory allocator. Have it call sqlite3_release_memory()
automatically, without having to specify the soft heap limit. (CVS 4496)

FossilOrigin-Name: ca51b2f54076fcf73a8857aecf4b45d66ef0c7b6
2007-10-20 15:41:57 +00:00
danielk1977 4152e677b8 Fixes for compilation/testing when the various OMIT macros are defined. (CVS 4423)
FossilOrigin-Name: c8405b15c074c94dab5e33272cf1471f458d11df
2007-09-12 17:01:45 +00:00
danielk1977 fa18bece7a Handle transient malloc() failures in sqlite3CreateFunc(). (CVS 4371)
FossilOrigin-Name: c0ce63196458c81e0859fc8a38f2dd2145a580bc
2007-09-03 11:04:22 +00:00
drh 056c8f782e Additional tests for malformed UTF-8. (CVS 4011)
FossilOrigin-Name: 448d3ef670dce6d27c7d7b1be58088d45f8b6274
2007-05-15 18:35:21 +00:00
drh 4e05c83bc3 Additional parsing bugs fixed. (CVS 3981)
FossilOrigin-Name: d12a8924c6083cdff14990b4fd036ca386c2e34a
2007-05-11 01:44:50 +00:00
danielk1977 17374e8f94 Fix a potential buffer overrun in the replace() function. (CVS 3947)
FossilOrigin-Name: b0fb4a3cf6ddbc17ccd0c719b34a720d9090bc93
2007-05-08 14:39:04 +00:00
danielk1977 7de68a097e Add a version of the LIKE operator to the icu extension. Requires optimisation. (CVS 3939)
FossilOrigin-Name: 3e96105c1f084a4ab4dad4de6f4759e43fc497f7
2007-05-07 16:58:02 +00:00
drh 7a928d75f4 Fix an invalid UTF8 encoding in the tests for the trim function. (CVS 3898)
FossilOrigin-Name: 4dbbfff4a7d4be197aac19c80400dafe10dd5e58
2007-05-02 15:36:01 +00:00
drh d1e3a616ca Internationalize the TRIM functions. Ticket #2323. (CVS 3883)
FossilOrigin-Name: ff1f4e744728c8f55afae265246797b30fe98fb0
2007-04-27 21:59:52 +00:00
drh 709cff33dc The replace() function should return NULL if the second argument is an
empty string.  Ticket #2324. (CVS 3877)

FossilOrigin-Name: e6a0c90dd9b4f7efe2153dd0c899b6e3d9846bd8
2007-04-27 01:18:02 +00:00
drh 1eb2538a33 Be careful not to use the result of sqlite3_value_blob() after changing
the representation of an object.  Ticket #2290. (CVS 3834)

FossilOrigin-Name: e14374e4e6f14a90ecb53c2e7c86908a220c6d68
2007-04-10 13:51:17 +00:00
drh 309b338673 Added TRIM, LTRIM, and RTRIM functions. (CVS 3698)
FossilOrigin-Name: 6fe13eeade4fc7099fbda1e6520640927c08debc
2007-03-17 17:52:42 +00:00
drh 26b6d90d74 First cut at an implementation of the REPLACE() function. We might yet
make this a compile-time option or move it into a separate source file. (CVS 3697)

FossilOrigin-Name: c2fe746ea782f84e850aaf3af7f5536b027a19a1
2007-03-17 13:27:54 +00:00
drh 137c728f5a Replace the randomHex() function with separate functions
randomBlob() and hex(). (CVS 3620)

FossilOrigin-Name: f5ad74a9bc57e83c11beb3cf46bb6cd8c9de3f86
2007-01-29 17:58:28 +00:00
drh 63cf66f02e Add the randomhex() function as a built-in. (CVS 3619)
FossilOrigin-Name: a6001589ab1349f7a6b4af941e9e0fd73d13c1c0
2007-01-29 15:50:05 +00:00
drh b7481e70c5 Add the sqlite3_overload_function() API - part of the virtual table
interface. (CVS 3426)

FossilOrigin-Name: aa7728f9f5b80dbb1b3db124f84b9166bf72bdd3
2006-09-16 21:45:14 +00:00
drh bdf67e0efe Fix for the (unsupported) soundex algorithm so that it conforms to Knuth.
Ticket #1925.  Test cases added. (CVS 3358)

FossilOrigin-Name: 7810d1abf611ce40dd0de45610269359a8ca9222
2006-08-19 11:34:01 +00:00
danielk1977 4b2688ab31 Modifications so that compilation and testing with the various OMIT macros defined works. (CVS 3276)
FossilOrigin-Name: c6ea353bd9f5fe6c9cc3349d2034ada283f9c80e
2006-06-20 11:01:07 +00:00
drh 7f3759015a The optimizer recognizes MATCH operators and allows virtual-tables to make
use of them. (CVS 3232)

FossilOrigin-Name: 136bed496b89943522310ec511199b78198d0844
2006-06-13 17:38:59 +00:00
drh 923782530b SQLite now always chooses the column names for compound selects using
the left-most select.  This makes SQLite work like other SQL database,
but it also is a change from historical behavior and may break some
scripts.  Ticket #1721. (CVS 3153)

FossilOrigin-Name: 80cda9f7ce83f2de6cd2fdaf6150bbc35b670fee
2006-03-26 01:21:22 +00:00
drh d589a92a26 Change the ROUND() function to return a REAL value instead of TEXT.
Ticket #1699. (CVS 3116)

FossilOrigin-Name: 9dbadfb2111f7d7f971e1832db3992ed5851d8b1
2006-03-02 03:02:48 +00:00
drh 52fc849a3c Detect integer overflow in the abs() function. The random() function
now provides 64 bits of randomness instead of just 32.  Fix bugs in
testing logic of test4.c. (CVS 3108)

FossilOrigin-Name: 942c509595a2a300e798e6b048ad7fc3bc54af43
2006-02-23 21:43:55 +00:00
drh 8c08e86187 I give up. SUM() now throws an error on integer overflow. Those of us
who think this is goofy can use TOTAL() instead.
Tickets #1664, #1669, #1670, #1674. (CVS 3084)

FossilOrigin-Name: 1c3e6002cd9fd5d30e197448c4d98cdd59163cac
2006-02-11 17:34:00 +00:00
drh 29d7210819 SUM never gives an error. An integer result is returned for exact results
and a floating point result is returned for approximate results.
Tickets #1664, #1669, and #1670. (CVS 3066)

FossilOrigin-Name: 9e04f8fdf1ec0dc36effb55c05d075b3b4777fef
2006-02-09 22:13:41 +00:00
drh 76c730c18f Integer overflow in SUM causes an exception. Ticket #1669. (CVS 3064)
FossilOrigin-Name: c72b946198128cbceb12dffbdf4706d9fda0fd72
2006-02-09 17:47:42 +00:00
drh fc6ad39cf8 Avoid overflowing the 48-bit mantissa of a floating point number when
summing large integers in the SUM() function.  Ticket #1664. (CVS 3061)

FossilOrigin-Name: a9169e879de5d5e4192d1681bc3e119fb83e739c
2006-02-09 13:38:19 +00:00
drh 90669c1dca Fix and test the processing of sqlite3_result_error() withing aggregate
functions.  Allow errors to come from the step function (a new
capability).  Ticket #1632. (CVS 2981)

FossilOrigin-Name: fd4a6bb1ac94d085dda247799c0a5c64aaeec046
2006-01-20 15:45:36 +00:00
drh dddca28608 The sqlite TCL command no longer returns the hex address of the sqlite3*
structure.  Instead there is a new command in testfixture to find that
information. (CVS 2852)

FossilOrigin-Name: 70b228575e045bc56013aab945334203ceb31d8b
2006-01-03 00:33:50 +00:00