[Tarantool-patches] [PATCH 4/4] sql: provide a user friendly frontend for accessing session settings

Vladislav Shpilevoy v.shpilevoy at tarantool.org
Tue Mar 17 01:53:34 MSK 2020


On 16/03/2020 18:02, Nikita Pettik wrote:
> On 17 Feb 15:12, Chris Sosnin wrote:
>> Currently if a user wants to change session setting with sql, he has
>> to execute non-obvious query, thus, we introduce a more native way to
>> do this.
> 
> It is not about non-obvious queries, but it is all about documentation:
> the better feature is described, the clearer its usage turns out to be
> for user.

However, on github you voted for this issue, and even agreed that at
least for SQL we need a simpler way to update settings. What changed?

In my opinion, none of system spaces should ever be allowed to be used
by users directly. Especially in such intricate and long way.

>> diff --git a/src/box/sql/vdbe.c b/src/box/sql/vdbe.c
>> index 620d74e66..c81486fa6 100644
>> --- a/src/box/sql/vdbe.c
>> +++ b/src/box/sql/vdbe.c
>> @@ -5248,6 +5249,55 @@ case OP_IncMaxid: {
>>  	break;
>>  }
>>  
>> +/* Opcode: Set P1 P2 * * *
>> + *
>> + * Set the new value of the session setting. P1 is the id of the
>> + * setting in the session_settings array, P2 is the register
>> + * holding a value.
>> + */
>> +case OP_Set: {
> 
> Please, use more specific opcode name. Like OP_SettingSet.

Should not we then change the grammar? Because it requires just SET to
change a session setting. Not SET SETTING.


More information about the Tarantool-patches mailing list