~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/lock.h

  • Committer: Brian Aker
  • Date: 2010-11-08 20:10:51 UTC
  • mfrom: (1910.2.8 merge)
  • Revision ID: brian@tangent.org-20101108201051-fmplr6oke3c088kf
Encapsulation around locking/kill

Show diffs side-by-side

added added

removed removed

Lines of Context:
22
22
 
23
23
#include <vector>
24
24
#include "drizzled/thr_lock.h"
 
25
#include "drizzled/locking/global.h"
25
26
 
26
27
namespace drizzled
27
28
{
86
87
 
87
88
};
88
89
 
89
 
DrizzleLock *mysql_lock_tables(Session *session, Table **table, uint32_t count,
90
 
                               uint32_t flags, bool *need_reopen);
91
 
/* mysql_lock_tables() and open_table() flags bits */
 
90
/* lockTables() and open_table() flags bits */
92
91
#define DRIZZLE_LOCK_IGNORE_GLOBAL_READ_LOCK      0x0001
93
92
#define DRIZZLE_LOCK_IGNORE_FLUSH                 0x0002
94
93
#define DRIZZLE_LOCK_NOTIFY_IF_NEED_REOPEN        0x0004
95
94
#define DRIZZLE_OPEN_TEMPORARY_ONLY               0x0008
96
95
 
97
 
void mysql_unlock_tables(Session *session, DrizzleLock *sql_lock);
98
 
void mysql_unlock_read_tables(Session *session, DrizzleLock *sql_lock);
99
 
void mysql_unlock_some_tables(Session *session, Table **table, uint32_t count);
100
 
void mysql_lock_remove(Session *session, Table *table);
101
 
void mysql_lock_abort(Session *session, Table *table);
102
 
bool mysql_lock_abort_for_thread(Session *session, Table *table);
103
 
bool lock_global_read_lock(Session *session);
104
 
void unlock_global_read_lock(Session *session);
105
 
bool wait_if_global_read_lock(Session *session, bool abort_on_refresh,
106
 
                              bool is_not_commit);
107
 
void start_waiting_global_read_lock(Session *session);
108
 
bool make_global_read_lock_block_commit(Session *session);
109
 
void broadcast_refresh(void);
110
 
 
111
 
/* Lock based on name */
112
 
void unlock_table_name(TableList *table_list);
113
 
void unlock_table_names(TableList *table_list, TableList *last_table);
114
 
bool lock_table_names_exclusively(Session *session, TableList *table_list);
115
 
 
116
96
} /* namespace drizzled */
117
97
 
118
98
#endif /* DRIZZLED_LOCK_H */