~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to plugin/innobase/row/row0ins.cc

  • Committer: Monty Taylor
  • Date: 2010-12-26 05:00:19 UTC
  • mto: This revision was merged to the branch mainline in revision 2038.
  • Revision ID: mordred@inaugust.com-20101226050019-myxhnb0bn243jf7c
More.

Show diffs side-by-side

added added

removed removed

Lines of Context:
74
74
{
75
75
        ins_node_t*     node;
76
76
 
77
 
        node = mem_heap_alloc(heap, sizeof(ins_node_t));
 
77
        node = static_cast<ins_node_t *>(mem_heap_alloc(heap, sizeof(ins_node_t)));
78
78
 
79
79
        node->common.type = QUE_NODE_INSERT;
80
80
 
150
150
 
151
151
        dfield = dtuple_get_nth_field(row, dict_col_get_no(col));
152
152
 
153
 
        ptr = mem_heap_zalloc(heap, DATA_ROW_ID_LEN);
 
153
        ptr = static_cast<byte *>(mem_heap_zalloc(heap, DATA_ROW_ID_LEN));
154
154
 
155
155
        dfield_set_data(dfield, ptr, DATA_ROW_ID_LEN);
156
156
 
161
161
        col = dict_table_get_sys_col(table, DATA_TRX_ID);
162
162
 
163
163
        dfield = dtuple_get_nth_field(row, dict_col_get_no(col));
164
 
        ptr = mem_heap_zalloc(heap, DATA_TRX_ID_LEN);
 
164
        ptr = static_cast<byte *>(mem_heap_zalloc(heap, DATA_TRX_ID_LEN));
165
165
 
166
166
        dfield_set_data(dfield, ptr, DATA_TRX_ID_LEN);
167
167
 
172
172
        col = dict_table_get_sys_col(table, DATA_ROLL_PTR);
173
173
 
174
174
        dfield = dtuple_get_nth_field(row, dict_col_get_no(col));
175
 
        ptr = mem_heap_zalloc(heap, DATA_ROLL_PTR_LEN);
 
175
        ptr = static_cast<byte *>(mem_heap_zalloc(heap, DATA_ROLL_PTR_LEN));
176
176
 
177
177
        dfield_set_data(dfield, ptr, DATA_ROLL_PTR_LEN);
178
178
}
371
371
 
372
372
        while (que_node_get_type(parent) == QUE_NODE_UPDATE) {
373
373
 
374
 
                upd_node = parent;
 
374
                upd_node = static_cast<upd_node_t *>(parent);
375
375
 
376
376
                if (upd_node->table == table && upd_node->is_delete == FALSE) {
377
377
 
518
518
                                        col->prtype, col->mbminmaxlen,
519
519
                                        col->len,
520
520
                                        ufield_len,
521
 
                                        dfield_get_data(&ufield->new_val))
 
521
                                        static_cast<const char *>(dfield_get_data(&ufield->new_val)))
522
522
                                    < ufield_len) {
523
523
 
524
524
                                        return(ULINT_UNDEFINED);
543
543
                                        byte*   padded_data;
544
544
                                        ulint   mbminlen;
545
545
 
546
 
                                        padded_data = mem_heap_alloc(
547
 
                                                heap, min_size);
 
546
                                        padded_data = static_cast<unsigned char *>(mem_heap_alloc(
 
547
                                                heap, min_size));
548
548
 
549
549
                                        pad = padded_data + ufield_len;
550
550
                                        pad_len = min_size - ufield_len;
801
801
 
802
802
        row_ins_invalidate_query_cache(thr, table->name);
803
803
 
804
 
        node = thr->run_node;
 
804
        node = static_cast<upd_node_t *>(thr->run_node);
805
805
 
806
806
        if (node->is_delete && 0 == (foreign->type
807
807
                                     & (DICT_FOREIGN_ON_DELETE_CASCADE
1238
1238
        }
1239
1239
 
1240
1240
        if (que_node_get_type(thr->run_node) == QUE_NODE_UPDATE) {
1241
 
                upd_node = thr->run_node;
 
1241
                upd_node = static_cast<upd_node_t *>(thr->run_node);
1242
1242
 
1243
1243
                if (!(upd_node->is_delete) && upd_node->foreign == foreign) {
1244
1244
                        /* If a cascaded update is done as defined by a
2160
2160
        enum db_err     err;
2161
2161
 
2162
2162
        if (foreign && UT_LIST_GET_FIRST(index->table->foreign_list)) {
2163
 
                err = row_ins_check_foreign_constraints(index->table, index,
2164
 
                                                        entry, thr);
 
2163
                err = static_cast<db_err>(row_ins_check_foreign_constraints(index->table, index,
 
2164
                                                        entry, thr));
2165
2165
                if (err != DB_SUCCESS) {
2166
2166
 
2167
2167
                        return(err);
2170
2170
 
2171
2171
        /* Try first optimistic descent to the B-tree */
2172
2172
 
2173
 
        err = row_ins_index_entry_low(BTR_MODIFY_LEAF, index, entry,
2174
 
                                      n_ext, thr);
 
2173
        err = static_Cast<db_err>(row_ins_index_entry_low(BTR_MODIFY_LEAF, index, entry,
 
2174
                                      n_ext, thr));
2175
2175
        if (err != DB_FAIL) {
2176
2176
 
2177
2177
                return(err);
2179
2179
 
2180
2180
        /* Try then pessimistic descent to the B-tree */
2181
2181
 
2182
 
        err = row_ins_index_entry_low(BTR_MODIFY_TREE, index, entry,
2183
 
                                      n_ext, thr);
 
2182
        err = static_cast<db_err>(row_ins_index_entry_low(BTR_MODIFY_TREE, index, entry,
 
2183
                                      n_ext, thr));
2184
2184
        return(err);
2185
2185
}
2186
2186
 
2223
2223
                        len = dtype_get_at_most_n_mbchars(
2224
2224
                                col->prtype, col->mbminmaxlen,
2225
2225
                                ind_field->prefix_len,
2226
 
                                len, dfield_get_data(row_field));
 
2226
                                len, static_cast<const char *>(dfield_get_data(row_field)));
2227
2227
 
2228
2228
                        ut_ad(!dfield_is_ext(row_field));
2229
2229
                }
2255
2255
 
2256
2256
        ut_ad(dtuple_check_typed(node->entry));
2257
2257
 
2258
 
        err = row_ins_index_entry(node->index, node->entry, 0, TRUE, thr);
 
2258
        err = static_cast<db_err>(row_ins_index_entry(node->index, node->entry, 0, TRUE, thr));
2259
2259
 
2260
2260
        return(err);
2261
2261
}
2427
2427
 
2428
2428
        trx_start_if_not_started(trx);
2429
2429
 
2430
 
        node = thr->run_node;
 
2430
        node = static_cast<ins_node_t *>(thr->run_node);
2431
2431
 
2432
2432
        ut_ad(que_node_get_type(node) == QUE_NODE_INSERT);
2433
2433