[tarantool-patches] Re: [PATCH] sql: make spaces without PK illegal in queries

Kirill Yukhin kyukhin at tarantool.org
Wed Mar 20 13:14:44 MSK 2019


Hello,

On 19 Mar 23:25, Nikita Pettik wrote:
> Our SQL codebase was inherited from SQLite, where each table must have
> at least one index - primary (if no explicit PK declared, one based on
> rowid is implicitly created). In Tarantool spaces can exists without
> indexes. The only existing restriction is that they can't contain any
> data. Hence, even very basic queries fail with assertion/seagfault if
> they are applied to spaces with no indexes. Situation when space turns
> out to remain without PK is quite common due to the absence of
> transactional DDL: for instance, space drop procedure consists of
> several steps including dropping all indexes; space itself is dropped at
> the very end. Thus, if a sequence of queries is interrupted by drop
> space procedure and one is not finished, the rest of queries will
> operate on space with no indexes.
> 
> As a solution to this problem (at least temporary) now we disallow
> query processing involving spaces without PK except for views.
> 
> Closes #3780
> ---
> Branch: https://github.com/tarantool/tarantool/tree/np/gh-3780-dissalow-spaces-without-pk
> Issue: https://github.com/tarantool/tarantool/issues/3780

Your patch is OK. I've checked it into 2.1 branch.

--
Regards, Kirill Yukhin




More information about the Tarantool-patches mailing list