1
0
mirror of https://github.com/MariaDB/server.git synced 2026-01-06 05:22:24 +03:00

manually merged

client/mysqlbinlog.cc:
  Auto merged
configure.in:
  Auto merged
include/my_global.h:
  Auto merged
include/my_pthread.h:
  Auto merged
innobase/trx/trx0trx.c:
  Auto merged
mysql-test/include/varchar.inc:
  Auto merged
mysql-test/r/bdb.result:
  Auto merged
mysql-test/r/myisam.result:
  Auto merged
mysql-test/r/mysqlbinlog2.result:
  Auto merged
mysql-test/t/ctype_ucs.test:
  Auto merged
mysql-test/t/user_var.test:
  Auto merged
mysys/hash.c:
  Auto merged
sql/item_func.cc:
  Auto merged
sql/log_event.cc:
  Auto merged
sql/log_event.h:
  Auto merged
sql/set_var.h:
  Auto merged
sql/slave.cc:
  Auto merged
sql/slave.h:
  Auto merged
sql/sp_head.cc:
  Auto merged
sql/sql_base.cc:
  Auto merged
sql/sql_class.cc:
  Auto merged
sql/sql_lex.h:
  Auto merged
sql/sql_repl.cc:
  Auto merged
sql/sql_repl.h:
  Auto merged
sql/sql_table.cc:
  Auto merged
sql/sql_trigger.cc:
  Auto merged
mysql-test/r/ctype_ucs.result:
  ul
mysql-test/r/drop_temp_table.result:
  ul
mysql-test/r/innodb.result:
  ul
mysql-test/r/insert_select.result:
  ul
mysql-test/r/mix_innodb_myisam_binlog.result:
  ul
mysql-test/r/rpl_change_master.result:
  ul
mysql-test/r/rpl_charset.result:
  ul
mysql-test/r/rpl_error_ignored_table.result:
  ul
mysql-test/r/rpl_flush_log_loop.result:
  ul
mysql-test/r/rpl_flush_tables.result:
  ul
mysql-test/r/rpl_loaddata.result:
  ul
mysql-test/r/rpl_loaddata_rule_m.result:
  ul
mysql-test/r/rpl_log.result:
  ul
mysql-test/r/rpl_max_relay_size.result:
  ul
mysql-test/r/rpl_relayrotate.result:
  ul
mysql-test/r/rpl_replicate_do.result:
  ul
mysql-test/r/rpl_rotate_logs.result:
  ul
mysql-test/r/rpl_temporary.result:
  ul
mysql-test/r/rpl_timezone.result:
  ul
mysql-test/r/rpl_until.result:
  ul
mysql-test/r/rpl_user_variables.result:
  ul
mysql-test/r/user_var.result:
  ul
This commit is contained in:
unknown
2005-02-14 21:50:09 +01:00
84 changed files with 4343 additions and 3270 deletions

View File

@@ -36,8 +36,8 @@ bool mysql_delete(THD *thd, TABLE_LIST *table_list, COND *conds,
TABLE *table;
SQL_SELECT *select=0;
READ_RECORD info;
bool using_limit=limit != HA_POS_ERROR;
bool transactional_table, log_delayed, safe_update, const_cond;
bool using_limit=limit != HA_POS_ERROR;
bool transactional_table, safe_update, const_cond;
ha_rows deleted;
SELECT_LEX *select_lex= &thd->lex->select_lex;
DBUG_ENTER("mysql_delete");
@@ -232,7 +232,6 @@ cleanup:
delete select;
transactional_table= table->file->has_transactions();
log_delayed= (transactional_table || table->s->tmp_table);
/*
We write to the binary log even if we deleted no row, because maybe the
user is using this command to ensure that a table is clean on master *and
@@ -248,11 +247,11 @@ cleanup:
if (error <= 0)
thd->clear_error();
Query_log_event qinfo(thd, thd->query, thd->query_length,
log_delayed, FALSE);
transactional_table, FALSE);
if (mysql_bin_log.write(&qinfo) && transactional_table)
error=1;
}
if (!log_delayed)
if (!transactional_table)
thd->options|=OPTION_STATUS_NO_TRANS_UPDATE;
}
if (transactional_table)
@@ -397,7 +396,7 @@ multi_delete::multi_delete(THD *thd_arg, TABLE_LIST *dt,
uint num_of_tables_arg)
: delete_tables(dt), thd(thd_arg), deleted(0), found(0),
num_of_tables(num_of_tables_arg), error(0),
do_delete(0), transactional_tables(0), log_delayed(0), normal_tables(0)
do_delete(0), transactional_tables(0), normal_tables(0)
{
tempfiles = (Unique **) sql_calloc(sizeof(Unique *) * (num_of_tables-1));
}
@@ -444,9 +443,7 @@ multi_delete::initialize_tables(JOIN *join)
tbl->no_cache= 1;
tbl->used_keys.clear_all();
if (tbl->file->has_transactions())
log_delayed= transactional_tables= 1;
else if (tbl->s->tmp_table != NO_TMP_TABLE)
log_delayed= 1;
transactional_tables= 1;
else
normal_tables= 1;
}
@@ -669,14 +666,14 @@ bool multi_delete::send_eof()
if (error <= 0)
thd->clear_error();
Query_log_event qinfo(thd, thd->query, thd->query_length,
log_delayed, FALSE);
transactional_tables, FALSE);
if (mysql_bin_log.write(&qinfo) && !normal_tables)
local_error=1; // Log write failed: roll back the SQL statement
}
if (!log_delayed)
if (!transactional_tables)
thd->options|=OPTION_STATUS_NO_TRANS_UPDATE;
}
/* Commit or rollback the current SQL statement */
/* Commit or rollback the current SQL statement */
if (transactional_tables)
if (ha_autocommit_or_rollback(thd,local_error > 0))
local_error=1;
@@ -767,7 +764,7 @@ bool mysql_truncate(THD *thd, TABLE_LIST *table_list, bool dont_send_ok)
*fn_ext(path)=0; // Remove the .frm extension
error= ha_create_table(path,&create_info,1);
query_cache_invalidate3(thd, table_list, 0);
query_cache_invalidate3(thd, table_list, 0);
end:
if (!dont_send_ok)
@@ -778,7 +775,7 @@ end:
{
thd->clear_error();
Query_log_event qinfo(thd, thd->query, thd->query_length,
thd->tmp_table, FALSE);
0, FALSE);
mysql_bin_log.write(&qinfo);
}
send_ok(thd); // This should return record count