Commit 74961760 authored by sensssz's avatar sensssz

A few fixes for VATS in 10.1

parent 183c0283
libmariadb @ c8dd0899
Subproject commit c8dd0899d484ad698ec2da5bc8e3d19ff8b623b9
......@@ -1335,6 +1335,20 @@ NUMERIC_BLOCK_SIZE NULL
ENUM_VALUE_LIST OFF,ON
READ_ONLY YES
COMMAND_LINE_ARGUMENT NONE
VARIABLE_NAME INNODB_LOCK_SCHEDULE_ALGORITHM
SESSION_VALUE NULL
GLOBAL_VALUE fcfs
GLOBAL_VALUE_ORIGIN COMPILE-TIME
DEFAULT_VALUE fcfs
VARIABLE_SCOPE GLOBAL
VARIABLE_TYPE ENUM
VARIABLE_COMMENT The algorithm Innodb uses for deciding which locks to grant next when a lock is released. Possible values are FCFS grant the locks in First-Come-First-Served order; VATS use the Variance-Aware-Transaction-Scheduling algorithm, which uses an Eldest-Transaction-First heuristic.
NUMERIC_MIN_VALUE NULL
NUMERIC_MAX_VALUE NULL
NUMERIC_BLOCK_SIZE NULL
ENUM_VALUE_LIST fcfs,vats
READ_ONLY NO
COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME INNODB_LOCK_WAIT_TIMEOUT
SESSION_VALUE 50
GLOBAL_VALUE 50
......
......@@ -1553,7 +1553,7 @@ thd_is_replication_slave_thread(
/*============================*/
THD* thd) /*!< in: thread handle */
{
return((ibool) thd_slave_thread(thd));
return thd && ((ibool) thd_slave_thread(thd));
}
/******************************************************************//**
......
......@@ -44,10 +44,10 @@ extern ibool lock_print_waits;
#endif /* UNIV_DEBUG */
/** Alternatives for innodb_lock_schedule_algorithm, which can be changed by
setting innodb_lock_schedule_algorithm. */
setting innodb_lock_schedule_algorithm. */
enum innodb_lock_schedule_algorithm_t {
INNODB_LOCK_SCHEDULE_ALGORITHM_FCFS, /*!< First Come First Served */
INNODB_LOCK_SCHEDULE_ALGORITHM_VATS /*!< Variance-Aware-Transaction-Scheduling */
INNODB_LOCK_SCHEDULE_ALGORITHM_FCFS, /*!< First Come First Served */
INNODB_LOCK_SCHEDULE_ALGORITHM_VATS /*!< Variance-Aware-Transaction-Scheduling */
};
extern ulong innodb_lock_schedule_algorithm;
......
......@@ -844,6 +844,8 @@ struct trx_t{
time_t start_time; /*!< time the trx state last time became
TRX_STATE_ACTIVE */
clock_t start_time_micro; /*!< start time of transaction in
microseconds */
trx_id_t id; /*!< transaction id */
XID xid; /*!< X/Open XA transaction
identification to identify a
......
This diff is collapsed.
......@@ -919,6 +919,8 @@ trx_start_low(
trx->start_time = ut_time();
trx->start_time_micro = clock();
MONITOR_INC(MONITOR_TRX_ACTIVE);
}
......
......@@ -1826,7 +1826,7 @@ thd_is_replication_slave_thread(
/*============================*/
THD* thd) /*!< in: thread handle */
{
return((ibool) thd_slave_thread(thd));
return thd && ((ibool) thd_slave_thread(thd));
}
/******************************************************************//**
......
......@@ -46,10 +46,10 @@ extern ibool lock_print_waits;
#endif /* UNIV_DEBUG */
/** Alternatives for innodb_lock_schedule_algorithm, which can be changed by
setting innodb_lock_schedule_algorithm. */
setting innodb_lock_schedule_algorithm. */
enum innodb_lock_schedule_algorithm_t {
INNODB_LOCK_SCHEDULE_ALGORITHM_FCFS, /*!< First Come First Served */
INNODB_LOCK_SCHEDULE_ALGORITHM_VATS /*!< Variance-Aware-Transaction-Scheduling */
INNODB_LOCK_SCHEDULE_ALGORITHM_FCFS, /*!< First Come First Served */
INNODB_LOCK_SCHEDULE_ALGORITHM_VATS /*!< Variance-Aware-Transaction-Scheduling */
};
extern ulong innodb_lock_schedule_algorithm;
......
......@@ -877,6 +877,8 @@ struct trx_t{
time_t start_time; /*!< time the trx state last time became
TRX_STATE_ACTIVE */
clock_t start_time_micro; /*!< start time of transaction in
microseconds */
trx_id_t id; /*!< transaction id */
XID xid; /*!< X/Open XA transaction
identification to identify a
......
This diff is collapsed.
......@@ -1117,6 +1117,8 @@ trx_start_low(
trx->start_time = ut_time();
trx->start_time_micro = clock();
MONITOR_INC(MONITOR_TRX_ACTIVE);
}
......
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