~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to libdrizzle/column.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:
65
65
static drizzle_column_type_drizzle_t _column_type_drizzle_map_from[]=
66
66
{
67
67
 DRIZZLE_COLUMN_TYPE_DRIZZLE_MAX, /* 0 */
68
 
 DRIZZLE_COLUMN_TYPE_DRIZZLE_BOOLEAN,
 
68
 DRIZZLE_COLUMN_TYPE_DRIZZLE_TINY,
69
69
 DRIZZLE_COLUMN_TYPE_DRIZZLE_MAX,
70
70
 DRIZZLE_COLUMN_TYPE_DRIZZLE_LONG,
71
71
 DRIZZLE_COLUMN_TYPE_DRIZZLE_MAX,
364
364
      return NULL;
365
365
    }
366
366
 
367
 
    column->result = result;
368
 
    /* SET BELOW: column->next */
369
 
    column->prev = NULL;
370
 
    column->options= DRIZZLE_COLUMN_ALLOCATED;
371
 
    column->catalog[0] = '\0';
372
 
    column->db[0] = '\0';
373
 
    column->table[0] = '\0';
374
 
    column->orig_table[0] = '\0';
375
 
    column->name[0] = '\0';
376
 
    column->orig_name[0] = '\0';
377
 
    column->charset = 0;
378
 
    column->size = 0;
379
 
    column->max_size = 0;
380
 
    column->type = 0;
381
 
    column->flags = 0;
382
 
    column->decimals = 0;
383
 
    /* UNSET: column->default_value */
384
 
    column->default_value_size = 0;
385
 
 
 
367
    memset(column, 0, sizeof(drizzle_column_st));
 
368
    column->options|= DRIZZLE_COLUMN_ALLOCATED;
386
369
  }
387
370
  else
388
 
  {
389
 
    column->result = result;
390
 
    /* SET BELOW: column->next */
391
 
    column->prev = NULL;
392
 
    column->options= 0;
393
 
    column->catalog[0] = '\0';
394
 
    column->db[0] = '\0';
395
 
    column->table[0] = '\0';
396
 
    column->orig_table[0] = '\0';
397
 
    column->name[0] = '\0';
398
 
    column->orig_name[0] = '\0';
399
 
    column->charset = 0;
400
 
    column->size = 0;
401
 
    column->max_size = 0;
402
 
    column->type = 0;
403
 
    column->flags = 0;
404
 
    column->decimals = 0;
405
 
    /* UNSET: column->default_value */
406
 
    column->default_value_size = 0;
407
 
  }
 
371
    memset(column, 0, sizeof(drizzle_column_st));
408
372
 
409
373
  column->result= result;
410
374