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

  • From: "n.pettik" <korablev@xxxxxxxxxxxxx>
  • To: tarantool-patches@xxxxxxxxxxxxx
  • Date: Wed, 18 Jul 2018 23:13:00 +0300

Again: why did this patch trapped in patch-set? All three patches seem to be 
independent.

On 18 Jul 2018, at 19:52, Kirill Shcherbatov <kshcherbatov@xxxxxxxxxxxxx> 
wrote:

Get rid of is_primkey in Column structure as it become

Typo: ‘becomes’.

redundant. Moved the last member coll with collation pointer
to field_def structure.

Why do you need to move collation ptr to field_def? It already features 
collation id,
so you can always get pointer to it by simple lookup. It would make sense if it 
was
utilised everywhere. But I see assignment only in 
sqlite3SelectAddColumnTypeAndCollation()
and no real usages..Lets remove it at all.

@@ -1692,22 +1680,9 @@ sqlite3EndTable(Parse * pParse,        /* Parse 
context */
              }
      }

-     /* Set default on_nullable action if required. */
-     struct field_def *field = p->def->fields;
-     for (uint32_t i = 0; i < p->def->field_count; ++i, ++field) {
-             if (field->nullable_action == on_conflict_action_MAX) {
-                     field->nullable_action = ON_CONFLICT_ACTION_NONE;
-                     field->is_nullable = true;
-             }
-     }
-
-     if (check_on_conflict_replace_entries(p)) {
-             sqlite3ErrorMsg(pParse,
-                             "only PRIMARY KEY constraint can "
-                             "have ON CONFLICT REPLACE clause "
-                             "- %s", p->def->name);

Here you are simply fixing changes made in first patch, so mb it is better to
move them to first patch?



Other related posts: