aboutsummaryrefslogtreecommitdiff
path: root/src/func.c
Commit message (Collapse)AuthorAge
...
* Prevent an infinite loop in the trim() SQL function if the second argumentdrh2021-06-15
| | | | | is a carefully malformed UTF8 string. FossilOrigin-Name: 829343c26ed7b87fafc70de3369625209bad91e79bb7ca2946d5c8d61cc1c3c4
* Fix the comment on the implementation of the pi() SQL function. No changesdrh2021-04-16
| | | | | to code. FossilOrigin-Name: 5620bd466eb10fd4daf51af9b88d8221f981dc0ceabfa84a0e1d5c817f635429
* Fix an issue with the LIKE operator when it includes the "ESCAPE '_'" clause.drh2021-02-15
| | | | | Ticket [c0aeea67d58ae0fd]. FossilOrigin-Name: 27d4117980d125975b5e70eeea58a6ab07bcf066e71b5fcb81b822e05afdbab0
* Fix possible division-by-zero in the new log() SQL functions.drh2021-01-29
| | | | | Problemm discovered by OSSFuzz. FossilOrigin-Name: 1ffd321a33b778e87614a26a91a8407ec7b9dec4f0f847b16b1dac4f3b910604
* Merge fixes from trunk. Omit a conditional in drh2021-01-22
| | | | | sqlite3IsLikeFunction() that was made unreachable by this enhancement. FossilOrigin-Name: 0b42f9eb5dd710991af3cf4b16464b22db9539361d618e50eaa4d43c811577b4
* Fix harmless typos in comments per drh2021-01-07
| | | | | [forum:/forumpost/7849e58dd5|forum post 7849e58dd5] FossilOrigin-Name: d1e22e2f76cce7eb9f9029646176daef2d9e41c7bb1d3e1da182fbdd0096605c
* Do not attempt to take a pointer to the ceil() and floor() functions asdrh2021-01-01
| | | | | those routines are intrinsics on some versions of MSVC. FossilOrigin-Name: e5d7209e118a84537a85c0c9cd2b7ca4cd6ccf04181dc840b19339b4c93840cd
* Remove an unnecessary and incorrect #ifdef. Fix harmless compiler warnings.drh2020-12-16
| | | FossilOrigin-Name: 31cd1bbfa5b06723288d99d1cb423f88353bdef770b82e9103f71a796d66f660
* Fix compilation issues with MSVC related to C99.mistachkin2020-12-09
| | | FossilOrigin-Name: c0de6c1fb2c486be1da01e5e4ca8c5634ba37822e418d57f272e018c3e3fc0a2
* Fix a bad assert() in math1Func().drh2020-12-07
| | | FossilOrigin-Name: 4b286129138d44e6f8e9b3450289941e01d20fdfb9d0b5d846031425e8ca6b49
* Many more math functions. Semantics follows PG wherever possible.drh2020-12-07
| | | FossilOrigin-Name: 6b93627b5d9819abf179a3e4a82e7afe17cbcafdabbd5f058de9ed114c9d477f
* Begin adding new SQL functions that depend on -lm: ceil(), ceiling(),drh2020-12-07
| | | | | floor(), ln(), log(), and log10() so far. More to follow. FossilOrigin-Name: 4db5f2f7875f6df78630a7816fc018141a6eee2e295b44fc7627eb66d07881ea
* Allow "substring()" as an alias for "substr()" for compatibility with otherdrh2020-11-23
| | | | | SQL engines. FossilOrigin-Name: aa2ee5754c9f8378c4d490ca756a6415042904477727f0d86e9c0190b5e8b275
* Use the sqlite3Realloc() interface internally, rather than the publicdrh2020-05-17
| | | | | | sqlite3_realloc64() equivalent, to avoid unnecessary calls to sqlite3_initialize(). FossilOrigin-Name: 1313557b512297e7b75ed748894379b2022aecf696d5a58318e46a668321c1ff
* Implement the IIF(x,y,z) SQL function that is short-hand fordrh2020-05-13
| | | | | "CASE WHEN x THEN y ELSE z END". For compatibility with SQL Server. FossilOrigin-Name: fce173cd211b15867369b6a54fad48168352fc83981a722ce98e57299b88608a
* Remove unused constant SQLITE_FUNC_COALESCE.drh2020-05-13
| | | FossilOrigin-Name: a116b20f863e9732cd08fbfbb1aa48204a17d611c9c1edde85dcf59310bde782
* Chagnes the ESCAPE clause on the LIKE operator to overwrite wildcarddrh2020-03-19
| | | | | characters, in order ot match the behavior of PosgreSQL. FossilOrigin-Name: 11e0844f71e8f2d27ce9363fb505e02fd7795c61dae0b3886cf0d8df4484dd97
* Fix a NEVER() macro that can be true if compiled withdrh2020-01-22
| | | | | | SQLITE_ENABLE_UNKNOWN_SQL_FUNCTION. Ticket [b985f0bd1636d9bc] FossilOrigin-Name: 9f0f5d593a383ec2bebb6513ad566813f5b3dc6f052c61bcd76e8ac557bbb062
* Fix #ifdefs so it compiles cleanly with all SQLITE_OMIT compile-time options.drh2020-01-17
| | | | | Update compile-time option testing. FossilOrigin-Name: 7584e4b649d57767aac3906da6b06549d5b772aaa69f469c623ae5da834d54d5
* New test-only SQL functions: implies_nonnull_row(), expr_compare(), anddrh2020-01-01
| | | | | | | expr_implies_expr(). The SQLITE_TESTCTRL_INTERNAL_FUNCTIONS test-control is modified to toggle internal function access on and off for a single database connection. FossilOrigin-Name: 473892a8eceacf24d57fd0c72ff2a0b8be4e0d75e0af7a30bdb24fbc3b453601
* Factor out code generation for in-line SQL functions into a separate routinedrh2020-01-01
| | | | | inside of expr.c. FossilOrigin-Name: 586a65a28fc6cac77309612abc32a2e1017c65e0387f9f438f5d8ac8406da8eb
* Also set the SQLITE_DIRECTONLY flag on the load_extension() function.drh2019-12-31
| | | FossilOrigin-Name: 3bd095a53119c368fe30e539983588b27957203344cf427405b9a64784b8eba7
* Fix an OOB read in the INSTR() function introduced yesterday by check-indrh2019-09-18
| | | | | [3fb40f518086c1e8] and detected by OSSFuzz. The test case is in TH3. FossilOrigin-Name: d49047c1b59bbfd05204af9973cdb0fab51b4d2661b550aec10d917fff94dc9b
* Fix the instr() SQL function so that it makes a copy of its argumentdrh2019-09-17
| | | | | | | before changing the datatype, since the datatype affects processing. Also fix the sqlite3_value_text() routine so that it always works even for values obtained form sqlite3_value_dup(). Ticket [587791f92620090e] FossilOrigin-Name: 3fb40f518086c1e8d11eb1f4134e965450dbedfa4277bce39ef1e969fc747d38
* Remove support for STAT3. The sqlite_stat3 tables are ignored, if theydrh2019-08-08
| | | | | | exist. STAT4 continues to work as it always has, and as it is a superset of STAT3 is the recommended replacement. FossilOrigin-Name: 1e17ea2fd1df4ad49138c787c8fe3207dd0c25c93f9001d52a9b69f8c12e841c
* Remove code in the round() SQL function that became unreachable due todrh2019-06-07
| | | | | the optimization of check-in [e95138f5f4febde5] FossilOrigin-Name: b141bae3f6d16c0ebb59dac9b02086a4370839e71ade34004f647b09b1083d1d
* When casting string values into numeric and the string has a prefix that looksdrh2019-06-07
| | | | | | | like a number but total string is not a well-formed number, then take extra care that the result is either integer or real depending on what the prefix looks like. Fix for tickets [e8bedb2a184001] and [4c2d7639f076aa]. FossilOrigin-Name: 67a68af5578f08d2be2e48cf4fd12a6cf35a09c47d259deda81950f7ee1f02f7
* Optimization to the round() SQL function for large input values without adrh2019-05-30
| | | | | fractional part. FossilOrigin-Name: e95138f5f4febde598f39e031d6e4f4d5ad0adbd8dcdd34fd0baaa78ab393417
* Fix the round() SQL function so that it handles infinities correctly.drh2019-05-10
| | | FossilOrigin-Name: db9acef14d49212108c8082cc15a9b9b4a56b8afe4fe1104ddf62783739c1fbe
* Simplification to the logic underlying PRAGMA case_sensitive_like.drh2019-05-08
| | | FossilOrigin-Name: ef0015fde4c87e992ffd3d7dea8586951bdd65ff98d30d436b126b85b1cc9c74
* Provide the SQLITE_OMIT_CASE_SENSITIVE_LIKE_PRAGMA compile-time option todrh2019-05-08
| | | | | | | omit the case_sensitive_like pragma. This change, in combination with documentation changes, is the current solution to ticket [a340eef47b0cad5]. FossilOrigin-Name: eabe7f2d4ff0e0dd868dcab7ec1d4a9168a25f80d3a52f0eeea2f90bd33782f2
* Small performance increase and size reduction in the implementation of thedrh2019-04-30
| | | | | LIKE and GLOB operators. FossilOrigin-Name: f97626f921dafe596b615a168ef31987f4a1c0b52956443e1a5c1148b49cab74
* Enable the LIKE optimization when the ESCAPE keyword is present and thedrh2019-02-27
| | | | | PRAGMA case_sensitive_like pragma is ON. FossilOrigin-Name: 6ae4b8c525f446ddb0e0bdd5e4e01e06e2ab975e3effa42fce6a1102b3a39830
* Use the full 64-bit integer value in the argument to randomblob().drh2019-01-18
| | | FossilOrigin-Name: 05df5f7aeaf2132810452e8871132d1e66650a841991cb2a9ce32f2d03e20bf4
* Performance improvement on the instr() function, especially for largedrh2019-01-08
| | | | | haystacks. FossilOrigin-Name: ce51f1a2b6a1789a5876e01cf829e45d84f3851d135a2fa5c44a56f948673a60
* Fixes for various harmless compiler warnings.drh2018-07-09
| | | FossilOrigin-Name: 5023b1b85b883a716a5da673740b6effe214ee0490f4ca45f161bb8b04784366
* Simplifications to the implementation of the sum() SQL function.drh2018-07-07
| | | FossilOrigin-Name: a8b13002378fc4ef0b41c367b44b67bf2b28b6624303c087a3c6d657b5bfe32e
* Add ALWAYS() macros on results of sqlite3_aggregate_context() calls indrh2018-07-07
| | | | | xInverse() implements, since they can never fail. FossilOrigin-Name: fdef2a921d451c66ca535021d08af3ec1ab53283da2d2979378a799fd8731ef9
* Fix a problem in the xInverse method of window-function group_concat(1).dan2018-07-05
| | | FossilOrigin-Name: 73391283101288251fe5d030ba12bcdabe8a781d41086afe3564c58c05d0fd5c
* Fix a problem in the xInverse callback for the built-in sum() window function.dan2018-07-02
| | | FossilOrigin-Name: b6563647382634588ebe5c6a3c35c65a321dc1b3732c809d48ce46759b9dd80f
* Fix a crash caused by a LIKE pattern that consists of a single escapedan2018-07-02
| | | | | character. FossilOrigin-Name: bb9bfc3a12dfb89b1c58f5551cdc89ab7b0fbe03f285f2ed86611786ed02ffd9
* Fix a segfault caused by invoking a regular aggregate as a window-function.dan2018-07-02
| | | | | And some problems with count(*) when used as a window-function. FossilOrigin-Name: 4f3c8a82fd1c5b14d84f2301e34cfc8d52fe4b3a60840c39e895c11f2da529d9
* Omit all window-function related code when building with SQLITE_OMIT_WINDOWFUNC.dan2018-06-22
| | | FossilOrigin-Name: 5f04b016467342b5a796bf702ed25b621eb86f2961c1e703d276c93f2cb6aa89
* Fix a problem with using min() or max() as a window function.dan2018-06-19
| | | FossilOrigin-Name: 801074ce63d3f4825cc9fa508c42629a9f74e7f9e35c5f238343bb1cff4fbae1
* Add new API function sqlite3_create_window_function(), for creating newdan2018-06-18
| | | | | aggregate window functions. FossilOrigin-Name: da03fb4318fd2613ec5c5b109a3974ac1120c19ed16bed4ca85bbdc4b35c998c
* Add support for the WINDOW clause.dan2018-06-08
| | | FossilOrigin-Name: 19c983b511f1c823fdfb051713681b4c779f02fa83b41189afca0a9b8b72048d
* Fixes to allow group_concat() to be used as a window function.dan2018-06-08
| | | FossilOrigin-Name: 89bbc9ba8f66853a7530453f146c9df1baacd8558468016cefa7602911f7578a
* Add support for window functions row_number(), rank(), dense_rank() anddan2018-06-02
| | | | | percent_rank(). FossilOrigin-Name: 91c1cb7a217d0991a08256269f6c55ef185c25362d57b36bfbd2d85dab38e58f
* Add support for "ROWS BETWEEN <expr> PRECEDING AND <expr> FOLLOWING" windowdan2018-05-23
| | | | | frames. FossilOrigin-Name: 3a203660f1e4da3b8d2d605c494f4843f6e00752f28042b49e11d7d6550dd406
* Evaluate multiple window functions in a single pass if they use the samedan2018-05-17
| | | | | | window definition. Add xValue callbacks for other built-in aggregate functions. FossilOrigin-Name: c9f0f140941660ff368e5bb5752d54feb1964b7a9eac986d4bfb8f24a1c20d86