~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to plugin/innobase/buf/buf0buf.c

Merge Revision revid:svn-v4:16c675df-0fcb-4bc9-8058-dcc011a37293:branches/zip:6790 from MySQL InnoDB

Original revid:svn-v4:16c675df-0fcb-4bc9-8058-dcc011a37293:branches/zip:6790

Original Authors: jyang
Original commit message:
branches/zip: Fix bug #51356: "many valgrind errors in error messages
with concurrent ddl". Null terminate the name string returned
from innobase_convert_identifier() call when reporting DB_DUPLICATE_KEY
error in create_table_def().
rb://266 approved by Marko

Show diffs side-by-side

added added

removed removed

Lines of Context:
1191
1191
 
1192
1192
        HASH_DELETE(buf_page_t, hash, buf_pool->page_hash, fold, bpage);
1193
1193
        HASH_INSERT(buf_page_t, hash, buf_pool->page_hash, fold, dpage);
 
1194
 
 
1195
        UNIV_MEM_INVALID(bpage, sizeof *bpage);
1194
1196
}
1195
1197
 
1196
1198
/********************************************************************//**
2039
2041
        ulint           retries = 0;
2040
2042
 
2041
2043
        ut_ad(mtr);
2042
 
        ut_ad(mtr->state == MTR_ACTIVE);
2043
2044
        ut_ad((rw_latch == RW_S_LATCH)
2044
2045
              || (rw_latch == RW_X_LATCH)
2045
2046
              || (rw_latch == RW_NO_LATCH));
2222
2223
                        ut_ad(!block->page.in_flush_list);
2223
2224
                } else {
2224
2225
                        /* Relocate buf_pool->flush_list. */
2225
 
                        buf_flush_relocate_on_flush_list(bpage,
2226
 
                                                         &block->page);
 
2226
                        buf_page_t*     b;
 
2227
 
 
2228
                        b = UT_LIST_GET_PREV(list, &block->page);
 
2229
                        ut_ad(block->page.in_flush_list);
 
2230
                        UT_LIST_REMOVE(list, buf_pool->flush_list,
 
2231
                                       &block->page);
 
2232
 
 
2233
                        if (b) {
 
2234
                                UT_LIST_INSERT_AFTER(
 
2235
                                        list, buf_pool->flush_list, b,
 
2236
                                        &block->page);
 
2237
                        } else {
 
2238
                                UT_LIST_ADD_FIRST(
 
2239
                                        list, buf_pool->flush_list,
 
2240
                                        &block->page);
 
2241
                        }
2227
2242
                }
2228
2243
 
2229
2244
                /* Buffer-fix, I/O-fix, and X-latch the block
2237
2252
                block->page.buf_fix_count = 1;
2238
2253
                buf_block_set_io_fix(block, BUF_IO_READ);
2239
2254
                rw_lock_x_lock(&block->lock);
2240
 
 
2241
 
                UNIV_MEM_INVALID(bpage, sizeof *bpage);
2242
 
 
2243
2255
                mutex_exit(&block->mutex);
2244
2256
                mutex_exit(&buf_pool_zip_mutex);
2245
2257
                buf_pool->n_pend_unzip++;
2385
2397
        ibool           success;
2386
2398
        ulint           fix_type;
2387
2399
 
2388
 
        ut_ad(block);
2389
 
        ut_ad(mtr);
2390
 
        ut_ad(mtr->state == MTR_ACTIVE);
 
2400
        ut_ad(mtr && block);
2391
2401
        ut_ad((rw_latch == RW_S_LATCH) || (rw_latch == RW_X_LATCH));
2392
2402
 
2393
2403
        mutex_enter(&block->mutex);
2499
2509
        ulint           fix_type;
2500
2510
 
2501
2511
        ut_ad(mtr);
2502
 
        ut_ad(mtr->state == MTR_ACTIVE);
2503
2512
        ut_ad((rw_latch == RW_S_LATCH) || (rw_latch == RW_X_LATCH));
2504
2513
 
2505
2514
        mutex_enter(&block->mutex);
2599
2608
        ibool           success;
2600
2609
        ulint           fix_type;
2601
2610
 
2602
 
        ut_ad(mtr);
2603
 
        ut_ad(mtr->state == MTR_ACTIVE);
2604
 
 
2605
2611
        buf_pool_mutex_enter();
2606
2612
        block = buf_block_hash_get(space_id, page_no);
2607
2613
 
2975
2981
        ulint           time_ms         = ut_time_ms();
2976
2982
 
2977
2983
        ut_ad(mtr);
2978
 
        ut_ad(mtr->state == MTR_ACTIVE);
2979
2984
        ut_ad(space || !zip_size);
2980
2985
 
2981
2986
        free_block = buf_LRU_get_free_block(0);