From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-lf1-f66.google.com (mail-lf1-f66.google.com [209.85.167.66]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by dev.tarantool.org (Postfix) with ESMTPS id E5D2946970F for ; Wed, 27 Nov 2019 14:37:43 +0300 (MSK) Received: by mail-lf1-f66.google.com with SMTP id a17so16850458lfi.13 for ; Wed, 27 Nov 2019 03:37:43 -0800 (PST) Date: Wed, 27 Nov 2019 14:37:41 +0300 From: Konstantin Osipov Message-ID: <20191127113741.GC9233@atlas> References: <84ae817b52e0d9415a0b89c730792b1e0221ff24.1574510839.git.imeevma@gmail.com> <20191126211234.GF23422@atlas> <20191127051523.qm3mjvng4pnqoe4y@tarantool.org> <20191127105206.GA16682@tarantool.org> <20191127110505.GA9233@atlas> <20191127111826.GA16940@tarantool.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20191127111826.GA16940@tarantool.org> Subject: Re: [Tarantool-patches] [PATCH v4 2/2] box: introduce _vsession_settings sysview List-Id: Tarantool development patches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Mergen Imeev Cc: Vladislav Shpilevoy , tarantool-patches@dev.tarantool.org * Mergen Imeev [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