mirror of
https://github.com/MariaDB/server.git
synced 2025-07-29 05:21:33 +03:00
Merge branch '10.2' of github.com:MariaDB/server into bb-10.2-mariarocks
This commit is contained in:
@ -2580,7 +2580,7 @@ int handler::ha_rnd_next(uchar *buf)
|
||||
{
|
||||
update_rows_read();
|
||||
if (table->vfield && buf == table->record[0])
|
||||
table->update_virtual_fields(VCOL_UPDATE_FOR_READ);
|
||||
table->update_virtual_fields(this, VCOL_UPDATE_FOR_READ);
|
||||
increment_statistics(&SSV::ha_read_rnd_next_count);
|
||||
}
|
||||
else if (result == HA_ERR_RECORD_DELETED)
|
||||
@ -2608,7 +2608,7 @@ int handler::ha_rnd_pos(uchar *buf, uchar *pos)
|
||||
{
|
||||
update_rows_read();
|
||||
if (table->vfield && buf == table->record[0])
|
||||
table->update_virtual_fields(VCOL_UPDATE_FOR_READ);
|
||||
table->update_virtual_fields(this, VCOL_UPDATE_FOR_READ);
|
||||
}
|
||||
table->status=result ? STATUS_NOT_FOUND: 0;
|
||||
DBUG_RETURN(result);
|
||||
@ -2631,7 +2631,7 @@ int handler::ha_index_read_map(uchar *buf, const uchar *key,
|
||||
{
|
||||
update_index_statistics();
|
||||
if (table->vfield && buf == table->record[0])
|
||||
table->update_virtual_fields(VCOL_UPDATE_FOR_READ);
|
||||
table->update_virtual_fields(this, VCOL_UPDATE_FOR_READ);
|
||||
}
|
||||
table->status=result ? STATUS_NOT_FOUND: 0;
|
||||
DBUG_RETURN(result);
|
||||
@ -2660,7 +2660,7 @@ int handler::ha_index_read_idx_map(uchar *buf, uint index, const uchar *key,
|
||||
update_rows_read();
|
||||
index_rows_read[index]++;
|
||||
if (table->vfield && buf == table->record[0])
|
||||
table->update_virtual_fields(VCOL_UPDATE_FOR_READ);
|
||||
table->update_virtual_fields(this, VCOL_UPDATE_FOR_READ);
|
||||
}
|
||||
table->status=result ? STATUS_NOT_FOUND: 0;
|
||||
return result;
|
||||
@ -2681,7 +2681,7 @@ int handler::ha_index_next(uchar * buf)
|
||||
{
|
||||
update_index_statistics();
|
||||
if (table->vfield && buf == table->record[0])
|
||||
table->update_virtual_fields(VCOL_UPDATE_FOR_READ);
|
||||
table->update_virtual_fields(this, VCOL_UPDATE_FOR_READ);
|
||||
}
|
||||
table->status=result ? STATUS_NOT_FOUND: 0;
|
||||
DBUG_RETURN(result);
|
||||
@ -2702,7 +2702,7 @@ int handler::ha_index_prev(uchar * buf)
|
||||
{
|
||||
update_index_statistics();
|
||||
if (table->vfield && buf == table->record[0])
|
||||
table->update_virtual_fields(VCOL_UPDATE_FOR_READ);
|
||||
table->update_virtual_fields(this, VCOL_UPDATE_FOR_READ);
|
||||
}
|
||||
table->status=result ? STATUS_NOT_FOUND: 0;
|
||||
DBUG_RETURN(result);
|
||||
@ -2722,7 +2722,7 @@ int handler::ha_index_first(uchar * buf)
|
||||
{
|
||||
update_index_statistics();
|
||||
if (table->vfield && buf == table->record[0])
|
||||
table->update_virtual_fields(VCOL_UPDATE_FOR_READ);
|
||||
table->update_virtual_fields(this, VCOL_UPDATE_FOR_READ);
|
||||
}
|
||||
table->status=result ? STATUS_NOT_FOUND: 0;
|
||||
return result;
|
||||
@ -2750,7 +2750,7 @@ int handler::ha_index_last(uchar * buf)
|
||||
{
|
||||
update_index_statistics();
|
||||
if (table->vfield && buf == table->record[0])
|
||||
table->update_virtual_fields(VCOL_UPDATE_FOR_READ);
|
||||
table->update_virtual_fields(this, VCOL_UPDATE_FOR_READ);
|
||||
}
|
||||
table->status=result ? STATUS_NOT_FOUND: 0;
|
||||
return result;
|
||||
@ -2770,7 +2770,7 @@ int handler::ha_index_next_same(uchar *buf, const uchar *key, uint keylen)
|
||||
{
|
||||
update_index_statistics();
|
||||
if (table->vfield && buf == table->record[0])
|
||||
table->update_virtual_fields(VCOL_UPDATE_FOR_READ);
|
||||
table->update_virtual_fields(this, VCOL_UPDATE_FOR_READ);
|
||||
}
|
||||
table->status=result ? STATUS_NOT_FOUND: 0;
|
||||
return result;
|
||||
@ -3230,11 +3230,9 @@ void handler::get_auto_increment(ulonglong offset, ulonglong increment,
|
||||
{
|
||||
ulonglong nr;
|
||||
int error;
|
||||
MY_BITMAP *old_read_set;
|
||||
|
||||
(void) extra(HA_EXTRA_KEYREAD);
|
||||
table->mark_columns_used_by_index_no_reset(table->s->next_number_index,
|
||||
table->read_set);
|
||||
column_bitmaps_signal();
|
||||
old_read_set= table->prepare_for_keyread(table->s->next_number_index);
|
||||
|
||||
if (ha_index_init(table->s->next_number_index, 1))
|
||||
{
|
||||
@ -3286,7 +3284,7 @@ void handler::get_auto_increment(ulonglong offset, ulonglong increment,
|
||||
nr= ((ulonglong) table->next_number_field->
|
||||
val_int_offset(table->s->rec_buff_length)+1);
|
||||
ha_index_end();
|
||||
(void) extra(HA_EXTRA_NO_KEYREAD);
|
||||
table->restore_column_maps_after_keyread(old_read_set);
|
||||
*first_value= nr;
|
||||
return;
|
||||
}
|
||||
@ -4557,7 +4555,7 @@ void handler::get_dynamic_partition_info(PARTITION_STATS *stat_info,
|
||||
stat_info->update_time= stats.update_time;
|
||||
stat_info->check_time= stats.check_time;
|
||||
stat_info->check_sum= 0;
|
||||
if (table_flags() & (HA_HAS_OLD_CHECKSUM | HA_HAS_OLD_CHECKSUM))
|
||||
if (table_flags() & (HA_HAS_OLD_CHECKSUM | HA_HAS_NEW_CHECKSUM))
|
||||
stat_info->check_sum= checksum();
|
||||
return;
|
||||
}
|
||||
@ -4982,7 +4980,7 @@ public:
|
||||
bool handle_condition(THD *thd,
|
||||
uint sql_errno,
|
||||
const char* sqlstate,
|
||||
Sql_condition::enum_warning_level level,
|
||||
Sql_condition::enum_warning_level *level,
|
||||
const char* msg,
|
||||
Sql_condition ** cond_hdl)
|
||||
{
|
||||
@ -4995,7 +4993,7 @@ public:
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
if (level == Sql_condition::WARN_LEVEL_ERROR)
|
||||
if (*level == Sql_condition::WARN_LEVEL_ERROR)
|
||||
m_unhandled_errors++;
|
||||
return FALSE;
|
||||
}
|
||||
@ -5781,7 +5779,7 @@ static int write_locked_table_maps(THD *thd)
|
||||
|
||||
typedef bool Log_func(THD*, TABLE*, bool, const uchar*, const uchar*);
|
||||
|
||||
|
||||
static int check_wsrep_max_ws_rows();
|
||||
|
||||
static int binlog_log_row_internal(TABLE* table,
|
||||
const uchar *before_record,
|
||||
@ -5810,6 +5808,13 @@ static int binlog_log_row_internal(TABLE* table,
|
||||
bool const has_trans= thd->lex->sql_command == SQLCOM_CREATE_TABLE ||
|
||||
table->file->has_transactions();
|
||||
error= (*log_func)(thd, table, has_trans, before_record, after_record);
|
||||
|
||||
/*
|
||||
Now that the record has been logged, increment wsrep_affected_rows and
|
||||
also check whether its within the allowable limits (wsrep_max_ws_rows).
|
||||
*/
|
||||
if (error == 0)
|
||||
error= check_wsrep_max_ws_rows();
|
||||
}
|
||||
return error ? HA_ERR_RBR_LOGGING_FAILED : 0;
|
||||
}
|
||||
@ -5912,7 +5917,7 @@ int handler::ha_reset()
|
||||
table->s->column_bitmap_size ==
|
||||
(uchar*) table->def_write_set.bitmap);
|
||||
DBUG_ASSERT(bitmap_is_set_all(&table->s->all_set));
|
||||
DBUG_ASSERT(table->key_read == 0);
|
||||
DBUG_ASSERT(!table->file->keyread_enabled());
|
||||
/* ensure that ha_index_end / ha_rnd_end has been called */
|
||||
DBUG_ASSERT(inited == NONE);
|
||||
/* reset the bitmaps to point to defaults */
|
||||
@ -5975,7 +5980,7 @@ int handler::ha_write_row(uchar *buf)
|
||||
error= binlog_log_row(table, 0, buf, log_func);
|
||||
}
|
||||
DEBUG_SYNC_C("ha_write_row_end");
|
||||
DBUG_RETURN(error ? error : check_wsrep_max_ws_rows());
|
||||
DBUG_RETURN(error);
|
||||
}
|
||||
|
||||
|
||||
@ -6006,7 +6011,7 @@ int handler::ha_update_row(const uchar *old_data, uchar *new_data)
|
||||
rows_changed++;
|
||||
error= binlog_log_row(table, old_data, new_data, log_func);
|
||||
}
|
||||
return error ? error : check_wsrep_max_ws_rows();
|
||||
return error;
|
||||
}
|
||||
|
||||
int handler::ha_delete_row(const uchar *buf)
|
||||
@ -6033,7 +6038,7 @@ int handler::ha_delete_row(const uchar *buf)
|
||||
rows_changed++;
|
||||
error= binlog_log_row(table, buf, 0, log_func);
|
||||
}
|
||||
return error ? error : check_wsrep_max_ws_rows();
|
||||
return error;
|
||||
}
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user