[Tarantool-patches] [PATCH v4 2/2] box: introduce _vsession_settings sysview
Konstantin Osipov
kostja.osipov at gmail.com
Wed Nov 27 14:37:41 MSK 2019
* Mergen Imeev <imeevma at tarantool.org> [19/11/27 14:22]:
> > Where do you get the value from to build the tuple?
> >
> I get it from current_session()->sql_flags and
> current_session()->sql_default_engine.
OK, so my point is that they were put there as a historical
artefact of sqlite conversion. It seemed then as the most logical
place to put them. PRAGMAs were internal, so it was not a big
deal.
But going forward it's a dangerous place to store them, they should be
global - it fattens the session object, and if there are more
settings like these, there will be semantics issues.
Besides, there will be a need for global counterpart anyway - since the
next logical question is how to reset the session defaults?
I.e. I want all new sessions to get created with
sql_default_engine = vinyl, how do I do it?
Does my point make sense now?
> I think that the system view state is the same for all
> sessions. It is empty, it has the same methods. However, it
> can give different results, because when it gives tuples,
> it reads from the session state (current_session()) to
> create them.
This is a neat implementation, I agree.
--
Konstantin Osipov, Moscow, Russia
More information about the Tarantool-patches
mailing list