[tarantool-patches] Re: [PATCH v1 3/3] sql: get rid of Column structure

  • From: Vladislav Shpilevoy <v.shpilevoy@xxxxxxxxxxxxx>
  • To: tarantool-patches@xxxxxxxxxxxxx, Kirill Shcherbatov <kshcherbatov@xxxxxxxxxxxxx>, Nikita Pettik <korablev@xxxxxxxxxxxxx>
  • Date: Thu, 19 Jul 2018 11:39:46 +0300


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.

        }
  }

Other related posts: