[tarantool-patches] [PATCH v2 0/2] sql: proper check for index in sqlite3Insert()

imeevma at tarantool.org imeevma at tarantool.org
Thu Nov 15 15:09:19 MSK 2018


In case when different fibers try to "INSERT INTO table" and
"DROP TABLE table" at the same time it is possible to get
SEGMENTATION FAULT because INSERT tried to use nonexistent index.

Patch 1 adds a check for index in given space and do some
refactoring.

Patch 2 do some refactoring.

Changes in v2:
 - Check that index exists instead of do less work if it doesn't.
 - Refactoring: reduced "struct Table" usage.
 - Refactoring: removed space_column_default_expr().

https://github.com/tarantool/tarantool/issues/3780
https://github.com/tarantool/tarantool/tree/imeevma/gh-3780-proper-index-check

Mergen Imeev (1):
  sql: proper check for index in sqlite3Insert()

Vladislav Shpilevoy (1):
  sql: remove space_column_default_expr()

 src/box/sql.c            | 14 ----------
 src/box/sql.h            | 11 --------
 src/box/sql/insert.c     | 68 +++++++++++++++++++++++-------------------------
 test/sql/errinj.result   | 33 +++++++++++++++++++++++
 test/sql/errinj.test.lua | 12 +++++++++
 5 files changed, 78 insertions(+), 60 deletions(-)

-- 
2.7.4




More information about the Tarantool-patches mailing list