Skip to content
Snippets Groups Projects
Commit b9c9792d authored by Kirill Yukhin's avatar Kirill Yukhin
Browse files

sql: move default col values to Tarantool's core

Extract expressions parsing into separate routine to
allow Tarantool's backend compile DEFAULT statements w/o
SQL machinery at all. So far, for DEFAULT values no context
is needed: only constant expressions and built-ins are allowed.
In future, table context will be added to allow use column
values for CHECK constraint expressions.

Move DEFAULT string value to space_def. Move compiled expresion
to field_def as well. Reason not to move compiled expression
to tuple_field as follows: we do not want to engage parser
during tuple validation. So, do it in alter.cc.

In order to allow expression duplication in alter.cc: expose
those routines from expr.c and make their names correspond to
coding style.

Since recovery is performed before SQL fronend initialization:
split it into two pieces: 1. create SQL handler, enable
all subsystems 2. Do recovery.  This will allow to run
parser during recovery, since it needs db handle so far.

Part of #3235
parent 11404909
No related branches found
No related tags found
Loading
Showing with 872 additions and 626 deletions
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment