mirror of
https://github.com/MariaDB/server.git
synced 2025-12-24 11:21:21 +03:00
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
This commit is contained in:
@@ -246,9 +246,12 @@ int mysql_insert(THD *thd,TABLE_LIST *table_list, List<Item> &fields,
|
||||
id=table->next_number_field->val_int(); // Return auto_increment value
|
||||
if (info.copied || info.deleted)
|
||||
{
|
||||
mysql_update_log.write(thd->query, thd->query_length);
|
||||
Query_log_event qinfo(thd, thd->query);
|
||||
mysql_bin_log.write(&qinfo);
|
||||
mysql_update_log.write(thd, thd->query, thd->query_length);
|
||||
if (mysql_bin_log.is_open())
|
||||
{
|
||||
Query_log_event qinfo(thd, thd->query);
|
||||
mysql_bin_log.write(&qinfo);
|
||||
}
|
||||
}
|
||||
error=ha_autocommit_or_rollback(thd,error);
|
||||
if (thd->lock)
|
||||
@@ -1085,9 +1088,12 @@ bool delayed_insert::handle_inserts(void)
|
||||
}
|
||||
if (row->query && row->log_query)
|
||||
{
|
||||
mysql_update_log.write(row->query, row->query_length);
|
||||
Query_log_event qinfo(&thd, row->query);
|
||||
mysql_bin_log.write(&qinfo);
|
||||
mysql_update_log.write(&thd,row->query, row->query_length);
|
||||
if (mysql_bin_log.is_open())
|
||||
{
|
||||
Query_log_event qinfo(&thd, row->query);
|
||||
mysql_bin_log.write(&qinfo);
|
||||
}
|
||||
}
|
||||
if (table->blob_fields)
|
||||
free_delayed_insert_blobs(table);
|
||||
@@ -1245,9 +1251,12 @@ bool select_insert::send_eof()
|
||||
if (last_insert_id)
|
||||
thd->insert_id(last_insert_id); // For update log
|
||||
::send_ok(&thd->net,info.copied,last_insert_id,buff);
|
||||
mysql_update_log.write(thd->query,thd->query_length);
|
||||
Query_log_event qinfo(thd, thd->query);
|
||||
mysql_bin_log.write(&qinfo);
|
||||
mysql_update_log.write(thd,thd->query,thd->query_length);
|
||||
if (mysql_bin_log.is_open())
|
||||
{
|
||||
Query_log_event qinfo(thd, thd->query);
|
||||
mysql_bin_log.write(&qinfo);
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user