Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Move SQL TRIGGERs into server #3273

Closed
Gerold103 opened this issue Mar 22, 2018 · 1 comment
Closed

Move SQL TRIGGERs into server #3273

Gerold103 opened this issue Mar 22, 2018 · 1 comment
Assignees
Labels
Milestone

Comments

@Gerold103
Copy link
Collaborator

Move SQL triggers into Tarantool's struct space.

@Gerold103
Copy link
Collaborator Author

Part of #2217.

@kyukhin kyukhin added this to the 2.1.0 milestone Mar 26, 2018
@Gerold103 Gerold103 assigned kshcherbatov and unassigned Gerold103 May 18, 2018
kshcherbatov added a commit that referenced this issue May 31, 2018
As we are going to call parser on box.cfg() to recreate triggers
from SQL, we should initialize Schema as it used in sqlite3BeginTrigger.

Part of #3273.
kshcherbatov added a commit that referenced this issue May 31, 2018
kshcherbatov added a commit that referenced this issue May 31, 2018
Introduced sql_triggers field in space structure.
Changed parser logic to do not insert builded triggers, just only
to do parsing. All triggers insertions and deletions are operated
via on_replace_dd_trigger now.

Resolves #3273.
kshcherbatov added a commit that referenced this issue May 31, 2018
As we are going to call parser on box.cfg() to recreate triggers
from SQL, we should initialize Schema as it used in sqlite3BeginTrigger.

Part of #3273.
kshcherbatov added a commit that referenced this issue May 31, 2018
kshcherbatov added a commit that referenced this issue May 31, 2018
Introduced sql_triggers field in space structure.
Changed parser logic to do not insert builded triggers, just only
to do parsing. All triggers insertions and deletions are operated
via on_replace_dd_trigger now.

Resolves #3273.
kshcherbatov added a commit that referenced this issue May 31, 2018
Introduced sql_triggers field in space structure.
Changed parser logic to do not insert builded triggers, just only
to do parsing. All triggers insertions and deletions are operated
via on_replace_dd_trigger now.

Resolves #3273.
kshcherbatov added a commit that referenced this issue Jun 1, 2018
As we are going to call parser on box.cfg() to recreate triggers
from SQL, we should initialize Schema as it used in sqlite3BeginTrigger.

Part of #3273.
kshcherbatov added a commit that referenced this issue Jun 1, 2018
kshcherbatov added a commit that referenced this issue Jun 1, 2018
kshcherbatov added a commit that referenced this issue Jun 1, 2018
kshcherbatov added a commit that referenced this issue Jun 1, 2018
Introduced sql_triggers field in space structure.
Changed parser logic to do not insert built triggers, just only
to do parsing. All triggers insertions and deletions are operated
via on_replace_dd_trigger now.

Resolves #3273.
kshcherbatov added a commit that referenced this issue Jun 1, 2018
Introduced sql_triggers field in space structure.
Changed parser logic to do not insert built triggers, just only
to do parsing. All triggers insertions and deletions are operated
via on_replace_dd_trigger now.

Resolves #3273.
kshcherbatov added a commit that referenced this issue Jun 4, 2018
Introduced sql_triggers field in space structure.
Changed parser logic to do not insert built triggers, just only
to do parsing. All triggers insertions and deletions are operated
via on_replace_dd_trigger now.

Resolves #3273.
kshcherbatov added a commit that referenced this issue Jun 4, 2018
As we are going to call parser on box.cfg() to recreate triggers
from SQL, we should initialize Schema as it used in sqlite3BeginTrigger.

Part of #3273.
kshcherbatov added a commit that referenced this issue Jun 4, 2018
kshcherbatov added a commit that referenced this issue Jun 4, 2018
kshcherbatov added a commit that referenced this issue Jun 4, 2018
kshcherbatov added a commit that referenced this issue Jun 4, 2018
Introduced sql_triggers field in space structure.
Changed parser logic to do not insert built triggers, just only
to do parsing. All triggers insertions and deletions are operated
via on_replace_dd_trigger now.

Resolves #3273.
kshcherbatov added a commit that referenced this issue Jun 26, 2018
As new _trigger format contain space_id, we can do not
store AST pointers in HASH. Requested AST could be found
by name in appropriate space.

Part of #3273.
kshcherbatov added a commit that referenced this issue Jun 27, 2018
As we are going to port triggers to server, we need
an instrument to release allocated memory in alter.cc.

Part of #3273.
kshcherbatov added a commit that referenced this issue Jun 27, 2018
As we would like to lookup triggers by space_id in future
on space deletion to delete associated _trigger tuples we
need to introduce new field space_id as secondary key.

Part of #3273.
kshcherbatov added a commit that referenced this issue Jun 27, 2018
Introduced sql_triggers field in space structure.
Changed parser logic to do not insert built triggers, just only
to do parsing. All triggers insertions and deletions are operated
via on_replace_dd_trigger now.
Global DB hash has been kept as we still ned to get Trigger AST
by name on trigger deletion.

Resolves #3273.
kshcherbatov added a commit that referenced this issue Jun 27, 2018
kshcherbatov added a commit that referenced this issue Jun 27, 2018
Trigger presence in system should be tested on each VDBE
execution attempt, not on Parser iteration as system state
could be changed between opcode run.
With this patch, such checks are the part of VDBE program
looking to the _trigger space and raise error message if
tuple with specified key already exists.

Part of #3435, #3273
kshcherbatov added a commit that referenced this issue Jun 27, 2018
As new _trigger format contain space_id, we can do not
store AST pointers in HASH. Requested AST could be found
by name in appropriate space.

