1
0
mirror of https://github.com/MariaDB/server.git synced 2025-07-30 16:24:05 +03:00

MDEV-16973 Application-time periods: DELETE

* inject portion of time updates into mysql_delete main loop
* triggered case emits delete+insert, no updates
* PORTION OF `SYSTEM_TIME` is forbidden
* `DELETE HISTORY .. FOR PORTION OF ...` is forbidden as well
This commit is contained in:
Nikita Malyavin
2019-02-04 09:37:58 +10:00
committed by Sergei Golubchik
parent 073c93b194
commit 47e28a94d5
15 changed files with 1048 additions and 128 deletions

View File

@ -766,6 +766,7 @@ void LEX::start(THD *thd_arg)
win_spec= NULL;
vers_conditions.empty();
period_conditions.empty();
is_lex_started= TRUE;
@ -3606,6 +3607,19 @@ void LEX::set_trg_event_type_for_tables()
break;
}
if (period_conditions.is_set())
{
switch (sql_command)
{
case SQLCOM_DELETE:
case SQLCOM_UPDATE:
case SQLCOM_REPLACE:
new_trg_event_map |= trg2bit(TRG_EVENT_INSERT);
default:
break;
}
}
/*
Do not iterate over sub-selects, only the tables in the outermost