[patches] [PATCH] sql: disallow id duplicate in insert & update

v.shpilevoy at tarantool.org v.shpilevoy at tarantool.org
Tue Mar 13 10:44:49 MSK 2018


Try to use column mask. See column_mask.h for API.

> 13 марта 2018 г., в 9:19, Kirill Yukhin <kyukhin at tarantool.org> написал(а):
> 
> On 12 мар 15:10, AKhatskevich wrote:
>> ## branch https://github.com/tarantool/tarantool/tree/kh/gh-2358-insert-stmt-duplicate
>> ## issue https://github.com/tarantool/tarantool/issues/2358
>> 
>> Before this patch one was able to exec query like this:
>>  `insert into t(col1, col1) values(1, 1)`
>>  `update t set col1 = 1, col1 = 2;`
>> which is nonsense.
>> 
>> New policy is to throw an error in case of duplicates in columns
>> description.
>> 
>> The fix for insert compares each identifier with the others and
>> therefore has O(n^2) complexity. However, it seems that to maintain
>> faster data structure just for this small check is redundant.
> Why not to use bitset here?
> 
> --
> Kirill




More information about the Tarantool-patches mailing list