Skip to content

Commit 7496176

Browse files
committed
A few fixes for VATS in 10.1
1 parent 183c028 commit 7496176

File tree

12 files changed

+707
-266
lines changed

12 files changed

+707
-266
lines changed

libmariadb

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Subproject commit c8dd0899d484ad698ec2da5bc8e3d19ff8b623b9

mysql-test/suite/sys_vars/r/sysvars_innodb.result

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1335,6 +1335,20 @@ NUMERIC_BLOCK_SIZE NULL
13351335
ENUM_VALUE_LIST OFF,ON
13361336
READ_ONLY YES
13371337
COMMAND_LINE_ARGUMENT NONE
1338+
VARIABLE_NAME INNODB_LOCK_SCHEDULE_ALGORITHM
1339+
SESSION_VALUE NULL
1340+
GLOBAL_VALUE fcfs
1341+
GLOBAL_VALUE_ORIGIN COMPILE-TIME
1342+
DEFAULT_VALUE fcfs
1343+
VARIABLE_SCOPE GLOBAL
1344+
VARIABLE_TYPE ENUM
1345+
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.
1346+
NUMERIC_MIN_VALUE NULL
1347+
NUMERIC_MAX_VALUE NULL
1348+
NUMERIC_BLOCK_SIZE NULL
1349+
ENUM_VALUE_LIST fcfs,vats
1350+
READ_ONLY NO
1351+
COMMAND_LINE_ARGUMENT REQUIRED
13381352
VARIABLE_NAME INNODB_LOCK_WAIT_TIMEOUT
13391353
SESSION_VALUE 50
13401354
GLOBAL_VALUE 50

storage/innobase/handler/ha_innodb.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1553,7 +1553,7 @@ thd_is_replication_slave_thread(
15531553
/*============================*/
15541554
THD* thd) /*!< in: thread handle */
15551555
{
1556-
return((ibool) thd_slave_thread(thd));
1556+
return thd && ((ibool) thd_slave_thread(thd));
15571557
}
15581558

15591559
/******************************************************************//**

storage/innobase/include/lock0lock.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -44,10 +44,10 @@ extern ibool lock_print_waits;
4444
#endif /* UNIV_DEBUG */
4545

4646
/** Alternatives for innodb_lock_schedule_algorithm, which can be changed by
47-
setting innodb_lock_schedule_algorithm. */
47+
setting innodb_lock_schedule_algorithm. */
4848
enum innodb_lock_schedule_algorithm_t {
49-
INNODB_LOCK_SCHEDULE_ALGORITHM_FCFS, /*!< First Come First Served */
50-
INNODB_LOCK_SCHEDULE_ALGORITHM_VATS /*!< Variance-Aware-Transaction-Scheduling */
49+
INNODB_LOCK_SCHEDULE_ALGORITHM_FCFS, /*!< First Come First Served */
50+
INNODB_LOCK_SCHEDULE_ALGORITHM_VATS /*!< Variance-Aware-Transaction-Scheduling */
5151
};
5252

5353
extern ulong innodb_lock_schedule_algorithm;

storage/innobase/include/trx0trx.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -844,6 +844,8 @@ struct trx_t{
844844

845845
time_t start_time; /*!< time the trx state last time became
846846
TRX_STATE_ACTIVE */
847+
clock_t start_time_micro; /*!< start time of transaction in
848+
microseconds */
847849
trx_id_t id; /*!< transaction id */
848850
XID xid; /*!< X/Open XA transaction
849851
identification to identify a

0 commit comments

Comments
 (0)