Part of #3273.
kshcherbatov added a commit that referenced this issue Jun 27, 2018
Changed Trigger structure name to sql trigger to avoid
confusing similarity with Tarantool trigger structure.
Refactored related code to match tarantool codestyle.

Part of #3273.
kshcherbatov added a commit that referenced this issue Jun 27, 2018
Trigger presence in system should be tested on each VDBE
execution attempt, not on Parser iteration as system state
could be changed between opcode run.
With this patch, such checks are the part of VDBE program
looking to the _trigger space and raise error message if
tuple with specified key already exists.

Part of #3435, #3273
kshcherbatov added a commit that referenced this issue Jun 27, 2018
As new _trigger format contain space_id, we can do not
store AST pointers in HASH. Requested AST could be found
by name in appropriate space.

Part of #3273.
kshcherbatov added a commit that referenced this issue Jun 27, 2018
Changed Trigger structure name to sql trigger to avoid
confusing similarity with Tarantool trigger structure.
Refactored related code to match tarantool codestyle.

Part of #3273.
kshcherbatov added a commit that referenced this issue Jun 27, 2018
Trigger presence in system should be tested on each VDBE
execution attempt, not on Parser iteration as system state
could be changed between opcode run.
With this patch, such checks are the part of VDBE program
looking to the _trigger space and raise error message if
tuple with specified key already exists.

Part of #3435, #3273
kshcherbatov added a commit that referenced this issue Jun 27, 2018
As new _trigger format contains space_id, we can avoid
storing AST pointers in HASH. Requested AST could be found
by name in appropriate space.

Part of #3273.
kshcherbatov added a commit that referenced this issue Jun 28, 2018
Introduced sql_triggers field in space structure.
Changed parser logic to do not insert built triggers, just only
to do parsing. All triggers insertions and deletions are operated
via on_replace_dd_trigger now.
Global DB hash has been kept as we still ned to get Trigger AST
by name on trigger deletion.

Resolves #3273.
kshcherbatov added a commit that referenced this issue Jun 28, 2018
Changed Trigger structure name to sql trigger to avoid
confusing similarity with Tarantool trigger structure.
Refactored related code to match tarantool codestyle.

Part of #3273.
kshcherbatov added a commit that referenced this issue Jun 28, 2018
Trigger presence in system should be tested on each VDBE
execution attempt, not on Parser iteration as system state
could be changed between opcode run.
With this patch, such checks are the part of VDBE program
looking to the _trigger space and raise error message if
tuple with specified key already exists.

Part of #3435, #3273
kshcherbatov added a commit that referenced this issue Jun 28, 2018
As new _trigger format contains space_id, we can avoid
storing AST pointers in HASH. Requested AST could be found
by name in appropriate space.

Part of #3273.
kshcherbatov added a commit that referenced this issue Jun 29, 2018
As we are going to port triggers to server, we need
an instrument to release allocated memory in alter.cc.

Part of #3273.
kshcherbatov added a commit that referenced this issue Jun 29, 2018
As we would like to lookup triggers by space_id in future
on space deletion to delete associated _trigger tuples we
need to introduce new field space_id as secondary key.

Part of #3273.
kshcherbatov added a commit that referenced this issue Jun 29, 2018
Introduced sql_triggers field in space structure.
Changed parser logic to do not insert built triggers, just only
to do parsing. All triggers insertions and deletions are operated
via on_replace_dd_trigger now.
Global DB hash has been kept as we still ned to get Trigger AST
by name on trigger deletion.

Resolves #3273.
kshcherbatov added a commit that referenced this issue Jun 29, 2018
Changed Trigger structure name to sql trigger to avoid
confusing similarity with Tarantool trigger structure.
Refactored related code to match tarantool codestyle.

Part of #3273.
kshcherbatov added a commit that referenced this issue Jun 29, 2018
Trigger presence in system should be tested on each VDBE
execution attempt, not on Parser iteration as system state
could be changed between opcode run.
With this patch, such checks are the part of VDBE program
looking to the _trigger space and raise error message if
tuple with specified key already exists.

Part of #3435, #3273
kshcherbatov added a commit that referenced this issue Jun 29, 2018
As new _trigger format contains space_id, we can avoid
storing AST pointers in HASH. Requested AST could be found
by name in appropriate space.

Part of #3273.
kyukhin pushed a commit that referenced this issue Jun 29, 2018
As we are going to port triggers to server, we need
an instrument to release allocated memory in alter.cc.

Part of #3273.
kyukhin pushed a commit that referenced this issue Jun 29, 2018
As we would like to lookup triggers by space_id in future
on space deletion to delete associated _trigger tuples we
need to introduce new field space_id as secondary key.

Part of #3273.
kyukhin pushed a commit that referenced this issue Jun 29, 2018
Changed Trigger structure name to sql trigger to avoid
confusing similarity with Tarantool trigger structure.
Refactored related code to match tarantool codestyle.

Part of #3273.
kyukhin pushed a commit that referenced this issue Jun 29, 2018
Trigger presence in system should be tested on each VDBE
execution attempt, not on Parser iteration as system state
could be changed between opcode run.
With this patch, such checks are the part of VDBE program
looking to the _trigger space and raise error message if
tuple with specified key already exists.

Part of #3435, #3273
kyukhin pushed a commit that referenced this issue Jun 29, 2018
As new _trigger format contains space_id, we can avoid
storing AST pointers in HASH. Requested AST could be found
by name in appropriate space.

Part of #3273.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants