Skip to content

Commit

Permalink
Merge a fix from MySQL 5.7, to presumably dead code
Browse files Browse the repository at this point in the history
Remove a test that does not apply to MariaDB

In MariaDB, there are no high-priority transactions (no tx_priority).
This should also mean that all references to TRX_STATE_FORCED_ROLLBACK
are dead code.
  • Loading branch information
dr-m committed Feb 2, 2018
2 parents 4c731a2 + 6266493 commit d57b243
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions storage/innobase/lock/lock0lock.cc
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/*****************************************************************************
Copyright (c) 1996, 2016, Oracle and/or its affiliates. All Rights Reserved.
Copyright (c) 1996, 2017, Oracle and/or its affiliates. All Rights Reserved.
Copyright (c) 2014, 2017, MariaDB Corporation.
This program is free software; you can redistribute it and/or modify it under
Expand Down Expand Up @@ -2728,7 +2728,10 @@ RecLock::lock_add_priority(
lock_t* grant_position = NULL;
lock_t* add_position = NULL;

HASH_SEARCH(hash, lock_sys->rec_hash, m_rec_id.fold(), lock_t*,
/* Different lock (such as predicate lock) are on different hash */
hash_table_t* lock_hash = lock_hash_get(m_mode);

HASH_SEARCH(hash, lock_hash, m_rec_id.fold(), lock_t*,
lock_head, ut_ad(lock_head->is_record_lock()), true);

ut_ad(lock_head);
Expand Down

0 comments on commit d57b243

Please sign in to comment.