Tarantool development patches archive
 help / color / mirror / Atom feed
From: Kirill Shcherbatov <kshcherbatov@tarantool.org>
To: tarantool-patches@freelists.org,
	Vladislav Shpilevoy <v.shpilevoy@tarantool.org>,
	Nikita Pettik <korablev@tarantool.org>
Subject: [tarantool-patches] Re: [PATCH v1 3/3] sql: get rid of Column structure
Date: Thu, 19 Jul 2018 13:17:03 +0300	[thread overview]
Message-ID: <b3fd0682-dd6c-457b-c1f7-23eadaa88cfb@tarantool.org> (raw)
In-Reply-To: <b6d27b55-0126-7011-231c-39f3cd206837@tarantool.org>

> Now you have changed the behavior. Before this fix the collation was
> assigned once. Now it is assigned every time.
hi! Thank you for lookup. You right: columns could have default collation that could be 
overwritten with specified one. 
I've returned old semantics.

CREATE TABLE t3(x TEXT PRIMARY KEY COLLATE "unicode_ci");
SELECT b FROM t4 UNION SELECT b FROM v4 ORDER BY 1 COLLATE text;

-               bool unused;
-               uint32_t id;
-               struct coll *coll = sql_expr_coll(pParse, p, &unused, &id);
-               if (coll != NULL && pCol->coll == NULL) {
-                       pCol->coll = coll;
-                       pTab->def->fields[i].coll_id = id;
-               }
+               bool is_found;
+               uint32_t coll_id;
+               if (pTab->def->fields[i].coll_id == COLL_NONE &&
+                   sql_expr_coll(pParse, p, &is_found, &coll_id) && is_found)
+                       pTab->def->fields[i].coll_id = coll_id;

  reply	other threads:[~2018-07-19 10:17 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] sql: restrict nullable action definitions 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
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 [this message]
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=b3fd0682-dd6c-457b-c1f7-23eadaa88cfb@tarantool.org \
    --to=kshcherbatov@tarantool.org \
    --cc=korablev@tarantool.org \
    --cc=tarantool-patches@freelists.org \
    --cc=v.shpilevoy@tarantool.org \
    --subject='[tarantool-patches] Re: [PATCH v1 3/3] sql: get rid of Column structure' \
    /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