[tarantool-patches] Re: [PATCH v1 3/3] sql: get rid of Column structure
Kirill Shcherbatov
kshcherbatov at tarantool.org
Thu Jul 19 13:17:03 MSK 2018
> 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;
More information about the Tarantool-patches
mailing list