Jussi Saurio
8e5499e5ed
Fix not evaling constant conditions when no tables in query
...
We were not evaluating constant conditions (e.g '1 IS NULL')
when there were no tables referenced in the query, because
our WHERE term evaluation was based on "during which loop"
to evaluate them. However, when there are no tables, there are
no loops, so they were never evaluated.
2025-02-17 13:10:27 +02:00
Jussi Saurio
ec3ae2ace6
Fix remainder panic on zero right-hand-side
2025-02-17 13:09:33 +02:00
Pere Diaz Bou
e25272adc0
fix free_cell_space extend content area
2025-02-17 11:50:15 +01:00
Jussi Saurio
bece5b601a
Add comment about translate_like_base
2025-02-17 10:55:26 +02:00
Pere Diaz Bou
ddbfada8bd
fix wrong usage of insert in fuzz tests
2025-02-17 08:47:55 +01:00
Jussi Saurio
447f91e5ee
optimizer.rs: remove constant folding optimization for NULL since it's incorrect
2025-02-17 07:43:09 +02:00
Jussi Saurio
9bf5b9609f
expr.rs: Binary: use translate_expr()'s impl for currently unsupported ops in translate_condition_expr()
2025-02-17 07:43:09 +02:00
Jussi Saurio
28ad12699f
expr.rs: Unary: use shared impl in translate_expr() and translate_condition_expr()
2025-02-17 07:43:09 +02:00
Jussi Saurio
dc852fee8c
expr.rs: Like: use shared impl in translate_expr() and translate_condition_expr()
2025-02-17 07:43:09 +02:00
Jussi Saurio
c6b8100d64
expr.rs: Case: call translate_expr() from translate_condition_expr()
2025-02-17 07:43:09 +02:00
Jussi Saurio
4f384e3a02
expr.rs: Rowid: call translate_expr() from translate_condition_expr()
2025-02-17 07:43:09 +02:00
Jussi Saurio
d91ba9573b
expr.rs: Column: call translate_expr() from translate_condition_expr()
2025-02-17 07:43:08 +02:00
Jussi Saurio
7023ffc215
expr.rs: FunctionCall: call translate_expr() from translate_condition_expr()
2025-02-17 07:43:08 +02:00
Jussi Saurio
b93e01d59f
expr.rs: Cast: call translate_expr() from translate_condition_expr()
2025-02-17 07:43:05 +02:00
Pere Diaz Bou
4d6843d1cc
clippy
2025-02-16 19:27:34 +01:00
Pere Diaz Bou
d276c22a0c
clippy
2025-02-16 19:25:41 +01:00
Pere Diaz Bou
a6f5bcbaf4
fix return find_free_cell
2025-02-16 19:21:37 +01:00
Pere Diaz Bou
286cb8c5bc
fix some free_cell_range pointer reads
2025-02-16 19:10:15 +01:00
Pere Diaz Bou
aea4560422
bring back corrupt errors
2025-02-16 18:51:09 +01:00
Pere Diaz Bou
1687072d77
remove dbg
2025-02-16 18:31:19 +01:00
Pere Diaz Bou
b64cc769b6
fix rebase
2025-02-16 18:31:03 +01:00
Pere Diaz Bou
b5ec5186ea
fix divider cell on leaf data
2025-02-16 18:30:42 +01:00
Pere Diaz Bou
177dbcd403
simplify balance_root
2025-02-16 18:01:33 +01:00
Nikita Sivukhin
37e27131e3
fix inequality
2025-02-16 12:49:55 +04:00
Nikita Sivukhin
d2a507e458
add unit tests for reading integer serial types
2025-02-16 12:46:45 +04:00
Nikita Sivukhin
279652b271
extend sign for 24/48 bit width serial types
2025-02-16 12:46:18 +04:00
Nikita Sivukhin
db7544fe7a
Merge branch 'tursodatabase:main' into fix-and-predicate
2025-02-15 22:57:56 +04:00
Jussi Saurio
aea8b416bc
Merge 'mvcc: comments and small cleanup' from Jussi Saurio
...
Closes #930
2025-02-15 18:18:01 +02:00
Jussi Saurio
01f51a4c20
Merge 'Fix math binary' from Nikita Sivukhin
...
Fix codegen for binary functions and add fuzz test for math functions
(we need to compile `rusqlite` with `-DSQLITE_ENABLE_MATH_FUNCTIONS` in
order to bundle sqlite with math functions compiled)
Reviewed-by: Jussi Saurio (@jussisaurio)
Closes #1015
2025-02-15 18:17:08 +02:00
Jussi Saurio
cbfd77849d
Merge 'Fix substr' from Nikita Sivukhin
...
Align `substr` implementation with SQLite spec
(https://www.sqlite.org/lang_corefunc.html#substr ):
> The substr(X,Y,Z) function returns a substring of input string X that
begins with the Y-th character and which is Z characters long. If Z is
omitted then substr(X,Y) returns all characters through the end of the
string X beginning with the Y-th. The left-most character of X is number
1. If Y is negative then the first character of the substring is found
by counting from the right rather than the left. If Z is negative then
the abs(Z) characters preceding the Y-th character are returned. If X is
a string then characters indices refer to actual UTF-8 characters. If X
is a BLOB then the indices refer to bytes.
Reviewed-by: Jussi Saurio (@jussisaurio)
Closes #1013
2025-02-15 18:16:57 +02:00
Pere Diaz Bou
f9d979575b
fix defragment_page cell payload size calculation
2025-02-15 16:51:52 +01:00
Pere Diaz Bou
d3574f1e55
fix root offfset handling
2025-02-15 16:51:52 +01:00
Pere Diaz Bou
8ba7022e0b
remove dbg prints
2025-02-15 16:51:52 +01:00
Pere Diaz Bou
1b96bd8a30
fix free_cell_area offset check
2025-02-15 16:46:22 +01:00
Pere Diaz Bou
7e55f46b26
fix defragment
2025-02-15 16:46:22 +01:00
Pere Diaz Bou
c65dce6cfd
re implemenet free cell range
2025-02-15 16:46:22 +01:00
Pere Diaz Bou
9d2aaea439
add no offset write and read u16 from page
2025-02-15 16:46:22 +01:00
Pere Diaz Bou
4907de6e21
fix rightpoitner load + some stuff
2025-02-15 16:46:22 +01:00
Pere Diaz Bou
5ff66b8c62
fix reset content area in drop_cell
2025-02-15 16:42:26 +01:00
Pere Diaz Bou
78e7364f45
fuzz test
2025-02-15 16:30:59 +01:00
Pere Diaz Bou
ea77902e24
add defragment test after deletion of odd cells
...
Signed-off-by: Pere Diaz Bou <pere-altea@hotmail.com >
2025-02-15 16:30:59 +01:00
Pere Diaz Bou
0274f74f32
fix drop cell and add some tests
2025-02-15 16:30:59 +01:00
Pere Diaz Bou
44857cdd17
fix insert test
2025-02-15 16:21:33 +01:00
Pere Diaz Bou
0aa70929f2
fix usable size btree init
2025-02-15 16:21:33 +01:00
Pere Diaz Bou
48f0fe0904
multiple cell insert test
2025-02-15 16:21:33 +01:00
Pere Diaz Bou
c4c5a74e16
add a bit of testing
2025-02-15 16:21:33 +01:00
Pere Diaz Bou
7e3470fb8e
fix rebase
2025-02-15 16:18:04 +01:00
Pere Diaz Bou
915bb42412
fix rightmost pointer update
2025-02-15 16:18:04 +01:00
Pere Diaz Bou
0c015e43a2
some fixes
2025-02-15 16:18:04 +01:00
Pere Diaz Bou
05ca716f82
up to finish without fixing stuff
2025-02-15 16:11:29 +01:00