From: "n.pettik" <korablev@tarantool.org> To: tarantool-patches@freelists.org Cc: Kirill Shcherbatov <kshcherbatov@tarantool.org> Subject: [tarantool-patches] Re: [PATCH v1 1/3] sql: restrict nullable action definitions Date: Fri, 20 Jul 2018 05:39:48 +0300 [thread overview] Message-ID: <185A42F6-2824-47BE-A521-147C8D22F944@tarantool.org> (raw) In-Reply-To: <972c8144-0f4c-c882-3ab9-4a50cbaf43c6@tarantool.org> >> Why do you need on_conflict_action_MAX when you already have ON_CONFLICT_ACTION_DEFAULT? >> Anyway, there is no action DEFAULT, it is sooner or later converted to ABORT. > This is the central idea of the patch. on_conflict_action_MAX is a marker that this field wasn't > initialized yet manually. This allows to detect second attempt to specify NULL/NOT NULL etc. > There is a comment about this concept in sqlite3AddColumn where on_conflict_action_MAX is set. > The default behavior is ON_CONFLICT_ACTION_NONE and we have to distinguish non-initialized > columns and initialized with ON_CONFLICT_ACTION_DEFAULT. Well, it seems to be total mess. DEFAULT (for nullable on conflict action) is always converted into ABORT. If you move this conversation right after parser’s pass, you can get rid off using additional enum value: create table t1(a NULL PRIMARY KEY NOT NULL , b); a == DEFAULT —> NONE —> ABORT b == DEFAULT —> NONE >> Could we avoid using iPKey in this function? We are going to remove it soon. > I don't increase a complexity here and believe that is patch is not about to suggest a way to exclude iPkey. > No idea. Nevermind, Kirill already reworked this function in order to avoid using iPKey.
next prev parent reply other threads:[~2018-07-20 2:39 UTC|newest] Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top 2018-07-18 16:52 [tarantool-patches] [PATCH v1 0/3] " Kirill Shcherbatov 2018-07-18 16:52 ` [tarantool-patches] [PATCH v1 1/3] " Kirill Shcherbatov 2018-07-18 20:12 ` [tarantool-patches] " n.pettik 2018-07-19 8:12 ` Kirill Shcherbatov 2018-07-20 2:39 ` n.pettik [this message] 2018-07-20 7:29 ` Kirill Shcherbatov 2018-07-23 8:31 ` Kirill Shcherbatov 2018-07-23 16:53 ` Kirill Shcherbatov 2018-07-23 19:27 ` n.pettik 2018-07-18 16:52 ` [tarantool-patches] [PATCH v1 2/3] sql: fixed possible leak in sqlite3EndTable Kirill Shcherbatov 2018-07-18 20:12 ` [tarantool-patches] " n.pettik 2018-07-18 16:52 ` [tarantool-patches] [PATCH v1 3/3] sql: get rid of Column structure Kirill Shcherbatov 2018-07-18 20:13 ` [tarantool-patches] " n.pettik 2018-07-19 8:12 ` Kirill Shcherbatov 2018-07-19 8:39 ` Vladislav Shpilevoy 2018-07-19 10:17 ` Kirill Shcherbatov 2018-07-20 2:43 ` n.pettik 2018-07-24 15:26 ` [tarantool-patches] Re: [PATCH v1 0/3] sql: restrict nullable action definitions Kirill Yukhin
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=185A42F6-2824-47BE-A521-147C8D22F944@tarantool.org \ --to=korablev@tarantool.org \ --cc=kshcherbatov@tarantool.org \ --cc=tarantool-patches@freelists.org \ --subject='[tarantool-patches] Re: [PATCH v1 1/3] sql: restrict nullable action definitions' \ /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