diff options
author | unknown <monty@donna.mysql.fi> | 2001-05-29 13:46:17 +0300 |
---|---|---|
committer | unknown <monty@donna.mysql.fi> | 2001-05-29 13:46:17 +0300 |
commit | 14122286588e2fcf05d4142c5dd6ff05a59bd83b (patch) | |
tree | 7f42d1149eac3fb84c4cbb7810d966b33a86fb72 /sql | |
parent | cef9025b707f60c9b4bd703866b2896166004799 (diff) | |
download | mariadb-git-14122286588e2fcf05d4142c5dd6ff05a59bd83b.tar.gz |
Fixed problems with decimals withing IF()
Force add of FN_LIBCHAR to symlinks on windows
Docs/manual.texi:
Cleanup & Changelog
client/mysqladmin.c:
Added quoting for 'drop database'
client/mysqlcheck.c:
Fixed wrong comment syntax
libmysql/net.c:
Cleanup
mysql-test/mysql-test-run.sh:
Better error message.
mysql-test/r/func_test.result:
test for if()
mysql-test/t/func_test.test:
test for if()
mysys/mf_pack.c:
Force add of FN_LIBCHAR to symlinks on windows.
sql/item_cmpfunc.cc:
Fixed problems with decimals withing IF()
sql/mysqlbinlog.cc:
Better error messages.
sql/sql_repl.cc:
Better error messages.
Diffstat (limited to 'sql')
-rw-r--r-- | sql/item_cmpfunc.cc | 2 | ||||
-rw-r--r-- | sql/mysqlbinlog.cc | 14 | ||||
-rw-r--r-- | sql/sql_repl.cc | 5 |
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; } |