<HTML><BODY><p style='margin-top: 0px;' dir="ltr">;<br>
> + if (sql_bind_decode(&bind, i + 1, &new_tuple) != 0 ||<br>
> +     sql_bind_column(ck_constraint->stmt, &bind, i + 1) != 0) {<br>
> + diag_set(ClientError, ER_CK_CONSTRAINT_FAILED,<br>
> +  ck_constraint->def->name,<br>
> +  ck_constraint->def->expr_str);<br>
> + return -1;<br>
>This looks like a pessimization to me. Depending on the >code flow,<br>
>some of the tuple fields may not be accessed at all. Is it >really<br>
>necessary to decode them so agressibvely here? <br>
>Especially since<br>
>you encode *all* space fields.</p>
<p dir="ltr">I'll try to walk though the AST tree and prepare the map of fields that are involved in expression (on check compile operation);<br>
Here there would be binding of **used** fields.</p>
<p dir="ltr">What do you think?</p>
<p dir="ltr">-- <br>
Konstantin Osipov, Moscow, Russia, +7 903 626 22 32</p>
</BODY></HTML>