~drizzle-trunk/drizzle/development

« back to all changes in this revision

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

  • Committer: Stewart Smith
  • Author(s): Vasil Dimov, Stewart Smith
  • Date: 2010-12-20 02:24:00 UTC
  • mto: (2021.1.2 build)
  • mto: This revision was merged to the branch mainline in revision 2022.
  • Revision ID: stewart@flamingspork.com-20101220022400-0p9lvvppwgaowdju
Merge Revision revid:vasil.dimov@oracle.com-20101102165720-164z3666y3tut4c2 from MySQL InnoDB

Original revid:vasil.dimov@oracle.com-20101102165720-164z3666y3tut4c2

Original Authors: Vasil Dimov <vasil.dimov@oracle.com>
Original commit message:
Fix Bug#53046 dict_update_statistics_low can still be run concurrently on same table

Replace the array of mutexes that used to protect
dict_index_t::stat_n_diff_key_vals[] with an array of rw locks that protects
all the stats related members in dict_table_t and all of its indexes.

Approved by:    Jimmy (rb://503)

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
/*****************************************************************************
2
2
 
3
 
Copyright (C) 2006, 2009, Innobase Oy. All Rights Reserved.
 
3
Copyright (c) 2006, 2009, 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
42
42
        ulint           zip_size,/*!< compressed page size in bytes, or 0 */
43
43
        const dfield_t* dfield) /*!< in: data field */
44
44
{
45
 
        const byte*     field   = static_cast<const byte *>(dfield_get_data(dfield));
 
45
        const byte*     field   = dfield_get_data(dfield);
46
46
        ulint           f_len   = dfield_get_len(dfield);
47
47
        byte*           buf     = ext->buf + i * REC_MAX_INDEX_COL_LEN;
48
48
 
89
89
        mem_heap_t*     heap)   /*!< in: heap where created */
90
90
{
91
91
        ulint           i;
92
 
        row_ext_t*      ret = static_cast<row_ext_t *>(mem_heap_alloc(heap, (sizeof *ret)
93
 
                                             + (n_ext - 1) * sizeof ret->len));
 
92
        row_ext_t*      ret = mem_heap_alloc(heap, (sizeof *ret)
 
93
                                             + (n_ext - 1) * sizeof ret->len);
94
94
 
95
95
        ut_ad(ut_is_2pow(zip_size));
96
96
        ut_ad(zip_size <= UNIV_PAGE_SIZE);
97
97
 
98
98
        ret->n_ext = n_ext;
99
99
        ret->ext = ext;
100
 
        ret->buf = static_cast<byte *>(mem_heap_alloc(heap, n_ext * REC_MAX_INDEX_COL_LEN));
 
100
        ret->buf = mem_heap_alloc(heap, n_ext * REC_MAX_INDEX_COL_LEN);
101
101
#ifdef UNIV_DEBUG
102
102
        memset(ret->buf, 0xaa, n_ext * REC_MAX_INDEX_COL_LEN);
103
103
        UNIV_MEM_ALLOC(ret->buf, n_ext * REC_MAX_INDEX_COL_LEN);