718
718
uint32_t row_count;
719
719
session_id_t thread_id;
720
720
uint32_t tmp_table;
721
uint32_t global_read_lock;
721
enum global_read_lock_t
724
GOT_GLOBAL_READ_LOCK= 1,
725
MADE_GLOBAL_READ_LOCK_BLOCK_COMMIT= 2
728
global_read_lock_t _global_read_lock;
732
global_read_lock_t isGlobalReadLock() const
734
return _global_read_lock;
737
void setGlobalReadLock(global_read_lock_t arg)
739
_global_read_lock= arg;
742
DrizzleLock *lockTables(Table **tables, uint32_t count, uint32_t flags, bool *need_reopen);
743
bool lockGlobalReadLock();
744
bool lock_table_names(TableList *table_list);
745
bool lock_table_names_exclusively(TableList *table_list);
746
bool makeGlobalReadLockBlockCommit();
747
bool abortLockForThread(Table *table);
748
bool wait_if_global_read_lock(bool abort_on_refresh, bool is_not_commit);
749
int lock_table_name(TableList *table_list);
750
void abortLock(Table *table);
751
void removeLock(Table *table);
752
void unlockReadTables(DrizzleLock *sql_lock);
753
void unlockSomeTables(Table **table, uint32_t count);
754
void unlockTables(DrizzleLock *sql_lock);
755
void startWaitingGlobalReadLock();
756
void unlockGlobalReadLock();
759
int unlock_external(Table **table, uint32_t count);
760
int lock_external(Table **tables, uint32_t count);
761
bool wait_for_locked_table_names(TableList *table_list);
762
DrizzleLock *get_lock_data(Table **table_ptr, uint32_t count,
763
bool should_lock, Table **write_lock_used);
722
766
uint32_t server_status;
723
767
uint32_t open_options;
724
768
uint32_t select_number; /**< number of select (used for EXPLAIN) */
735
779
KILLED_NO_VALUE /* means none of the above states apply */
737
killed_state volatile killed;
782
killed_state_t volatile _killed;
786
void setKilled(killed_state_t arg)
791
killed_state_t getKilled()
796
volatile killed_state_t *getKilledPtr() // Do not use this method, it is here for historical convience.
739
801
bool some_tables_deleted;
1139
1201
void end_statement();
1140
1202
inline int killed_errno() const
1142
killed_state killed_val; /* to cache the volatile 'killed' */
1143
return (killed_val= killed) != KILL_BAD_DATA ? killed_val : 0;
1204
killed_state_t killed_val; /* to cache the volatile 'killed' */
1205
return (killed_val= _killed) != KILL_BAD_DATA ? killed_val : 0;
1145
1207
void send_kill_message() const;
1146
1208
/* return true if we will abort query if we make a warning now */