~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to storage/innobase/row/row0undo.c

  • Committer: Monty Taylor
  • Date: 2008-09-15 17:24:04 UTC
  • Revision ID: monty@inaugust.com-20080915172404-ygh6hiyu0q7qpa9x
Removed strndup calls.

Show diffs side-by-side

added added

removed removed

Lines of Context:
24
24
#include "row0row.h"
25
25
#include "row0uins.h"
26
26
#include "row0umod.h"
27
 
#include "row0upd.h"
28
27
#include "row0mysql.h"
29
28
#include "srv0srv.h"
30
29
 
105
104
 
106
105
/************************************************************************
107
106
Creates a row undo node to a query graph. */
108
 
UNIV_INTERN
 
107
 
109
108
undo_node_t*
110
109
row_undo_node_create(
111
110
/*=================*/
138
137
The pcur in node is used in the search. If found, stores the row to node,
139
138
and stores the position of pcur, and detaches it. The pcur must be closed
140
139
by the caller in any case. */
141
 
UNIV_INTERN
 
140
 
142
141
ibool
143
142
row_undo_search_clust_to_pcur(
144
143
/*==========================*/
155
154
        mem_heap_t*     heap            = NULL;
156
155
        ulint           offsets_[REC_OFFS_NORMAL_SIZE];
157
156
        ulint*          offsets         = offsets_;
158
 
        rec_offs_init(offsets_);
 
157
        *offsets_ = (sizeof offsets_) / sizeof *offsets_;
159
158
 
160
159
        mtr_start(&mtr);
161
160
 
184
183
                ret = FALSE;
185
184
        } else {
186
185
                node->row = row_build(ROW_COPY_DATA, clust_index, rec,
187
 
                                      offsets, NULL, &node->ext, node->heap);
188
 
                if (node->update) {
189
 
                        node->undo_row = dtuple_copy(node->row, node->heap);
190
 
                        row_upd_replace(node->undo_row, &node->undo_ext,
191
 
                                        clust_index, node->update, node->heap);
192
 
                } else {
193
 
                        node->undo_row = NULL;
194
 
                        node->undo_ext = NULL;
195
 
                }
196
 
 
 
186
                                      offsets, node->heap);
197
187
                btr_pcur_store_position(&(node->pcur), &mtr);
198
188
 
199
189
                ret = TRUE;
313
303
/***************************************************************
314
304
Undoes a row operation in a table. This is a high-level function used
315
305
in SQL execution graphs. */
316
 
UNIV_INTERN
 
306
 
317
307
que_thr_t*
318
308
row_undo_step(
319
309
/*==========*/