~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to plugin/innobase/page/page0page.c

  • Committer: Lee Bieber
  • Date: 2010-11-14 23:15:42 UTC
  • mfrom: (1929.1.42 warning-stack-frame)
  • Revision ID: kalebral@gmail.com-20101114231542-fnnu6ydd2p17n582
Merge Monty - fix bug 672372: some functions use > 32k stack

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
/*****************************************************************************
2
2
 
3
 
Copyright (C) 1994, 2010, Innobase Oy. All Rights Reserved.
 
3
Copyright (c) 1994, 2010, Innobase Oy. All Rights Reserved.
4
4
 
5
5
This program is free software; you can redistribute it and/or modify it under
6
6
the terms of the GNU General Public License as published by the Free Software
233
233
                                      8, mtr);
234
234
#ifndef UNIV_HOTBACKUP
235
235
        } else if (mtr) {
236
 
                mlog_write_ull(page + (PAGE_HEADER + PAGE_MAX_TRX_ID),
237
 
                               trx_id, mtr);
 
236
                mlog_write_dulint(page + (PAGE_HEADER + PAGE_MAX_TRX_ID),
 
237
                                  trx_id, mtr);
238
238
#endif /* !UNIV_HOTBACKUP */
239
239
        } else {
240
240
                mach_write_to_8(page + (PAGE_HEADER + PAGE_MAX_TRX_ID), trx_id);
313
313
page_parse_create(
314
314
/*==============*/
315
315
        byte*           ptr,    /*!< in: buffer */
316
 
        byte*           /*end_ptr __attribute__((unused))*/, /*!< in: buffer end */
 
316
        byte*           end_ptr __attribute__((unused)), /*!< in: buffer end */
317
317
        ulint           comp,   /*!< in: nonzero=compact page format */
318
318
        buf_block_t*    block,  /*!< in: block or NULL */
319
319
        mtr_t*          mtr)    /*!< in: mtr or NULL */
455
455
        page_header_set_field(page, NULL, PAGE_DIRECTION, PAGE_NO_DIRECTION);
456
456
        page_header_set_field(page, NULL, PAGE_N_DIRECTION, 0);
457
457
        page_header_set_field(page, NULL, PAGE_N_RECS, 0);
458
 
        page_set_max_trx_id(block, NULL, 0, NULL);
 
458
        page_set_max_trx_id(block, NULL, ut_dulint_zero, NULL);
459
459
        memset(heap_top, 0, UNIV_PAGE_SIZE - PAGE_EMPTY_DIR_START
460
460
               - page_offset(heap_top));
461
461
 
2299
2299
        dict_index_t*   index)  /*!< in: data dictionary index containing
2300
2300
                                the page record type definition */
2301
2301
{
2302
 
        page_dir_slot_t*slot= NULL;
2303
 
        mem_heap_t*     heap= NULL;
2304
 
        byte*           buf= NULL;
2305
 
        ulint           count= 0;
2306
 
        ulint           own_count= 0;
2307
 
        ulint           rec_own_count= 0;
2308
 
        ulint           slot_no= 0;
2309
 
        ulint           data_size= 0;
2310
 
        rec_t*          rec= NULL;
 
2302
        page_dir_slot_t*slot;
 
2303
        mem_heap_t*     heap;
 
2304
        byte*           buf;
 
2305
        ulint           count;
 
2306
        ulint           own_count;
 
2307
        ulint           rec_own_count;
 
2308
        ulint           slot_no;
 
2309
        ulint           data_size;
 
2310
        rec_t*          rec;
2311
2311
        rec_t*          old_rec         = NULL;
2312
 
        ulint           offs= 0;
2313
 
        ulint           n_slots= 0;
 
2312
        ulint           offs;
 
2313
        ulint           n_slots;
2314
2314
        ibool           ret             = FALSE;
2315
 
        ulint           i= 0;
 
2315
        ulint           i;
2316
2316
        ulint*          offsets         = NULL;
2317
2317
        ulint*          old_offsets     = NULL;
2318
 
        void* buf_ptr= NULL;
2319
2318
 
2320
2319
        if (UNIV_UNLIKELY((ibool) !!page_is_comp(page)
2321
2320
                          != dict_table_is_comp(index->table))) {
2337
2336
        /* The following buffer is used to check that the
2338
2337
        records in the page record heap do not overlap */
2339
2338
 
2340
 
        buf_ptr= mem_heap_zalloc(heap, UNIV_PAGE_SIZE);
2341
 
        buf = static_cast<byte *>(buf_ptr);
 
2339
        buf = mem_heap_zalloc(heap, UNIV_PAGE_SIZE);
2342
2340
 
2343
2341
        /* Check first that the record heap and the directory do not
2344
2342
        overlap. */
2475
2473
 
2476
2474
                /* set old_offsets to offsets; recycle offsets */
2477
2475
                {
2478
 
                        ulint* tmp_offs = old_offsets;
 
2476
                        ulint* offs = old_offsets;
2479
2477
                        old_offsets = offsets;
2480
 
                        offsets = tmp_offs;
 
2478
                        offsets = offs;
2481
2479
                }
2482
2480
        }
2483
2481