~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to plugin/innobase/row/row0upd.c

  • Committer: Lee Bieber
  • Date: 2010-12-23 23:11:00 UTC
  • mfrom: (2024.1.1 clean)
  • Revision ID: kalebral@gmail.com-20101223231100-0rqirgz7ugkl10yp
Merge Brian - session list cleanup

Show diffs side-by-side

added added

removed removed

Lines of Context:
313
313
{
314
314
        upd_node_t*     node;
315
315
 
316
 
        node = static_cast<upd_node_t *>(mem_heap_alloc(heap, sizeof(upd_node_t)));
 
316
        node = mem_heap_alloc(heap, sizeof(upd_node_t));
317
317
        node->common.type = QUE_NODE_UPDATE;
318
318
 
319
319
        node->state = UPD_NODE_UPDATE_CLUSTERED;
398
398
        pos = dict_index_get_sys_col_pos(index, type);
399
399
 
400
400
        dfield = dtuple_get_nth_field(entry, pos);
401
 
        field = static_cast<byte *>(dfield_get_data(dfield));
 
401
        field = dfield_get_data(dfield);
402
402
 
403
403
        if (type == DATA_TRX_ID) {
404
404
                trx_write_trx_id(field, val);
537
537
        roll_ptr_t      roll_ptr,/*!< in: roll ptr of the undo log record */
538
538
        byte*           log_ptr,/*!< pointer to a buffer of size > 20 opened
539
539
                                in mlog */
540
 
        mtr_t*          /*mtr __attribute__((unused))*/) /*!< in: mtr */
 
540
        mtr_t*          mtr __attribute__((unused))) /*!< in: mtr */
541
541
{
542
542
        ut_ad(dict_index_is_clust(index));
543
543
        ut_ad(mtr);
648
648
                                mlog_close(mtr, log_ptr);
649
649
 
650
650
                                mlog_catenate_string(mtr,
651
 
                                                     static_cast<byte *>(dfield_get_data(new_val)),
 
651
                                                     dfield_get_data(new_val),
652
652
                                                     len);
653
653
 
654
654
                                log_ptr = mlog_open(mtr, MLOG_BUF_MARGIN);
907
907
                                        out: fetched length of the prefix */
908
908
        mem_heap_t*     heap)           /*!< in: heap where to allocate */
909
909
{
910
 
        byte* buf = static_cast<byte *>(mem_heap_alloc(heap, *len));
 
910
        byte*   buf = mem_heap_alloc(heap, *len);
911
911
 
912
912
        *len = btr_copy_externally_stored_field_prefix(buf, *len,
913
913
                                                       zip_size,
945
945
        }
946
946
 
947
947
        len = dfield_get_len(dfield);
948
 
        data = static_cast<const byte *>(dfield_get_data(dfield));
 
948
        data = dfield_get_data(dfield);
949
949
 
950
950
        if (field->prefix_len > 0) {
951
951
                ibool           fetch_ext = dfield_is_ext(dfield)
996
996
                stored part of the column.  The data
997
997
                will have to be copied. */
998
998
                ut_a(uf->orig_len > BTR_EXTERN_FIELD_REF_SIZE);
999
 
                buf = static_cast<byte *>(mem_heap_alloc(heap, uf->orig_len));
 
999
                buf = mem_heap_alloc(heap, uf->orig_len);
1000
1000
                /* Copy the locally stored prefix. */
1001
1001
                memcpy(buf, data,
1002
1002
                       uf->orig_len - BTR_EXTERN_FIELD_REF_SIZE);
1146
1146
        table = index->table;
1147
1147
        ut_ad(n_cols == dict_table_get_n_cols(table));
1148
1148
 
1149
 
        ext_cols = static_cast<ulint *>(mem_heap_alloc(heap, n_cols * sizeof *ext_cols));
 
1149
        ext_cols = mem_heap_alloc(heap, n_cols * sizeof *ext_cols);
1150
1150
        n_ext_cols = 0;
1151
1151
 
1152
1152
        dtuple_set_info_bits(row, update->info_bits);
1651
1651
 
1652
1652
        if (node->state != UPD_NODE_INSERT_CLUSTERED) {
1653
1653
                rec_t*          rec;
1654
 
                dict_index_t*   node_index;
 
1654
                dict_index_t*   index;
1655
1655
                ulint           offsets_[REC_OFFS_NORMAL_SIZE];
1656
1656
                ulint*          offsets;
1657
1657
                rec_offs_init(offsets_);
1669
1669
                record is removed from the index tree, or updated. */
1670
1670
 
1671
1671
                rec = btr_cur_get_rec(btr_cur);
1672
 
                node_index = dict_table_get_first_index(table);
1673
 
                offsets = rec_get_offsets(rec, node_index, offsets_,
 
1672
                index = dict_table_get_first_index(table);
 
1673
                offsets = rec_get_offsets(rec, index, offsets_,
1674
1674
                                          ULINT_UNDEFINED, &heap);
1675
1675
                change_ownership = btr_cur_mark_extern_inherited_fields(
1676
 
                        btr_cur_get_page_zip(btr_cur), rec, node_index, offsets,
 
1676
                        btr_cur_get_page_zip(btr_cur), rec, index, offsets,
1677
1677
                        node->update, mtr);
1678
1678
                if (referenced) {
1679
1679
                        /* NOTE that the following call loses
1680
1680
                        the position of pcur ! */
1681
1681
 
1682
1682
                        err = row_upd_check_references_constraints(
1683
 
                                node, pcur, table, node_index, offsets, thr, mtr);
 
1683
                                node, pcur, table, index, offsets, thr, mtr);
1684
1684
 
1685
1685
                        if (err != DB_SUCCESS) {
1686
1686
 
2154
2154
 
2155
2155
        trx_start_if_not_started(trx);
2156
2156
 
2157
 
        node = static_cast<upd_node_t *>(thr->run_node);
 
2157
        node = thr->run_node;
2158
2158
 
2159
2159
        sel_node = node->select;
2160
2160