From: Vladislav Shpilevoy <v.shpilevoy@tarantool.org> To: tarantool-patches@freelists.org, Kirill Shcherbatov <kshcherbatov@tarantool.org> Subject: [tarantool-patches] Re: [PATCH v1 0/4] sql: store regular identifiers in case-normal form Date: Fri, 22 Feb 2019 15:20:25 +0300 [thread overview] Message-ID: <d1588da2-f1ef-fe84-597d-090a2987f68e@tarantool.org> (raw) In-Reply-To: <cover.1550237391.git.kshcherbatov@tarantool.org> Hi! Thanks for the patch! On 15/02/2019 16:30, Kirill Shcherbatov wrote: > Perform SQL name normalization: cast name to the upper-case > (via Unicode Character Folding). Casing is locale-dependent > and context-sensitive. The result may be longer or shorter > than the original. For example, ß is converted to SS. > The result is similar to SQL UPPER function. > > Performed extensive code refactoring to pass parser instance in > routines that use sql_normalize_name function. This makes > possible to raise an error in case of normalizing failure. > > Branch: http://github.com/tarantool/tarantool/tree/kshch/gh-3991-fix-names-normalization > Issue: https://github.com/tarantool/tarantool/issues/3991 Issue 3991 is about vshard integration. Please, check your links next time. The correct issue is 3931, as I understand. Talking about the patchset - I do not understand a point of the first 3 patches. I see, that the only reason why you pass the parser is a wish to set nErr. Why instead not to just do diag_set, return -1, and check for that in all upper functions, until parser is already in one of them? This how all box functions work with SQL right now - they do not take Vdbe, nor Parse. They just set diag and return -1. Our global goal is to get rid of parser nErr, not spread it more. Please, do it. > > Kirill Shcherbatov (4): > sql: patch sql_name_from_token to use Parser > sql: patch sql_trigger_step_allocate to use Parser > sql: patch sql_expr_create routine to use Parser > sql: store regular identifiers in case-normal form > > src/box/lua/lua_sql.c | 11 +- > src/box/sql/alter.c | 2 +- > src/box/sql/analyze.c | 2 +- > src/box/sql/build.c | 212 +++++++++------------ > src/box/sql/delete.c | 2 +- > src/box/sql/expr.c | 256 ++++++++++++-------------- > src/box/sql/fkey.c | 128 +++++++------ > src/box/sql/parse.y | 60 +++--- > src/box/sql/pragma.c | 11 +- > src/box/sql/resolve.c | 41 ++--- > src/box/sql/select.c | 70 ++++--- > src/box/sql/sqlInt.h | 255 +++++++++++++++++++++++-- > src/box/sql/trigger.c | 201 +++++++++----------- > src/box/sql/util.c | 42 +++-- > src/box/sql/wherecode.c | 3 +- > src/box/sql/whereexpr.c | 10 +- > test/sql-tap/identifier_case.test.lua | 12 +- > 17 files changed, 753 insertions(+), 565 deletions(-) > > -- > 2.20.1 > >
next prev parent reply other threads:[~2019-02-22 12:20 UTC|newest] Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top 2019-02-15 13:30 [tarantool-patches] " Kirill Shcherbatov 2019-02-15 13:30 ` [tarantool-patches] [PATCH v1 1/4] sql: patch sql_name_from_token to use Parser Kirill Shcherbatov 2019-02-15 13:30 ` [tarantool-patches] [PATCH v1 2/4] sql: patch sql_trigger_step_allocate " Kirill Shcherbatov 2019-02-15 13:30 ` [tarantool-patches] [PATCH v1 3/4] sql: patch sql_expr_create routine " Kirill Shcherbatov 2019-02-15 13:30 ` [tarantool-patches] [PATCH v1 4/4] sql: store regular identifiers in case-normal form Kirill Shcherbatov 2019-02-22 12:20 ` Vladislav Shpilevoy [this message] 2019-02-22 12:38 ` [tarantool-patches] Re: [PATCH v1 0/4] " Kirill Shcherbatov 2019-02-22 12:43 ` Vladislav Shpilevoy
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=d1588da2-f1ef-fe84-597d-090a2987f68e@tarantool.org \ --to=v.shpilevoy@tarantool.org \ --cc=kshcherbatov@tarantool.org \ --cc=tarantool-patches@freelists.org \ --subject='[tarantool-patches] Re: [PATCH v1 0/4] sql: store regular identifiers in case-normal form' \ /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