mirror of
https://github.com/MariaDB/server.git
synced 2025-07-27 18:02:13 +03:00
Put temporary files in binlog cache when using BEGIN/COMMIT
Let MySQL 4.0 read 4.1 .frm files without 4.1 specific extensions New variables @@rand_seed1 and @@rand_seed2 (used by replication) DROP TEMPORARY TABLE mysql-test/r/rpl_log.result: Update of results after last replication change mysql-test/r/variables.result: Test of new variables @@rand_seed1 and @@rand_seed2 mysql-test/t/variables.test: Test of new variables @@rand_seed1 and @@rand_seed2 sql/field.cc: Let MySQL 4.0 read 4.1 .frm files without 4.1 specific extensions sql/field.h: Let MySQL 4.0 read 4.1 .frm files without 4.1 specific extensions sql/item_func.cc: Put temporary files in binlog cache when using BEGIN/COMMIT sql/log.cc: Put temporary files in binlog cache when using BEGIN/COMMIT More debug information sql/log_event.cc: Put temporary files in binlog cache when using BEGIN/COMMIT sql/log_event.h: Put temporary files in binlog cache when using BEGIN/COMMIT sql/set_var.cc: Add system variables @@rand_seed1 and @@rand_seed2 sql/set_var.h: Add system variables @@rand_seed1 and @@rand_seed2 sql/slave.cc: Put temporary files in binlog cache when using BEGIN/COMMIT sql/sql_acl.cc: Put temporary files in binlog cache when using BEGIN/COMMIT sql/sql_base.cc: Store DROP of temporary tables in binlog cache sql/sql_class.h: Put temporary files in binlog cache when using BEGIN/COMMIT sql/sql_db.cc: Put temporary files in binlog cache when using BEGIN/COMMIT sql/sql_delete.cc: Put temporary files in binlog cache when using BEGIN/COMMIT sql/sql_insert.cc: Put temporary files in binlog cache when using BEGIN/COMMIT sql/sql_lex.h: DROP TEMPORARY TABLE sql/sql_load.cc: Put temporary files in binlog cache when using BEGIN/COMMIT sql/sql_parse.cc: Put temporary files in binlog cache when using BEGIN/COMMIT sql/sql_rename.cc: Put temporary files in binlog cache when using BEGIN/COMMIT sql/sql_repl.cc: Put temporary files in binlog cache when using BEGIN/COMMIT sql/sql_repl.h: Put temporary files in binlog cache when using BEGIN/COMMIT sql/sql_table.cc: Put temporary files in binlog cache when using BEGIN/COMMIT sql/sql_update.cc: Put temporary files in binlog cache when using BEGIN/COMMIT sql/sql_yacc.yy: DROP TEMPORARY sql/table.cc: Let MySQL 4.0 read 4.1 .frm files without 4.1 specific extensions sql/unireg.cc: Let MySQL 4.0 read 4.1 .frm files without 4.1 specific extensions
This commit is contained in:
@ -104,7 +104,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 & SUPER_ACL));
|
||||
bool using_transactions, bulk_insert=0;
|
||||
bool transactional_table, log_delayed, bulk_insert=0;
|
||||
uint value_count;
|
||||
uint save_time_stamp;
|
||||
ulong counter = 1;
|
||||
@ -297,21 +297,23 @@ 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
|
||||
using_transactions=table->file->has_transactions();
|
||||
if ((info.copied || info.deleted) && (error <= 0 || !using_transactions))
|
||||
|
||||
transactional_table= table->file->has_transactions();
|
||||
log_delayed= (transactional_table || table->tmp_table);
|
||||
if ((info.copied || info.deleted) && (error <= 0 || !transactional_table))
|
||||
{
|
||||
mysql_update_log.write(thd, thd->query, thd->query_length);
|
||||
if (mysql_bin_log.is_open())
|
||||
{
|
||||
Query_log_event qinfo(thd, thd->query, thd->query_length,
|
||||
using_transactions);
|
||||
if (mysql_bin_log.write(&qinfo) && using_transactions)
|
||||
log_delayed);
|
||||
if (mysql_bin_log.write(&qinfo) && transactional_table)
|
||||
error=1;
|
||||
}
|
||||
if (!using_transactions)
|
||||
if (!log_delayed)
|
||||
thd->options|=OPTION_STATUS_NO_TRANS_UPDATE;
|
||||
}
|
||||
if (using_transactions)
|
||||
if (transactional_table)
|
||||
error=ha_autocommit_or_rollback(thd,error);
|
||||
if (info.copied || info.deleted)
|
||||
{
|
||||
@ -1197,7 +1199,7 @@ bool delayed_insert::handle_inserts(void)
|
||||
mysql_update_log.write(&thd,row->query, row->query_length);
|
||||
if (using_bin_log)
|
||||
{
|
||||
Query_log_event qinfo(&thd, row->query, row->query_length);
|
||||
Query_log_event qinfo(&thd, row->query, row->query_length,0);
|
||||
mysql_bin_log.write(&qinfo);
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user