From: Stanislav Zudin <szudin@tarantool.org>
To: tarantool-patches@freelists.org, "n.pettik" <korablev@tarantool.org>
Subject: [tarantool-patches] Re: [PATCH] sql: remove useless pragmas
Date: Fri, 8 Feb 2019 13:17:02 +0300 [thread overview]
Message-ID: <cdb95b87-4b6a-f50b-dbd8-58fb5af116ac@tarantool.org> (raw)
In-Reply-To: <E85549E6-2B7D-4BDA-86D1-32C7F5037B16@tarantool.org>
On 06.02.2019 16:21, n.pettik wrote:
>
>> On 6 Feb 2019, at 15:18, Stanislav Zudin <szudin@tarantool.org> wrote:
>>
>> The pragmas "query_only" and "read_uncommitted" didn't affect anything and were removed.
> Nit: please, fit commit message into 72 symbols.
Mea culpa
>
> What about “busy_timeout”? As I see from code it is also useless.
> It may require to delete some code more code.
It calls sqlite_busy_handler. Does this feature work?
>
> Moreover, last two arguments of index_list are still unused:
>
> 386 void
> 387 sql_pragma_index_list(struct Parse *parse, const char *tbl_name)
> 388 {
> ...
> 398 sqlite3VdbeMultiLoad(v, 1, "isisi", i, idx->def->name,
> 399 idx->def->opts.is_unique);
>
> Function expects 5 args (int-string-int-string-int), but only three are passed.
> Let’s remove them as well.
Fixed.
>
> Finally, consider comment from P. Gulutzan and my answer attached to ticket.
> In a nutshell, at least two points (except for notes above) should be fixed:
> a) Raise an error if index_list accepts name of unexisting index;
> b) Make sql_default_engine accept only string, not id.
Done.
>
> You may expand current patch into patch-set.
>
>> Closes #3733
>> ---
>> Branch: https://github.com/tarantool/tarantool/tree/stanztt/gh-3733-obsolete-pragmas
>> Issue: https://github.com/tarantool/tarantool/issues/3733
>>
>> src/box/sql/pragma.h | 10 ----------
>> src/box/sql/sqliteInt.h | 3 ---
>> 2 files changed, 13 deletions(-)
>>
>> diff --git a/src/box/sql/pragma.h b/src/box/sql/pragma.h
>> index e60801608..6b27f83c2 100644
>> --- a/src/box/sql/pragma.h
>> +++ b/src/box/sql/pragma.h
>> @@ -153,16 +153,6 @@ static const PragmaName aPragmaName[] = {
>> /* iArg: */ 0},
>> #endif
>> #if !defined(SQLITE_OMIT_FLAG_PRAGMAS)
>> - { /* zName: */ "query_only",
>> - /* ePragTyp: */ PragTyp_FLAG,
>> - /* ePragFlg: */ PragFlg_Result0 | PragFlg_NoColumns1,
>> - /* ColNames: */ 0, 0,
>> - /* iArg: */ SQLITE_QueryOnly},
>> - { /* zName: */ "read_uncommitted",
>> - /* ePragTyp: */ PragTyp_FLAG,
>> - /* ePragFlg: */ PragFlg_Result0 | PragFlg_NoColumns1,
>> - /* ColNames: */ 0, 0,
> Personally I would add very simple tests to make sure
> that these pragmas can’t be used anymore.
>
Agreed.
next prev parent reply other threads:[~2019-02-08 10:17 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-02-06 12:18 [tarantool-patches] " Stanislav Zudin
2019-02-06 13:21 ` [tarantool-patches] " n.pettik
2019-02-08 10:17 ` Stanislav Zudin [this message]
2019-02-08 14:03 ` n.pettik
2019-02-08 16:46 ` Stanislav Zudin
2019-02-10 22:54 ` n.pettik
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=cdb95b87-4b6a-f50b-dbd8-58fb5af116ac@tarantool.org \
--to=szudin@tarantool.org \
--cc=korablev@tarantool.org \
--cc=tarantool-patches@freelists.org \
--subject='[tarantool-patches] Re: [PATCH] sql: remove useless pragmas' \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox