mirror of
https://github.com/MariaDB/server.git
synced 2025-08-08 11:22:35 +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:
@@ -288,8 +288,6 @@ Log_event::Log_event(THD* thd_arg, uint16 flags_arg, bool using_trans)
|
||||
server_id= thd->server_id;
|
||||
when= thd->start_time;
|
||||
cache_stmt= using_trans;
|
||||
cache_stmt= (using_trans &&
|
||||
(thd->options & (OPTION_NOT_AUTOCOMMIT | OPTION_BEGIN)));
|
||||
}
|
||||
|
||||
|
||||
@@ -316,12 +314,12 @@ Log_event::Log_event()
|
||||
*/
|
||||
|
||||
Log_event::Log_event(const char* buf,
|
||||
const Format_description_log_event* description_event)
|
||||
const Format_description_log_event* description_event)
|
||||
:temp_buf(0), cache_stmt(0)
|
||||
{
|
||||
#ifndef MYSQL_CLIENT
|
||||
thd = 0;
|
||||
#endif
|
||||
#endif
|
||||
when = uint4korr(buf);
|
||||
server_id = uint4korr(buf + SERVER_ID_OFFSET);
|
||||
if (description_event->binlog_version==1)
|
||||
@@ -2982,11 +2980,19 @@ void Xid_log_event::pack_info(Protocol *protocol)
|
||||
{
|
||||
char buf[64], *pos;
|
||||
pos= strmov(buf, "xid=");
|
||||
pos= int10_to_str(xid, pos, 10);
|
||||
pos= longlong10_to_str(xid, pos, 10);
|
||||
protocol->store(buf, (uint) (pos-buf), &my_charset_bin);
|
||||
}
|
||||
#endif
|
||||
|
||||
/*
|
||||
NOTE it's ok not to use int8store here,
|
||||
as long as xid_t::set(ulonglong) and
|
||||
xid_t::get_my_xid doesn't do it either
|
||||
|
||||
we don't care about actual values of xids as long as
|
||||
identical numbers compare identically
|
||||
*/
|
||||
Xid_log_event::Xid_log_event(const char* buf,
|
||||
const Format_description_log_event* description_event)
|
||||
:Log_event(buf, description_event)
|
||||
@@ -3006,14 +3012,15 @@ bool Xid_log_event::write(IO_CACHE* file)
|
||||
#ifdef MYSQL_CLIENT
|
||||
void Xid_log_event::print(FILE* file, bool short_form, LAST_EVENT_INFO* last_event_info)
|
||||
{
|
||||
char buf[512];
|
||||
if (!short_form)
|
||||
{
|
||||
char buf[64];
|
||||
longlong10_to_str(xid, buf, 10);
|
||||
|
||||
print_header(file);
|
||||
fprintf(file, "\tXid\n");
|
||||
fprintf(file, "\tXid = %s\n", buf);
|
||||
fflush(file);
|
||||
}
|
||||
fprintf(file, "/* == %lu == */\n", xid);
|
||||
fflush(file);
|
||||
}
|
||||
#endif /* MYSQL_CLIENT */
|
||||
|
||||
|
Reference in New Issue
Block a user