Skip to content

Adds Drop Table - #897

Merged
penberg merged 21 commits into
tursodatabase:mainfrom
redixhumayun:main
Mar 6, 2025
Merged

penberg merged 21 commits into
tursodatabase:mainfrom
redixhumayun:main

Conversation

@redixhumayun

@redixhumayun redixhumayun commented Feb 5, 2025 •

Copy link
Copy Markdown
Contributor

This PR adds support for DROP TABLE and addresses issue #894

It depends on #785 being merged in because it requires the implementation of free_page.
EDIT: The PR above has been merged.

It adds the following:

  • an implementation for the DropTable AST instruction via a method called translate_drop_table
  • a couple of new instructions - Destroy and DropTable. The former is to modify physical b-tree pages and the latter is to modify in-memory structures like the schema hash table.
  • btree_destroy on BTreeCursor to walk the tree of pages for this table and place it in free list.
  • state machine traversal for both btree_destroy and clear_overflow_pages to ensure performant, correct code.
  • unit & tcl tests
  • modifies the Null instruction to follow SQLite semantics and accept a second register. It will set all registers in this range to null. This is required for DROP TABLE.

Bytecode Compatibility

The screenshots below have a comparison of the bytecodes generated via SQLite & Limbo.

Limbo has the same instruction set except for the subroutines which involve opening an ephemeral table, copying over the triggers from the sqlite_schema table and then re-inserting them back into the sqlite_schema table.

This is because OpenEphemeral is still a WIP and is being tracked at #768

Screenshot 2025-02-09 at 7 05 03 PM
Screenshot 2025-02-09 at 7 05 35 PM

@redixhumayun
redixhumayun marked this pull request as draft February 5, 2025 15:11
@redixhumayun redixhumayun mentioned this pull request Feb 5, 2025
@el-yawd

el-yawd commented Feb 6, 2025 •

Copy link
Copy Markdown
Contributor

Very nice @redixhumayun! I don't understand things below the btree yet but I can give my 2 cents about other things. Idk if you ran EXPLAIN to take a look in the bytecodes, in my machine it produces:

CREATE TABLE a (a);
EXPLAIN DROP TABLE a (a);
addr  opcode         p1    p2    p3    p4             p5  comment
----  -------------  ----  ----  ----  -------------  --  -------------
0     Init           0     37    0                    0   Start at 37
1     Null           0     1     0                    0   r[1]=NULL
2     OpenWrite      0     1     0     5              0   root=1 iDb=0; sqlite_master
3     Rewind         0     11    0                    0
4       Column         0     2     2                    0   r[2]= cursor 0 column 2
5       Ne             3     10    2     BINARY-8       82  if r[2]!=r[3] goto 10
6       Column         0     0     2                    0   r[2]= cursor 0 column 0
7       Eq             4     10    2     BINARY-8       82  if r[2]==r[4] goto 10
8       Rowid          0     5     0                    0   r[5]=sqlite_master.rowid
9       Delete         0     0     0                    2
10    Next           0     4     0                    1
11    Destroy        2     2     0                    0
12    Null           0     6     7                    0   r[6..7]=NULL
13    OpenEphemeral  2     0     6                    0   nColumn=0
14    IfNot          2     22    1                    0
15    OpenRead       1     1     0     4              0   root=1 iDb=0; sqlite_master
16    Rewind         1     22    0                    0
17      Column         1     3     13                   0   r[13]= cursor 1 column 3
18      Ne             2     21    13    BINARY-8       84  if r[13]!=r[2] goto 21
19      Rowid          1     7     0                    0   r[7]= rowid of 1
20      Insert         2     6     7                    0   intkey=r[7] data=r[6]
21    Next           1     17    0                    1
22    OpenWrite      1     1     0     5              0   root=1 iDb=0; sqlite_master
23    Rewind         2     34    0                    0
24      Rowid          2     7     0                    0   r[7]= rowid of 2
25      NotExists      1     33    7                    0   intkey=r[7]
26      Column         1     0     8                    0   r[8]= cursor 1 column 0
27      Column         1     1     9                    0   r[9]= cursor 1 column 1
28      Column         1     2     10                   0   r[10]= cursor 1 column 2
29      Integer        2     11    0                    0   r[11]=2
30      Column         1     4     12                   0   r[12]= cursor 1 column 4
31      MakeRecord     8     5     15    BBBDB          0   r[15]=mkrec(r[8..12])
32      Insert         1     15    7                    0   intkey=r[7] data=r[15]
33    Next           2     24    0                    0
34    DropTable      0     0     0     a              0
35    SetCookie      0     1     2                    0
36    Halt           0     0     0                    0
37    Transaction    0     1     1     0              1   usesStmtJournal=1
38    String8        0     3     0     a              0   r[3]='a'
39    String8        0     4     0     trigger        0   r[4]='trigger'
40    Goto           0     1     0                    0

