diff options
author | Jan Lindström <jan.lindstrom@skysql.com> | 2014-08-06 15:39:15 +0300 |
---|---|---|
committer | Jan Lindström <jan.lindstrom@skysql.com> | 2014-08-26 15:43:46 +0300 |
commit | df4dd593f29aec8e2116aec1775ad4b8833d8c93 (patch) | |
tree | becae67f02054e15ead58e929e91c044f0b7aa15 /storage/innobase/include/hash0hash.h | |
parent | e974b564389af8251c2ba51060e6129e45431586 (diff) | |
download | mariadb-git-df4dd593f29aec8e2116aec1775ad4b8833d8c93.tar.gz |
MDEV-6247: Merge 10.0-galera to 10.1.
Merged lp:maria/maria-10.0-galera up to revision 3879.
Added a new functions to handler API to forcefully abort_transaction,
producing fake_trx_id, get_checkpoint and set_checkpoint for XA. These
were added for future possiblity to add more storage engines that
could use galera replication.
Diffstat (limited to 'storage/innobase/include/hash0hash.h')
-rw-r--r-- | storage/innobase/include/hash0hash.h | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/storage/innobase/include/hash0hash.h b/storage/innobase/include/hash0hash.h index 6f9a628df5d..9a4077befb1 100644 --- a/storage/innobase/include/hash0hash.h +++ b/storage/innobase/include/hash0hash.h @@ -144,6 +144,33 @@ do {\ }\ } while (0) +#ifdef WITH_WSREP +/*******************************************************************//** +Inserts a struct to the head of hash table. */ + +#define HASH_PREPEND(TYPE, NAME, TABLE, FOLD, DATA) \ +do { \ + hash_cell_t* cell3333; \ + TYPE* struct3333; \ + \ + HASH_ASSERT_OWN(TABLE, FOLD) \ + \ + (DATA)->NAME = NULL; \ + \ + cell3333 = hash_get_nth_cell(TABLE, hash_calc_hash(FOLD, TABLE));\ + \ + if (cell3333->node == NULL) { \ + cell3333->node = DATA; \ + DATA->NAME = NULL; \ + } else { \ + struct3333 = (TYPE*) cell3333->node; \ + \ + DATA->NAME = struct3333; \ + \ + cell3333->node = DATA; \ + } \ +} while (0) +#endif /*WITH_WSREP */ #ifdef UNIV_HASH_DEBUG # define HASH_ASSERT_VALID(DATA) ut_a((void*) (DATA) != (void*) -1) # define HASH_INVALIDATE(DATA, NAME) *(void**) (&DATA->NAME) = (void*) -1 |