~ubuntu-branches/ubuntu/wily/mysql-5.6/wily

« back to all changes in this revision

Viewing changes to sql/sql_class.h

  • Committer: Package Import Robot
  • Author(s): Marc Deslauriers
  • Date: 2015-07-21 07:09:29 UTC
  • mto: This revision was merged to the branch mainline in revision 14.
  • Revision ID: package-import@ubuntu.com-20150721070929-mg4dpqkgg3it1ajf
Tags: upstream-5.6.25
ImportĀ upstreamĀ versionĀ 5.6.25

Show diffs side-by-side

added added

removed removed

Lines of Context:
45
45
#include <mysql/psi/mysql_idle.h>
46
46
#include <mysql_com_server.h>
47
47
#include "sql_data_change.h"
 
48
#include "my_atomic.h"
48
49
 
49
50
#define FLAGSTR(V,F) ((V)&(F)?#F" ":"")
50
51
 
2012
2013
 
2013
2014
  bool lock_global_read_lock(THD *thd);
2014
2015
  void unlock_global_read_lock(THD *thd);
 
2016
 
 
2017
  /**
 
2018
    Used by innodb memcached server to check if any connections
 
2019
    have global read lock
 
2020
  */
 
2021
  static bool global_read_lock_active()
 
2022
  {
 
2023
    return my_atomic_load32(&m_active_requests) ? true : false;
 
2024
  }
 
2025
 
2015
2026
  /**
2016
2027
    Check if this connection can acquire protection against GRL and
2017
2028
    emit error if otherwise.
2029
2040
  bool is_acquired() const { return m_state != GRL_NONE; }
2030
2041
  void set_explicit_lock_duration(THD *thd);
2031
2042
private:
 
2043
  volatile static int32 m_active_requests;
2032
2044
  enum_grl_state m_state;
2033
2045
  /**
2034
2046
    In order to acquire the global read lock, the connection must
2256
2268
    decremented each time before it returns from the function.
2257
2269
  */
2258
2270
  uint fill_status_recursion_level;
 
2271
  uint fill_variables_recursion_level;
2259
2272
 
2260
2273
  /* container for handler's private per-connection data */
2261
2274
  Ha_data ha_data[MAX_HA];