There are some bytecodes that afaik we don't have implemented yet, like SetCookie, Destroy and DropTable, for OpenEphemeral there is this an open PR #768, but honestly idk how it is used in this case.

@redixhumayun

Copy link
Copy Markdown
Contributor Author

@diegoreis42 Hey, thanks for taking a look. Yeah, I took a look at the SQLite bytecode before I started working on this. Although, after your comment I went back fixed a few things.

Yeah, I'm skipping the instructions that don't exist like OpenEphemeral, SetCookie, Destroy etc. However, this should still take care of removing the metadata and freeing up the b-tree pages correctly.

Screenshot 2025-02-06 at 10 57 24 PM

@redixhumayun

Copy link
Copy Markdown
Contributor Author

@diegoreis42 @PThorpe92 @jussisaurio Btw how closely are we shooting to match the bytecodes across Limbo & SQLite? Because even for CREATE TABLE, I can see that the byte codes differ quite a bit.

@PThorpe92

Copy link
Copy Markdown
Contributor

Hey @redixhumayun, I haven't taken a look at this quite yet, but to answer your question, with the exception of the obvious places we will differ like OpenWriteAsync InsertAsync / ..Await, we are aiming for compatibility with sqlite as much as possible. The reason for any statements currently not matching sqlite's output is just due to the amount of opcodes still not implemented and not for any intended difference in design.

I'll have a look at this in the morning 👍

@redixhumayun
redixhumayun marked this pull request as ready for review February 9, 2025 13:44
@alpaylan

alpaylan commented Feb 9, 2025

Copy link
Copy Markdown
Contributor

In case it uncovers any bugs;
#949

Comment thread core/storage/btree.rs Outdated
}
}
} else {
// if the node is a leaf node, clear overflow pages

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe not for now but we also need to check overflow pages on interior index pages because they have variable size payload.

Comment thread core/storage/btree.rs Outdated
self.payload_overflow_threshold_min(contents.page_type()),
self.usable_space(),
)?;
return_if_io!(self.clear_overflow_pages(&cell));

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If this returns Locked then we will try to run the traversal again for every overflow page we try to load which is quite inefficient and I don't know if it's safe. It looks like we will need a state machine to keep track of all pages that are being deleted.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@pereman2 Regarding performance concerns, all pages should be in the page cache if the routine resumes, right?. Yes, traversal would be repeated.

I don't understand why it wouldn't be safe though. Could you explain?

Should I go ahead and add a state machine implementation to this routine? Guessing I need to add a new variant to CursorState and use that to track?

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@pereman2 Regarding performance concerns, all pages should be in the page cache if the routine resumes, right?. Yes, traversal would be repeated.

There are no guarantees of a page being in cache unless you pin them. For example, there are no set_dirty or pager.add_dirty calls which marks them as pinned. But even though if we were to pin all of these pages, imagine the case where you drop a table which has 50GB worth of pages, now this means that would have to hold ALL pages in memory, but this is a problem that happens regardless of this destroy stuff anyways. Good thing about a state machine is that you can resume where you started, in this case maybe the PageStack could be enough to ensure we don't traverse again from root to child page every time.

I don't understand why it wouldn't be safe though. Could you explain?

For example you call clear_overflow_pages, which clears the first overflow page, and then it will try to load the second overflow page, but this page could return I/O because it's not in cache. This means that first page is now "freed" and somehow we need to traverse again "first page -> second page" but first page is not there now? This might be also a problem with current clear overflow pages because it should behave like a state machine with DFS.

@redixhumayun redixhumayun Feb 16, 2025 •

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@pereman2 I've addressed your comments in f2e11a1 and 4eaeb18.
Can you take a look?

It adds a state machine to keep track of Destroy operations and also adds another state machine to keep track of ClearOverflowPage operations.
The reason for two separate state machines is because clear_overflow_pages has two separate call sites (one from btree_destroy and one from delete) and I don't want to complicate the code by linking the state machine used by btree_destroy to the state machine used in clear_overflow_pages

penberg added a commit that referenced this pull request Feb 11, 2025
I wanted to assist the current development in an up-to-date fashion,
this PR adds drop table(which is being implemented currently in
#897) testing support to the
generator.
Unfortunately, we don't have feature flags in the simulator yet, so the
users should manually fix the generation probability in
`simulator/generation/plan.rs#L644` and
`simulator/generation/property.rs#L629`.

Closes #949
@penberg penberg added this to the 0.1.0 milestone Feb 14, 2025
…emented

this is the initial commit is for the implementation of DROP TABLE. It adds support for the DROP TABLE instruction and adds a DropBTree instruction. It also implements the btree_drop method in btree.rs which makes use of free_page method which will be implemented via PR #785
the command for drop table translation has been updated so that it more closely matches the semantics of SQLite's drop table command.

there are a few more things missing like ephemeral tables, destroy etc.
added required functionality for destroy. minor cleanup of print statements
correctly emitting constant instructions and also calling Destroy instead of DropTable instruction for removing btree pages
modified the Null instruction to more closely match SQLite semantics. Allows passing in a second register and all registers from r1..r2 area set to null
the instruction DropTable has been modified to correctly match SQLite semantics
added helper methods to Schema to remove table and indices from in-memory structures
completed the implementation for DropTable using that
modified the btree_destroy subroutine to do an iterative DFS and use the stack cell counters to keep track of whether children have been removed. adds a unit test.
added missing instructions to drop the indices for a table physically from btree pages in a loop
this commit adds the final touches to the state machine for btree_destroy and also introduces a state machine for clear_overflow_pages
this addresses the issue of IO interrupting an operation in progress and solves the following problems:
* performance issues with repeating an operation
* missing page issues with clear overflow pages
Comment thread core/storage/btree.rs Resolved
Comment thread core/storage/btree.rs Resolved
Comment thread core/storage/btree.rs Resolved
this commit changes the contents of the state machine state for ClearOverflowPages to contain the BTreeCell instead of the cell index.
this avoids having to repeatedly do an operation to get the BTreeCell from the cell index each time the state is reached
this commit introduces the ability of the state machine traversal to handle index interior cell overflow pages. it also makes the state machine states more explicit with match arms.
Comment thread core/translate/mod.rs Outdated
let init_label = program.emit_init();
let start_offset = program.offset();

let r1 = program.alloc_register(); // r1

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: null_reg?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

addressed by 2f14b5d

renames the variable r1 to null_reg since that's the purpose anyway
@penberg
penberg merged commit b0636e4 into tursodatabase:main Mar 6, 2025
orrinfrazier pushed a commit to orrinfrazier/turso that referenced this pull request Jul 28, 2026
I wanted to assist the current development in an up-to-date fashion,
this PR adds drop table(which is being implemented currently in
tursodatabase#897) testing support to the
generator.
Unfortunately, we don't have feature flags in the simulator yet, so the
users should manually fix the generation probability in
`simulator/generation/plan.rs#L644` and
`simulator/generation/property.rs#L629`.

Closes tursodatabase#949
orrinfrazier pushed a commit to orrinfrazier/turso that referenced this pull request Jul 28, 2026
this commit adds the final touches to the state machine for btree_destroy and also introduces a state machine for clear_overflow_pages
this addresses the issue of IO interrupting an operation in progress and solves the following problems:
* performance issues with repeating an operation
* missing page issues with clear overflow pages
orrinfrazier pushed a commit to orrinfrazier/turso that referenced this pull request Jul 28, 2026
this commit changes the contents of the state machine state for ClearOverflowPages to contain the BTreeCell instead of the cell index.
this avoids having to repeatedly do an operation to get the BTreeCell from the cell index each time the state is reached
orrinfrazier pushed a commit to orrinfrazier/turso that referenced this pull request Jul 28, 2026
…#897 (comment) by @pereman2

this commit introduces the ability of the state machine traversal to handle index interior cell overflow pages. it also makes the state machine states more explicit with match arms.
orrinfrazier pushed a commit to orrinfrazier/turso that referenced this pull request Jul 28, 2026
renames the variable r1 to null_reg since that's the purpose anyway
orrinfrazier pushed a commit to orrinfrazier/turso that referenced this pull request Jul 28, 2026
This PR adds support for `DROP TABLE` and addresses issue
tursodatabase#894
It depends on tursodatabase#785 being
merged in because it requires the implementation of `free_page`.
EDIT: The PR above has been merged.
It adds the following:
* an implementation for the `DropTable` AST instruction via a method
called `translate_drop_table`
* a couple of new instructions - `Destroy` and `DropTable`. The former
is to modify physical b-tree pages and the latter is to modify in-memory
structures like the schema hash table.
* `btree_destroy` on `BTreeCursor` to walk the tree of pages for this
table and place it in free list.
* state machine traversal for both `btree_destroy` and
`clear_overflow_pages` to ensure performant, correct code.
* unit & tcl tests
* modifies the `Null` instruction to follow SQLite semantics and accept
a second register. It will set all registers in this range to null. This
is required for `DROP TABLE`.
The screenshots below have a comparison of the bytecodes generated via
SQLite & Limbo.
Limbo has the same instruction set except for the subroutines which
involve opening an ephemeral table, copying over the triggers from the
`sqlite_schema` table and then re-inserting them back into the
`sqlite_schema` table.
This is because `OpenEphemeral` is still a WIP and is being tracked at
tursodatabase#768
![Screenshot 2025-02-09 at 7 05 03 PM](https://github.com/user-
attachments/assets/1d597001-a60c-4a76-89fd-8b90881c77c9)
![Screenshot 2025-02-09 at 7 05 35 PM](https://github.com/user-
attachments/assets/ecfd2a7a-2edc-49cd-a8d1-7b4db8657444)

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

Closes tursodatabase#897
penberg added a commit that referenced this pull request Nov 25, 2026
…amples/react-native' from app/dependabot

Bumps [fast-xml-parser](https://github.com/NaturalIntelligence/fast-xml-
parser) from 5.11.1 to 5.12.1. <details> <summary>Release
notes</summary> <p><em>Sourced from <a
href="https://github.com/NaturalIntelligence/fast-xml-
parser/releases">fast-xml-parser's releases</a>.</em></p> <blockquote>
<h2>v5.12.1</h2> <h2>What's Changed</h2> <ul> <li>fix: correct demo
parser and builder options by <a href="https://github.com/arba-
octo"><code>@​arba-octo</code></a> in <a
href="https://redirect.github.com/NaturalIntelligence/fast-xml-
parser/pull/897">NaturalIntelligence/fast-xml-parser#897</a></li>
<li>Bump github/codeql-action/init from 4.36.2 to 4.39.1 by <a
href="https://github.com/dependabot"><code>@​dependabot</code></a>[bot]
in <a href="https://redirect.github.com/NaturalIntelligence/fast-xml-
parser/pull/907">NaturalIntelligence/fast-xml-parser#907</a></li>
<li>Bump github/codeql-action/analyze from 4.36.2 to 4.39.1 by <a
href="https://github.com/dependabot"><code>@​dependabot</code></a>[bot]
in <a href="https://redirect.github.com/NaturalIntelligence/fast-xml-
parser/pull/905">NaturalIntelligence/fast-xml-parser#905</a></li>
<li>perf: skip quoted attribute values in one step (long SVG path data
4-5x faster) by <a
href="https://github.com/deadstrobe5"><code>@​deadstrobe5</code></a> in
<a href="https://redirect.github.com/NaturalIntelligence/fast-xml-
parser/pull/919">NaturalIntelligence/fast-xml-parser#919</a></li> </ul>
<h2>New Contributors</h2> <ul> <li><a href="https://github.com/arba-
octo"><code>@​arba-octo</code></a> made their first contribution in <a
href="https://redirect.github.com/NaturalIntelligence/fast-xml-
parser/pull/897">NaturalIntelligence/fast-xml-parser#897</a></li> <li><a
href="https://github.com/deadstrobe5"><code>@​deadstrobe5</code></a>
made their first contribution in <a
href="https://redirect.github.com/NaturalIntelligence/fast-xml-
parser/pull/919">NaturalIntelligence/fast-xml-parser#919</a></li> </ul>
<p><strong>Full Changelog</strong>: <a
href="https://github.com/NaturalIntelligence/fast-xml-parser/compare/v5.
12.0...v5.12.1">https://github.com/NaturalIntelligence/fast-xml-
parser/compare/v5.12.0...v5.12.1</a></p> <h2>v5.12.0</h2> <h2>What's
Changed</h2> <ul> <li>fix: add endIndex to the CommonJS XMLMetaData
declaration by <a
href="https://github.com/dualfroz"><code>@​dualfroz</code></a> in <a
href="https://redirect.github.com/NaturalIntelligence/fast-xml-
parser/pull/896">NaturalIntelligence/fast-xml-parser#896</a></li>
<li>Bump zizmorcore/zizmor-action from 0.6.1 to 0.8.0 by <a
href="https://github.com/dependabot"><code>@​dependabot</code></a>[bot]
in <a href="https://redirect.github.com/NaturalIntelligence/fast-xml-
parser/pull/906">NaturalIntelligence/fast-xml-parser#906</a></li>
<li>Bump actions/setup-node from 7.0.0 to 7.1.0 by <a
href="https://github.com/dependabot"><code>@​dependabot</code></a>[bot]
in <a href="https://redirect.github.com/NaturalIntelligence/fast-xml-
parser/pull/904">NaturalIntelligence/fast-xml-parser#904</a></li>
<li>fix: preserve original metadata offsets for CRLF input by <a
href="https://github.com/Sskift"><code>@​Sskift</code></a> in <a
href="https://redirect.github.com/NaturalIntelligence/fast-xml-
parser/pull/911">NaturalIntelligence/fast-xml-parser#911</a></li>
<li>docs: update NASA link in users list by <a
href="https://github.com/CodeVertex55"><code>@​CodeVertex55</code></a>
in <a href="https://redirect.github.com/NaturalIntelligence/fast-xml-
parser/pull/885">NaturalIntelligence/fast-xml-parser#885</a></li>
<li>README.md: fix documentation links by <a
href="https://github.com/maxlath"><code>@​maxlath</code></a> in <a
href="https://redirect.github.com/NaturalIntelligence/fast-xml-
parser/pull/872">NaturalIntelligence/fast-xml-parser#872</a></li>
<li>test: drop shadowed ignoreAttributes option by <a
href="https://github.com/rajanpanth"><code>@​rajanpanth</code></a> in <a
href="https://redirect.github.com/NaturalIntelligence/fast-xml-
parser/pull/863">NaturalIntelligence/fast-xml-parser#863</a></li> </ul>
<h2>New Contributors</h2> <ul> <li><a
href="https://github.com/dualfroz"><code>@​dualfroz</code></a> made
their first contribution in <a
href="https://redirect.github.com/NaturalIntelligence/fast-xml-
parser/pull/896">NaturalIntelligence/fast-xml-parser#896</a></li> <li><a
href="https://github.com/Sskift"><code>@​Sskift</code></a> made their
first contribution in <a
href="https://redirect.github.com/NaturalIntelligence/fast-xml-
parser/pull/911">NaturalIntelligence/fast-xml-parser#911</a></li> <li><a
href="https://github.com/CodeVertex55"><code>@​CodeVertex55</code></a>
made their first contribution in <a
href="https://redirect.github.com/NaturalIntelligence/fast-xml-
parser/pull/885">NaturalIntelligence/fast-xml-parser#885</a></li> <li><a
href="https://github.com/maxlath"><code>@​maxlath</code></a> made their
first contribution in <a
href="https://redirect.github.com/NaturalIntelligence/fast-xml-
parser/pull/872">NaturalIntelligence/fast-xml-parser#872</a></li> </ul>
<p><strong>Full Changelog</strong>: <a
href="https://github.com/NaturalIntelligence/fast-xml-parser/compare/v5.
11.2...v5.12.0">https://github.com/NaturalIntelligence/fast-xml-
parser/compare/v5.11.2...v5.12.0</a></p> <h2>v5.11.2</h2> <h2>What's
Changed</h2> <ul> <li>fix: decode Uint8Array XML input as UTF-8 by <a
href="https://github.com/emme1t"><code>@​emme1t</code></a> in <a
href="https://redirect.github.com/NaturalIntelligence/fast-xml-
parser/pull/875">NaturalIntelligence/fast-xml-parser#875</a></li>
<li>fix: type EntityDecoderOptions.setXmlVersion's version as a number
by <a href="https://github.com/YevheniiKotyrlo"><code>@​YevheniiKotyrlo<
/code></a> in <a
href="https://redirect.github.com/NaturalIntelligence/fast-xml-
parser/pull/880">NaturalIntelligence/fast-xml-parser#880</a></li> </ul>
<h2>New Contributors</h2> <ul> <li><a
href="https://github.com/emme1t"><code>@​emme1t</code></a> made their
first contribution in <a
href="https://redirect.github.com/NaturalIntelligence/fast-xml-
parser/pull/875">NaturalIntelligence/fast-xml-parser#875</a></li> <li><a
href="https://github.com/YevheniiKotyrlo"><code>@​YevheniiKotyrlo</code>
</a> made their first contribution in <a
href="https://redirect.github.com/NaturalIntelligence/fast-xml-
parser/pull/880">NaturalIntelligence/fast-xml-parser#880</a></li> </ul>
<p><strong>Full Changelog</strong>: <a
href="https://github.com/NaturalIntelligence/fast-xml-parser/compare/v5.
11.1...v5.11.2">https://github.com/NaturalIntelligence/fast-xml-
parser/compare/v5.11.1...v5.11.2</a></p> </blockquote> </details>
<details> <summary>Changelog</summary> <p><em>Sourced from <a
href="https://github.com/NaturalIntelligence/fast-xml-
parser/blob/master/CHANGELOG.md">fast-xml-parser's
changelog</a>.</em></p> <blockquote> <p><!-- raw HTML omitted -->Note:
If you find missing information about particular minor version, that
version must have been changed without any functional change in this
library.<!-- raw HTML omitted --></p> <p>Note: Due to some last quick
changes on v4, detail of v4.5.3 &amp; v4.5.4 are not updated here.
v4.5.4x is the last tag of v4 in github repository. I'm extremely sorry
for the confusion</p> <p><strong>5.12.1 / 2026-11-13</strong></p> <ul>
<li>deps: fast-xml-builder v1.3.2</li> <li>perf: skip quoted attribute
values in one step (long SVG path data 4-5x faster) (<a
href="https://redirect.github.com/NaturalIntelligence/fast-xml-
parser/issues/919">#919</a>) (By Afonso Ribeiro)</li> <li>perf:
validator; attr scan</li> </ul> <p><strong>5.12.0 /
2026-11-03</strong></p> <ul> <li>perf improvement for stop node: After
the first failure in a given stop node, the function stops using
readTagExp and switches to a cheap fallback.</li> <li>devdep:jasmine
7.0</li> <li>deps: <ul> <li><code>@​nodable/entities</code> v3.1.0</li>
<li>fast-xml-builder v1.3.1</li> <li>is-unsafe v2.0.3</li> <li>strnum
v2.5.1</li> </ul> </li> <li>fix cjs typing</li> <li>fix: preserve
original metadata offsets for CRLF input (<a
href="https://redirect.github.com/NaturalIntelligence/fast-xml-
parser/issues/911">#911</a>) (By <a
href="https://github.com/sskift">sskift</a>)</li> </ul>
<p><strong>5.11.2 / 2026-09-29</strong></p> <ul> <li>fix (<a
href="https://redirect.github.com/NaturalIntelligence/fast-xml-
parser/issues/875">#875</a>): decode Uint8Array XML input as UTF-8 (By
emme1t)</li> <li>fix (<a
href="https://redirect.github.com/NaturalIntelligence/fast-xml-
parser/issues/880">#880</a>) :type EntityDecoderOptions.setXmlVersion's
version as a number (By Yevhenii Kotyrlo)</li> </ul> <p><strong>5.11.1 /
2026-08-27</strong></p> <ul> <li>fix: validator; Replace regex with a
single-pass scanner for attribute tokens, eliminating quadratic behavior
on long whitespace runs.</li> </ul> <p><strong>5.11.0 /
2026-08-16</strong></p> <ul> <li>feat: support for endIndex in node
metadata (<a href="https://redirect.github.com/NaturalIntelligence/fast-
xml-parser/issues/850">#850</a>) [By <a href="https://github.com/Wain-
PC">Pavel Dranichnikov</a>]</li> <li>fix: don't crash on a closing tag
with no matching opening tag (<a
href="https://redirect.github.com/NaturalIntelligence/fast-xml-
parser/issues/861">#861</a>) [By <a
href="https://github.com/hdimer">Haïm Dimer</a>]</li> <li>fix: DOCTYPE
to read SYSTEM/PUBLIC</li> <li>deps: strnum v2.4.2</li> </ul>
<p><strong>5.10.1 / 2026-07-17</strong></p> <ul> <li>fix: multiple
DOCTYPE declarations.</li> <li>deps: <code>@nodable/entities</code> for
treeshaking</li> </ul> <p><strong>5.10.0 / 2026-07-11</strong></p> <ul>
<li>upgrade: <ul> <li>xml-naming v0.3.0: cache support</li> <li>PEM
v1.6.2: sibling bug fix</li> <li>is-unsafe v2.0.0: tree shaking</li>
</ul> </li> </ul> <p>*<em>5.9.3 / 2026-06-19</em></p> <ul> <li>update
strnum</li> </ul> <p>*<em>5.9.2 / 2026-06-17</em></p> <ul> <li>dummy
release to test changes in github action</li> </ul> <!-- raw HTML
omitted --> </blockquote> <p>... (truncated)</p> </details> <details>
<summary>Commits</summary> <ul> <li><a
href="NaturalIntelligence/fast-xml-parser@88b8
16b30d8d41fd276c35afa267e84f2bf4ffb5"><code>88b816b</code></a>
5.12.1</li> <li><a href="https://github.com/NaturalIntelligence/fast-
xml-parser/commit/292d189993e0eae705597fe524fbb534b3a424c6"><code>292d18
9</code></a> update for release</li> <li><a
href="NaturalIntelligence/fast-xml-parser@7016
813d0679d1bbdfecacd4b57529397ff9ad0b"><code>7016813</code></a> deps:
fxb</li> <li><a href="https://github.com/NaturalIntelligence/fast-xml-pa
rser/commit/4a1623bc23c011fd5ea0b72c21b00f3109688e6c"><code>4a1623b</cod
e></a> perf: validator; attr scan</li> <li><a
href="NaturalIntelligence/fast-xml-parser@339e
aba32aee955a16ce277ae3f56137cf2f2c56"><code>339eaba</code></a> perf:
skip quoted attribute values in one step (long SVG path data 4-5x
faste...</li> <li><a href="https://github.com/NaturalIntelligence/fast-
xml-parser/commit/d81af6066e27d65ab500d05c09e63ee9121aeb90"><code>d81af6
0</code></a> Bump github/codeql-action/analyze from 4.36.2 to 4.39.1 (<a
href="https://redirect.github.com/NaturalIntelligence/fast-xml-
parser/issues/905">#905</a>)</li> <li><a
href="NaturalIntelligence/fast-xml-parser@21ee
0c3c79c389562c8305cd9cd4ff051817fced"><code>21ee0c3</code></a> Bump
github/codeql-action/init from 4.36.2 to 4.39.1 (<a
href="https://redirect.github.com/NaturalIntelligence/fast-xml-
parser/issues/907">#907</a>)</li> <li><a
href="NaturalIntelligence/fast-xml-parser@2460
b41927ad94d352c44297a3aa2fa22fe2d65d"><code>2460b41</code></a> fix:
correct demo parser and builder options (<a
href="https://redirect.github.com/NaturalIntelligence/fast-xml-
parser/issues/897">#897</a>)</li> <li><a
href="NaturalIntelligence/fast-xml-parser@d33f
c7da4a5e73fae518134fa72c6725fd4698da"><code>d33fc7d</code></a> Enhance
pull request template with project links</li> <li><a
href="NaturalIntelligence/fast-xml-parser@9764
70f6100eac10304d80507bbd76fb739ba7f5"><code>976470f</code></a>
5.12.0</li> <li>Additional commits viewable in <a
href="https://github.com/NaturalIntelligence/fast-xml-
parser/compare/v5.11.1...v5.12.1">compare view</a></li> </ul> </details>
<br />

[![Dependabot compatibility score](https://dependabot-
badges.githubapp.com/badges/compatibility_score?dependency-name=fast-
xml-parser&package-manager=npm_and_yarn&previous-version=5.11.1&new-
version=5.12.1)](https://docs.github.com/en/github/managing-security-
vulnerabilities/about-dependabot-security-updates#about-compatibility-
scores)

Dependabot will resolve any conflicts with this PR as long as you don't
alter it yourself. You can also trigger a rebase manually by commenting
`@dependabot rebase`.

[//]: # (dependabot-automerge-start) [//]: # (dependabot-automerge-end)

---

<details> <summary>Dependabot commands and options</summary> <br />

You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits
that have been made to it
- `@dependabot show <dependency name> ignore conditions` will show all
of the ignore conditions of the specified dependency
- `@dependabot ignore this major version` will close this PR and stop
Dependabot creating any more for this major version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this minor version` will close this PR and stop
Dependabot creating any more for this minor version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this dependency` will close this PR and stop
Dependabot creating any more for this dependency (unless you reopen the
PR or upgrade to it yourself)
You can disable automated security fix PRs for this repo from the
[Security Alerts
page](https://github.com/tursodatabase/turso/network/alerts).

</details>

Closes #12464

This branch was previously deployed

1 inactive deployment
test — 2f14b5dd Deployed Feb 28, 2025 by redixhumayun
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants