/********************************************************************//** Creates a row undo node to a query graph. @return own: undo node */ UNIV_INTERN undo_node_t* row_undo_node_create( /*=================*/ trx_t* trx, /*!< in: transaction */ que_thr_t* parent, /*!< in: parent node, i.e., a thr node */ mem_heap_t* heap) /*!< in: memory heap where created */ { undo_node_t* undo; ut_ad(trx && parent && heap); undo = mem_heap_alloc(heap, sizeof(undo_node_t)); undo->common.type = QUE_NODE_UNDO; undo->common.parent = parent; undo->state = UNDO_NODE_FETCH_NEXT; undo->trx = trx; btr_pcur_init(&(undo->pcur)); undo->heap = mem_heap_create(256); return(undo); }
/**************************************************************//** Allocates memory for a persistent cursor object and initializes the cursor. @return own: persistent cursor */ UNIV_INTERN btr_pcur_t* btr_pcur_create_for_mysql(void) /*============================*/ { btr_pcur_t* pcur; pcur = mem_alloc(sizeof(btr_pcur_t)); pcur->btr_cur.index = NULL; btr_pcur_init(pcur); return(pcur); }
btr_pcur_t* btr_pcur_create_for_mysql(void) /*============================*/ /* out, own: persistent cursor */ { btr_pcur_t* pcur; pcur = mem_alloc(sizeof(btr_pcur_t)); pcur->btr_cur.index = NULL; btr_pcur_init(pcur); return(pcur); }