mirror of
https://github.com/MariaDB/server.git
synced 2025-07-30 16:24:05 +03:00
Only write full transactions to binary log
A lot of new functions for BDB tables Fix for DROP DATABASE on windows Default server_id variables Docs/manual.texi: Update of BDB info + Changes configure.in: Added test of readlink include/mysqld_error.h: Added new error message sql/ha_berkeley.cc: Added storing of status, CHECK, ANALYZE and OPTIMIZE TABLE sql/ha_berkeley.h: Added storing of status, CHECK, ANALYZE and OPTIMIZE TABLE sql/handler.cc: Only write full transactions to binary log sql/hostname.cc: cleanup sql/log.cc: Only write full transactions to binary log sql/log_event.h: Only write full transactions to binary log sql/mf_iocache.cc: Changes to be able to use IO_CACHE to save statements in a transaction sql/mysql_priv.h: New variables sql/mysqld.cc: Only write full transactions to binary log Added default values for server_id Lots of new bdb options sql/share/czech/errmsg.sys: Added new error message sql/share/czech/errmsg.txt: Added new error message sql/share/danish/errmsg.sys: Added new error message sql/share/danish/errmsg.txt: Added new error message sql/share/dutch/errmsg.sys: Added new error message sql/share/dutch/errmsg.txt: Added new error message sql/share/english/errmsg.sys: Added new error message sql/share/english/errmsg.txt: Added new error message sql/share/estonian/errmsg.sys: Added new error message sql/share/estonian/errmsg.txt: Added new error message sql/share/french/errmsg.sys: Added new error message sql/share/french/errmsg.txt: Added new error message sql/share/german/errmsg.sys: Added new error message sql/share/german/errmsg.txt: Added new error message sql/share/greek/errmsg.sys: Added new error message sql/share/greek/errmsg.txt: Added new error message sql/share/hungarian/errmsg.sys: Added new error message sql/share/hungarian/errmsg.txt: Added new error message sql/share/italian/errmsg.sys: Added new error message sql/share/italian/errmsg.txt: Added new error message sql/share/japanese/errmsg.sys: Added new error message sql/share/japanese/errmsg.txt: Added new error message sql/share/korean/errmsg.sys: Added new error message sql/share/korean/errmsg.txt: Added new error message sql/share/norwegian-ny/errmsg.txt: Added new error message sql/share/norwegian/errmsg.txt: Added new error message sql/share/polish/errmsg.sys: Added new error message sql/share/polish/errmsg.txt: Added new error message sql/share/portuguese/errmsg.sys: Added new error message sql/share/portuguese/errmsg.txt: Added new error message sql/share/romanian/errmsg.txt: Added new error message sql/share/russian/errmsg.sys: Added new error message sql/share/russian/errmsg.txt: Added new error message sql/share/slovak/errmsg.sys: Added new error message sql/share/slovak/errmsg.txt: Added new error message sql/share/spanish/errmsg.sys: Added new error message sql/share/spanish/errmsg.txt: Added new error message sql/share/swedish/errmsg.OLD: Added new error message sql/share/swedish/errmsg.sys: Added new error message sql/share/swedish/errmsg.txt: Added new error message sql/sql_base.cc: cleanup sql/sql_class.cc: Only write full transactions to binary log sql/sql_class.h: Added error handling of failed writes to logs sql/sql_db.cc: Fix for DROP DATABASE on windows sql/sql_delete.cc: Only write full transactions to binary log sql/sql_insert.cc: Only write full transactions to binary log sql/sql_load.cc: Only write full transactions to binary log sql/sql_parse.cc: End transaction at DROP, RENAME, CREATE and TRUNCATE sql/sql_table.cc: Fixes for ALTER TABLE on BDB tables for windows sql/sql_update.cc: Only write full transactions to binary log sql/sql_yacc.yy: AGAINST is not anymore a reserved word support-files/my-huge.cnf.sh: Changed to use binary log support-files/my-large.cnf.sh: Changed to use binary log support-files/my-medium.cnf.sh: Changed to use binary log support-files/my-small.cnf.sh: Changed to use binary log
This commit is contained in:
@ -102,6 +102,7 @@ int mysql_insert(THD *thd,TABLE_LIST *table_list, List<Item> &fields,
|
||||
int error;
|
||||
bool log_on= ((thd->options & OPTION_UPDATE_LOG) ||
|
||||
!(thd->master_access & PROCESS_ACL));
|
||||
bool using_transactions;
|
||||
uint value_count;
|
||||
uint save_time_stamp;
|
||||
ulong counter = 1;
|
||||
@ -254,18 +255,21 @@ int mysql_insert(THD *thd,TABLE_LIST *table_list, List<Item> &fields,
|
||||
thd->insert_id(id); // For update log
|
||||
else if (table->next_number_field)
|
||||
id=table->next_number_field->val_int(); // Return auto_increment value
|
||||
if (info.copied || info.deleted)
|
||||
using_transactions=table->file->has_transactions();
|
||||
if ((info.copied || info.deleted) && (error == 0 || !using_transactions))
|
||||
{
|
||||
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);
|
||||
Query_log_event qinfo(thd, thd->query, using_transactions);
|
||||
if (mysql_bin_log.write(&qinfo) && using_transactions)
|
||||
error=1;
|
||||
}
|
||||
if (!table->file->has_transactions())
|
||||
if (!using_transactions)
|
||||
thd->options|=OPTION_STATUS_NO_TRANS_UPDATE;
|
||||
}
|
||||
error=ha_autocommit_or_rollback(thd,error);
|
||||
if (using_transactions)
|
||||
error=ha_autocommit_or_rollback(thd,error);
|
||||
if (thd->lock)
|
||||
{
|
||||
mysql_unlock_tables(thd, thd->lock);
|
||||
@ -1265,7 +1269,8 @@ bool select_insert::send_eof()
|
||||
mysql_update_log.write(thd,thd->query,thd->query_length);
|
||||
if (mysql_bin_log.is_open())
|
||||
{
|
||||
Query_log_event qinfo(thd, thd->query);
|
||||
Query_log_event qinfo(thd, thd->query,
|
||||
table->file->has_transactions());
|
||||
mysql_bin_log.write(&qinfo);
|
||||
}
|
||||
return 0;
|
||||
|
Reference in New Issue
Block a user