Commit Graph

4557 Commits

Author SHA1 Message Date
Pekka Enberg
5bd85774cf Merge 'Update README.md' from Yusheng Guo
A syntax error.

Closes #1522
2025-05-19 20:42:25 +03:00
Yusheng Guo
810beeea93 Update README.md
A syntax error.
2025-05-19 18:29:57 +08:00
Jussi Saurio
d2b1be8af7 Merge 'optimizer: fix order by removal logic' from Jussi Saurio
1. `group_by_contains_all` was incorrect - it was not checking that all
order by columns are in group by; it was instead checking that all group
by columns are in order by, which is absolutely incorrect for the
intended purpose.
2. remove ORDER BY clause if GROUP BY clause can sort the rows in the
same way.
Test failures are not related

Reviewed-by: Pere Diaz Bou <pere-altea@homail.com>

Closes #1511
2025-05-19 11:29:17 +03:00
Jussi Saurio
b7b4f6a390 Merge 'Mark WHERE terms as consumed instead of deleting them' from Jussi Saurio
We've run into trouble in multiple places due to the fact that we delete
terms from the where clause (e.g. when a constant condition is removed,
or the term becomes part of an index seek key).
A simpler solution is to add a flag indicating that the term is consumed
(used), so that it is not translated in the main loop anymore when WHERE
clause terms are evaluated.
note: CI failures are unrelated

Reviewed-by: Pere Diaz Bou <pere-altea@homail.com>

Closes #1477
2025-05-19 11:28:09 +03:00
Jussi Saurio
092462fa74 fix build 2025-05-19 07:29:02 +03:00
Jussi Saurio
7c6a4410d2 Merge '(btree): Implement support for handling offset-based payload access with overflow support' from Krishna Vishal
This PR adds a new function `read_write_payload_with_offset` to support
reading and writing payload data at specific offsets, handling both
local content and overflow pages. This is a port of SQLite's
`accessPayload` function in `btree.c` and will be essential for
supporting incremental blob I/O in the coming PRs.
- Added a state machine called `PayloadOverflowWithOffset` to make the
procedure reentrant.
- Correctly processes both local payload data and payload stored in
overflow pages
Testing:
- Reading and writing to a column with no overflow pages.
- Reading and writing at an offset with overflow pages (spanning 10
pages)

Reviewed-by: Pere Diaz Bou <pere-altea@homail.com>

Closes #1476
2025-05-18 22:58:10 +03:00
Jussi Saurio
3185aabd20 Merge 'Cli config 2' from Pedro Muniz
As there were many merge conflicts for the other PR, I rewrote the code
and condensed it here.
ORIGINAL PR TEXT: Provides the code to almost close
https://github.com/tursodatabase/limbo/issues/1251 . The JsonSchema is
derived, but I am still not sure how to automate the distribution to
SchemaStore for autocomplete. I added some docs for that want to see the
config file description. I still am not sure how to automate this
documentation. Maybe some macro magic?

Reviewed-by: Preston Thorpe (@PThorpe92)

Closes #1430
2025-05-18 22:56:22 +03:00
Jussi Saurio
372850756d Merge 'Fix updating single value' from Pedro Muniz
Closes #1482. I needed to change the `key_exists_in_index` function
because it zips the values from the records it is comparing, but if one
of the records is empty or not of the same length, the `all` function
could return true incorrectly.

Reviewed-by: Jussi Saurio <jussi.saurio@gmail.com>

Closes #1514
2025-05-18 22:51:11 +03:00
pedrocarlo
fd51c0a970 invalidate records not necessary for fix 2025-05-18 16:43:25 -03:00
Jussi Saurio
071940f9a7 Merge 'Autoindex fix' from Pedro Muniz
Closes #1508 . There were two small issues to fix:
1. We were not checking in the IndexMap of columns, if the unique column
name is declared in the composite declaration exists in the IndexMap.
This solved the first this statement `create table t4(a, unique(b));`.
2. The second thing was that we forgot to add the column_name to the
HashSet of columns.
```rust
Some(PrimaryKeyDefinitionType::Simple { column, .. }) => {
      let mut columns = HashSet::new();
      columns.insert(std::mem::take(column));
      // Have to also insert the current column_name we are iterating over in primary_key_column_results
      columns.insert(column_name.clone()); <-- Fix here
      primary_key_definition =
           Some(PrimaryKeyDefinitionType::Composite { columns });
      }
```
The rest of the modifications are just some small simplifications for
readability and avoiding some clones

Reviewed-by: Jussi Saurio <jussi.saurio@gmail.com>

Closes #1512
2025-05-18 22:41:02 +03:00
pedrocarlo
c8b768f1ea add tests 2025-05-18 12:43:11 -03:00
pedrocarlo
7f081c1ac9 remove transmute. Just iterate over columns. No need for unsafe 2025-05-18 12:32:49 -03:00
Jussi Saurio
06c4a5dea9 Merge 'use temporary db in sqlite3 wal tests to fix later tests failing' from Preston Thorpe
This prevents the new wal checkpoint tests in `sqlite3/tests/compat`
from writing/creating `test` table to `testing/testing.db`, which is
queried in later tests which fail for having an extra table.
There is another issue with failing tests related to the new `count`
impl that I am in the process of fixing as well, but that will be a
separate PR.

Closes #1513
2025-05-18 09:48:23 +03:00
pedrocarlo
af1f9492ef fix updating single value 2025-05-17 19:43:24 -03:00
PThorpe92
6d70e6d048 Add reset db to Makefile to create clean testing db between tests that perform writes 2025-05-17 16:23:17 -04:00
PThorpe92
45de41626c Adjust sqlite3 compat tests to use temp cloned database so further tests dont break 2025-05-17 16:11:59 -04:00
PThorpe92
f128887348 Add script to create clone of testing/testing.db to allow for writes in tests 2025-05-17 16:11:16 -04:00
pedrocarlo
b3b52f7f2f applying config in app 2025-05-17 15:51:43 -03:00
pedrocarlo
c73927729d config docs 2025-05-17 15:51:17 -03:00
pedrocarlo
a614114591 Config Definitions 2025-05-17 15:51:17 -03:00
pedrocarlo
0e6ef1f478 removed some clone, simplified slightly logic + also inserted the column name of the current column we are iterating, not only the last column contained in PrimaryKeyDefinitionType::Simple 2025-05-17 15:32:58 -03:00
pedrocarlo
166dc2184e fix autoindex creation not detecting if column existed in created table declaration using transmute to avoid cloning 2025-05-17 12:58:00 -03:00
Jussi Saurio
93d88527c3 optimizer: remove order by if group by already sorts the result properly 2025-05-17 17:42:52 +03:00
Jussi Saurio
ce8b2722cf optimizer: fix incorrect logic in group_by_contains_all 2025-05-17 17:28:29 +03:00
Jussi Saurio
0fa4ebaec2 Merge 'tpc-h: fix 'time' output in Ubuntu CI' from Jussi Saurio
Closes #1509
2025-05-17 17:12:25 +03:00
Jussi Saurio
53b135829a tpc-h: fix 'time' output in Ubuntu CI 2025-05-17 16:55:05 +03:00
Jussi Saurio
d584a1879b Mark WHERE terms as consumed instead of deleting them
We've run into trouble in multiple places due to the fact that
we delete terms from the where clause (e.g. when a constant condition
is removed, or the term becomes part of an index seek key).

A simpler solution is to add a flag indicating that the term is
consumed (used), so that it is not translated in the main loop
anymore when WHERE clause terms are evaluated.
2025-05-17 15:44:12 +03:00
Jussi Saurio
31bb26c8bb Merge 'fix labeler correct file name extension use .yml instead of .yaml' from Mohamed A. Salah
I saw that the labeler workflow trying to get `labeler.yml` file but i
see it's `.yaml` in the repo so i renamed it.
![image](https://github.com/user-
attachments/assets/698bf54c-aeb2-48f1-bade-95862968b706)

Reviewed-by: Jussi Saurio <jussi.saurio@gmail.com>

Closes #1506
2025-05-17 15:32:59 +03:00
Mohamed A. Salah
9b52e42fe6 feat: revert the labler workflow 2025-05-17 13:55:42 +03:00
Mohamed A. Salah
c7871e9e27 checkout first 2025-05-17 13:32:58 +03:00
Mohamed A. Salah
fe183e8956 fix labeler correct file name extension use .yml instead of .yaml 2025-05-17 13:27:32 +03:00
Pekka Enberg
26e5496c19 Merge 'Fix autoindex of primary key marked as unique' from Pere Diaz Bou
Primary keys that are marked as unique constraint, do not need to have
separate indexes, one is enough. In the case primary key is integer,
therefore rowid alias, we still need an index to satisfy unique
constraint.

Closes #1494
2025-05-17 08:02:04 +03:00
Pekka Enberg
5209d0c14d Merge 'Add labeler workflow and reorganize macros' from Preston Thorpe
No semantic changes in this PR, the macros were organized because
`lib.rs` was getting out of hand anyhow, and because it's now easier to
determine if a change submitted in a PR is related to `extensions/core`
for labeling.
# NOTE:
this will not work until it is merged, because it needs write
permissions from the base or root of the repo
https://github.com/actions/labeler?tab=readme-ov-file#initial-set-up-of-
the-labeler-action

Closes #1503
2025-05-17 08:01:21 +03:00
PThorpe92
92185f7ba8 Add macros to list of PR labels 2025-05-16 21:43:26 -04:00
PThorpe92
a4dca99bfc Add stress path to anthithesis label workflow 2025-05-16 11:20:14 -04:00
PThorpe92
e86aec892e Reorganize macros to separate those needed for extension library for better labeling of PRs 2025-05-16 11:20:14 -04:00
PThorpe92
426c1c6155 Add configuration file for labeler workflow 2025-05-16 11:20:14 -04:00
PThorpe92
f7f59b4c61 Add label workflow github action 2025-05-16 11:20:14 -04:00
Pekka Enberg
eb757436b2 Merge 'pager: bump default page cache size from 10 to 2000 pages' from Jussi Saurio
```
Execute `SELECT count() FROM users`/limbo_execute_select_count
                        time:   [12.867 µs 12.958 µs 13.104 µs]
                        change: [-91.233% -91.178% -91.120%] (p = 0.00 < 0.05)
                        Performance has improved.
```
also extracted it to a constant

