tarantool / tarantool/tarantool

sql: prepared statements follow-ups

Open
#4,721 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

feature sql
Dominant language
Lua
Stars
3.7k
Forks
419
Avg merge
1d 23h
Merged PRs (30d)
88

Description

  • Provide more sophisticated test cases covering multiple session interaction scenarios.

  • Copy VDBE for each session before execution. Now there's one object in the cache and if it is busy at the moment (i.e. it is executed by another session), execution of prepared statement results in prepare-and-execute procedure. It means that performance benefits from prepared statement may be neglected for statements accessed by several sessions.

  • Now after any DDL operation all prepared statements are considered to be expired (at the moment of statement preparation, schema version is saved within prepared statement object; then it is simply checked before execution with current one). Even if prepared statement has no references to changed by DDL operation entity. We need to invalidate only prepared statements related to the subject of DDL operation.

  • Provide an opportunity to specify types of parameters in :prepare() interface and check them before execution of prepared statement. Now type of binding parameters is always assumed to be ANY.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by tracing the :prepare() interface, the prepared-statement cache, VDBE execution, and schema-version invalidation described in the issue; review how multiple sessions interact. Done means the listed session tests, per-session VDBE handling, targeted DDL invalidation, and parameter-type checks are all implemented and verified.

Written by the indexing model from the issue text.

Assessment

Tech stack
lua, sql
Domain
databases
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
20/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.