~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/session.h

  • Committer: Brian Aker
  • Date: 2009-03-25 22:52:34 UTC
  • mfrom: (934.2.28 small-cleanups)
  • Revision ID: brian@tangent.org-20090325225234-2ewmv7ma3kh858jk
Merge with Jay

Show diffs side-by-side

added added

removed removed

Lines of Context:
386
386
#include <drizzled/security_context.h>
387
387
#include <drizzled/open_tables_state.h>
388
388
 
389
 
/* Flags for the Session::system_thread variable */
390
 
enum enum_thread_type
391
 
{
392
 
  NON_SYSTEM_THREAD
393
 
};
394
 
 
395
389
#include <drizzled/internal_error_handler.h> 
396
390
#include <drizzled/diagnostics_area.h> 
397
391
 
736
730
  my_thread_id  thread_id;
737
731
  uint       tmp_table, global_read_lock;
738
732
  uint       server_status,open_options;
739
 
  enum enum_thread_type system_thread;
740
733
  uint32_t       select_number;             //number of select (used for EXPLAIN)
741
734
  /* variables.transaction_isolation is reset to this after each commit */
742
735
  enum_tx_isolation session_tx_isolation;
906
899
   */
907
900
  bool authenticate();
908
901
 
909
 
  /**
910
 
   * Performs handshake with client and authorizes user.
911
 
   *
912
 
   * Returns true is the connection is valid and the 
913
 
   * user is authorized, otherwise false.
914
 
   */
915
 
  bool check_connection(void);
916
 
 
917
 
  /**
918
 
   * Check if user exists and the password supplied is correct.
919
 
   *
920
 
   * Returns true on success, and false on failure.
921
 
   *
922
 
   * @note Host, user and passwd may point to communication buffer.
923
 
   * Current implementation does not depend on that, but future changes
924
 
   * should be done with this in mind; 
925
 
   *
926
 
   * @param  Scrambled password received from client
927
 
   * @param  Length of scrambled password
928
 
   * @param  Database name to connect to, may be NULL
929
 
   */
930
 
  bool check_user(const char *passwd, uint32_t passwd_len, const char *db);
931
 
 
932
902
  /*
933
903
    For enter_cond() / exit_cond() to work the mutex must be got before
934
904
    enter_cond(); this mutex is then released by exit_cond().
981
951
  {
982
952
    return limit_found_rows;
983
953
  }
984
 
  inline bool active_transaction()
 
954
  /** Returns whether the session is currently inside a transaction */
 
955
  inline bool inTransaction()
985
956
  {
986
957
    return server_status & SERVER_STATUS_IN_TRANS;
987
958
  }
1054
1025
  {
1055
1026
    *place= new_value;
1056
1027
  }
1057
 
  void nocheck_register_item_tree_change(Item **place, Item *old_value,
1058
 
                                         MEM_ROOT *runtime_memroot);
1059
 
  void rollback_item_tree_changes();
1060
 
 
1061
1028
  /*
1062
1029
    Cleanup statement parse state (parse tree, lex) and execution
1063
1030
    state after execution of a non-prepared SQL statement.
1165
1132
  void close_temporary_tables();
1166
1133
 
1167
1134
private:
 
1135
  /**
 
1136
   * Performs handshake with client and authorizes user.
 
1137
   *
 
1138
   * Returns true is the connection is valid and the 
 
1139
   * user is authorized, otherwise false.
 
1140
   */
 
1141
  bool _checkConnection(void);
 
1142
 
 
1143
  /**
 
1144
   * Check if user exists and the password supplied is correct.
 
1145
   *
 
1146
   * Returns true on success, and false on failure.
 
1147
   *
 
1148
   * @note Host, user and passwd may point to communication buffer.
 
1149
   * Current implementation does not depend on that, but future changes
 
1150
   * should be done with this in mind; 
 
1151
   *
 
1152
   * @param  Scrambled password received from client
 
1153
   * @param  Length of scrambled password
 
1154
   * @param  Database name to connect to, may be NULL
 
1155
   */
 
1156
  bool checkUser(const char *passwd, uint32_t passwd_len, const char *db);
1168
1157
  const char *proc_info;
1169
1158
 
1170
1159
  /** The current internal error handler for this thread, or NULL. */