~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/message/statement_transform.h

  • 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
/* -*- mode: c++; c-basic-offset: 2; indent-tabs-mode: nil; -*-
2
2
 *  vim:expandtab:shiftwidth=2:tabstop=2:smarttab:
3
3
 *
4
 
 *  Copyright (C) 2009 Sun Microsystems, Inc.
5
 
 *  Copyright (C) 2010 Jay Pipes <jaypipes@gmail.com>
 
4
 *  Copyright (C) 2009 Sun Microsystems
 
5
 *  Copyright (c) 2010 Jay Pipes <jayjpipes@gmail.com>
6
6
 *
7
7
 *  Authors:
8
8
 *
36
36
#include <string>
37
37
#include <vector>
38
38
 
39
 
#include <drizzled/common.h>
 
39
#include "drizzled/common.h"
40
40
 
41
41
namespace drizzled
42
42
{
59
59
class TruncateTableStatement;
60
60
class CreateSchemaStatement;
61
61
class DropSchemaStatement;
62
 
class AlterSchemaStatement;
63
62
class SetVariableStatement;
64
63
 
65
64
/** A Variation of SQL to be output during transformation */
76
75
{
77
76
  NONE= 0,
78
77
  MISSING_HEADER= 1, /* A data segment without a header segment was found */
79
 
  MISSING_DATA= 2,   /* A header segment without a data segment was found */
80
 
  UUID_MISMATCH= 3
 
78
  MISSING_DATA= 2 /* A header segment without a data segment was found */
81
79
};
82
80
 
83
81
/**
348
346
                                  enum TransformSqlVariant sql_variant= DRIZZLE);
349
347
 
350
348
/**
351
 
 * This function looks at a supplied AlterSchemaStatement
352
 
 * and constructs a correctly-formatted SQL
353
 
 * statement to the supplied destination string.
354
 
 *
355
 
 * @param AlterSchemaStatement message to transform
356
 
 * @param Destination string to append SQL to
357
 
 * @param Variation of SQL to generate
358
 
 *
359
 
 * @retval
360
 
 *  NONE if successful transformation
361
 
 * @retval
362
 
 *  Error code (see enum TransformSqlError definition) if failure
363
 
 */
364
 
enum TransformSqlError
365
 
transformAlterSchemaStatementToSql(const AlterSchemaStatement &statement,
366
 
                                   std::string &destination,
367
 
                                   enum TransformSqlVariant sql_variant= DRIZZLE);
368
 
 
369
 
/**
370
349
 * This function looks at a supplied SetVariableStatement
371
350
 * and constructs a correctly-formatted SQL
372
351
 * statement to the supplied destination string.