Commit d767ed5c authored by Sergei Golubchik's avatar Sergei Golubchik

remove handler::open_read_view()

ht->start_consistent_snapshot() is also not a way,
because some engines (e.g. rocksdb) only do it readonly.
instead, downgrade the lock after reading the first row
(which implicitly opens a read view).
parent 0b67af5a
......@@ -3562,7 +3562,6 @@ class handler :public Sql_alloc
/** to be actually called to get 'check()' functionality*/
int ha_check(THD *thd, HA_CHECK_OPT *check_opt);
int ha_repair(THD* thd, HA_CHECK_OPT* check_opt);
virtual void open_read_view(){}
void ha_start_bulk_insert(ha_rows rows, uint flags= 0)
{
DBUG_ENTER("handler::ha_start_bulk_insert");
......
This diff is collapsed.
......@@ -21165,17 +21165,3 @@ buf_pool_size_align(
return (size / m + 1) * m;
}
}
void ha_innobase::open_read_view()
{
trx_t *trx= m_prebuilt->trx;
auto thd_iso= thd_get_trx_isolation(m_user_thd);
trx->isolation_level= innobase_map_isolation_level(thd_iso);
ut_ad(trx->isolation_level == TRX_ISO_REPEATABLE_READ);
ut_ad(!trx_is_started(trx));
trx_start_if_not_started_xa(trx, false);
trx->read_view.open(m_prebuilt->trx);
}
......@@ -438,7 +438,6 @@ class ha_innobase final : public handler
const KEY_PART_INFO& old_part,
const KEY_PART_INFO& new_part) const override;
void open_read_view() override;
protected:
bool
can_convert_string(const Field_string* field,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment