[patches] [PATCH V3 00/10] sql: SQLite backend removal

Bulat Niatshin niatshin at tarantool.org
Mon Mar 5 14:53:19 MSK 2018


Branch:
https://github.com/tarantool/tarantool/tree/bn/gh-3119-final

Issue:
https://github.com/tarantool/tarantool/issues/3119

Brief overview:
SQLite backend is a appendix element in our code base,
several components like OP_Transaction opcode,
journal_mode and memory journal, SQLite authorization,
struct Db, struct Schema. Some of them like struct Db
are fully unnecessary, some are not like struct Schema
and need only refactoring.

In this patch I've removed and refactored it
(whole follow-up list you can find in the issue
mentioned above).

Changes in V3:
- Fixed comments as per review by Nikita
- Removed unnecessary VDBE flags like
  readOnly, bIsReader, removed all related
  SQL DB flags like nVdbeRead, nVdbeWrite
  and so on (it was necessary for proper
  and successful removal of OP_Transaction).
- Removed struct CursorPayload and
  refactored all related code.
- Fixed several code style issues, now
  patch is way more close to Tarantool
  code style.

Changes in V2:
- Fixed comments as per review by Nikita
- Splitted last commit with removing OP_Transaction
  and sqlite authorization into two separate.
  - Removed undeleted deprecated code.
  - Removed struct CursorPayload.
  - Made some commit messages more informative.

Bulat Niatshin (10):
  sql: remove OMIT_AUTOINCREMENT ifndef
  sql: remove P4_TABLE type from 4th vdbe arg
  sql: remove OMIT_DEPRECATED code under define
  sql: remove struct Db
  sql: refactor struct Schema
  sql: remove journal_mode
  sql: remove sqlite authorization
  sql: delete CursorPayload structure
  sql: remove unnecessary VDBE flags
  sql: remove OP_Transaction

 extra/mkopcodeh.tcl        |   1 -
 src/box/sql.c              |  34 ++--
 src/box/sql/CMakeLists.txt |   2 -
 src/box/sql/alter.c        |  27 +--
 src/box/sql/analyze.c      |   8 +-
 src/box/sql/attach.c       |   2 +-
 src/box/sql/build.c        | 219 ++-------------------
 src/box/sql/callback.c     |  13 +-
 src/box/sql/cursor.h       |  19 --
 src/box/sql/delete.c       |  20 +-
 src/box/sql/fkey.c         |  16 --
 src/box/sql/func.c         |  12 --
 src/box/sql/global.c       |  14 +-
 src/box/sql/insert.c       |   3 -
 src/box/sql/main.c         | 100 +---------
 src/box/sql/malloc.c       |  17 --
 src/box/sql/memjournal.c   | 473 ---------------------------------------------
 src/box/sql/opcodes.c      | 226 +++++++++++-----------
 src/box/sql/opcodes.h      | 260 ++++++++++++-------------
 src/box/sql/os.c           |   2 +-
 src/box/sql/os_unix.c      | 127 ++----------
 src/box/sql/pragma.c       |  31 +--
 src/box/sql/prepare.c      |  44 +----
 src/box/sql/resolve.c      |  24 ---
 src/box/sql/select.c       |  13 --
 src/box/sql/sqlite3.h      | 399 +-------------------------------------
 src/box/sql/sqliteInt.h    | 138 +------------
 src/box/sql/sqliteLimit.h  |   8 -
 src/box/sql/status.c       |   2 +-
 src/box/sql/tarantoolInt.h |   6 +-
 src/box/sql/trigger.c      |  40 +---
 src/box/sql/update.c       |  30 +--
 src/box/sql/vdbe.c         | 282 ++++-----------------------
 src/box/sql/vdbe.h         |   8 +-
 src/box/sql/vdbeInt.h      |   2 -
 src/box/sql/vdbeapi.c      |  82 +-------
 src/box/sql/vdbeaux.c      |  59 +-----
 src/box/sql/vdbesort.c     |  12 +-
 38 files changed, 390 insertions(+), 2385 deletions(-)
 delete mode 100644 src/box/sql/memjournal.c

-- 
2.14.1




More information about the Tarantool-patches mailing list