Commit 960fbc38 authored by Sergei Petrunia's avatar Sergei Petrunia

MariaRocks port: temporarily? disable "CONSISTENT INNODB|ROCKSDB SNAPSHOT" feature

cset
c2b8ced16e255ffdbcc1e638ac8dd4f398eb1a93
Implement START TRANSACTION WITH CONSISTENT INNODB SNAPSHOT
parent 0a132ae7
...@@ -3056,13 +3056,15 @@ static inline void rocksdb_register_tx(handlerton *hton, THD *thd, ...@@ -3056,13 +3056,15 @@ static inline void rocksdb_register_tx(handlerton *hton, THD *thd,
*/ */
static int rocksdb_start_tx_and_assign_read_view( static int rocksdb_start_tx_and_assign_read_view(
handlerton* hton, /*!< in: RocksDB handlerton */ handlerton* hton, /*!< in: RocksDB handlerton */
THD* thd, /*!< in: MySQL thread handle of the THD* thd) /*!< in: MySQL thread handle of the
user for whom the transaction should user for whom the transaction should
be committed */ be committed */
#ifdef MARIAROCKS_NOT_YET // consistent snapshot with binlog
char* binlog_file, /* out: binlog file for last commit */ char* binlog_file, /* out: binlog file for last commit */
ulonglong* binlog_pos, /* out: binlog pos for last commit */ ulonglong* binlog_pos, /* out: binlog pos for last commit */
char** gtid_executed, /* out: Gtids logged until last commit */ char** gtid_executed, /* out: Gtids logged until last commit */
int* gtid_executed_length) /*out: Length of gtid_executed string */ int* gtid_executed_length) /*out: Length of gtid_executed string */
#endif
{ {
Rdb_perf_context_guard guard(thd); Rdb_perf_context_guard guard(thd);
...@@ -3076,7 +3078,7 @@ static int rocksdb_start_tx_and_assign_read_view( ...@@ -3076,7 +3078,7 @@ static int rocksdb_start_tx_and_assign_read_view(
"in RocksDB Storage Engine.", MYF(0)); "in RocksDB Storage Engine.", MYF(0));
return 1; return 1;
} }
#ifdef MARIAROCKS_NOT_YET // consistent snapshot with binlog
if (binlog_file) if (binlog_file)
{ {
if (binlog_pos && mysql_bin_log.is_open()) if (binlog_pos && mysql_bin_log.is_open())
...@@ -3084,17 +3086,18 @@ static int rocksdb_start_tx_and_assign_read_view( ...@@ -3084,17 +3086,18 @@ static int rocksdb_start_tx_and_assign_read_view(
else else
return 1; return 1;
} }
#endif
Rdb_transaction* tx= get_or_create_tx(thd); Rdb_transaction* tx= get_or_create_tx(thd);
DBUG_ASSERT(!tx->has_snapshot()); DBUG_ASSERT(!tx->has_snapshot());
tx->set_tx_read_only(true); tx->set_tx_read_only(true);
rocksdb_register_tx(hton, thd, tx); rocksdb_register_tx(hton, thd, tx);
tx->acquire_snapshot(true); tx->acquire_snapshot(true);
#ifdef MARIAROCKS_NOT_YET // consistent snapshot with binlog
if (binlog_file) if (binlog_file)
mysql_bin_log_unlock_commits(binlog_file, binlog_pos, gtid_executed, mysql_bin_log_unlock_commits(binlog_file, binlog_pos, gtid_executed,
gtid_executed_length); gtid_executed_length);
#endif
return 0; return 0;
} }
......
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