mirror of
https://github.com/MariaDB/server.git
synced 2025-07-30 16:24:05 +03:00
Timestamp-based versioning for InnoDB [closes #209]
* Removed integer_fields check * Reworked Vers_parse_info::check_sys_fields() * Misc renames * versioned as vers_sys_type_t * Removed versioned_by_sql(), versioned_by_engine() versioned() works as before; versioned(VERS_TIMESTAMP) is versioned_by_sql(); versioned(VERS_TRX_ID) is versioned_by_engine(). * create_tmp_table() fix * Foreign constraints for timestamp-based * Range auto-specifier fix * SQL: 1-row partition rotation fix [fixes #260] * Fix 'drop system versioning, algorithm=inplace'
This commit is contained in:
@ -930,7 +930,7 @@ update_begin:
|
||||
|
||||
if (has_vers_fields && table->versioned())
|
||||
{
|
||||
if (table->versioned_by_sql())
|
||||
if (table->versioned(VERS_TIMESTAMP))
|
||||
{
|
||||
store_record(table, record[2]);
|
||||
if ((error = vers_insert_history_row(table)))
|
||||
@ -1119,7 +1119,7 @@ update_end:
|
||||
errcode= query_error_code(thd, killed_status == NOT_KILLED);
|
||||
|
||||
ScopedStatementReplication scoped_stmt_rpl(
|
||||
table->versioned_by_engine() ? thd : NULL);
|
||||
table->versioned(VERS_TRX_ID) ? thd : NULL);
|
||||
|
||||
if (thd->binlog_query(THD::ROW_QUERY_TYPE,
|
||||
thd->query(), thd->query_length(),
|
||||
@ -1145,7 +1145,7 @@ update_end:
|
||||
if (error < 0 && !thd->lex->analyze_stmt)
|
||||
{
|
||||
char buff[MYSQL_ERRMSG_SIZE];
|
||||
if (!table->versioned_by_sql())
|
||||
if (!table->versioned(VERS_TIMESTAMP))
|
||||
my_snprintf(buff, sizeof(buff), ER_THD(thd, ER_UPDATE_INFO), (ulong) found,
|
||||
(ulong) updated,
|
||||
(ulong) thd->get_stmt_da()->current_statement_warn_count());
|
||||
@ -2330,7 +2330,7 @@ int multi_update::send_data(List<Item> ¬_used_values)
|
||||
}
|
||||
else if (has_vers_fields && table->versioned())
|
||||
{
|
||||
if (table->versioned_by_sql())
|
||||
if (table->versioned(VERS_TIMESTAMP))
|
||||
{
|
||||
store_record(table, record[2]);
|
||||
if (vers_insert_history_row(table))
|
||||
@ -2655,7 +2655,7 @@ int multi_update::do_updates()
|
||||
|
||||
if (has_vers_fields && table->versioned())
|
||||
{
|
||||
if (table->versioned_by_sql())
|
||||
if (table->versioned(VERS_TIMESTAMP))
|
||||
{
|
||||
store_record(table, record[2]);
|
||||
if ((local_error= vers_insert_history_row(table)))
|
||||
@ -2788,7 +2788,7 @@ bool multi_update::send_eof()
|
||||
bool force_stmt= false;
|
||||
for (TABLE *table= all_tables->table; table; table= table->next)
|
||||
{
|
||||
if (table->versioned_by_engine())
|
||||
if (table->versioned(VERS_TRX_ID))
|
||||
{
|
||||
force_stmt= true;
|
||||
break;
|
||||
|
Reference in New Issue
Block a user