mirror of
https://github.com/MariaDB/server.git
synced 2025-07-29 05:21:33 +03:00
SQL: TRUNCATE FOR SYSTEM_TIME BEFORE [closes #111]
This commit is contained in:
@ -283,11 +283,16 @@ bool mysql_delete(THD *thd, TABLE_LIST *table_list, COND *conds,
|
||||
DBUG_RETURN(TRUE);
|
||||
|
||||
// trx_sees() in InnoDB reads sys_trx_start
|
||||
if (!table->versioned_by_sql() &&
|
||||
(select_lex->vers_conditions.type == FOR_SYSTEM_TIME_BETWEEN ||
|
||||
select_lex->vers_conditions.type == FOR_SYSTEM_TIME_FROM_TO))
|
||||
{
|
||||
bitmap_set_bit(table->read_set, table->vers_start_field()->field_index);
|
||||
if (!table->versioned_by_sql()) {
|
||||
if (select_lex->vers_conditions.type == FOR_SYSTEM_TIME_BETWEEN ||
|
||||
select_lex->vers_conditions.type == FOR_SYSTEM_TIME_FROM_TO)
|
||||
{
|
||||
bitmap_set_bit(table->read_set, table->vers_start_field()->field_index);
|
||||
}
|
||||
else if (select_lex->vers_conditions.type == FOR_SYSTEM_TIME_BEFORE)
|
||||
{
|
||||
bitmap_set_bit(table->read_set, table->vers_end_field()->field_index);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user