Closes #1498
2025-05-16 16:32:33 +03:00
Jussi Saurio
416de9dd9c Extract page cache size constant and bump to 2k 2025-05-16 15:40:19 +03:00
Pekka Enberg
a283de53a8 Merge 'Update Nyrkiö change detection to newest version' from Henrik Ingo
(Yes, I changed the name of the repo.)
Also switch back to 'cargo' for the parser, which is the original
upstream code. I created 'criterion' because I didn't realize cargo
bench spitz half of the text to stdout the other half to stderr.

Closes #1486
2025-05-16 13:35:00 +03:00
Pekka Enberg
fa9da52bcc Merge 'long fuzz tests ci on btree changes' from Pere Diaz Bou
The idea is simple, if you modify the btree, we should verify fuzz tests
with long number of iterations to decrease the chance of a regression

Closes #1502
2025-05-16 13:30:55 +03:00
Pekka Enberg
eddc8e2a75 Merge 'perf/ci: add basic tpc-h benchmark' from Jussi Saurio
Doesn't seem to work in CI yet properly (probably `time` utility output
is different on linux), but here's an example local run output on mac.
Notice we panic in `btree.rs` in one of the queries:
```bash
Using existing TPC-H.db file
Running TPC-H benchmark...
Starting TPC-H query timing comparison...
The script might ask you to enter the password for sudo, in order to clear system caches.
Running 1.sql with Limbo...
Running 1.sql with SQLite3...
Limbo real time: 2.21
SQLite3 real time: 1.96
Limbo output:

SQLite3 output:

No output difference
-----------------------------------------------------------
Skipping 2.sql, reason: subquery in where not supported
-----------------------------------------------------------
Running 3.sql with Limbo...
Running 3.sql with SQLite3...
Limbo real time: 4.08
SQLite3 real time: 2.95
Limbo output:

SQLite3 output:

No output difference
-----------------------------------------------------------
Skipping 4.sql, reason: subquery in where not supported
-----------------------------------------------------------
Running 5.sql with Limbo...
Running 5.sql with SQLite3...
Limbo real time: 4.37
SQLite3 real time: 2.89
Limbo output:

SQLite3 output:

No output difference
-----------------------------------------------------------
Running 6.sql with Limbo...
Running 6.sql with SQLite3...
Limbo real time: 2.35
SQLite3 real time: 1.95
Limbo output:

SQLite3 output:

No output difference
-----------------------------------------------------------
Running 7.sql with Limbo...
Running 7.sql with SQLite3...
Limbo real time: 2.36
SQLite3 real time: 2.08
Limbo output:

SQLite3 output:

No output difference
-----------------------------------------------------------
Running 8.sql with Limbo...
Running 8.sql with SQLite3...
Limbo real time: 12.10
SQLite3 real time: 8.04
Limbo output:

SQLite3 output:

No output difference
-----------------------------------------------------------
Running 9.sql with Limbo...
Running 9.sql with SQLite3...
Limbo real time: 29.34
SQLite3 real time: 10.86
Limbo output:
ALGERIA|1998|29295233.7707
ALGERIA|1997|52762473.1280001
ALGERIA|1996|53328474.5168001
ALGERIA|1995|51214356.9348
ALGERIA|1994|52169009.5454001
ALGERIA|1993|51333122.8883999
ALGERIA|1992|53203252.4182999
ARGENTINA|1998|29384458.7504
ARGENTINA|1997|45981195.6821
ARGENTINA|1996|48997927.7816
ARGENTINA|1995|49082188.7182
ARGENTINA|1994|47490431.4357
ARGENTINA|1993|49591543.2561
ARGENTINA|1992|47079630.0749
BRAZIL|1998|29522875.2849
BRAZIL|1997|49830726.1137001
BRAZIL|1996|49660010.6812
BRAZIL|1995|48661796.5732001
BRAZIL|1994|48005015.4903
BRAZIL|1993|50642897.2944999
BRAZIL|1992|49796165.2673
CANADA|1998|30827887.8847
CANADA|1997|48200922.4406001
CANADA|1996|49554205.1958
CANADA|1995|52247758.0634
CANADA|1994|50398007.9934001
CANADA|1993|49295434.7577
CANADA|1992|50755100.1311
CHINA|1998|26232779.0758
CHINA|1997|46180740.9342
CHINA|1996|49535189.5637999
CHINA|1995|45696326.4191
CHINA|1994|45699007.4057
CHINA|1993|44820179.7542999
CHINA|1992|44853598.8
EGYPT|1998|28802425.5049
EGYPT|1997|50669980.5204
EGYPT|1996|49409929.5778
EGYPT|1995|51266322.0907999
EGYPT|1994|49610689.962
EGYPT|1993|50945963.7431999
EGYPT|1992|51820711.9291
ETHIOPIA|1998|26507500.3726
ETHIOPIA|1997|44417449.7821001
ETHIOPIA|1996|44396024.8895
ETHIOPIA|1995|45573214.4916
ETHIOPIA|1994|45069220.5918999
ETHIOPIA|1993|45526099.1928999
ETHIOPIA|1992|44415214.7402
FRANCE|1998|27094664.6850001
FRANCE|1997|47521933.8432999
FRANCE|1996|46879568.39
FRANCE|1995|47457222.4867
FRANCE|1994|46096705.433
FRANCE|1993|45962990.9133
FRANCE|1992|43440538.875
GERMANY|1998|26805454.2551
GERMANY|1997|45707724.7992001
GERMANY|1996|45193561.3894001
GERMANY|1995|44010364.8541
GERMANY|1994|46537140.2347001
GERMANY|1993|47120186.1391
GERMANY|1992|47792976.5344
INDIA|1998|29171438.7556
INDIA|1997|49447171.43
INDIA|1996|48314107.4742
INDIA|1995|48157640.2670999
INDIA|1994|47510322.1694
INDIA|1993|50121088.1220001
INDIA|1992|48429696.926
INDONESIA|1998|28049078.872
INDONESIA|1997|47156405.6367
INDONESIA|1996|43832977.6843001
INDONESIA|1995|47383429.9181
INDONESIA|1994|47310891.6826001
INDONESIA|1993|46222112.2464
INDONESIA|1992|46149893.8672
IRAN|1998|26417181.0269999
IRAN|1997|44502840.2268
IRAN|1996|46959453.7866
IRAN|1995|45002812.1692999
IRAN|1994|45433091.641
IRAN|1993|44172584.8788
IRAN|1992|46657917.9228001
IRAQ|1998|32136725.1368001
IRAQ|1997|53988245.1021001
IRAQ|1996|52484885.6999
IRAQ|1995|50826802.1894
IRAQ|1994|53626739.7554
IRAQ|1993|51327489.4222999
IRAQ|1992|53426847.4636
JAPAN|1998|25437238.7276
JAPAN|1997|44207490.0138999
JAPAN|1996|46682874.9343
JAPAN|1995|45283181.6082
JAPAN|1994|45426265.8305
JAPAN|1993|44621631.1586001
JAPAN|1992|45985318.7576999
JORDAN|1998|23772738.5645
JORDAN|1997|43512430.6899999
JORDAN|1996|44074184.9532999
JORDAN|1995|44879506.6709999
JORDAN|1994|42583604.8272
JORDAN|1993|43264733.7961
JORDAN|1992|44983643.7616
KENYA|1998|27596885.9388
KENYA|1997|43800422.8362999
KENYA|1996|45304179.5469
KENYA|1995|45710986.3243999
KENYA|1994|45545675.3259001
KENYA|1993|43921106.8724
KENYA|1992|47458265.2438001
MOROCCO|1998|25236567.0029
MOROCCO|1997|42658811.0476002
MOROCCO|1996|43329016.5985
MOROCCO|1995|44592882.7362999
MOROCCO|1994|42161453.2719
MOROCCO|1993|44899634.791
MOROCCO|1992|43769529.8111
MOZAMBIQUE|1998|27775252.4025
MOZAMBIQUE|1997|49532331.8161999
MOZAMBIQUE|1996|47312132.3954
MOZAMBIQUE|1995|48505778.1883001
MOZAMBIQUE|1994|47280918.1024001
MOZAMBIQUE|1993|46763612.6601001
MOZAMBIQUE|1992|48404237.7845
PERU|1998|31081623.8101
PERU|1997|51536280.2962
PERU|1996|50970091.6021
PERU|1995|52743689.8273001
PERU|1994|49410457.3558
PERU|1993|53695789.9142
PERU|1992|51357085.5809
ROMANIA|1998|25833567.3851
ROMANIA|1997|47308870.4744001
ROMANIA|1996|49278980.0867
ROMANIA|1995|46424352.8088001
ROMANIA|1994|47193732.0789001
ROMANIA|1993|45462367.0855
ROMANIA|1992|46118290.2659999
RUSSIA|1998|27153133.384
RUSSIA|1997|47950148.5437
RUSSIA|1996|49155236.6337
RUSSIA|1995|47417353.3309
RUSSIA|1994|47547047.0333001
RUSSIA|1993|47568120.3475
RUSSIA|1992|45138673.4933001
SAUDI ARABIA|1998|26552308.9274001
SAUDI ARABIA|1997|47935070.9259001
SAUDI ARABIA|1996|48493831.1925001
SAUDI ARABIA|1995|44926913.9565
SAUDI ARABIA|1994|45759107.7221999
SAUDI ARABIA|1993|45849219.1862
SAUDI ARABIA|1992|47456695.9113998
UNITED KINGDOM|1998|25377312.4879
UNITED KINGDOM|1997|46960767.7209999
UNITED KINGDOM|1996|45076159.6326
UNITED KINGDOM|1995|46592948.4497
UNITED KINGDOM|1994|45650295.2464001
UNITED KINGDOM|1993|44963874.6307001
UNITED KINGDOM|1992|46318296.6940999
UNITED STATES|1998|26004416.0988
UNITED STATES|1997|48191685.5994999
UNITED STATES|1996|45327281.0055001
UNITED STATES|1995|46824650.2317
UNITED STATES|1994|46990075.4818999
UNITED STATES|1993|47777150.1640001
UNITED STATES|1992|45725428.7094999
VIETNAM|1998|26143707.6779
VIETNAM|1997|47682484.7703999
VIETNAM|1996|48394548.176
VIETNAM|1995|49341297.159
VIETNAM|1994|47801518.8178
VIETNAM|1993|48531159.0752
VIETNAM|1992|46569476.7732999
SQLite3 output:
ALGERIA|1998|29295233.7707
ALGERIA|1997|52762473.128
ALGERIA|1996|53328474.5168
ALGERIA|1995|51214356.9348
ALGERIA|1994|52169009.5454
ALGERIA|1993|51333122.8884
ALGERIA|1992|53203252.4183
ARGENTINA|1998|29384458.7504
ARGENTINA|1997|45981195.6821
ARGENTINA|1996|48997927.7816
ARGENTINA|1995|49082188.7182
ARGENTINA|1994|47490431.4357
ARGENTINA|1993|49591543.2561
ARGENTINA|1992|47079630.0749
BRAZIL|1998|29522875.2849
BRAZIL|1997|49830726.1137
BRAZIL|1996|49660010.6812
BRAZIL|1995|48661796.5732
BRAZIL|1994|48005015.4903
BRAZIL|1993|50642897.2945
BRAZIL|1992|49796165.2673
CANADA|1998|30827887.8847
CANADA|1997|48200922.4406
CANADA|1996|49554205.1958
CANADA|1995|52247758.0634
CANADA|1994|50398007.9934
CANADA|1993|49295434.7577
CANADA|1992|50755100.1311
CHINA|1998|26232779.0758
CHINA|1997|46180740.9342
CHINA|1996|49535189.5638
CHINA|1995|45696326.4191
CHINA|1994|45699007.4057
CHINA|1993|44820179.7543
CHINA|1992|44853598.8
EGYPT|1998|28802425.5049
EGYPT|1997|50669980.5204
EGYPT|1996|49409929.5778
EGYPT|1995|51266322.0908
EGYPT|1994|49610689.962
EGYPT|1993|50945963.7432
EGYPT|1992|51820711.9291
ETHIOPIA|1998|26507500.3726
ETHIOPIA|1997|44417449.7821
ETHIOPIA|1996|44396024.8895
ETHIOPIA|1995|45573214.4916
ETHIOPIA|1994|45069220.5919
ETHIOPIA|1993|45526099.1929
ETHIOPIA|1992|44415214.7402
FRANCE|1998|27094664.685
FRANCE|1997|47521933.8433
FRANCE|1996|46879568.39
FRANCE|1995|47457222.4867
FRANCE|1994|46096705.433
FRANCE|1993|45962990.9133
FRANCE|1992|43440538.875
GERMANY|1998|26805454.2551
GERMANY|1997|45707724.7992
GERMANY|1996|45193561.3894
GERMANY|1995|44010364.8541
GERMANY|1994|46537140.2347
GERMANY|1993|47120186.1391
GERMANY|1992|47792976.5344
INDIA|1998|29171438.7556
INDIA|1997|49447171.43
INDIA|1996|48314107.4742
INDIA|1995|48157640.2671
INDIA|1994|47510322.1694
INDIA|1993|50121088.122
INDIA|1992|48429696.926
INDONESIA|1998|28049078.872
INDONESIA|1997|47156405.6367
INDONESIA|1996|43832977.6843
INDONESIA|1995|47383429.9181
INDONESIA|1994|47310891.6826
INDONESIA|1993|46222112.2464
INDONESIA|1992|46149893.8672
IRAN|1998|26417181.027
IRAN|1997|44502840.2268
IRAN|1996|46959453.7866
IRAN|1995|45002812.1693
IRAN|1994|45433091.641
IRAN|1993|44172584.8788
IRAN|1992|46657917.9228
IRAQ|1998|32136725.1368
IRAQ|1997|53988245.1021
IRAQ|1996|52484885.6999
IRAQ|1995|50826802.1894
IRAQ|1994|53626739.7554
IRAQ|1993|51327489.4223
IRAQ|1992|53426847.4636
JAPAN|1998|25437238.7276
JAPAN|1997|44207490.0139
JAPAN|1996|46682874.9343
JAPAN|1995|45283181.6082
JAPAN|1994|45426265.8305
JAPAN|1993|44621631.1586
JAPAN|1992|45985318.7577
JORDAN|1998|23772738.5645
JORDAN|1997|43512430.69
JORDAN|1996|44074184.9533
JORDAN|1995|44879506.671
JORDAN|1994|42583604.8272
JORDAN|1993|43264733.7961
JORDAN|1992|44983643.7616
KENYA|1998|27596885.9388
KENYA|1997|43800422.8363
KENYA|1996|45304179.5469
KENYA|1995|45710986.3244
KENYA|1994|45545675.3259
KENYA|1993|43921106.8724
KENYA|1992|47458265.2438
MOROCCO|1998|25236567.0029
MOROCCO|1997|42658811.0476
MOROCCO|1996|43329016.5985
MOROCCO|1995|44592882.7363
MOROCCO|1994|42161453.2719
MOROCCO|1993|44899634.791
MOROCCO|1992|43769529.8111
MOZAMBIQUE|1998|27775252.4025
MOZAMBIQUE|1997|49532331.8162
MOZAMBIQUE|1996|47312132.3954
MOZAMBIQUE|1995|48505778.1883
MOZAMBIQUE|1994|47280918.1024
MOZAMBIQUE|1993|46763612.6601
MOZAMBIQUE|1992|48404237.7845
PERU|1998|31081623.8101
PERU|1997|51536280.2962
PERU|1996|50970091.6021
PERU|1995|52743689.8273
PERU|1994|49410457.3558
PERU|1993|53695789.9142
PERU|1992|51357085.5809
ROMANIA|1998|25833567.3851
ROMANIA|1997|47308870.4744
ROMANIA|1996|49278980.0867
ROMANIA|1995|46424352.8088
ROMANIA|1994|47193732.0789
ROMANIA|1993|45462367.0855
ROMANIA|1992|46118290.266
RUSSIA|1998|27153133.384
RUSSIA|1997|47950148.5437
RUSSIA|1996|49155236.6337
RUSSIA|1995|47417353.3309
RUSSIA|1994|47547047.0333
RUSSIA|1993|47568120.3475
RUSSIA|1992|45138673.4933
SAUDI ARABIA|1998|26552308.9274
SAUDI ARABIA|1997|47935070.9259
SAUDI ARABIA|1996|48493831.1925
SAUDI ARABIA|1995|44926913.9565
SAUDI ARABIA|1994|45759107.7222
SAUDI ARABIA|1993|45849219.1862
SAUDI ARABIA|1992|47456695.9114
UNITED KINGDOM|1998|25377312.4879
UNITED KINGDOM|1997|46960767.721
UNITED KINGDOM|1996|45076159.6326
UNITED KINGDOM|1995|46592948.4497
UNITED KINGDOM|1994|45650295.2464
UNITED KINGDOM|1993|44963874.6307
UNITED KINGDOM|1992|46318296.6941
UNITED STATES|1998|26004416.0988
UNITED STATES|1997|48191685.5995
UNITED STATES|1996|45327281.0055
UNITED STATES|1995|46824650.2317
UNITED STATES|1994|46990075.4819
UNITED STATES|1993|47777150.164
UNITED STATES|1992|45725428.7095
VIETNAM|1998|26143707.6779
VIETNAM|1997|47682484.7704
VIETNAM|1996|48394548.176
VIETNAM|1995|49341297.159
VIETNAM|1994|47801518.8178
VIETNAM|1993|48531159.0752
VIETNAM|1992|46569476.7733
Output difference:
2,3c2,3
< ALGERIA|1997|52762473.1280001
< ALGERIA|1996|53328474.5168001
---
> ALGERIA|1997|52762473.128
> ALGERIA|1996|53328474.5168
5,7c5,7
< ALGERIA|1994|52169009.5454001
< ALGERIA|1993|51333122.8883999
< ALGERIA|1992|53203252.4182999
---
> ALGERIA|1994|52169009.5454
> ALGERIA|1993|51333122.8884
> ALGERIA|1992|53203252.4183
16c16
< BRAZIL|1997|49830726.1137001
---
> BRAZIL|1997|49830726.1137
18c18
< BRAZIL|1995|48661796.5732001
---
> BRAZIL|1995|48661796.5732
20c20
< BRAZIL|1993|50642897.2944999
---
> BRAZIL|1993|50642897.2945
23c23
< CANADA|1997|48200922.4406001
---
> CANADA|1997|48200922.4406
26c26
< CANADA|1994|50398007.9934001
---
> CANADA|1994|50398007.9934
31c31
< CHINA|1996|49535189.5637999
---
> CHINA|1996|49535189.5638
34c34
< CHINA|1993|44820179.7542999
---
> CHINA|1993|44820179.7543
39c39
< EGYPT|1995|51266322.0907999
---
> EGYPT|1995|51266322.0908
41c41
< EGYPT|1993|50945963.7431999
---
> EGYPT|1993|50945963.7432
44c44
< ETHIOPIA|1997|44417449.7821001
---
> ETHIOPIA|1997|44417449.7821
47,48c47,48
< ETHIOPIA|1994|45069220.5918999
< ETHIOPIA|1993|45526099.1928999
---
> ETHIOPIA|1994|45069220.5919
> ETHIOPIA|1993|45526099.1929
50,51c50,51
< FRANCE|1998|27094664.6850001
< FRANCE|1997|47521933.8432999
---
> FRANCE|1998|27094664.685
> FRANCE|1997|47521933.8433
58,59c58,59
< GERMANY|1997|45707724.7992001
< GERMANY|1996|45193561.3894001
---
> GERMANY|1997|45707724.7992
> GERMANY|1996|45193561.3894
61c61
< GERMANY|1994|46537140.2347001
---
> GERMANY|1994|46537140.2347
67c67
< INDIA|1995|48157640.2670999
---
> INDIA|1995|48157640.2671
69c69
< INDIA|1993|50121088.1220001
---
> INDIA|1993|50121088.122
73c73
< INDONESIA|1996|43832977.6843001
---
> INDONESIA|1996|43832977.6843
75c75
< INDONESIA|1994|47310891.6826001
---
> INDONESIA|1994|47310891.6826
78c78
< IRAN|1998|26417181.0269999
---
> IRAN|1998|26417181.027
81c81
< IRAN|1995|45002812.1692999
---
> IRAN|1995|45002812.1693
84,86c84,86
< IRAN|1992|46657917.9228001
< IRAQ|1998|32136725.1368001
< IRAQ|1997|53988245.1021001
---
> IRAN|1992|46657917.9228
> IRAQ|1998|32136725.1368
> IRAQ|1997|53988245.1021
90c90
< IRAQ|1993|51327489.4222999
---
> IRAQ|1993|51327489.4223
93c93
< JAPAN|1997|44207490.0138999
---
> JAPAN|1997|44207490.0139
97,98c97,98
< JAPAN|1993|44621631.1586001
< JAPAN|1992|45985318.7576999
---
> JAPAN|1993|44621631.1586
> JAPAN|1992|45985318.7577
100,102c100,102
< JORDAN|1997|43512430.6899999
< JORDAN|1996|44074184.9532999
< JORDAN|1995|44879506.6709999
---
> JORDAN|1997|43512430.69
> JORDAN|1996|44074184.9533
> JORDAN|1995|44879506.671
107c107
< KENYA|1997|43800422.8362999
---
> KENYA|1997|43800422.8363
109,110c109,110
< KENYA|1995|45710986.3243999
< KENYA|1994|45545675.3259001
---
> KENYA|1995|45710986.3244
> KENYA|1994|45545675.3259
112c112
< KENYA|1992|47458265.2438001
---
> KENYA|1992|47458265.2438
114c114
< MOROCCO|1997|42658811.0476002
---
> MOROCCO|1997|42658811.0476
116c116
< MOROCCO|1995|44592882.7362999
---
> MOROCCO|1995|44592882.7363
121c121
< MOZAMBIQUE|1997|49532331.8161999
---
> MOZAMBIQUE|1997|49532331.8162
123,125c123,125
< MOZAMBIQUE|1995|48505778.1883001
< MOZAMBIQUE|1994|47280918.1024001
< MOZAMBIQUE|1993|46763612.6601001
---
> MOZAMBIQUE|1995|48505778.1883
> MOZAMBIQUE|1994|47280918.1024
> MOZAMBIQUE|1993|46763612.6601
130c130
< PERU|1995|52743689.8273001
---
> PERU|1995|52743689.8273
135c135
< ROMANIA|1997|47308870.4744001
---
> ROMANIA|1997|47308870.4744
137,138c137,138
< ROMANIA|1995|46424352.8088001
< ROMANIA|1994|47193732.0789001
---
> ROMANIA|1995|46424352.8088
> ROMANIA|1994|47193732.0789
140c140
< ROMANIA|1992|46118290.2659999
---
> ROMANIA|1992|46118290.266
145c145
< RUSSIA|1994|47547047.0333001
---
> RUSSIA|1994|47547047.0333
147,150c147,150
< RUSSIA|1992|45138673.4933001
< SAUDI ARABIA|1998|26552308.9274001
< SAUDI ARABIA|1997|47935070.9259001
< SAUDI ARABIA|1996|48493831.1925001
---
> RUSSIA|1992|45138673.4933
> SAUDI ARABIA|1998|26552308.9274
> SAUDI ARABIA|1997|47935070.9259
> SAUDI ARABIA|1996|48493831.1925
152c152
< SAUDI ARABIA|1994|45759107.7221999
---
> SAUDI ARABIA|1994|45759107.7222
154c154
< SAUDI ARABIA|1992|47456695.9113998
---
> SAUDI ARABIA|1992|47456695.9114
156c156
< UNITED KINGDOM|1997|46960767.7209999
---
> UNITED KINGDOM|1997|46960767.721
159,161c159,161
< UNITED KINGDOM|1994|45650295.2464001
< UNITED KINGDOM|1993|44963874.6307001
< UNITED KINGDOM|1992|46318296.6940999
---
> UNITED KINGDOM|1994|45650295.2464
> UNITED KINGDOM|1993|44963874.6307
> UNITED KINGDOM|1992|46318296.6941
163,164c163,164
< UNITED STATES|1997|48191685.5994999
< UNITED STATES|1996|45327281.0055001
---
> UNITED STATES|1997|48191685.5995
> UNITED STATES|1996|45327281.0055
166,168c166,168
< UNITED STATES|1994|46990075.4818999
< UNITED STATES|1993|47777150.1640001
< UNITED STATES|1992|45725428.7094999
---
> UNITED STATES|1994|46990075.4819
> UNITED STATES|1993|47777150.164
> UNITED STATES|1992|45725428.7095
170c170
< VIETNAM|1997|47682484.7703999
---
> VIETNAM|1997|47682484.7704
175c175
< VIETNAM|1992|46569476.7732999
---
> VIETNAM|1992|46569476.7733
-----------------------------------------------------------
Running 10.sql with Limbo...
Running 10.sql with SQLite3...
Limbo real time: 3.48
SQLite3 real time: 2.85
Limbo output:

SQLite3 output:

No output difference
-----------------------------------------------------------
Skipping 11.sql, reason: subquery in where not supported
-----------------------------------------------------------
Running 12.sql with Limbo...
Running 12.sql with SQLite3...
Limbo real time: 2.54
SQLite3 real time: 1.99
Limbo output:

SQLite3 output:

No output difference
-----------------------------------------------------------
Running 13.sql with Limbo...
Running 13.sql with SQLite3...
Limbo real time: 3.64
SQLite3 real time: 4.07
Limbo output:

thread 'main' panicked at core/storage/btree.rs:5124:13:
slice index starts at 128 but ends at 126
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
time: command terminated abnormally
SQLite3 output:
0|50004
9|6642
10|6578
11|6010
8|5916
12|5598
13|5009
19|4704
7|4677
17|4604
20|4581
18|4523
14|4470
15|4449
16|4339
21|4173
22|3717
6|3295
23|3196
24|2647
25|2120
5|1962
26|1632
27|1196
4|985
28|873
29|595
3|412
30|370
31|233
32|146
2|133
33|83
34|43
35|28
36|20
1|19
37|6
38|4
40|3
39|3
41|2
Output difference:
1,5c1,42
<
< thread 'main' panicked at core/storage/btree.rs:5124:13:
< slice index starts at 128 but ends at 126
< note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
< time: command terminated abnormally
---
> 0|50004
> 9|6642
> 10|6578
> 11|6010
> 8|5916
> 12|5598
> 13|5009
> 19|4704
> 7|4677
> 17|4604
> 20|4581
> 18|4523
> 14|4470
> 15|4449
> 16|4339
> 21|4173
> 22|3717
> 6|3295
> 23|3196
> 24|2647
> 25|2120
> 5|1962
> 26|1632
> 27|1196
> 4|985
> 28|873
> 29|595
> 3|412
> 30|370
> 31|233
> 32|146
> 2|133
> 33|83
> 34|43
> 35|28
> 36|20
> 1|19
> 37|6
> 38|4
> 40|3
> 39|3
> 41|2
-----------------------------------------------------------
Running 14.sql with Limbo...
Running 14.sql with SQLite3...
Limbo real time: 2.21
SQLite3 real time: 1.89
Limbo output:

SQLite3 output:

No output difference
-----------------------------------------------------------
Skipping 15.sql, reason: views not supported
-----------------------------------------------------------
Skipping 16.sql, reason: subquery in where not supported
-----------------------------------------------------------
Skipping 17.sql, reason: subquery in where not supported
-----------------------------------------------------------
Skipping 18.sql, reason: subquery in where not supported
-----------------------------------------------------------
Skipping 19.sql, reason: bad-query-plan-takes-forever
-----------------------------------------------------------
Skipping 20.sql, reason: subquery in where not supported
-----------------------------------------------------------
Skipping 21.sql, reason: subquery in where not supported
-----------------------------------------------------------
Skipping 22.sql, reason: subquery in where not supported
-----------------------------------------------------------
-----------------------------------------------------------
TPC-H query timing comparison completed.
```

Closes #1492
2025-05-16 13:30:22 +03:00
Pekka Enberg
adf90052a3 Merge 'Document how to run cargo test on Ubuntu' from Zaid Humayun
This PR adds documentation on how to get tests to successfully pass on
Linux (Ubuntu 24.04.2 LTS)
Without these additional steps `cargo test` complains about missing
missing dev files and can't complete the compatibility tests.

Closes #1500
2025-05-16 13:23:29 +03:00
Pere Diaz Bou
12ebfc1fcf wip 2025-05-16 11:52:57 +02:00
Pere Diaz Bou
852cd48aa4 uses install sqlite 2025-05-16 11:30:58 +02:00
Pere Diaz Bou
82e5597b00 long fuzz tests ci on btree changes
The idea is simple, if you modify the btree, we should verify fuzz tests
with long number of iterations to decrease the chance of a regression
2025-05-16 11:26:00 +02:00
Pere Diaz Bou
36dd5b9704 fmt 2025-05-16 09:06:44 +00:00
Pere Diaz Bou
45412a394f add another test with >1 indexes 2025-05-16 10:37:04 +02:00
Pere Diaz Bou
74328f2617 fix allocation of indices BTreeCreate registers
For some reason we always allocated one more index than required when we
had `total_indices>1`.
2025-05-16 10:37:04 +02:00