~drizzle-trunk/drizzle/development

« back to all changes in this revision

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

  • Committer: Stewart Smith
  • Date: 2011-02-24 07:46:16 UTC
  • mto: (2200.1.2 drizzle-staging)
  • mto: This revision was merged to the branch mainline in revision 2201.
  • Revision ID: stewart@flamingspork.com-20110224074616-l2rmp406vf78x71q
add ER_NO_LOCK_HELD error code, and expect it in case of UNLOCK TABLES without any locks held.

Show diffs side-by-side

added added

removed removed

Lines of Context:
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 */
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;
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;
 
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;
2311
2311
        rec_t*          old_rec         = NULL;
2312
 
        ulint           offs;
2313
 
        ulint           n_slots;
 
2312
        ulint           offs= 0;
 
2313
        ulint           n_slots= 0;
2314
2314
        ibool           ret             = FALSE;
2315
 
        ulint           i;
 
2315
        ulint           i= 0;
2316
2316
        ulint*          offsets         = NULL;
2317
2317
        ulint*          old_offsets     = NULL;
 
2318
        void* buf_ptr= NULL;
2318
2319
 
2319
2320
        if (UNIV_UNLIKELY((ibool) !!page_is_comp(page)
2320
2321
                          != dict_table_is_comp(index->table))) {
2336
2337
        /* The following buffer is used to check that the
2337
2338
        records in the page record heap do not overlap */
2338
2339
 
2339
 
        buf = mem_heap_zalloc(heap, UNIV_PAGE_SIZE);
 
2340
        buf_ptr= mem_heap_zalloc(heap, UNIV_PAGE_SIZE);
 
2341
        buf = static_cast<byte *>(buf_ptr);
2340
2342
 
2341
2343
        /* Check first that the record heap and the directory do not
2342
2344
        overlap. */
2473
2475
 
2474
2476
                /* set old_offsets to offsets; recycle offsets */
2475
2477
                {
2476
 
                        ulint* offs = old_offsets;
 
2478
                        ulint* tmp_offs = old_offsets;
2477
2479
                        old_offsets = offsets;
2478
 
                        offsets = offs;
 
2480
                        offsets = tmp_offs;
2479
2481
                }
2480
2482
        }
2481
2483