diff options
author | Guilhem Bichot <guilhem@mysql.com> | 2009-08-04 13:25:19 +0200 |
---|---|---|
committer | Guilhem Bichot <guilhem@mysql.com> | 2009-08-04 13:25:19 +0200 |
commit | b57e4dbd88671df86e2cf39aff5178976d710b64 (patch) | |
tree | 32be2bfec3ca062c65566c60ecf59b673d1f97e9 /storage/innobase/include/que0que.ic | |
parent | 1a0c2153a036296785dcdfa7b5f4974515616e11 (diff) | |
parent | 94efc1c6b084ed531b513e70fb66e7b7a1186b56 (diff) | |
download | mariadb-git-b57e4dbd88671df86e2cf39aff5178976d710b64.tar.gz |
Creation of mysql-trunk = {summit + "Innodb plugin replacing the builtin"}:
bzr branch mysql-5.1-performance-version mysql-trunk # Summit
cd mysql-trunk
bzr merge mysql-5.1-innodb_plugin # which is 5.1 + Innodb plugin
bzr rm innobase # remove the builtin
Next step: build, test fixes.
Diffstat (limited to 'storage/innobase/include/que0que.ic')
-rw-r--r-- | storage/innobase/include/que0que.ic | 259 |
1 files changed, 0 insertions, 259 deletions
diff --git a/storage/innobase/include/que0que.ic b/storage/innobase/include/que0que.ic deleted file mode 100644 index a20108a7820..00000000000 --- a/storage/innobase/include/que0que.ic +++ /dev/null @@ -1,259 +0,0 @@ -/****************************************************** -Query graph - -(c) 1996 Innobase Oy - -Created 5/27/1996 Heikki Tuuri -*******************************************************/ - -#include "usr0sess.h" - -/*************************************************************************** -Gets the trx of a query thread. */ -UNIV_INLINE -trx_t* -thr_get_trx( -/*========*/ - que_thr_t* thr) /* in: query thread */ -{ - ut_ad(thr); - - return(thr->graph->trx); -} - -/*************************************************************************** -Gets the first thr in a fork. */ -UNIV_INLINE -que_thr_t* -que_fork_get_first_thr( -/*===================*/ - que_fork_t* fork) /* in: query fork */ -{ - return(UT_LIST_GET_FIRST(fork->thrs)); -} - -/*************************************************************************** -Gets the child node of the first thr in a fork. */ -UNIV_INLINE -que_node_t* -que_fork_get_child( -/*===============*/ - que_fork_t* fork) /* in: query fork */ -{ - que_thr_t* thr; - - thr = UT_LIST_GET_FIRST(fork->thrs); - - return(thr->child); -} - -/*************************************************************************** -Gets the type of a graph node. */ -UNIV_INLINE -ulint -que_node_get_type( -/*==============*/ - que_node_t* node) /* in: graph node */ -{ - ut_ad(node); - - return(((que_common_t*)node)->type); -} - -/*************************************************************************** -Gets pointer to the value dfield of a graph node. */ -UNIV_INLINE -dfield_t* -que_node_get_val( -/*=============*/ - que_node_t* node) /* in: graph node */ -{ - ut_ad(node); - - return(&(((que_common_t*)node)->val)); -} - -/*************************************************************************** -Gets the value buffer size of a graph node. */ -UNIV_INLINE -ulint -que_node_get_val_buf_size( -/*======================*/ - /* out: val buffer size, not defined if - val.data == NULL in node */ - que_node_t* node) /* in: graph node */ -{ - ut_ad(node); - - return(((que_common_t*)node)->val_buf_size); -} - -/*************************************************************************** -Sets the value buffer size of a graph node. */ -UNIV_INLINE -void -que_node_set_val_buf_size( -/*======================*/ - que_node_t* node, /* in: graph node */ - ulint size) /* in: size */ -{ - ut_ad(node); - - ((que_common_t*)node)->val_buf_size = size; -} - -/*************************************************************************** -Sets the parent of a graph node. */ -UNIV_INLINE -void -que_node_set_parent( -/*================*/ - que_node_t* node, /* in: graph node */ - que_node_t* parent) /* in: parent */ -{ - ut_ad(node); - - ((que_common_t*)node)->parent = parent; -} - -/*************************************************************************** -Gets pointer to the value data type field of a graph node. */ -UNIV_INLINE -dtype_t* -que_node_get_data_type( -/*===================*/ - que_node_t* node) /* in: graph node */ -{ - ut_ad(node); - - return(&(((que_common_t*)node)->val.type)); -} - -/************************************************************************* -Catenates a query graph node to a list of them, possible empty list. */ -UNIV_INLINE -que_node_t* -que_node_list_add_last( -/*===================*/ - /* out: one-way list of nodes */ - que_node_t* node_list, /* in: node list, or NULL */ - que_node_t* node) /* in: node */ -{ - que_common_t* cnode; - que_common_t* cnode2; - - cnode = node; - - cnode->brother = NULL; - - if (node_list == NULL) { - - return(node); - } - - cnode2 = node_list; - - while (cnode2->brother != NULL) { - cnode2 = cnode2->brother; - } - - cnode2->brother = node; - - return(node_list); -} - -/************************************************************************* -Gets the next list node in a list of query graph nodes. */ -UNIV_INLINE -que_node_t* -que_node_get_next( -/*==============*/ - /* out: next node in a list of nodes */ - que_node_t* node) /* in: node in a list */ -{ - return(((que_common_t*)node)->brother); -} - -/************************************************************************* -Gets a query graph node list length. */ -UNIV_INLINE -ulint -que_node_list_get_len( -/*==================*/ - /* out: length, for NULL list 0 */ - que_node_t* node_list) /* in: node list, or NULL */ -{ - que_common_t* cnode; - ulint len; - - cnode = node_list; - len = 0; - - while (cnode != NULL) { - len++; - cnode = cnode->brother; - } - - return(len); -} - -/************************************************************************* -Gets the parent node of a query graph node. */ -UNIV_INLINE -que_node_t* -que_node_get_parent( -/*================*/ - /* out: parent node or NULL */ - que_node_t* node) /* in: node */ -{ - return(((que_common_t*)node)->parent); -} - -/************************************************************************** -Checks if graph, trx, or session is in a state where the query thread should -be stopped. */ -UNIV_INLINE -ibool -que_thr_peek_stop( -/*==============*/ - /* out: TRUE if should be stopped; NOTE that - if the peek is made without reserving the - kernel mutex, then another peek with the - mutex reserved is necessary before deciding - the actual stopping */ - que_thr_t* thr) /* in: query thread */ -{ - trx_t* trx; - que_t* graph; - - graph = thr->graph; - trx = graph->trx; - - if (graph->state != QUE_FORK_ACTIVE - || trx->que_state == TRX_QUE_LOCK_WAIT - || (UT_LIST_GET_LEN(trx->signals) > 0 - && trx->que_state == TRX_QUE_RUNNING)) { - - return(TRUE); - } - - return(FALSE); -} - -/*************************************************************************** -Returns TRUE if the query graph is for a SELECT statement. */ -UNIV_INLINE -ibool -que_graph_is_select( -/*================*/ - /* out: TRUE if a select */ - que_t* graph) /* in: graph */ -{ - if (graph->fork_type == QUE_FORK_SELECT_SCROLL - || graph->fork_type == QUE_FORK_SELECT_NON_SCROLL) { - - return(TRUE); - } - - return(FALSE); -} |