summaryrefslogtreecommitdiff
path: root/sql
diff options
context:
space:
mode:
Diffstat (limited to 'sql')
-rw-r--r--sql/item_cmpfunc.cc2
-rw-r--r--sql/mysqlbinlog.cc14
-rw-r--r--sql/sql_repl.cc5
3 files changed, 9 insertions, 12 deletions
diff --git a/sql/item_cmpfunc.cc b/sql/item_cmpfunc.cc
index e7a6c52dfd9..373aede7b6b 100644
--- a/sql/item_cmpfunc.cc
+++ b/sql/item_cmpfunc.cc
@@ -487,7 +487,7 @@ Item_func_if::fix_length_and_dec()
{
maybe_null=args[1]->maybe_null || args[2]->maybe_null;
max_length=max(args[1]->max_length,args[2]->max_length);
- decimals=max(args[0]->decimals,args[1]->decimals);
+ decimals=max(args[1]->decimals,args[2]->decimals);
enum Item_result arg1_type=args[1]->result_type();
enum Item_result arg2_type=args[2]->result_type();
if (arg1_type == STRING_RESULT || arg2_type == STRING_RESULT)
diff --git a/sql/mysqlbinlog.cc b/sql/mysqlbinlog.cc
index f0a9692cc2d..c234e2421bf 100644
--- a/sql/mysqlbinlog.cc
+++ b/sql/mysqlbinlog.cc
@@ -303,14 +303,12 @@ static void dump_remote_log_entries(const char* logname)
uint len;
NET* net = &mysql->net;
if(!position) position = 4; // protect the innocent from spam
- if(position < 4)
- {
- position = 4;
- // warn the guity
- fprintf(stderr,
- "Warning: with the position so small you would hit the magic number\n\
-Unfortunately, no sweepstakes today, adjusted position to 4\n");
- }
+ if (position < 4)
+ {
+ position = 4;
+ // warn the guity
+ sql_print_error("Warning: The position in the binary log can't be less than 4.\nStarting from position 4\n");
+ }
int4store(buf, position);
int2store(buf + 4, binlog_flags);
len = (uint) strlen(logname);
diff --git a/sql/sql_repl.cc b/sql/sql_repl.cc
index e5039d118be..3af757993b5 100644
--- a/sql/sql_repl.cc
+++ b/sql/sql_repl.cc
@@ -297,10 +297,9 @@ void mysql_binlog_send(THD* thd, char* log_ident, ulong pos, ushort flags)
if ((file=open_binlog(&log, log_file_name, &errmsg)) < 0)
goto err;
- if(pos < 4)
+ if (pos < 4)
{
- errmsg = "Congratulations! You have hit the magic number and can win \
-sweepstakes if you report the bug";
+ errmsg = "Client requested master to start repliction from impossible position.\n";
goto err;
}