mirror of
https://github.com/MariaDB/server.git
synced 2025-07-29 05:21:33 +03:00
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
This commit is contained in:
@ -105,7 +105,7 @@ bool mysql_load(THD *thd,sql_exchange *ex,TABLE_LIST *table_list,
|
||||
char *tdb= thd->db ? thd->db : db; // Result is never null
|
||||
ulong skip_lines= ex->skip_lines;
|
||||
int res;
|
||||
bool transactional_table, log_delayed;
|
||||
bool transactional_table;
|
||||
DBUG_ENTER("mysql_load");
|
||||
|
||||
#ifdef EMBEDDED_LIBRARY
|
||||
@ -133,7 +133,6 @@ bool mysql_load(THD *thd,sql_exchange *ex,TABLE_LIST *table_list,
|
||||
}
|
||||
table= table_list->table;
|
||||
transactional_table= table->file->has_transactions();
|
||||
log_delayed= (transactional_table || table->tmp_table);
|
||||
|
||||
if (!fields.elements)
|
||||
{
|
||||
@ -261,7 +260,7 @@ bool mysql_load(THD *thd,sql_exchange *ex,TABLE_LIST *table_list,
|
||||
lf_info.handle_dup = handle_duplicates;
|
||||
lf_info.wrote_create_file = 0;
|
||||
lf_info.last_pos_in_file = HA_POS_ERROR;
|
||||
lf_info.log_delayed= log_delayed;
|
||||
lf_info.log_delayed= transactional_table;
|
||||
read_info.set_io_cache_arg((void*) &lf_info);
|
||||
}
|
||||
#endif /*!EMBEDDED_LIBRARY*/
|
||||
@ -363,7 +362,7 @@ bool mysql_load(THD *thd,sql_exchange *ex,TABLE_LIST *table_list,
|
||||
/* If the file was not empty, wrote_create_file is true */
|
||||
if (lf_info.wrote_create_file)
|
||||
{
|
||||
Delete_file_log_event d(thd, db, log_delayed);
|
||||
Delete_file_log_event d(thd, db, transactional_table);
|
||||
mysql_bin_log.write(&d);
|
||||
}
|
||||
}
|
||||
@ -375,7 +374,7 @@ bool mysql_load(THD *thd,sql_exchange *ex,TABLE_LIST *table_list,
|
||||
(ulong) (info.records - info.copied), (ulong) thd->cuted_fields);
|
||||
send_ok(thd,info.copied+info.deleted,0L,name);
|
||||
|
||||
if (!log_delayed)
|
||||
if (!transactional_table)
|
||||
thd->options|=OPTION_STATUS_NO_TRANS_UPDATE;
|
||||
#ifndef EMBEDDED_LIBRARY
|
||||
if (mysql_bin_log.is_open())
|
||||
@ -385,16 +384,16 @@ bool mysql_load(THD *thd,sql_exchange *ex,TABLE_LIST *table_list,
|
||||
block will be logged only after Execute_load_log_event (which is wrong),
|
||||
when read_info is destroyed.
|
||||
*/
|
||||
read_info.end_io_cache();
|
||||
read_info.end_io_cache();
|
||||
if (lf_info.wrote_create_file)
|
||||
{
|
||||
Execute_load_log_event e(thd, db, log_delayed);
|
||||
Execute_load_log_event e(thd, db, transactional_table);
|
||||
mysql_bin_log.write(&e);
|
||||
}
|
||||
}
|
||||
#endif /*!EMBEDDED_LIBRARY*/
|
||||
if (transactional_table)
|
||||
error=ha_autocommit_or_rollback(thd,error);
|
||||
error=ha_autocommit_or_rollback(thd,error);
|
||||
|
||||
err:
|
||||
if (thd->lock)
|
||||
@ -402,7 +401,7 @@ err:
|
||||
mysql_unlock_tables(thd, thd->lock);
|
||||
thd->lock=0;
|
||||
}
|
||||
thd->abort_on_warning= 0;
|
||||
thd->abort_on_warning= 0;
|
||||
DBUG_RETURN(error);
|
||||
}
|
||||
|
||||
@ -732,12 +731,11 @@ READ_INFO::READ_INFO(File file_par, uint tot_length, CHARSET_INFO *cs,
|
||||
my_free((gptr) buffer,MYF(0)); /* purecov: inspected */
|
||||
error=1;
|
||||
}
|
||||
else
|
||||
else
|
||||
{
|
||||
/*
|
||||
init_io_cache() will not initialize read_function member
|
||||
if the cache is READ_NET. The reason is explained in
|
||||
mysys/mf_iocache.c. So we work around the problem with a
|
||||
if the cache is READ_NET. So we work around the problem with a
|
||||
manual assignment
|
||||
*/
|
||||
need_end_io_cache = 1;
|
||||
|
Reference in New Issue
Block a user