Commit Graph

25 Commits

Author SHA1 Message Date
pedrocarlo
6249cd67e9 added print statement to test that VDestroy is being called 2025-04-13 17:10:43 -03:00
pedrocarlo
000d8756ec Implment VDestroy opcode 2025-04-13 17:06:12 -03:00
PThorpe92
5643a0abba Dont emit ansi codes when outputting logs to a file 2025-04-09 19:31:35 -04:00
PThorpe92
7993857020 Add py tests for vtab update behavior 2025-04-09 11:06:41 -04:00
Pekka Enberg
3025b71406 Merge 'Memory tests to track large blob insertions' from Pedro Muniz
My PR #972 always keeps breaking when there are changes in how Btree
works lol. I'm extracting the memory tests I created there here, so we
can track problems earlier.

Closes #1228
2025-04-09 16:45:06 +03:00
PThorpe92
a0f71e27be Fix cli tests 2025-04-08 20:10:49 -04:00
Preston Thorpe
62e0a137dd Merge branch 'main' into update_offset 2025-04-06 12:34:23 -04:00
Pekka Enberg
2d3fd01f91 Merge 'Support Create Index' from Preston Thorpe
Closes #1193
```console
│limbo> explain create index idxp on products(price);
│addr  opcode             p1    p2    p3    p4             p5  comment
│----  -----------------  ----  ----  ----  -------------  --  -------
│0     Init               0     39    0                    0   Start at 39
│1     CreateBtree        0     1     2                    0   r[1]=root iDb=0 flags=2
│2     OpenWriteAsync     0     1     0                    0
│3     OpenWriteAwait     0     0     0                    0
│4     NewRowId           0     2     0                    0
│5     String8            0     3     0     index          0   r[3]='index'
│6     String8            0     4     0     idxp           0   r[4]='idxp'
│7     String8            0     5     0     products       0   r[5]='products'
│8     Copy               1     6     1                    0   r[6]=r[1]
│9     String8            0     7     0     CREATE INDEX idxp ON products (price)  0   r[7]='CREATE INDEX idxp ON products (price)'
│10    MakeRecord         3     5     8                    0   r[8]=mkrec(r[3..7])
│11    InsertAsync        0     8     2                    0
│12    InsertAwait        0     0     0                    0
│13    SorterOpen         3     1     0     k(1,B)         0   cursor=3
│14    OpenPseudo         4     9     2                    0   2 columns in r[9]
│15    OpenReadAsync      2     273   0                    0   table=products, root=273
│16    OpenReadAwait      0     0     0                    0
│17    RewindAsync        2     0     0                    0
│18    RewindAwait        2     25    0                    0   Rewind table products
│19      Column           2     2     10                   0   r[10]=products.price
│20      RowId            2     11    0                    0   r[11]=products.rowid
│21      MakeRecord       10    2     12                   0   r[12]=mkrec(r[10..11])
│22      SorterInsert     3     12    0     0              0   key=r[12]
│23    NextAsync          2     0     0                    0
│24    NextAwait          2     19    0                    0
│25    OpenWriteAsync     1     1     0                    0
│26    OpenWriteAwait     0     0     0                    0
│27    SorterSort         3     33    0                    0
│28      SorterData       3     13    4                    0   r[13]=data
│29      SeekEnd          1     0     0                    0
│30      IdxInsertAsync   1     13    0                    0   key=r[13]
│31      IdxInsertAwait   1     0     0                    0
│32    SorterNext         3     28    0                    0
│33    Close              3     0     0                    0
│34    Close              2     0     0                    0
│35    Close              1     0     0                    0
│36    ParseSchema        0     0     0     name = 'idxp' AND type = 'index'  0   name = 'idxp' AND type = 'index'
│37    Close              0     0     0                    0
│38    Halt               0     0     0                    0
│39    Transaction        0     1     0                    0   write=true
│40    Goto               0     1     0                    0
```
This will create the initial index btree and insert whatever relevant
records that need to be inserted, it doesn't handle the case of
inserting new index keys when normal records are created afterwards.
That will prob be added in next PR to keep this one concise.
Limbo will properly use the index in a subsequent query:
![image](https://github.com/user-
attachments/assets/eb41e985-4a70-49a5-8218-62c25e4d16c5)
Creating a unique index on a column that has 2 existing identical rows:
![image](https://github.com/user-
attachments/assets/ea46c720-5235-4451-81f0-25497ed9ee92)

Reviewed-by: Pere Diaz Bou <pere-altea@homail.com>
Reviewed-by: Jussi Saurio <jussi.saurio@gmail.com>

Closes #1199
2025-04-06 19:32:36 +03:00
PThorpe92
ff482fc753 Add test case for insert default values 2025-04-05 21:34:27 -04:00
PThorpe92
399994bf66 Fix ext tests start with no default schema 2025-04-05 11:19:40 -04:00
PThorpe92
c6c3f39959 Add test cases in python CLI tests for OFFSET on LIMIT clauses 2025-04-04 12:49:12 -04:00
PThorpe92
97c68f905a Move test back to original setup to ensure issue is solved 2025-04-03 20:22:47 -04:00
PThorpe92
22fd3e9781 Fix cli tests 2025-04-03 15:23:49 -04:00
pedrocarlo
8f202e8015 separate memory tests to track large blob insertions 2025-04-01 19:42:44 -03:00
PThorpe92
7b25895940 Add update query tests with limit 2025-03-30 12:15:25 -04:00
Pere Diaz Bou
cb85ba8e82 fix extensions.py test 2025-03-28 11:58:03 +01:00
Pekka Enberg
7832ae22df Enable pretty mode in shell by default
Fixes #929
2025-03-22 08:10:26 +02:00
PThorpe92
c638b64a59 Fix tests to use updated extension name 2025-03-12 21:55:50 -04:00
PThorpe92
35fc9df275 Rename and combine testing extension crate 2025-03-12 21:52:51 -04:00
Pekka Enberg
01f121b567 Merge 'adding limbo.quit to cleanly quit the subprocess in python tests' from Pedro Muniz
Closes #1071
2025-03-04 10:21:49 +02:00
EmNudge
116350d139 Add ipaddr extension 2025-03-02 16:03:46 -05:00
pedrocarlo
2bdb682a49 adding limbo quit to cleanly quit the subprocess 2025-02-28 22:18:05 -03:00
PThorpe92
6c98cf4d82 Clean up extension python tests to use convenience CLI-test class 2025-02-25 20:36:35 -05:00
PThorpe92
6a1f9ed773 Fix cli test for new output name 2025-02-17 22:33:55 -05:00
CK-7vn
5f02521d08 cleanup shell tests and cli 2025-02-13 00:49:12 -05:00