Below is the list of changes that have just been committed into a local
5.0 repository of grog. When grog does a push these changes will
be propagated to the main repository and, within 24 hours after the
push, to the public repository.
For information on how to access the public repository
see http://dev.mysql.com/doc/mysql/en/installing-source-tree.html
ChangeSet@stripped, 2006-07-12 16:28:05+09:30, grog@stripped +2 -0
Preparation for BUG#11312: Tidy up extraneous white space and tabs
client/mysqlbinlog.cc@stripped, 2006-07-12 16:27:55+09:30, grog@stripped +92 -92
Preparation for BUG#11312: Tidy up extraneous white space and tabs.
sql/log_event.cc@stripped, 2006-07-12 16:27:56+09:30, grog@stripped +272 -272
Preparation for BUG#11312: Tidy up extraneous white space and tabs.
# This is a BitKeeper patch. What follows are the unified diffs for the
# set of deltas contained in the patch. The rest of the patch, the part
# that BitKeeper cares about, is below these diffs.
# User: grog
# Host: eucla.lemis.com
# Root: /wantadilla/home/MySQL/5.0-Bug-11312
--- 1.204/sql/log_event.cc 2006-07-12 16:28:13 +09:30
+++ 1.205/sql/log_event.cc 2006-07-12 16:28:13 +09:30
@@ -18,7 +18,7 @@
#ifndef MYSQL_CLIENT
#ifdef USE_PRAGMA_IMPLEMENTATION
-#pragma implementation // gcc: Class implementation
+#pragma implementation // gcc: Class implementation
#endif
#include "mysql_priv.h"
@@ -26,7 +26,7 @@
#include <my_dir.h>
#endif /* MYSQL_CLIENT */
-#define log_cs &my_charset_latin1
+#define log_cs &my_charset_latin1
/*
pretty_print_str()
@@ -118,10 +118,10 @@
SYNOPSIS
slave_load_file_stem()
- buf Store new filename here
- file_id File_id (part of file name)
+ buf Store new filename here
+ file_id File_id (part of file name)
event_server_id Event_id (part of file name)
- ext Extension for file name
+ ext Extension for file name
RETURN
Pointer to start of extension
@@ -165,12 +165,12 @@
if (!(dirp=my_dir(slave_load_tmpdir,MYF(MY_WME))))
return;
- /*
+ /*
When we are deleting temporary files, we should only remove
the files associated with the server id of our server.
We don't use event_server_id here because since we've disabled
direct binlogging of Create_file/Append_file/Exec_load events
- we cannot meet Start_log event in the middle of events from one
+ we cannot meet Start_log event in the middle of events from one
LOAD DATA.
*/
p= strmake(prefbuf, STRING_WITH_LEN("SQL_LOAD-"));
@@ -202,7 +202,7 @@
byte tmp[1];
tmp[0]= (byte) length;
return (my_b_safe_write(file, tmp, sizeof(tmp)) ||
- my_b_safe_write(file, (byte*) str, length));
+ my_b_safe_write(file, (byte*) str, length));
}
@@ -211,7 +211,7 @@
*/
static inline int read_str(char **buf, char *buf_end, char **str,
- uint8 *len)
+ uint8 *len)
{
if (*buf + ((uint) (uchar) **buf) >= buf_end)
return 1;
@@ -276,7 +276,7 @@
*/
static void print_set_option(FILE* file, uint32 bits_changed, uint32 option,
- uint32 flags, const char* name, bool* need_comma)
+ uint32 flags, const char* name, bool* need_comma)
{
if (bits_changed & option)
{
@@ -288,7 +288,7 @@
}
/**************************************************************************
- Log_event methods (= the parent class of all events)
+ Log_event methods (= the parent class of all events)
**************************************************************************/
/*
@@ -316,7 +316,7 @@
case FORMAT_DESCRIPTION_EVENT: return "Format_desc";
case BEGIN_LOAD_QUERY_EVENT: return "Begin_load_query";
case EXECUTE_LOAD_QUERY_EVENT: return "Execute_load_query";
- default: return "Unknown"; /* impossible */
+ default: return "Unknown"; /* impossible */
}
}
@@ -329,9 +329,9 @@
Log_event::Log_event(THD* thd_arg, uint16 flags_arg, bool using_trans)
:log_pos(0), temp_buf(0), exec_time(0), flags(flags_arg), thd(thd_arg)
{
- server_id= thd->server_id;
- when= thd->start_time;
- cache_stmt= using_trans;
+ server_id= thd->server_id;
+ when= thd->start_time;
+ cache_stmt= using_trans;
}
@@ -346,9 +346,9 @@
:temp_buf(0), exec_time(0), flags(0), cache_stmt(0),
thd(0)
{
- server_id= ::server_id;
- when= time(NULL);
- log_pos= 0;
+ server_id= ::server_id;
+ when= time(NULL);
+ log_pos= 0;
}
#endif /* !MYSQL_CLIENT */
@@ -439,7 +439,7 @@
rli is null when (as far as I (Guilhem) know)
the caller is
Load_log_event::exec_event *and* that one is called from
- Execute_load_log_event::exec_event.
+ Execute_load_log_event::exec_event.
In this case, we don't do anything here ;
Execute_load_log_event::exec_event will call Log_event::exec_event
again later with the proper rli.
@@ -480,7 +480,7 @@
{
rli->inc_group_relay_log_pos(log_pos);
flush_relay_log_info(rli);
- /*
+ /*
Note that Rotate_log_event::exec_event() does not call this
function, so there is no chance that a fake rotate event resets
last_master_timestamp.
@@ -517,7 +517,7 @@
const char *event_type;
if (p)
log_name = p + 1;
-
+
protocol->prepare_for_resend();
protocol->store(log_name, &my_charset_bin);
protocol->store((ulonglong) pos);
@@ -539,12 +539,12 @@
{
field_list->push_back(new Item_empty_string("Log_name", 20));
field_list->push_back(new Item_return_int("Pos", 11,
- MYSQL_TYPE_LONGLONG));
+ MYSQL_TYPE_LONGLONG));
field_list->push_back(new Item_empty_string("Event_type", 20));
field_list->push_back(new Item_return_int("Server_id", 10,
- MYSQL_TYPE_LONG));
+ MYSQL_TYPE_LONG));
field_list->push_back(new Item_return_int("End_log_pos", 11,
- MYSQL_TYPE_LONGLONG));
+ MYSQL_TYPE_LONGLONG));
field_list->push_back(new Item_empty_string("Info", 20));
}
@@ -633,7 +633,7 @@
*/
int Log_event::read_log_event(IO_CACHE* file, String* packet,
- pthread_mutex_t* log_lock)
+ pthread_mutex_t* log_lock)
{
ulong data_len;
int result=0;
@@ -662,7 +662,7 @@
{
DBUG_PRINT("error",("data_len: %ld", data_len));
result= ((data_len < LOG_EVENT_MINIMAL_HEADER_LEN) ? LOG_READ_BOGUS :
- LOG_READ_TOO_LARGE);
+ LOG_READ_TOO_LARGE);
goto end;
}
packet->append(buf, sizeof(buf));
@@ -672,10 +672,10 @@
if (packet->append(file, data_len))
{
/*
- Here if we hit EOF it's really an error: as data_len is >=0
- there's supposed to be more bytes available.
- EOF means we are reading the event partially, which should
- never happen: either we read badly or the binlog is truncated.
+ Here if we hit EOF it's really an error: as data_len is >=0
+ there's supposed to be more bytes available.
+ EOF means we are reading the event partially, which should
+ never happen: either we read badly or the binlog is truncated.
*/
result= file->error >= 0 ? LOG_READ_TRUNC: LOG_READ_IO;
/* Implicit goto end; */
@@ -706,7 +706,7 @@
#ifndef MYSQL_CLIENT
Log_event* Log_event::read_log_event(IO_CACHE* file,
- pthread_mutex_t* log_lock,
+ pthread_mutex_t* log_lock,
const Format_description_log_event *description_event)
#else
Log_event* Log_event::read_log_event(IO_CACHE* file,
@@ -784,7 +784,7 @@
DBUG_ASSERT(error != 0);
sql_print_error("Error in Log_event::read_log_event(): "
"'%s', data_len: %d, event_type: %d",
- error,data_len,head[EVENT_TYPE_OFFSET]);
+ error,data_len,head[EVENT_TYPE_OFFSET]);
my_free(buf, MYF(MY_ALLOW_ZERO_PTR));
/*
The SQL slave thread will check if file->error<0 to know
@@ -807,7 +807,7 @@
*/
Log_event* Log_event::read_log_event(const char* buf, uint event_len,
- const char **error,
+ const char **error,
const Format_description_log_event *description_event)
{
Log_event* ev;
@@ -817,7 +817,7 @@
if (event_len < EVENT_LEN_OFFSET ||
(uint) event_len != uint4korr(buf+EVENT_LEN_OFFSET))
{
- *error="Sanity check failed"; // Needed to free buffer
+ *error="Sanity check failed"; // Needed to free buffer
DBUG_RETURN(NULL); // general sanity check - will fail on a partial read
}
@@ -870,7 +870,7 @@
ev = new User_var_log_event(buf, description_event);
break;
case FORMAT_DESCRIPTION_EVENT:
- ev = new Format_description_log_event(buf, event_len, description_event);
+ ev = new Format_description_log_event(buf, event_len, description_event);
break;
case BEGIN_LOAD_QUERY_EVENT:
ev = new Begin_load_query_log_event(buf, event_len, description_event);
@@ -910,7 +910,7 @@
DBUG_RETURN(0);
#endif
}
- DBUG_RETURN(ev);
+ DBUG_RETURN(ev);
}
#ifdef MYSQL_CLIENT
@@ -927,7 +927,7 @@
fputc('#', file);
print_timestamp(file);
fprintf(file, " server id %d end_log_pos %s ", server_id,
- llstr(log_pos,llbuff));
+ llstr(log_pos,llbuff));
/* mysqlbinlog --hexdump */
if (print_event_info->hexdump_from)
@@ -946,11 +946,11 @@
if (print_event_info->common_header_len == LOG_EVENT_MINIMAL_HEADER_LEN)
{
fprintf(file, "# Position Timestamp Type Master ID "
- "Size Master Pos Flags \n");
+ "Size Master Pos Flags \n");
fprintf(file, "# %8.8lx %02x %02x %02x %02x %02x "
- "%02x %02x %02x %02x %02x %02x %02x %02x "
- "%02x %02x %02x %02x %02x %02x\n",
- (unsigned long) hexdump_from,
+ "%02x %02x %02x %02x %02x %02x %02x %02x "
+ "%02x %02x %02x %02x %02x %02x\n",
+ (unsigned long) hexdump_from,
ptr[0], ptr[1], ptr[2], ptr[3], ptr[4], ptr[5], ptr[6],
ptr[7], ptr[8], ptr[9], ptr[10], ptr[11], ptr[12], ptr[13],
ptr[14], ptr[15], ptr[16], ptr[17], ptr[18]);
@@ -960,8 +960,8 @@
/* Rest of event (without common header) */
for (i= 0, c= char_string, h=hex_string;
- i < size;
- i++, ptr++)
+ i < size;
+ i++, ptr++)
{
my_snprintf(h, 4, "%02x ", *ptr);
h += 3;
@@ -970,13 +970,13 @@
if (i % 16 == 15)
{
- fprintf(file, "# %8.8lx %-48.48s |%16s|\n",
- (unsigned long) (hexdump_from + (i & 0xfffffff0)),
+ fprintf(file, "# %8.8lx %-48.48s |%16s|\n",
+ (unsigned long) (hexdump_from + (i & 0xfffffff0)),
hex_string, char_string);
- hex_string[0]= 0;
- char_string[0]= 0;
- c= char_string;
- h= hex_string;
+ hex_string[0]= 0;
+ char_string[0]= 0;
+ c= char_string;
+ h= hex_string;
}
else if (i % 8 == 7) *h++ = ' ';
}
@@ -985,7 +985,7 @@
/* Non-full last line */
if (hex_string[0])
fprintf(file, "# %8.8lx %-48.48s |%s|\n# ",
- (unsigned long) (hexdump_from + (i & 0xfffffff0)),
+ (unsigned long) (hexdump_from + (i & 0xfffffff0)),
hex_string, char_string);
}
}
@@ -1000,7 +1000,7 @@
struct tm *res;
if (!ts)
ts = &when;
-#ifdef MYSQL_SERVER // This is always false
+#ifdef MYSQL_SERVER // This is always false
struct tm tm_tmp;
localtime_r(ts,(res= &tm_tmp));
#else
@@ -1008,19 +1008,19 @@
#endif
fprintf(file,"%02d%02d%02d %2d:%02d:%02d",
- res->tm_year % 100,
- res->tm_mon+1,
- res->tm_mday,
- res->tm_hour,
- res->tm_min,
- res->tm_sec);
+ res->tm_year % 100,
+ res->tm_mon+1,
+ res->tm_mday,
+ res->tm_hour,
+ res->tm_min,
+ res->tm_sec);
}
#endif /* MYSQL_CLIENT */
/**************************************************************************
- Query_log_event methods
+ Query_log_event methods
**************************************************************************/
#if defined(HAVE_REPLICATION) && !defined(MYSQL_CLIENT)
@@ -1209,7 +1209,7 @@
start+= 4;
}
*/
-
+
/* Store length of status variables */
status_vars_len= (uint) (start-start_of_status);
int2store(buf + Q_STATUS_VARS_LEN_OFFSET, status_vars_len);
@@ -1234,12 +1234,12 @@
Query_log_event::Query_log_event()
*/
Query_log_event::Query_log_event(THD* thd_arg, const char* query_arg,
- ulong query_length, bool using_trans,
- bool suppress_use)
+ ulong query_length, bool using_trans,
+ bool suppress_use)
:Log_event(thd_arg,
- ((thd_arg->tmp_table_used ? LOG_EVENT_THREAD_SPECIFIC_F : 0)
- | (suppress_use ? LOG_EVENT_SUPPRESS_USE_F : 0)),
- using_trans),
+ ((thd_arg->tmp_table_used ? LOG_EVENT_THREAD_SPECIFIC_F : 0)
+ | (suppress_use ? LOG_EVENT_SUPPRESS_USE_F : 0)),
+ using_trans),
data_buf(0), query(query_arg), catalog(thd_arg->catalog),
db(thd_arg->db), q_len((uint32) query_length),
error_code((thd_arg->killed != THD::NOT_KILLED) ?
@@ -1335,17 +1335,17 @@
post_header_len= description_event->post_header_len[event_type-1];
DBUG_PRINT("info",("event_len=%ld, common_header_len=%d, post_header_len=%d",
event_len, common_header_len, post_header_len));
-
+
/*
We test if the event's length is sensible, and if so we compute data_len.
We cannot rely on QUERY_HEADER_LEN here as it would not be format-tolerant.
We use QUERY_HEADER_MINIMAL_LEN which is the same for 3.23, 4.0 & 5.0.
*/
if (event_len < (uint)(common_header_len + post_header_len))
- DBUG_VOID_RETURN;
+ DBUG_VOID_RETURN;
data_len = event_len - (common_header_len + post_header_len);
buf+= common_header_len;
-
+
slave_proxy_id= thread_id = uint4korr(buf + Q_THREAD_ID_OFFSET);
exec_time = uint4korr(buf + Q_EXEC_TIME_OFFSET);
db_len = (uint)buf[Q_DB_LEN_OFFSET]; // TODO: add a check of all *_len vars
@@ -1356,7 +1356,7 @@
Depending on the format, we may or not have affected/warnings etc
The remnent post-header to be parsed has length:
*/
- tmp= post_header_len - QUERY_HEADER_MINIMAL_LEN;
+ tmp= post_header_len - QUERY_HEADER_MINIMAL_LEN;
if (tmp)
{
status_vars_len= uint2korr(buf + Q_STATUS_VARS_LEN_OFFSET);
@@ -1372,7 +1372,7 @@
*/
/* variable-part: the status vars; only in MySQL 5.0 */
-
+
start= (char*) (buf+post_header_len);
end= (const char*) (start+status_vars_len);
for (const uchar* pos= (const uchar*) start; pos < (const uchar*) end;)
@@ -1392,7 +1392,7 @@
sql_mode_inited= 1;
sql_mode= (ulong) uint8korr(pos); // QQ: Fix when sql_mode is ulonglong
DBUG_PRINT("info",("In Query_log_event, read sql_mode: %s",
- llstr(sql_mode, buff)));
+ llstr(sql_mode, buff)));
pos+= 8;
break;
}
@@ -1429,19 +1429,19 @@
pos= (const uchar*) end; // Break loop
}
}
-
+
#if !defined(MYSQL_CLIENT) && defined(HAVE_QUERY_CACHE)
if (!(start= data_buf = (char*) my_malloc(catalog_len + 1 +
time_zone_len + 1 +
data_len + 1 +
- QUERY_CACHE_FLAGS_SIZE +
- db_len + 1,
- MYF(MY_WME))))
+ QUERY_CACHE_FLAGS_SIZE +
+ db_len + 1,
+ MYF(MY_WME))))
#else
if (!(start= data_buf = (char*) my_malloc(catalog_len + 1 +
time_zone_len + 1 +
data_len + 1,
- MYF(MY_WME))))
+ MYF(MY_WME))))
#endif
DBUG_VOID_RETURN;
if (catalog_len) // If catalog is given
@@ -1458,7 +1458,7 @@
if (time_zone_len)
copy_str_and_move(&start, &time_zone_str, time_zone_len);
- /* A 2nd variable part; this is common to all versions */
+ /* A 2nd variable part; this is common to all versions */
memcpy((char*) start, end, data_len); // Copy db and query
start[data_len]= '\0'; // End query with \0 (For safetly)
db= start;
@@ -1474,10 +1474,10 @@
#ifdef MYSQL_CLIENT
void Query_log_event::print_query_header(FILE* file,
- PRINT_EVENT_INFO* print_event_info)
+ PRINT_EVENT_INFO* print_event_info)
{
// TODO: print the catalog ??
- char buff[40],*end; // Enough for SET TIMESTAMP
+ char buff[40],*end; // Enough for SET TIMESTAMP
bool different_db= 1;
uint32 tmp;
@@ -1485,14 +1485,14 @@
{
print_header(file, print_event_info);
fprintf(file, "\t%s\tthread_id=%lu\texec_time=%lu\terror_code=%d\n",
- get_type_str(), (ulong) thread_id, (ulong) exec_time, error_code);
+ get_type_str(), (ulong) thread_id, (ulong) exec_time, error_code);
}
if (!(flags & LOG_EVENT_SUPPRESS_USE_F) && db)
{
if (different_db= memcmp(print_event_info->db, db, db_len + 1))
memcpy(print_event_info->db, db, db_len + 1);
- if (db[0] && different_db)
+ if (db[0] && different_db)
fprintf(file, "use %s;\n", db);
}
@@ -1511,7 +1511,7 @@
if (likely(flags2_inited)) /* likely as this will mainly read 5.0 logs */
{
/* tmp is a bitmask of bits which have changed. */
- if (likely(print_event_info->flags2_inited))
+ if (likely(print_event_info->flags2_inited))
/* All bits which have changed */
tmp= (print_event_info->flags2) ^ flags2;
else /* that's the first Query event we read */
@@ -1677,11 +1677,11 @@
VOID(pthread_mutex_lock(&LOCK_thread_count));
thd->query_id = next_query_id();
VOID(pthread_mutex_unlock(&LOCK_thread_count));
- thd->variables.pseudo_thread_id= thread_id; // for temp tables
+ thd->variables.pseudo_thread_id= thread_id; // for temp tables
DBUG_PRINT("query",("%s",thd->query));
if (ignored_error_code((expected_error= error_code)) ||
- !check_expected_error(thd,rli,expected_error))
+ !check_expected_error(thd,rli,expected_error))
{
if (flags2_inited)
/*
@@ -1758,7 +1758,7 @@
clear_all_errors(thd, rli); /* Can ignore query */
else
{
- slave_print_error(rli,expected_error,
+ slave_print_error(rli,expected_error,
"\
Query partially completed on the master (error on master: %d) \
and was aborted. There is a chance that your master is inconsistent at this \
@@ -1781,29 +1781,29 @@
code, and none of them should be ignored.
*/
DBUG_PRINT("info",("expected_error: %d last_errno: %d",
- expected_error, thd->net.last_errno));
+ expected_error, thd->net.last_errno));
if ((expected_error != (actual_error= thd->net.last_errno)) &&
- expected_error &&
- !ignored_error_code(actual_error) &&
- !ignored_error_code(expected_error))
+ expected_error &&
+ !ignored_error_code(actual_error) &&
+ !ignored_error_code(expected_error))
{
slave_print_error(rli, 0,
- "\
+ "\
Query caused different errors on master and slave. \
Error on master: '%s' (%d), Error on slave: '%s' (%d). \
Default database: '%s'. Query: '%s'",
- ER_SAFE(expected_error),
- expected_error,
- actual_error ? thd->net.last_error: "no error",
- actual_error,
- print_slave_db_safe(db), query_arg);
+ ER_SAFE(expected_error),
+ expected_error,
+ actual_error ? thd->net.last_error: "no error",
+ actual_error,
+ print_slave_db_safe(db), query_arg);
thd->query_error= 1;
}
/*
- If we get the same error code as expected, or they should be ignored.
+ If we get the same error code as expected, or they should be ignored.
*/
else if (expected_error == actual_error ||
- ignored_error_code(actual_error))
+ ignored_error_code(actual_error))
{
DBUG_PRINT("info",("error ignored"));
clear_all_errors(thd, rli);
@@ -1814,10 +1814,10 @@
else if (thd->query_error || thd->is_fatal_error)
{
slave_print_error(rli,actual_error,
- "Error '%s' on query. Default database: '%s'. Query: '%s'",
- (actual_error ? thd->net.last_error :
- "unexpected success or fatal error"),
- print_slave_db_safe(thd->db), query_arg);
+ "Error '%s' on query. Default database: '%s'. Query: '%s'",
+ (actual_error ? thd->net.last_error :
+ "unexpected success or fatal error"),
+ print_slave_db_safe(thd->db), query_arg);
thd->query_error= 1;
}
@@ -1850,17 +1850,17 @@
Probably we have set thd->query, thd->db, thd->catalog to point to places
in the data_buf of this event. Now the event is going to be deleted
probably, so data_buf will be freed, so the thd->... listed above will be
- pointers to freed memory.
+ pointers to freed memory.
So we must set them to 0, so that those bad pointers values are not later
used. Note that "cleanup" queries like automatic DROP TEMPORARY TABLE
don't suffer from these assignments to 0 as DROP TEMPORARY
TABLE uses the db.table syntax.
*/
- thd->db= thd->catalog= 0; // prevent db from being freed
- thd->query= 0; // just to be sure
+ thd->db= thd->catalog= 0; // prevent db from being freed
+ thd->query= 0; // just to be sure
thd->query_length= thd->db_length =0;
VOID(pthread_mutex_unlock(&LOCK_thread_count));
- close_thread_tables(thd);
+ close_thread_tables(thd);
free_root(thd->mem_root,MYF(MY_KEEP_PREALLOC));
/*
If there was an error we stop. Otherwise we increment positions. Note that
@@ -1868,15 +1868,15 @@
ONE_SHOT, because SET ONE_SHOT should not be separated from its following
updating query.
*/
- return (thd->query_error ? thd->query_error :
+ return (thd->query_error ? thd->query_error :
(thd->one_shot_set ? (rli->inc_event_relay_log_pos(),0) :
- Log_event::exec_event(rli)));
+ Log_event::exec_event(rli)));
}
#endif
/**************************************************************************
- Start_log_event_v3 methods
+ Start_log_event_v3 methods
**************************************************************************/
#ifndef MYSQL_CLIENT
@@ -1953,7 +1953,7 @@
buf+= description_event->common_header_len;
binlog_version= uint2korr(buf+ST_BINLOG_VER_OFFSET);
memcpy(server_version, buf+ST_SERVER_VER_OFFSET,
- ST_SERVER_VER_LEN);
+ ST_SERVER_VER_LEN);
created= uint4korr(buf+ST_CREATED_OFFSET);
/* We use log_pos to mark if this was an artificial event or not */
artificial_event= (log_pos == 0);
@@ -2314,7 +2314,7 @@
return
5 + db_len + 3 + // "use DB; "
18 + fname_len + 2 + // "LOAD DATA INFILE 'file''"
- 7 + // LOCAL
+ 7 + // LOCAL
9 + // " REPLACE or IGNORE "
13 + table_name_len*2 + // "INTO TABLE `table`"
21 + sql_ex.field_term_len*4 + 2 + // " FIELDS TERMINATED BY 'str'"
@@ -2387,7 +2387,7 @@
{
pos= strmov(pos, " IGNORE ");
pos= longlong10_to_str((longlong) skip_lines, pos, 10);
- pos= strmov(pos," LINES ");
+ pos= strmov(pos," LINES ");
}
if (num_fields)
@@ -2456,12 +2456,12 @@
if (num_fields && fields && field_lens)
{
if (my_b_safe_write(file, (byte*)field_lens, num_fields) ||
- my_b_safe_write(file, (byte*)fields, field_block_len))
+ my_b_safe_write(file, (byte*)fields, field_block_len))
return 1;
}
return (my_b_safe_write(file, (byte*)table_name, table_name_len + 1) ||
- my_b_safe_write(file, (byte*)db, db_len + 1) ||
- my_b_safe_write(file, (byte*)fname, fname_len));
+ my_b_safe_write(file, (byte*)db, db_len + 1) ||
+ my_b_safe_write(file, (byte*)fname, fname_len));
}
@@ -2470,12 +2470,12 @@
*/
Load_log_event::Load_log_event(THD *thd_arg, sql_exchange *ex,
- const char *db_arg, const char *table_name_arg,
- List<Item> &fields_arg,
- enum enum_duplicates handle_dup,
- bool ignore, bool using_trans)
+ const char *db_arg, const char *table_name_arg,
+ List<Item> &fields_arg,
+ enum enum_duplicates handle_dup,
+ bool ignore, bool using_trans)
:Log_event(thd_arg, !thd_arg->tmp_table_used ?
- 0 : LOG_EVENT_THREAD_SPECIFIC_F, using_trans),
+ 0 : LOG_EVENT_THREAD_SPECIFIC_F, using_trans),
thread_id(thd_arg->thread_id),
slave_proxy_id(thd_arg->variables.pseudo_thread_id),
num_fields(0),fields(0),
@@ -2502,7 +2502,7 @@
sql_ex.escaped_len = (uint8) ex->escaped->length();
sql_ex.opt_flags = 0;
sql_ex.cached_new_format = -1;
-
+
if (ex->dumpfile)
sql_ex.opt_flags|= DUMPFILE_FLAG;
if (ex->opt_enclosed)
@@ -2514,9 +2514,9 @@
case DUP_REPLACE:
sql_ex.opt_flags|= REPLACE_FLAG;
break;
- case DUP_UPDATE: // Impossible here
+ case DUP_UPDATE: // Impossible here
case DUP_ERROR:
- break;
+ break;
}
if (ignore)
sql_ex.opt_flags|= IGNORE_FLAG;
@@ -2531,7 +2531,7 @@
sql_ex.empty_flags |= LINE_START_EMPTY;
if (!ex->escaped->length())
sql_ex.empty_flags |= ESCAPED_EMPTY;
-
+
skip_lines = ex->skip_lines;
List_iterator<Item> li(fields_arg);
@@ -2575,7 +2575,7 @@
if (event_len)
copy_log_event(buf, event_len,
((buf[EVENT_TYPE_OFFSET] == LOAD_EVENT) ?
- LOAD_HEADER_LEN +
+ LOAD_HEADER_LEN +
description_event->common_header_len :
LOAD_HEADER_LEN + LOG_EVENT_HEADER_LEN),
description_event);
@@ -2603,7 +2603,7 @@
table_name_len = (uint)data_head[L_TBL_LEN_OFFSET];
db_len = (uint)data_head[L_DB_LEN_OFFSET];
num_fields = uint4korr(data_head + L_NUM_FIELDS_OFFSET);
-
+
if ((int) event_len < body_offset)
DBUG_RETURN(1);
/*
@@ -2614,7 +2614,7 @@
buf_end,
buf[EVENT_TYPE_OFFSET] != LOAD_EVENT)))
DBUG_RETURN(1);
-
+
data_len = event_len - body_offset;
if (num_fields > data_len) // simple sanity check against corruption
DBUG_RETURN(1);
@@ -2644,14 +2644,14 @@
void Load_log_event::print(FILE* file, PRINT_EVENT_INFO* print_event_info,
- bool commented)
+ bool commented)
{
DBUG_ENTER("Load_log_event::print");
if (!print_event_info->short_form)
{
print_header(file, print_event_info);
fprintf(file, "\tQuery\tthread_id=%ld\texec_time=%ld\n",
- thread_id, exec_time);
+ thread_id, exec_time);
}
bool different_db= 1;
@@ -2667,9 +2667,9 @@
!commented)
memcpy(print_event_info->db, db, db_len + 1);
}
-
+
if (db && db[0] && different_db)
- fprintf(file, "%suse %s;\n",
+ fprintf(file, "%suse %s;\n",
commented ? "# " : "",
db);
@@ -2686,7 +2686,7 @@
fprintf(file," REPLACE ");
else if (sql_ex.opt_flags & IGNORE_FLAG)
fprintf(file," IGNORE ");
-
+
fprintf(file, "INTO TABLE `%s`", table_name);
fprintf(file, " FIELDS TERMINATED BY ");
pretty_print_str(file, sql_ex.field_term, sql_ex.field_term_len);
@@ -2695,10 +2695,10 @@
fprintf(file," OPTIONALLY ");
fprintf(file, " ENCLOSED BY ");
pretty_print_str(file, sql_ex.enclosed, sql_ex.enclosed_len);
-
+
fprintf(file, " ESCAPED BY ");
pretty_print_str(file, sql_ex.escaped, sql_ex.escaped_len);
-
+
fprintf(file," LINES TERMINATED BY ");
pretty_print_str(file, sql_ex.line_term, sql_ex.line_term_len);
@@ -2719,9 +2719,9 @@
for (i = 0; i < num_fields; i++)
{
if (i)
- fputc(',', file);
+ fputc(',', file);
fprintf(file, field);
-
+
field += field_lens[i] + 1;
}
fputc(')', file);
@@ -2736,15 +2736,15 @@
/*
Load_log_event::set_fields()
- Note that this function can not use the member variable
+ Note that this function can not use the member variable
for the database, since LOAD DATA INFILE on the slave
can be for a different database than the current one.
This is the reason for the affected_db argument to this method.
*/
#ifndef MYSQL_CLIENT
-void Load_log_event::set_fields(const char* affected_db,
- List<Item> &field_list,
+void Load_log_event::set_fields(const char* affected_db,
+ List<Item> &field_list,
Name_resolution_context *context)
{
uint i;
@@ -2765,29 +2765,29 @@
SYNOPSIS
Load_log_event::exec_event
- net
- rli
- use_rli_only_for_errors - if set to 1, rli is provided to
- Load_log_event::exec_event only for this
- function to have RPL_LOG_NAME and
- rli->last_slave_error, both being used by
- error reports. rli's position advancing
- is skipped (done by the caller which is
- Execute_load_log_event::exec_event).
- - if set to 0, rli is provided for full use,
- i.e. for error reports and position
- advancing.
+ net
+ rli
+ use_rli_only_for_errors - if set to 1, rli is provided to
+ Load_log_event::exec_event only for this
+ function to have RPL_LOG_NAME and
+ rli->last_slave_error, both being used by
+ error reports. rli's position advancing
+ is skipped (done by the caller which is
+ Execute_load_log_event::exec_event).
+ - if set to 0, rli is provided for full use,
+ i.e. for error reports and position
+ advancing.
DESCRIPTION
Does the data loading job when executing a LOAD DATA on the slave
-
+
RETURN VALUE
- 0 Success
- 1 Failure
+ 0 Success
+ 1 Failure
*/
-int Load_log_event::exec_event(NET* net, struct st_relay_log_info* rli,
- bool use_rli_only_for_errors)
+int Load_log_event::exec_event(NET* net, struct st_relay_log_info* rli,
+ bool use_rli_only_for_errors)
{
thd->db_length= db_len;
thd->db= (char*) rewrite_db(db, &thd->db_length);
@@ -2806,7 +2806,7 @@
rli->future_group_master_log_pos= log_pos;
DBUG_PRINT("info", ("log_pos: %lu", (ulong) log_pos));
}
-
+
/*
We test replicate_*_db rules. Note that we have already prepared the file
to load, even if we are going to ignore and delete it now. So it is
@@ -2850,7 +2850,7 @@
tables.lock_type = TL_WRITE;
tables.updating= 1;
- // the table will be opened in mysql_load
+ // the table will be opened in mysql_load
if (table_rules_on && !tables_ok(thd, &tables))
{
// TODO: this is a bug - this needs to be moved to the I/O thread
@@ -2886,7 +2886,7 @@
if (sql_ex.opt_flags & REPLACE_FLAG)
{
- handle_dup= DUP_REPLACE;
+ handle_dup= DUP_REPLACE;
}
else if (sql_ex.opt_flags & IGNORE_FLAG)
{
@@ -2896,14 +2896,14 @@
else
{
/*
- When replication is running fine, if it was DUP_ERROR on the
+ When replication is running fine, if it was DUP_ERROR on the
master then we could choose IGNORE here, because if DUP_ERROR
suceeded on master, and data is identical on the master and slave,
then there should be no uniqueness errors on slave, so IGNORE is
the same as DUP_ERROR. But in the unlikely case of uniqueness errors
(because the data on the master and slave happen to be different
- (user error or bug), we want LOAD DATA to print an error message on
- the slave to discover the problem.
+ (user error or bug), we want LOAD DATA to print an error message on
+ the slave to discover the problem.
If reading from net (a 3.23 master), mysql_load() will change this
to IGNORE.
@@ -2935,7 +2935,7 @@
ex.opt_enclosed = (sql_ex.opt_flags & OPT_ENCLOSED_FLAG);
if (sql_ex.empty_flags & FIELD_TERM_EMPTY)
- ex.field_term->length(0);
+ ex.field_term->length(0);
ex.skip_lines = skip_lines;
List<Item> field_list;
@@ -2945,12 +2945,12 @@
List<Item> set_fields;
if (net)
{
- // mysql_load will use thd->net to read the file
- thd->net.vio = net->vio;
- /*
- Make sure the client does not get confused about the packet sequence
- */
- thd->net.pkt_nr = net->pkt_nr;
+ // mysql_load will use thd->net to read the file
+ thd->net.vio = net->vio;
+ /*
+ Make sure the client does not get confused about the packet sequence
+ */
+ thd->net.pkt_nr = net->pkt_nr;
}
/*
It is safe to use set_fields twice because we are not going to
@@ -2961,12 +2961,12 @@
thd->query_error= 1;
if (thd->cuted_fields)
{
- /* log_pos is the position of the LOAD event in the master log */
+ /* log_pos is the position of the LOAD event in the master log */
sql_print_warning("Slave: load data infile on table '%s' at "
"log position %s in log '%s' produced %ld "
"warning(s). Default database: '%s'",
(char*) table_name,
- llstr(log_pos,llbuff), RPL_LOG_NAME,
+ llstr(log_pos,llbuff), RPL_LOG_NAME,
(ulong) thd->cuted_fields,
print_slave_db_safe(thd->db));
}
@@ -2986,7 +2986,7 @@
}
error:
- thd->net.vio = 0;
+ thd->net.vio = 0;
char *save_db= thd->db;
VOID(pthread_mutex_lock(&LOCK_thread_count));
thd->db= thd->catalog= 0;
@@ -3004,25 +3004,25 @@
else
{
sql_errno=ER_UNKNOWN_ERROR;
- err=ER(sql_errno);
+ err=ER(sql_errno);
}
slave_print_error(rli,sql_errno,"\
Error '%s' running LOAD DATA INFILE on table '%s'. Default database: '%s'",
- err, (char*)table_name, print_slave_db_safe(save_db));
+ err, (char*)table_name, print_slave_db_safe(save_db));
free_root(thd->mem_root,MYF(MY_KEEP_PREALLOC));
return 1;
}
free_root(thd->mem_root,MYF(MY_KEEP_PREALLOC));
-
+
if (thd->is_fatal_error)
{
slave_print_error(rli,ER_UNKNOWN_ERROR, "\
Fatal error running LOAD DATA INFILE on table '%s'. Default database: '%s'",
- (char*)table_name, print_slave_db_safe(save_db));
+ (char*)table_name, print_slave_db_safe(save_db));
return 1;
}
- return ( use_rli_only_for_errors ? 0 : Log_event::exec_event(rli) );
+ return ( use_rli_only_for_errors ? 0 : Log_event::exec_event(rli) );
}
#endif
@@ -3063,7 +3063,7 @@
print_header(file, print_event_info);
fprintf(file, "\tRotate to ");
if (new_log_ident)
- my_fwrite(file, (byte*) new_log_ident, (uint)ident_len,
+ my_fwrite(file, (byte*) new_log_ident, (uint)ident_len,
MYF(MY_NABP | MY_WME));
fprintf(file, " pos: %s", llstr(pos, buf));
fputc('\n', file);
@@ -3115,8 +3115,8 @@
buf += header_size;
pos = post_header_len ? uint8korr(buf + R_POS_OFFSET) : 4;
ident_len = (uint)(event_len -
- (header_size+post_header_len));
- ident_offset = post_header_len;
+ (header_size+post_header_len));
+ ident_offset = post_header_len;
set_if_smaller(ident_len,FN_REFLEN-1);
new_log_ident= my_strdup_with_length((byte*) buf + ident_offset,
(uint) ident_len,
@@ -3154,7 +3154,7 @@
The NOTES below is a wrong comment which will disappear when 4.1 is merged.
RETURN VALUES
- 0 ok
+ 0 ok
*/
#if defined(HAVE_REPLICATION) && !defined(MYSQL_CLIENT)
@@ -3210,7 +3210,7 @@
/**************************************************************************
- Intvar_log_event methods
+ Intvar_log_event methods
**************************************************************************/
/*
@@ -3380,7 +3380,7 @@
fprintf(file, "\tRand\n");
}
fprintf(file, "SET @@RAND_SEED1=%s, @@RAND_SEED2=%s;\n",
- llstr(seed1, llbuff),llstr(seed2, llbuff2));
+ llstr(seed1, llbuff),llstr(seed2, llbuff2));
fflush(file);
}
#endif /* MYSQL_CLIENT */
@@ -3492,7 +3492,7 @@
float8get(real_val, val);
buf= my_malloc(val_offset + FLOATING_POINT_BUFFER, MYF(MY_WME));
event_len+= my_sprintf(buf + val_offset,
- (buf + val_offset, "%.14g", real_val));
+ (buf + val_offset, "%.14g", real_val));
break;
case INT_RESULT:
buf= my_malloc(val_offset + 22, MYF(MY_WME));
@@ -3507,7 +3507,7 @@
my_decimal2string(E_DEC_FATAL_ERROR, &dec, 0, 0, 0, &str);
event_len= str.length() + val_offset;
break;
- }
+ }
case STRING_RESULT:
/* 15 is for 'COLLATE' and other chars */
buf= my_malloc(event_len+val_len*2+1+2*MY_CS_NAME_SIZE+15, MYF(MY_WME));
@@ -3557,16 +3557,16 @@
type= STRING_RESULT;
charset_number= my_charset_bin.number;
val_len= 0;
- val= 0;
+ val= 0;
}
else
{
type= (Item_result) buf[UV_VAL_IS_NULL];
charset_number= uint4korr(buf + UV_VAL_IS_NULL + UV_VAL_TYPE_SIZE);
- val_len= uint4korr(buf + UV_VAL_IS_NULL + UV_VAL_TYPE_SIZE +
- UV_CHARSET_NUMBER_SIZE);
+ val_len= uint4korr(buf + UV_VAL_IS_NULL + UV_VAL_TYPE_SIZE +
+ UV_CHARSET_NUMBER_SIZE);
val= (char *) (buf + UV_VAL_IS_NULL + UV_VAL_TYPE_SIZE +
- UV_CHARSET_NUMBER_SIZE + UV_VAL_LEN_SIZE);
+ UV_CHARSET_NUMBER_SIZE + UV_VAL_LEN_SIZE);
}
}
@@ -3575,19 +3575,19 @@
bool User_var_log_event::write(IO_CACHE* file)
{
char buf[UV_NAME_LEN_SIZE];
- char buf1[UV_VAL_IS_NULL + UV_VAL_TYPE_SIZE +
- UV_CHARSET_NUMBER_SIZE + UV_VAL_LEN_SIZE];
+ char buf1[UV_VAL_IS_NULL + UV_VAL_TYPE_SIZE +
+ UV_CHARSET_NUMBER_SIZE + UV_VAL_LEN_SIZE];
char buf2[max(8, DECIMAL_MAX_FIELD_SIZE + 2)], *pos= buf2;
uint buf1_length;
ulong event_length;
int4store(buf, name_len);
-
+
if ((buf1[0]= is_null))
{
buf1_length= 1;
val_len= 0;
- }
+ }
else
{
buf1[1]= type;
@@ -3627,9 +3627,9 @@
return (write_header(file, event_length) ||
my_b_safe_write(file, (byte*) buf, sizeof(buf)) ||
- my_b_safe_write(file, (byte*) name, name_len) ||
- my_b_safe_write(file, (byte*) buf1, buf1_length) ||
- my_b_safe_write(file, (byte*) pos, val_len));
+ my_b_safe_write(file, (byte*) name, name_len) ||
+ my_b_safe_write(file, (byte*) buf1, buf1_length) ||
+ my_b_safe_write(file, (byte*) pos, val_len));
}
#endif
@@ -3762,13 +3762,13 @@
case REAL_RESULT:
float8get(real_val, val);
it= new Item_float(real_val);
- val= (char*) &real_val; // Pointer to value in native format
+ val= (char*) &real_val; // Pointer to value in native format
val_len= 8;
break;
case INT_RESULT:
int_val= (longlong) uint8korr(val);
it= new Item_int(int_val);
- val= (char*) &int_val; // Pointer to value in native format
+ val= (char*) &int_val; // Pointer to value in native format
val_len= 8;
break;
case DECIMAL_RESULT:
@@ -3822,7 +3822,7 @@
fputc('\n', file);
fprintf(file, "# %s", "Unknown event\n");
}
-#endif
+#endif
#ifndef MYSQL_CLIENT
void Slave_log_event::pack_info(Protocol *protocol)
@@ -3843,11 +3843,11 @@
#ifndef MYSQL_CLIENT
Slave_log_event::Slave_log_event(THD* thd_arg,
- struct st_relay_log_info* rli)
+ struct st_relay_log_info* rli)
:Log_event(thd_arg, 0, 0) , mem_pool(0), master_host(0)
{
DBUG_ENTER("Slave_log_event");
- if (!rli->inited) // QQ When can this happen ?
+ if (!rli->inited) // QQ When can this happen ?
DBUG_VOID_RETURN;
MASTER_INFO* mi = rli->mi;
@@ -3858,7 +3858,7 @@
master_log_len = strlen(rli->group_master_log_name);
// on OOM, just do not initialize the structure and print the error
if ((mem_pool = (char*)my_malloc(get_data_size() + 1,
- MYF(MY_WME))))
+ MYF(MY_WME))))
{
master_host = mem_pool + SL_MASTER_HOST_OFFSET ;
memcpy(master_host, mi->host, master_host_len + 1);
@@ -3867,7 +3867,7 @@
master_port = mi->port;
master_pos = rli->group_master_log_pos;
DBUG_PRINT("info", ("master_log: %s pos: %d", master_log,
- (ulong) master_pos));
+ (ulong) master_pos));
}
else
sql_print_error("Out of memory while recording slave event");
@@ -3894,7 +3894,7 @@
fputc('\n', file);
fprintf(file, "\
Slave: master_host: '%s' master_port: %d master_log: '%s' master_pos: %s\n",
- master_host, master_port, master_log, llstr(master_pos, llbuff));
+ master_host, master_port, master_log, llstr(master_pos, llbuff));
}
#endif /* MYSQL_CLIENT */
@@ -3962,7 +3962,7 @@
/**************************************************************************
- Stop_log_event methods
+ Stop_log_event methods
**************************************************************************/
/*
@@ -4020,7 +4020,7 @@
/**************************************************************************
- Create_file_log_event methods
+ Create_file_log_event methods
**************************************************************************/
/*
@@ -4030,12 +4030,12 @@
#ifndef MYSQL_CLIENT
Create_file_log_event::
Create_file_log_event(THD* thd_arg, sql_exchange* ex,
- const char* db_arg, const char* table_name_arg,
- List<Item>& fields_arg, enum enum_duplicates handle_dup,
+ const char* db_arg, const char* table_name_arg,
+ List<Item>& fields_arg, enum enum_duplicates handle_dup,
bool ignore,
- char* block_arg, uint block_len_arg, bool using_trans)
+ char* block_arg, uint block_len_arg, bool using_trans)
:Load_log_event(thd_arg,ex,db_arg,table_name_arg,fields_arg,handle_dup, ignore,
- using_trans),
+ using_trans),
fake_base(0), block(block_arg), event_buf(0), block_len(block_len_arg),
file_id(thd_arg->file_id = mysql_bin_log.next_file_id())
{
@@ -4113,9 +4113,9 @@
DBUG_VOID_RETURN;
if (description_event->binlog_version!=1)
{
- file_id= uint4korr(buf +
+ file_id= uint4korr(buf +
header_len +
- load_header_len + CF_FILE_ID_OFFSET);
+ load_header_len + CF_FILE_ID_OFFSET);
/*
Note that it's ok to use get_data_size() below, because it is computed
with values we have already read from this event (because we called
@@ -4125,7 +4125,7 @@
as these Load events are not changed between 4.0 and 5.0 (as logging of
LOAD DATA INFILE does not use Load_log_event in 5.0).
- The + 1 is for \0 terminating fname
+ The + 1 is for \0 terminating fname
*/
block_offset= (description_event->common_header_len +
Load_log_event::get_data_size() +
@@ -4150,7 +4150,7 @@
#ifdef MYSQL_CLIENT
void Create_file_log_event::print(FILE* file, PRINT_EVENT_INFO* print_event_info,
- bool enable_local)
+ bool enable_local)
{
if (print_event_info->short_form)
{
@@ -4162,12 +4162,12 @@
if (enable_local)
{
Load_log_event::print(file, print_event_info,
- !check_fname_outside_temp_buf());
- /*
+ !check_fname_outside_temp_buf());
+ /*
That one is for "file_id: etc" below: in mysqlbinlog we want the #, in
SHOW BINLOG EVENTS we don't.
*/
- fprintf(file, "#");
+ fprintf(file, "#");
}
fprintf(file, " file_id: %d block_len: %d\n", file_id, block_len);
@@ -4221,17 +4221,17 @@
thd->proc_info= proc_info;
my_delete(fname_buf, MYF(0)); // old copy may exist already
if ((fd= my_create(fname_buf, CREATE_MODE,
- O_WRONLY | O_BINARY | O_EXCL | O_NOFOLLOW,
- MYF(MY_WME))) < 0 ||
+ O_WRONLY | O_BINARY | O_EXCL | O_NOFOLLOW,
+ MYF(MY_WME))) < 0 ||
init_io_cache(&file, fd, IO_SIZE, WRITE_CACHE, (my_off_t)0, 0,
- MYF(MY_WME|MY_NABP)))
+ MYF(MY_WME|MY_NABP)))
{
slave_print_error(rli,my_errno,
"Error in Create_file event: could not open file '%s'",
fname_buf);
goto err;
}
-
+
// a trick to avoid allocating another buffer
fname= fname_buf;
fname_len= (uint) (strmov(ext, ".data") - fname);
@@ -4239,19 +4239,19 @@
{
strmov(ext, ".info"); // to have it right in the error message
slave_print_error(rli,my_errno,
- "Error in Create_file event: could not write to file "
+ "Error in Create_file event: could not write to file "
"'%s'",
- fname_buf);
+ fname_buf);
goto err;
}
end_io_cache(&file);
my_close(fd, MYF(0));
-
+
// fname_buf now already has .data, not .info, because we did our trick
my_delete(fname_buf, MYF(0)); // old copy may exist already
if ((fd= my_create(fname_buf, CREATE_MODE,
- O_WRONLY | O_BINARY | O_EXCL | O_NOFOLLOW,
- MYF(MY_WME))) < 0)
+ O_WRONLY | O_BINARY | O_EXCL | O_NOFOLLOW,
+ MYF(MY_WME))) < 0)
{
slave_print_error(rli,my_errno,
"Error in Create_file event: could not open file '%s'",
@@ -4265,7 +4265,7 @@
fname_buf);
goto err;
}
- error=0; // Everything is ok
+ error=0; // Everything is ok
err:
if (error)
@@ -4279,18 +4279,18 @@
/**************************************************************************
- Append_block_log_event methods
+ Append_block_log_event methods
**************************************************************************/
/*
Append_block_log_event ctor
*/
-#ifndef MYSQL_CLIENT
+#ifndef MYSQL_CLIENT
Append_block_log_event::Append_block_log_event(THD* thd_arg, const char* db_arg,
- char* block_arg,
- uint block_len_arg,
- bool using_trans)
+ char* block_arg,
+ uint block_len_arg,
+ bool using_trans)
:Log_event(thd_arg,0, using_trans), block(block_arg),
block_len(block_len_arg), file_id(thd_arg->file_id), db(db_arg)
{
@@ -4307,7 +4307,7 @@
:Log_event(buf, description_event),block(0)
{
DBUG_ENTER("Append_block_log_event::Append_block_log_event(char*,...)");
- uint8 common_header_len= description_event->common_header_len;
+ uint8 common_header_len= description_event->common_header_len;
uint8 append_block_header_len=
description_event->post_header_len[APPEND_BLOCK_EVENT-1];
uint total_header_len= common_header_len+append_block_header_len;
@@ -4331,7 +4331,7 @@
int4store(buf + AB_FILE_ID_OFFSET, file_id);
return (write_header(file, APPEND_BLOCK_HEADER_LEN + block_len) ||
my_b_safe_write(file, buf, APPEND_BLOCK_HEADER_LEN) ||
- my_b_safe_write(file, (byte*) block, block_len));
+ my_b_safe_write(file, (byte*) block, block_len));
}
#endif
@@ -4340,16 +4340,16 @@
Append_block_log_event::print()
*/
-#ifdef MYSQL_CLIENT
+#ifdef MYSQL_CLIENT
void Append_block_log_event::print(FILE* file,
- PRINT_EVENT_INFO* print_event_info)
+ PRINT_EVENT_INFO* print_event_info)
{
if (print_event_info->short_form)
return;
print_header(file, print_event_info);
fputc('\n', file);
fprintf(file, "#%s: file_id: %d block_len: %d\n",
- get_type_str(), file_id, block_len);
+ get_type_str(), file_id, block_len);
}
#endif /* MYSQL_CLIENT */
@@ -4364,8 +4364,8 @@
char buf[256];
uint length;
length= (uint) my_sprintf(buf,
- (buf, ";file_id=%u;block_len=%u", file_id,
- block_len));
+ (buf, ";file_id=%u;block_len=%u", file_id,
+ block_len));
protocol->store(buf, length, &my_charset_bin);
}
@@ -4397,12 +4397,12 @@
{
my_delete(fname, MYF(0)); // old copy may exist already
if ((fd= my_create(fname, CREATE_MODE,
- O_WRONLY | O_BINARY | O_EXCL | O_NOFOLLOW,
- MYF(MY_WME))) < 0)
+ O_WRONLY | O_BINARY | O_EXCL | O_NOFOLLOW,
+ MYF(MY_WME))) < 0)
{
slave_print_error(rli, my_errno,
- "Error in %s event: could not create file '%s'",
- get_type_str(), fname);
+ "Error in %s event: could not create file '%s'",
+ get_type_str(), fname);
goto err;
}
}
@@ -4433,7 +4433,7 @@
/**************************************************************************
- Delete_file_log_event methods
+ Delete_file_log_event methods
**************************************************************************/
/*
@@ -4442,7 +4442,7 @@
#ifndef MYSQL_CLIENT
Delete_file_log_event::Delete_file_log_event(THD *thd_arg, const char* db_arg,
- bool using_trans)
+ bool using_trans)
:Log_event(thd_arg, 0, using_trans), file_id(thd_arg->file_id), db(db_arg)
{
}
@@ -4483,9 +4483,9 @@
Delete_file_log_event::print()
*/
-#ifdef MYSQL_CLIENT
+#ifdef MYSQL_CLIENT
void Delete_file_log_event::print(FILE* file,
- PRINT_EVENT_INFO* print_event_info)
+ PRINT_EVENT_INFO* print_event_info)
{
if (print_event_info->short_form)
return;
@@ -4527,21 +4527,21 @@
/**************************************************************************
- Execute_load_log_event methods
+ Execute_load_log_event methods
**************************************************************************/
/*
Execute_load_log_event ctor
*/
-#ifndef MYSQL_CLIENT
+#ifndef MYSQL_CLIENT
Execute_load_log_event::Execute_load_log_event(THD *thd_arg, const char* db_arg,
- bool using_trans)
+ bool using_trans)
:Log_event(thd_arg, 0, using_trans), file_id(thd_arg->file_id), db(db_arg)
{
}
#endif
-
+
/*
Execute_load_log_event ctor
@@ -4568,7 +4568,7 @@
{
byte buf[EXEC_LOAD_HEADER_LEN];
int4store(buf + EL_FILE_ID_OFFSET, file_id);
- return (write_header(file, sizeof(buf)) ||
+ return (write_header(file, sizeof(buf)) ||
my_b_safe_write(file, buf, sizeof(buf)));
}
#endif
@@ -4578,16 +4578,16 @@
Execute_load_log_event::print()
*/
-#ifdef MYSQL_CLIENT
+#ifdef MYSQL_CLIENT
void Execute_load_log_event::print(FILE* file,
- PRINT_EVENT_INFO* print_event_info)
+ PRINT_EVENT_INFO* print_event_info)
{
if (print_event_info->short_form)
return;
print_header(file, print_event_info);
fputc('\n', file);
fprintf(file, "#Exec_load: file_id=%d\n",
- file_id);
+ file_id);
}
#endif
@@ -4622,7 +4622,7 @@
if ((fd = my_open(fname, O_RDONLY | O_BINARY | O_NOFOLLOW,
MYF(MY_WME))) < 0 ||
init_io_cache(&file, fd, IO_SIZE, READ_CACHE, (my_off_t)0, 0,
- MYF(MY_WME|MY_NABP)))
+ MYF(MY_WME|MY_NABP)))
{
slave_print_error(rli,my_errno,
"Error in Exec_load event: could not open file '%s'",
@@ -4649,7 +4649,7 @@
*/
rli->future_group_master_log_pos= log_pos;
- if (lev->exec_event(0,rli,1))
+ if (lev->exec_event(0,rli,1))
{
/*
We want to indicate the name of the file that could not be loaded
@@ -4663,9 +4663,9 @@
if (tmp)
{
slave_print_error(rli,
- rli->last_slave_errno, /* ok to re-use error code */
- "%s. Failed executing load from '%s'",
- tmp, fname);
+ rli->last_slave_errno, /* ok to re-use error code */
+ "%s. Failed executing load from '%s'",
+ tmp, fname);
my_free(tmp,MYF(0));
}
goto err;
@@ -4699,7 +4699,7 @@
/**************************************************************************
- Begin_load_query_log_event methods
+ Begin_load_query_log_event methods
**************************************************************************/
#ifndef MYSQL_CLIENT
@@ -4731,7 +4731,7 @@
/**************************************************************************
- Execute_load_query_log_event methods
+ Execute_load_query_log_event methods
**************************************************************************/
@@ -4915,7 +4915,7 @@
/**************************************************************************
- sql_ex_info methods
+ sql_ex_info methods
**************************************************************************/
/*
@@ -4927,11 +4927,11 @@
if (new_format())
{
return (write_str(file, field_term, (uint) field_term_len) ||
- write_str(file, enclosed, (uint) enclosed_len) ||
- write_str(file, line_term, (uint) line_term_len) ||
- write_str(file, line_start, (uint) line_start_len) ||
- write_str(file, escaped, (uint) escaped_len) ||
- my_b_safe_write(file,(byte*) &opt_flags,1));
+ write_str(file, enclosed, (uint) enclosed_len) ||
+ write_str(file, line_term, (uint) line_term_len) ||
+ write_str(file, line_start, (uint) line_start_len) ||
+ write_str(file, escaped, (uint) escaped_len) ||
+ my_b_safe_write(file,(byte*) &opt_flags,1));
}
else
{
@@ -4966,18 +4966,18 @@
to read the actual file before we write out the Create_file event.
*/
if (read_str(&buf, buf_end, &field_term, &field_term_len) ||
- read_str(&buf, buf_end, &enclosed, &enclosed_len) ||
- read_str(&buf, buf_end, &line_term, &line_term_len) ||
- read_str(&buf, buf_end, &line_start, &line_start_len) ||
- read_str(&buf, buf_end, &escaped, &escaped_len))
+ read_str(&buf, buf_end, &enclosed, &enclosed_len) ||
+ read_str(&buf, buf_end, &line_term, &line_term_len) ||
+ read_str(&buf, buf_end, &line_start, &line_start_len) ||
+ read_str(&buf, buf_end, &escaped, &escaped_len))
return 0;
opt_flags = *buf++;
}
else
{
field_term_len= enclosed_len= line_term_len= line_start_len= escaped_len=1;
- field_term = buf++; // Use first byte in string
- enclosed= buf++;
+ field_term = buf++; // Use first byte in string
+ enclosed= buf++;
line_term= buf++;
line_start= buf++;
escaped= buf++;
--- 1.127/client/mysqlbinlog.cc 2006-07-12 16:28:13 +09:30
+++ 1.128/client/mysqlbinlog.cc 2006-07-12 16:28:13 +09:30
@@ -14,12 +14,12 @@
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */
-/*
+/*
TODO: print the catalog (some USE catalog.db ????).
Standalone program to read a MySQL binary log (or relay log);
- can read files produced by 3.23, 4.x, 5.0 servers.
+ can read files produced by 3.23, 4.x, 5.0 servers.
Can read binlogs from 3.23/4.x/5.0 and relay logs from 4.x/5.0.
Should be able to read any file of these categories, even with
@@ -34,14 +34,14 @@
#include "client_priv.h"
#include <my_time.h>
/* That one is necessary for defines of OPTION_NO_FOREIGN_KEY_CHECKS etc */
-#include "mysql_priv.h"
+#include "mysql_priv.h"
#include "log_event.h"
-#define BIN_LOG_HEADER_SIZE 4
-#define PROBE_HEADER_LEN (EVENT_LEN_OFFSET+4)
+#define BIN_LOG_HEADER_SIZE 4
+#define PROBE_HEADER_LEN (EVENT_LEN_OFFSET+4)
-#define CLIENT_CAPABILITIES (CLIENT_LONG_PASSWORD | CLIENT_LONG_FLAG | CLIENT_LOCAL_FILES)
+#define CLIENT_CAPABILITIES (CLIENT_LONG_PASSWORD | CLIENT_LONG_FLAG | CLIENT_LOCAL_FILES)
char server_version[SERVER_VERSION_LENGTH];
ulong server_id = 0;
@@ -50,7 +50,7 @@
ulong bytes_sent = 0L, bytes_received = 0L;
ulong mysqld_net_retry_count = 10L;
ulong open_files_limit;
-uint test_flags = 0;
+uint test_flags = 0;
static uint opt_protocol= 0;
static FILE *result_file;
@@ -80,7 +80,7 @@
static char *start_datetime_str, *stop_datetime_str;
static my_time_t start_datetime= 0, stop_datetime= MY_TIME_T_MAX;
static ulonglong rec_count= 0;
-static short binlog_flags = 0;
+static short binlog_flags = 0;
static MYSQL* mysql = NULL;
static const char* dirname_for_local_load= 0;
static bool stop_passed= 0;
@@ -91,7 +91,7 @@
This is because the event will be created (alloced) in read_log_event()
(which returns a pointer) in check_header().
*/
-Format_description_log_event* description_event;
+Format_description_log_event* description_event;
static int dump_local_log_entries(const char* logname);
static int dump_remote_log_entries(const char* logname);
@@ -124,12 +124,12 @@
DYNAMIC_ARRAY file_names;
/*
- Looking for new uniquie filename that doesn't exist yet by
+ Looking for new uniquie filename that doesn't exist yet by
adding postfix -%x
- SYNOPSIS
+ SYNOPSIS
create_unique_file()
-
+
filename buffer for filename
file_name_end tail of buffer that should be changed
should point to a memory enough to printf("-%x",..)
@@ -144,10 +144,10 @@
/* If we have to try more than 1000 times, something is seriously wrong */
for (uint version= 0; version<1000; version++)
{
- sprintf(file_name_end,"-%x",version);
- if ((res= my_create(filename,0,
- O_CREAT|O_EXCL|O_BINARY|O_WRONLY,MYF(0)))!=-1)
- return res;
+ sprintf(file_name_end,"-%x",version);
+ if ((res= my_create(filename,0,
+ O_CREAT|O_EXCL|O_BINARY|O_WRONLY,MYF(0)))!=-1)
+ return res;
}
return -1;
}
@@ -163,18 +163,18 @@
int init()
{
return init_dynamic_array(&file_names, sizeof(File_name_record),
- 100,100 CALLER_INFO);
+ 100,100 CALLER_INFO);
}
void init_by_dir_name(const char *dir)
{
target_dir_name_len= (convert_dirname(target_dir_name, dir, NullS) -
- target_dir_name);
+ target_dir_name);
}
void init_by_cur_dir()
{
if (my_getwd(target_dir_name,sizeof(target_dir_name),MYF(MY_WME)))
- exit(1);
+ exit(1);
target_dir_name_len= strlen(target_dir_name);
}
void destroy()
@@ -183,12 +183,12 @@
File_name_record *end= ptr + file_names.elements;
for (; ptr<end; ptr++)
{
- if (ptr->fname)
- {
+ if (ptr->fname)
+ {
my_free(ptr->fname, MYF(MY_WME));
delete ptr->event;
bzero((char *)ptr, sizeof(File_name_record));
- }
+ }
}
}
@@ -260,7 +260,7 @@
int process(Append_block_log_event *ae);
File prepare_new_file_for_old_format(Load_log_event *le, char *filename);
int load_old_format_file(NET* net, const char *server_fname,
- uint server_fname_len, File file);
+ uint server_fname_len, File file);
int process_first_event(const char *bname, uint blen, const char *block,
uint block_len, uint file_id,
Create_file_log_event *ce);
@@ -269,30 +269,30 @@
File Load_log_processor::prepare_new_file_for_old_format(Load_log_event *le,
- char *filename)
+ char *filename)
{
uint len;
char *tail;
File file;
-
+
fn_format(filename, le->fname, target_dir_name, "", 1);
len= strlen(filename);
tail= filename + len;
-
+
if ((file= create_unique_file(filename,tail)) < 0)
{
sql_print_error("Could not construct local filename %s",filename);
return -1;
}
-
+
le->set_fname_outside_temp_buf(filename,len+strlen(tail));
-
+
return file;
}
int Load_log_processor::load_old_format_file(NET* net, const char*server_fname,
- uint server_fname_len, File file)
+ uint server_fname_len, File file)
{
char buf[FN_REFLEN+1];
buf[0] = 0;
@@ -302,7 +302,7 @@
sql_print_error("Failed requesting the remote dump of %s", server_fname);
return -1;
}
-
+
for (;;)
{
ulong packet_len = my_net_read(net);
@@ -310,33 +310,33 @@
{
if (my_net_write(net, "", 0) || net_flush(net))
{
- sql_print_error("Failed sending the ack packet");
- return -1;
+ sql_print_error("Failed sending the ack packet");
+ return -1;
}
/*
- we just need to send something, as the server will read but
- not examine the packet - this is because mysql_load() sends
- an OK when it is done
+ we just need to send something, as the server will read but
+ not examine the packet - this is because mysql_load() sends
+ an OK when it is done
*/
break;
}
else if (packet_len == packet_error)
{
- sql_print_error("Failed reading a packet during the dump of %s ",
- server_fname);
+ sql_print_error("Failed reading a packet during the dump of %s ",
+ server_fname);
return -1;
}
-
+
if (packet_len > UINT_MAX)
{
sql_print_error("Illegal length of packet read from net");
return -1;
}
- if (my_write(file, (byte*) net->read_pos,
- (uint) packet_len, MYF(MY_WME|MY_NABP)))
+ if (my_write(file, (byte*) net->read_pos,
+ (uint) packet_len, MYF(MY_WME|MY_NABP)))
return -1;
}
-
+
return 0;
}
@@ -389,7 +389,7 @@
if ((file= create_unique_file(fname,ptr)) < 0)
{
sql_print_error("Could not construct local filename %s%s",
- target_dir_name,bname);
+ target_dir_name,bname);
DBUG_RETURN(-1);
}
@@ -399,7 +399,7 @@
if (set_dynamic(&file_names, (gptr)&rec, file_id))
{
sql_print_error("Could not construct local filename %s%s",
- target_dir_name, bname);
+ target_dir_name, bname);
DBUG_RETURN(-1);
}
@@ -443,7 +443,7 @@
File file;
int error= 0;
if (((file= my_open(fname,
- O_APPEND|O_BINARY|O_WRONLY,MYF(MY_WME))) < 0))
+ O_APPEND|O_BINARY|O_WRONLY,MYF(MY_WME))) < 0))
DBUG_RETURN(-1);
if (my_write(file,(byte*)ae->block,ae->block_len,MYF(MY_WME|MY_NABP)))
error= -1;
@@ -484,7 +484,7 @@
0 ok and continue
1 error and terminate
-1 ok and terminate
-
+
TODO
This function returns 0 even in some error cases. This should be changed.
*/
@@ -549,27 +549,27 @@
if (check_database(ce->db))
goto end; // Next event
/*
- We print the event, but with a leading '#': this is just to inform
- the user of the original command; the command we want to execute
- will be a derivation of this original command (we will change the
- filename and use LOCAL), prepared in the 'case EXEC_LOAD_EVENT'
- below.
+ We print the event, but with a leading '#': this is just to inform
+ the user of the original command; the command we want to execute
+ will be a derivation of this original command (we will change the
+ filename and use LOCAL), prepared in the 'case EXEC_LOAD_EVENT'
+ below.
*/
ce->print(result_file, print_event_info, TRUE);
// If this binlog is not 3.23 ; why this test??
if (description_event->binlog_version >= 3)
{
- if (load_processor.process(ce))
- break; // Error
- ev= 0;
+ if (load_processor.process(ce))
+ break; // Error
+ ev= 0;
}
break;
}
case APPEND_BLOCK_EVENT:
ev->print(result_file, print_event_info);
if (load_processor.process((Append_block_log_event*) ev))
- break; // Error
+ break; // Error
break;
case EXEC_LOAD_EVENT:
{
@@ -577,18 +577,18 @@
Execute_load_log_event *exv= (Execute_load_log_event*)ev;
Create_file_log_event *ce= load_processor.grab_event(exv->file_id);
/*
- if ce is 0, it probably means that we have not seen the Create_file
- event (a bad binlog, or most probably --start-position is after the
- Create_file event). Print a warning comment.
+ if ce is 0, it probably means that we have not seen the Create_file
+ event (a bad binlog, or most probably --start-position is after the
+ Create_file event). Print a warning comment.
*/
if (ce)
{
- ce->print(result_file, print_event_info, TRUE);
- my_free((char*)ce->fname,MYF(MY_WME));
- delete ce;
+ ce->print(result_file, print_event_info, TRUE);
+ my_free((char*)ce->fname,MYF(MY_WME));
+ delete ce;
}
else
- fprintf(stderr,"Warning: ignoring Exec_load as there is no \
+ fprintf(stderr,"Warning: ignoring Exec_load as there is no \
Create_file event for file_id: %u\n",exv->file_id);
break;
}
@@ -623,11 +623,11 @@
if (fname)
{
- exlq->print(result_file, print_event_info, fname);
- my_free(fname, MYF(MY_WME));
+ exlq->print(result_file, print_event_info, fname);
+ my_free(fname, MYF(MY_WME));
}
else
- fprintf(stderr,"Warning: ignoring Execute_load_query as there is no \
+ fprintf(stderr,"Warning: ignoring Execute_load_query as there is no \
Begin_load_query event for file_id: %u\n", exlq->file_id);
break;
}
@@ -715,7 +715,7 @@
(gptr*) &short_form, (gptr*) &short_form, 0, GET_BOOL, NO_ARG, 0, 0, 0, 0,
0, 0},
{"socket", 'S', "Socket file to use for connection.",
- (gptr*) &sock, (gptr*) &sock, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0,
+ (gptr*) &sock, (gptr*) &sock, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0,
0, 0},
{"start-datetime", OPT_START_DATETIME,
"Start reading the binlog at first event having a datetime equal or "
@@ -848,7 +848,7 @@
extern "C" my_bool
get_one_option(int optid, const struct my_option *opt __attribute__((unused)),
- char *argument)
+ char *argument)
{
bool tty_password=0;
switch (optid) {
@@ -871,9 +871,9 @@
my_free(pass,MYF(MY_ALLOW_ZERO_PTR));
char *start=argument;
pass= my_strdup(argument,MYF(MY_FAE));
- while (*argument) *argument++= 'x'; /* Destroy argument */
+ while (*argument) *argument++= 'x'; /* Destroy argument */
if (*start)
- start[1]=0; /* Cut length of argument */
+ start[1]=0; /* Cut length of argument */
}
else
tty_password=1;
@@ -1005,7 +1005,7 @@
break;
default:
sql_print_error("Master reported unrecognized MySQL version '%s'",
- version);
+ version);
mysql_free_result(res);
mysql_close(mysql);
return 1;
@@ -1056,7 +1056,7 @@
int2store(buf + BIN_LOG_HEADER_SIZE, binlog_flags);
size_s tlen = strlen(logname);
- if (tlen > UINT_MAX)
+ if (tlen > UINT_MAX)
{
fprintf(stderr,"Log name too long\n");
error= 1;
@@ -1081,14 +1081,14 @@
if (len == packet_error)
{
fprintf(stderr, "Got error reading packet from server: %s\n",
- mysql_error(mysql));
+ mysql_error(mysql));
error= 1;
goto err;
}
if (len < 8 && net->read_pos[0] == 254)
break; // end of data
DBUG_PRINT("info",( "len= %u, net->read_pos[5] = %d\n",
- len, net->read_pos[5]));
+ len, net->read_pos[5]));
if (!(ev= Log_event::read_log_event((const char*) net->read_pos + 1 ,
len - 1, &error_msg,
description_event)))
@@ -1096,7 +1096,7 @@
fprintf(stderr, "Could not construct log event object\n");
error= 1;
goto err;
- }
+ }
Log_event_type type= ev->get_type_code();
if (description_event->binlog_version >= 3 ||
@@ -1144,7 +1144,7 @@
}
if ((error= process_event(&print_event_info, ev, old_off)))
{
- error= ((error < 0) ? 0 : 1);
+ error= ((error < 0) ? 0 : 1);
goto err;
}
}
@@ -1154,17 +1154,17 @@
const char *old_fname= le->fname;
uint old_len= le->fname_len;
File file;
-
+
if ((file= load_processor.prepare_new_file_for_old_format(le,fname)) < 0)
{
error= 1;
goto err;
}
-
+
if ((error= process_event(&print_event_info, ev, old_off)))
{
- my_close(file,MYF(MY_WME));
- error= ((error < 0) ? 0 : 1);
+ my_close(file,MYF(MY_WME));
+ error= ((error < 0) ? 0 : 1);
goto err;
}
error= load_processor.load_old_format_file(net,old_fname,old_len,file);
@@ -1176,7 +1176,7 @@
}
}
/*
- Let's adjust offset for remote log as for local log to produce
+ Let's adjust offset for remote log as for local log to produce
similar text.
*/
old_off+= len-1;
@@ -1188,8 +1188,8 @@
}
-static void check_header(IO_CACHE* file,
- Format_description_log_event **description_event)
+static void check_header(IO_CACHE* file,
+ Format_description_log_event **description_event)
{
byte header[BIN_LOG_HEADER_SIZE];
byte buf[PROBE_HEADER_LEN];
@@ -1224,7 +1224,7 @@
if (file->error)
die("\
Could not read entry at offset %lu : Error in log format or read error",
- tmp_pos);
+ tmp_pos);
/*
Otherwise this is just EOF : this log currently contains 0-2
events. Maybe it's going to be filled in the next
@@ -1247,7 +1247,7 @@
/* always test for a Start_v3, even if no --start-position */
if (buf[4] == START_EVENT_V3) /* This is 3.23 or 4.x */
{
- if (uint4korr(buf + EVENT_LEN_OFFSET) <
+ if (uint4korr(buf + EVENT_LEN_OFFSET) <
(LOG_EVENT_MINIMAL_HEADER_LEN + START_V3_HEADER_LEN))
{
/* This is 3.23 (format 1) */
@@ -1261,12 +1261,12 @@
else if (buf[4] == FORMAT_DESCRIPTION_EVENT) /* This is 5.0 */
{
my_b_seek(file, tmp_pos); /* seek back to event's start */
- if (!(*description_event= (Format_description_log_event*)
+ if (!(*description_event= (Format_description_log_event*)
Log_event::read_log_event(file, *description_event)))
/* EOF can't be hit here normally, so it's a real error */
die("Could not read a Format_description_log_event event \
at offset %lu ; this could be a log format error or read error",
- tmp_pos);
+ tmp_pos);
DBUG_PRINT("info",("Setting description_event"));
}
else if (buf[4] == ROTATE_EVENT)
@@ -1300,7 +1300,7 @@
if ((fd = my_open(logname, O_RDONLY | O_BINARY, MYF(MY_WME))) < 0)
return 1;
if (init_io_cache(file, fd, 0, READ_CACHE, start_position_mot, 0,
- MYF(MY_WME | MY_NABP)))
+ MYF(MY_WME | MY_NABP)))
{
my_close(fd, MYF(MY_WME));
return 1;
@@ -1310,7 +1310,7 @@
else // reading from stdin;
{
if (init_io_cache(file, fileno(stdin), 0, READ_CACHE, (my_off_t) 0,
- 0, MYF(MY_WME | MY_NABP | MY_DONT_CHECK_FILESIZE)))
+ 0, MYF(MY_WME | MY_NABP | MY_DONT_CHECK_FILESIZE)))
return 1;
check_header(file, &description_event);
if (start_position)
@@ -1320,8 +1320,8 @@
my_off_t length,tmp;
for (length= start_position_mot ; length > 0 ; length-=tmp)
{
- tmp=min(length,sizeof(buff));
- if (my_b_read(file, buff, (uint) tmp))
+ tmp=min(length,sizeof(buff));
+ if (my_b_read(file, buff, (uint) tmp))
{
error= 1;
goto end;
@@ -1420,7 +1420,7 @@
load_processor.init_by_cur_dir();
fprintf(result_file,
- "/*!40019 SET @@session.max_insert_delayed_threads=0*/;\n");
+ "/*!40019 SET @@session.max_insert_delayed_threads=0*/;\n");
if (disable_log_bin)
fprintf(result_file,
@@ -1438,7 +1438,7 @@
fprintf(result_file,
"\n/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;"
"\n/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;"
- "\n/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;"
+ "\n/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;"
"\n/*!40101 SET NAMES %s */;\n", charset);
for (save_stop_position= stop_position, stop_position= ~(my_off_t)0 ;
@@ -1481,7 +1481,7 @@
/* We cannot free DBUG, it is used in global destructors after exit(). */
my_end(MY_DONT_FREE_DBUG);
exit(exit_value);
- DBUG_RETURN(exit_value); // Keep compilers happy
+ DBUG_RETURN(exit_value); // Keep compilers happy
}
/*
| Thread |
|---|
| • bk commit into 5.0 tree (grog:1.2207) BUG#11312 | Greg Lehey | 12 Jul |