From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: From: Roman Khabibov Subject: [PATCH 1/3 v2] sql: store CHAR|VARCHAR len as integer, not type_def Date: Wed, 5 Dec 2018 02:47:28 +0300 Message-Id: <7c0ef3cc962ce5724485b18c0da014625920bf3e.1543941445.git.roman.habibov@tarantool.org> In-Reply-To: References: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit To: tarantool-patches@freelists.org Cc: vdavydov.dev@gmail.com, Vladislav Shpilevoy List-ID: From: Vladislav Shpilevoy Length is just an integer, part of a type, not a whole type. --- src/box/sql/parse.y | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/box/sql/parse.y b/src/box/sql/parse.y index 6dfc81f70..5f64bfe8c 100644 --- a/src/box/sql/parse.y +++ b/src/box/sql/parse.y @@ -1485,13 +1485,13 @@ typedef(A) ::= DATE . { A.type = AFFINITY_REAL; } typedef(A) ::= TIME . { A.type = AFFINITY_REAL; } typedef(A) ::= DATETIME . { A.type = AFFINITY_REAL; } -%type char_len_typedef {struct type_def} -typedef(A) ::= CHAR|VARCHAR char_len_typedef(B) . { +%type char_len {int} +typedef(A) ::= CHAR|VARCHAR char_len(B) . { A.type = AFFINITY_TEXT; (void) B; } -char_len_typedef(A) ::= LP INTEGER(B) RP . { +char_len(A) ::= LP INTEGER(B) RP . { (void) A; (void) B; } -- 2.19.1