diff options
author | Sergei Golubchik <sergii@pisem.net> | 2014-10-06 20:06:39 +0200 |
---|---|---|
committer | Sergei Golubchik <sergii@pisem.net> | 2014-10-06 20:06:39 +0200 |
commit | 0d2cba5df2b8259b4faeb0401a4413a4e2244f79 (patch) | |
tree | 19aabcac6ab8f1f6a2bbc88aaddfadcb12bc71eb /storage/xtradb/include/dict0dict.h | |
parent | 1ddfce4840994b6b79a3f426fcedf8f0469334ac (diff) | |
parent | 014214d0348cd58a693c44e836915accfe48c275 (diff) | |
download | mariadb-git-0d2cba5df2b8259b4faeb0401a4413a4e2244f79.tar.gz |
XtraDB 5.5.39-36.0
Diffstat (limited to 'storage/xtradb/include/dict0dict.h')
-rw-r--r-- | storage/xtradb/include/dict0dict.h | 39 |
1 files changed, 38 insertions, 1 deletions
diff --git a/storage/xtradb/include/dict0dict.h b/storage/xtradb/include/dict0dict.h index 8c6620b94b3..8908d7608ad 100644 --- a/storage/xtradb/include/dict0dict.h +++ b/storage/xtradb/include/dict0dict.h @@ -1,6 +1,6 @@ /***************************************************************************** -Copyright (c) 1996, 2013, Oracle and/or its affiliates. All Rights Reserved. +Copyright (c) 1996, 2014, Oracle and/or its affiliates. All Rights Reserved. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software @@ -39,6 +39,7 @@ Created 1/8/1996 Heikki Tuuri #include "ut0rnd.h" #include "ut0byte.h" #include "trx0types.h" +#include "ut0rbt.h" #ifndef UNIV_HOTBACKUP # include "sync0sync.h" @@ -1355,6 +1356,42 @@ dict_table_set_corrupt_by_space( ulint space_id, ibool need_mutex); +/**********************************************************************//** +Compares the given foreign key identifier (the key in rb-tree) and the +foreign key identifier in the given fk object (value in rb-tree). +@return negative, 0, or positive if foreign_id is smaller, equal, +or greater than foreign_obj->id, respectively. */ +UNIV_INLINE +int +dict_foreign_rbt_cmp( +/*=================*/ + const void* foreign_id, /*!< in: the foreign key identifier + which is used as a key in rb-tree. */ + const void* foreign_obj); /*!< in: the foreign object itself + which is used as value in rb-tree. */ + +/**********************************************************************//** +Allocate the table->foreign_rbt, which stores all the foreign objects +that is available in table->foreign_list. +@return the allocated rbt object */ +UNIV_INLINE +ib_rbt_t* +dict_table_init_foreign_rbt( +/*========================*/ + dict_table_t* table); /*!< in: the table object whose + table->foreign_rbt will be initialized */ + +/**********************************************************************//** +Allocate the table->referened_rbt, which stores all the foreign objects +that is available in table->referenced_list. +@return the allocated rbt object */ +UNIV_INLINE +ib_rbt_t* +dict_table_init_referenced_rbt( +/*===========================*/ + dict_table_t* table); /*!< in: the table object whose + table->referenced_rbt will be initialized */ + #ifndef UNIV_NONINL #include "dict0dict.ic" #endif |