summaryrefslogtreecommitdiff
path: root/sql/sql_class.h
diff options
context:
space:
mode:
authorunknown <monty@donna.mysql.com>2000-09-16 04:27:21 +0300
committerunknown <monty@donna.mysql.com>2000-09-16 04:27:21 +0300
commit19b678eefe59529761691ddebece604107dcb42b (patch)
tree6e20280a8abcc28d14385983250a3e1823639028 /sql/sql_class.h
parentb35a18596c602e654b821ebef8e8a3147fae6dbf (diff)
downloadmariadb-git-19b678eefe59529761691ddebece604107dcb42b.tar.gz
Faster log::write() call, memory leak fix, flush master fix.
BUILD/compile-alpha-ccc: remove deps to get things to compile better Docs/manual.texi: Small fixes configure.in: Fix for mlockmem() include/my_sys.h: Made key_cache_inited global myisammrg/myrg_close.c: Fixed memory leak myisammrg/myrg_open.c: Initialize queue to avoid memory leak bug mysys/mf_format.c: Added overflow check mysys/mf_keycache.c: Made key_cache_init more secure to use mysys/my_static.h: Make key_cache_inite global sql/ChangeLog: Changes sql/lock.cc: Added logging of locktime sql/log.cc: Added logging of locktime sql/mysql_priv.h: Added locked_in_memory sql/mysqld.cc: Added logging of locktime + locked in memory sql/sql_acl.cc: Added thd to log::write() for faster call sql/sql_base.cc: Use global key_cache variable sql/sql_class.cc: Added result row counting sql/sql_class.h: Added thd to log::write() for faster call sql/sql_db.cc: Added thd to log::write() for faster call sql/sql_delete.cc: Added thd to log::write() for faster call sql/sql_insert.cc: Added thd to log::write() for faster call sql/sql_load.cc: Added thd to log::write() for faster call sql/sql_parse.cc: Added thd to log::write() for faster call sql/sql_rename.cc: Added thd to log::write() for faster call sql/sql_table.cc: Added thd to log::write() for faster call sql/sql_update.cc: Added thd to log::write() for faster call
Diffstat (limited to 'sql/sql_class.h')
-rw-r--r--sql/sql_class.h12
1 files changed, 7 insertions, 5 deletions
diff --git a/sql/sql_class.h b/sql/sql_class.h
index 4389512c1b3..34379baedd6 100644
--- a/sql/sql_class.h
+++ b/sql/sql_class.h
@@ -94,8 +94,9 @@ public:
void open(const char *log_name,enum_log_type log_type,
const char *new_name=0);
void new_file(void);
- void write(enum enum_server_command command,const char *format,...);
- void write(const char *query, uint query_length, ulong time_to_do_query=0);
+ void write(THD *thd, enum enum_server_command command,const char *format,...);
+ void write(THD *thd, const char *query, uint query_length,
+ time_t query_start=0);
void write(Query_log_event* event_info); // binary log write
void write(Load_log_event* event_info);
@@ -111,7 +112,7 @@ public:
int find_next_log(LOG_INFO* linfo);
int get_current_log(LOG_INFO* linfo);
- bool is_open() { return log_type != LOG_CLOSED; }
+ inline bool is_open() { return log_type != LOG_CLOSED; }
char* get_index_fname() { return index_file_name;}
char* get_log_fname() { return log_file_name; }
};
@@ -241,7 +242,7 @@ public:
const char *where;
char* last_nx_table; // last non-existent table, we need this for replication
char* last_nx_db; // database of the last nx table
- time_t start_time;
+ time_t start_time,time_after_lock;
time_t connect_time,thr_create_time; // track down slow pthread_create
thr_lock_type update_lock_default;
delayed_insert *di;
@@ -257,7 +258,7 @@ public:
#endif
ulonglong next_insert_id,last_insert_id,current_insert_id;
ha_rows select_limit,offset_limit,default_select_limit,cuted_fields,
- max_join_size;
+ max_join_size,sent_row_count;
ulong query_id,version, inactive_timeout,options,thread_id;
long dbug_thread_id;
pthread_t real_id;
@@ -276,6 +277,7 @@ public:
inline time_t query_start() { query_start_used=1; return start_time; }
inline void set_time() { if (!user_time) time(&start_time); }
inline void set_time(time_t t) { start_time=t; user_time=1; }
+ inline void lock_time() { time(&time_after_lock); }
inline void insert_id(ulonglong id)
{ last_insert_id=id; insert_id_used=1; }
inline ulonglong insert_id(void)