[Tarantool-patches] [PATCH 0/4] session settings fixes

Peter Gulutzan pgulutzan at ocelot.ca
Wed Apr 8 18:03:43 MSK 2020


On 2020-04-08 3:40 a.m., Timur Safin wrote:
<cut>
 > Peter, after multiple rounds of discussions here (one incompatible 
way against another incompatible way) we tend to prefer the simpler syntax
 >
 >     SET SESSION sqlconfigname = value
 >
 > because it's quite simpler, looks similar to MySQL way (though still 
is not part of standard), and would require less intrusive patch to 
parser. Introducing all configuration settins as separate system spaces 
(via hardcoding in the engine) looked to us slightly more intrusive 
(while still being not as much closer to the standard way).
 >
 > Minuses against minuses on both sides.
 >
 > What do you think, Peter?

My main objection to SETTING SET was that it
might cause an existing legal statement to become illegal.
I have asked C. Sosnin whether SET SESSION solves that.

My other objection was about proprietary syntax.
SET SESSION is not extremely different from standard SQL
SET SESSION CHARACTERISTICS (which I realize is too long),
and proprietary syntax is less bad if another vendor
does it. Incidentally MySQL handles this correctly:
CREATE PROCEDURE p()
BEGIN
   DECLARE session INTEGER;
   SET session = 5;
END;
Eventually, when Tarantool supports declared variables,
I hope everyone will remember that should be legal.

Thank you for considering alternative suggestions.
Please proceed with what you all regard as least intrusive.

Peter Gulutzan



More information about the Tarantool-patches mailing list