Commit 8246b0ac authored by Sergei Golubchik's avatar Sergei Golubchik

cleanup: TABLE::non_determinstic_insert

move the check where it make sense, remove incorrect comment
parent 6c4144a4
......@@ -1073,6 +1073,8 @@ bool parse_vcol_defs(THD *thd, MEM_ROOT *mem_root, TABLE *table,
&((*field_ptr)->default_value),
error_reported);
*(dfield_ptr++)= *field_ptr;
if (vcol && (vcol->flags & (VCOL_NON_DETERMINISTIC | VCOL_SESSION_FUNC)))
table->s->non_determinstic_insert= true;
break;
case VCOL_CHECK_FIELD:
vcol= unpack_vcol_info_from_frm(thd, mem_root, table, &expr_str,
......@@ -2761,12 +2763,6 @@ bool fix_session_vcol_expr_for_read(THD *thd, Field *field,
the virtual column vcol_field. The expression is used to compute the
values of this column.
@note
If the virtual column has stored_in_db set and it uses non deterministic
function then table->non_determinstic_insert is set.
This is used in replication to ensure that row based replication is used
for inserts.
@retval
TRUE An error occurred, something was wrong with the function
@retval
......@@ -2816,13 +2812,6 @@ static bool fix_and_check_vcol_expr(THD *thd, TABLE *table,
}
vcol->flags= res.errors;
/*
Mark what kind of default / virtual fields the table has
*/
if (vcol->stored_in_db &&
vcol->flags & (VCOL_NON_DETERMINISTIC | VCOL_SESSION_FUNC))
table->s->non_determinstic_insert= true;
if (vcol->flags & VCOL_SESSION_FUNC)
table->s->vcols_need_refixing= true;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment