Skip to content
Snippets Groups Projects
Commit 1f24d461 authored by Nikita Pettik's avatar Nikita Pettik Committed by Kirill Yukhin
Browse files

sql: pass space pointer to OP_OpenRead/OpenWrite

Originally in SQLite, to open table (i.e. btree) it was required to pass
number of page root to OP_OpenRead or OP_OpenWrite opcodes as an
argument. However, now there are only Tarantool spaces and nothing
prevents from operating directly on pointers to them. Thus, to pass
pointers from compile time to runtime, opcode OP_LoadPtr has been
introduced. It fetches pointer from P4 and stores to the register
specified by P2.
It is worth mentioning, that pointers are able to expire after schema
changes (i.e. after DML routine). For this reason, schema version is
saved to VDBE at compile time and checked each time during cursor
opening.

Part of #3252
parent 07e10012
No related merge requests found
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment