~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/statement/flush.h

  • Committer: Monty Taylor
  • Date: 2011-02-13 17:26:39 UTC
  • mfrom: (2157.2.2 give-in-to-pkg-config)
  • mto: This revision was merged to the branch mainline in revision 2166.
  • Revision ID: mordred@inaugust.com-20110213172639-nhy7i72sfhoq13ms
Merged in pkg-config fixes.

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
 
4
 *  Copyright (C) 2009 Sun Microsystems, Inc.
5
5
 *
6
6
 *  This program is free software; you can redistribute it and/or modify
7
7
 *  it under the terms of the GNU General Public License as published by
33
33
class Flush : public Statement
34
34
{
35
35
public:
36
 
  Flush(Session *in_session)
37
 
    :
38
 
      Statement(in_session)
39
 
  {}
 
36
  Flush(Session *in_session) :
 
37
    Statement(in_session),
 
38
    flush_log(false),
 
39
    flush_tables(false),
 
40
    flush_tables_with_read_lock(false),
 
41
    flush_status(false),
 
42
    flush_global_status(false)
 
43
  {
 
44
    getSession()->getLex()->sql_command= SQLCOM_FLUSH;
 
45
    getSession()->getLex()->type= 0;
 
46
  }
40
47
 
41
48
  bool execute();
42
49
 
43
50
private:
 
51
  bool flush_log;
 
52
  bool flush_tables;
 
53
  bool flush_tables_with_read_lock;
 
54
  bool flush_status;
 
55
  bool flush_global_status;
 
56
 
 
57
public:
 
58
  void setFlushLog(bool f) { flush_log= f; }
 
59
  void setFlushTables(bool f) { flush_tables= f; }
 
60
  void setFlushTablesWithReadLock(bool f) {
 
61
    flush_tables= flush_tables_with_read_lock= f;
 
62
  }
 
63
  void setFlushStatus(bool f) { flush_status= f; }
 
64
  void setFlushGlobalStatus(bool f) { flush_global_status= f; }
 
65
 
 
66
private:
44
67
 
45
68
  /**
46
69
   * Reload/resets privileges and the different caches.