20
20
Mostly this file is used in the server. But a little part of it is used in
21
21
mysqlbinlog too (definition of SELECT_DISTINCT and others).
22
The consequence is that 90% of the file is wrapped in \#ifndef MYSQL_CLIENT,
22
The consequence is that 90% of the file is wrapped in \#ifndef DRIZZLE_CLIENT,
23
23
except the part which must be in the server and in the client.
25
25
@TODO Name this file better. "priv" could mean private, privileged, privileges.
27
@TODO Get rid of the MYSQL_CLIENT and MYSQL_SERVER conditionals
27
@TODO Get rid of the DRIZZLE_CLIENT and DRIZZLE_SERVER conditionals
30
30
#ifndef DRIZZLE_SERVER_SERVER_INCLUDES_H
719
719
extern char *opt_logname, *opt_slow_logname;
720
720
extern const char *log_output_str;
722
extern MYSQL_BIN_LOG mysql_bin_log;
722
extern DRIZZLE_BIN_LOG mysql_bin_log;
723
723
extern LOGGER logger;
724
724
extern TABLE_LIST general_log, slow_log;
725
725
extern FILE *stderror_file;
775
775
extern pthread_t signal_thread;
777
MYSQL_LOCK *mysql_lock_tables(THD *thd, TABLE **table, uint count,
777
DRIZZLE_LOCK *mysql_lock_tables(THD *thd, TABLE **table, uint count,
778
778
uint flags, bool *need_reopen);
779
779
/* mysql_lock_tables() and open_table() flags bits */
780
#define MYSQL_LOCK_IGNORE_GLOBAL_READ_LOCK 0x0001
781
#define MYSQL_LOCK_IGNORE_FLUSH 0x0002
782
#define MYSQL_LOCK_NOTIFY_IF_NEED_REOPEN 0x0004
783
#define MYSQL_OPEN_TEMPORARY_ONLY 0x0008
784
#define MYSQL_LOCK_IGNORE_GLOBAL_READ_ONLY 0x0010
785
#define MYSQL_LOCK_PERF_SCHEMA 0x0020
780
#define DRIZZLE_LOCK_IGNORE_GLOBAL_READ_LOCK 0x0001
781
#define DRIZZLE_LOCK_IGNORE_FLUSH 0x0002
782
#define DRIZZLE_LOCK_NOTIFY_IF_NEED_REOPEN 0x0004
783
#define DRIZZLE_OPEN_TEMPORARY_ONLY 0x0008
784
#define DRIZZLE_LOCK_IGNORE_GLOBAL_READ_ONLY 0x0010
785
#define DRIZZLE_LOCK_PERF_SCHEMA 0x0020
787
void mysql_unlock_tables(THD *thd, MYSQL_LOCK *sql_lock);
788
void mysql_unlock_read_tables(THD *thd, MYSQL_LOCK *sql_lock);
787
void mysql_unlock_tables(THD *thd, DRIZZLE_LOCK *sql_lock);
788
void mysql_unlock_read_tables(THD *thd, DRIZZLE_LOCK *sql_lock);
789
789
void mysql_unlock_some_tables(THD *thd, TABLE **table,uint count);
790
void mysql_lock_remove(THD *thd, MYSQL_LOCK *locked,TABLE *table,
790
void mysql_lock_remove(THD *thd, DRIZZLE_LOCK *locked,TABLE *table,
791
791
bool always_unlock);
792
792
void mysql_lock_abort(THD *thd, TABLE *table, bool upgrade_lock);
793
793
void mysql_lock_downgrade_write(THD *thd, TABLE *table,
794
794
thr_lock_type new_lock_type);
795
795
bool mysql_lock_abort_for_thread(THD *thd, TABLE *table);
796
MYSQL_LOCK *mysql_lock_merge(MYSQL_LOCK *a,MYSQL_LOCK *b);
796
DRIZZLE_LOCK *mysql_lock_merge(DRIZZLE_LOCK *a,DRIZZLE_LOCK *b);
797
797
TABLE_LIST *mysql_lock_have_duplicate(THD *thd, TABLE_LIST *needle,
798
798
TABLE_LIST *haystack);
799
799
bool lock_global_read_lock(THD *thd);