From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from localhost (localhost [127.0.0.1]) by turing.freelists.org (Avenir Technologies Mail Multiplex) with ESMTP id 73AA527D83 for ; Wed, 27 Feb 2019 06:13:22 -0500 (EST) Received: from turing.freelists.org ([127.0.0.1]) by localhost (turing.freelists.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 8V65g2XqijFB for ; Wed, 27 Feb 2019 06:13:22 -0500 (EST) Received: from smtpng3.m.smailru.net (smtpng3.m.smailru.net [94.100.177.149]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by turing.freelists.org (Avenir Technologies Mail Multiplex) with ESMTPS id 2697923D48 for ; Wed, 27 Feb 2019 06:13:22 -0500 (EST) From: Kirill Shcherbatov Subject: [tarantool-patches] [PATCH v2 0/7] sql: store regular identifiers in case-normal form Date: Wed, 27 Feb 2019 14:13:11 +0300 Message-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 8bit Sender: tarantool-patches-bounce@freelists.org Errors-to: tarantool-patches-bounce@freelists.org Reply-To: tarantool-patches@freelists.org List-help: List-unsubscribe: List-software: Ecartis version 1.0.0 List-Id: tarantool-patches List-subscribe: List-owner: List-post: List-archive: To: tarantool-patches@freelists.org, v.shpilevoy@tarantool.org Cc: Kirill Shcherbatov 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. Changes in version 2: - Setup parser error externally Branch: http://github.com/tarantool/tarantool/tree/kshch/gh-3991-fix-names-normalization Issue: https://github.com/tarantool/tarantool/issues/3931 Kirill Shcherbatov (7): sql: refactor sql_alloc_src_list to set diag sql: rework sql_src_list_enlarge to set diag sql: refactor sql_src_list_append to set diag sql: refactor sql_name_from_token to set diag sql: refactor sql_trigger_step_allocate to set diag sql: refactor sql_expr_create to set diag sql: store regular identifiers in case-normal form src/box/lua/lua_sql.c | 11 +- src/box/sql/alter.c | 8 +- src/box/sql/analyze.c | 47 +-- src/box/sql/build.c | 517 +++++++++++++------------- src/box/sql/delete.c | 14 +- src/box/sql/expr.c | 300 +++++++-------- src/box/sql/fk_constraint.c | 202 ++++++---- src/box/sql/parse.y | 130 +++++-- src/box/sql/pragma.c | 24 +- src/box/sql/resolve.c | 47 ++- src/box/sql/select.c | 146 +++++--- src/box/sql/sqlInt.h | 301 ++++++++++++++- src/box/sql/trigger.c | 210 +++++------ src/box/sql/util.c | 42 ++- src/box/sql/wherecode.c | 9 +- src/box/sql/whereexpr.c | 22 +- test/sql-tap/identifier_case.test.lua | 12 +- 17 files changed, 1240 insertions(+), 802 deletions(-) -- 2.20.1