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 25FE02791C for ; Thu, 19 Jul 2018 04:39:50 -0400 (EDT) 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 UpR7h4srqlzO for ; Thu, 19 Jul 2018 04:39:50 -0400 (EDT) Received: from smtp41.i.mail.ru (smtp41.i.mail.ru [94.100.177.101]) (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 D2CCE269EE for ; Thu, 19 Jul 2018 04:39:49 -0400 (EDT) Subject: [tarantool-patches] Re: [PATCH v1 3/3] sql: get rid of Column structure References: <72990d0ecbba60f0551c254eb33a3282b645cd5d.1531932662.git.kshcherbatov@tarantool.org> <4A0B514A-C0DA-406F-BD14-B1F11D4357EF@tarantool.org> <73ba298b-8546-6a67-1b6e-87d2b55a9d8a@tarantool.org> From: Vladislav Shpilevoy Message-ID: Date: Thu, 19 Jul 2018 11:39:46 +0300 MIME-Version: 1.0 In-Reply-To: <73ba298b-8546-6a67-1b6e-87d2b55a9d8a@tarantool.org> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit 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, Kirill Shcherbatov , Nikita Pettik > diff --git a/src/box/sql/select.c b/src/box/sql/select.c > index d577648..ab91bd0 100644 > --- a/src/box/sql/select.c > +++ b/src/box/sql/select.c > @@ -1962,12 +1962,8 @@ sqlite3SelectAddColumnTypeAndCollation(Parse * pParse, /* Parsing contexts */ > affinity = AFFINITY_BLOB; > pTab->def->fields[i].affinity = affinity; > bool unused; > - uint32_t id; > - struct coll *coll = sql_expr_coll(pParse, p, &unused, &id); > - if (coll != NULL && pTab->def->fields[i].coll == NULL) { > - pTab->def->fields[i].coll = coll; > - pTab->def->fields[i].coll_id = id; > - } > + (void)sql_expr_coll(pParse, p, &unused, > + &pTab->def->fields[i].coll_id); Now you have changed the behavior. Before this fix the collation was assigned once. Now it is assigned every time. > } > } >