diff options
author | unknown <serg@serg.mylan> | 2005-01-27 22:38:56 +0100 |
---|---|---|
committer | unknown <serg@serg.mylan> | 2005-01-27 22:38:56 +0100 |
commit | 042448aa3364a65ed41ceeff10edbd170ee85a2c (patch) | |
tree | 6715c798eca742afb2f6f41acc10e122a8d50aa0 /sql/sql_update.cc | |
parent | a7401bf7cc1646f76710992cd77c54b97df8d860 (diff) | |
download | mariadb-git-042448aa3364a65ed41ceeff10edbd170ee85a2c.tar.gz |
query_id and my_xid -> ulonglong
fix for binlog+autocommit+tclog
comments, style fixes
libmysqld/libmysqld.rc:
Change mode to -rw-rw-r--
libmysqld/resource.h:
Change mode to -rw-rw-r--
configure.in:
check for getpagesize
include/my_global.h:
typo ?
include/my_pthread.h:
bug in thread_safe_decrement_and_test()
mysql-test/r/bdb.result:
results updated
mysql-test/r/innodb.result:
results updated
mysql-test/r/mix_innodb_myisam_binlog.result:
results updated
mysql-test/r/rpl_relayrotate.result:
results updated
sql/ha_berkeley.cc:
style fixes
sql/ha_innodb.cc:
fixes to follow innodb coding style
sql/handler.cc:
more comments. XA COMMIT ONE PHASE fix.
sql/handler.h:
my_xid -> ulonglong. comments
sql/item_func.cc:
DO RELEASE_LOCK("...") is no cache_stmt
sql/log.cc:
comments, better error messages
sql/log_event.cc:
even in autocommit mode we may need to cache_stmt
xid is ulonglong
sql/log_event.h:
more comments.
sql/mysql_priv.h:
query_id is ulonglong
sql/mysqld.cc:
default value for --log-tc changed
sql/share/errmsg.txt:
better error messages
sql/sql_class.h:
cleanup, comments
sql/sql_delete.cc:
deleting from temporary tables is not always transactional
sql/sql_insert.cc:
insert into temporary table is not always transactional
sql/sql_load.cc:
load data into temp table is not always transactional
sql/sql_parse.cc:
comments. bad merge fixed. xa_state_names[]
sql/sql_table.cc:
create/drop temp table is not always transactional
sql/sql_update.cc:
update temp table is not always transactional
Diffstat (limited to 'sql/sql_update.cc')
-rw-r--r-- | sql/sql_update.cc | 22 |
1 files changed, 7 insertions, 15 deletions
diff --git a/sql/sql_update.cc b/sql/sql_update.cc index 9613e39d403..d31a0c428cd 100644 --- a/sql/sql_update.cc +++ b/sql/sql_update.cc @@ -118,7 +118,7 @@ int mysql_update(THD *thd, { bool using_limit= limit != HA_POS_ERROR; bool safe_update= thd->options & OPTION_SAFE_UPDATES; - bool used_key_is_modified, transactional_table, log_delayed; + bool used_key_is_modified, transactional_table; bool ignore_err= (thd->lex->duplicates == DUP_IGNORE); int res; int error=0; @@ -474,7 +474,6 @@ int mysql_update(THD *thd, query_cache_invalidate3(thd, table_list, 1); } - log_delayed= (transactional_table || table->tmp_table); if ((updated || (error < 0)) && (error <= 0 || !transactional_table)) { if (mysql_bin_log.is_open()) @@ -482,11 +481,11 @@ int mysql_update(THD *thd, 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; // Rollback update } - if (!log_delayed) + if (!transactional_table) thd->options|=OPTION_STATUS_NO_TRANS_UPDATE; } if (transactional_table) @@ -1001,7 +1000,6 @@ multi_update::initialize_tables(JOIN *join) DBUG_RETURN(1); main_table=join->join_tab->table; trans_safe= transactional_tables= main_table->file->has_transactions(); - log_delayed= trans_safe || main_table->tmp_table != NO_TMP_TABLE; table_to_update= 0; /* Create a temporary table for keys to all tables, except main table */ @@ -1339,17 +1337,13 @@ int multi_update::do_updates(bool from_send_error) goto err; } updated++; - if (table->tmp_table != NO_TMP_TABLE) - log_delayed= 1; } } if (updated != org_updated) { - if (table->tmp_table != NO_TMP_TABLE) - log_delayed= 1; // Tmp tables forces delay log if (table->file->has_transactions()) - log_delayed= transactional_tables= 1; + transactional_tables= 1; else trans_safe= 0; // Can't do safe rollback } @@ -1370,10 +1364,8 @@ err: if (updated != org_updated) { - if (table->tmp_table != NO_TMP_TABLE) - log_delayed= 1; if (table->file->has_transactions()) - log_delayed= transactional_tables= 1; + transactional_tables= 1; else trans_safe= 0; } @@ -1415,11 +1407,11 @@ bool multi_update::send_eof() if (local_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) && trans_safe) local_error= 1; // Rollback update } - if (!log_delayed) + if (!transactional_tables) thd->options|=OPTION_STATUS_NO_TRANS_UPDATE; } |