diff options
-rw-r--r-- | Docs/manual.texi | 33 | ||||
-rw-r--r-- | client/mysqladmin.c | 4 | ||||
-rw-r--r-- | client/mysqlcheck.c | 2 | ||||
-rw-r--r-- | libmysql/net.c | 1 | ||||
-rw-r--r-- | mysql-test/mysql-test-run.sh | 5 | ||||
-rw-r--r-- | mysql-test/r/func_test.result | 2 | ||||
-rw-r--r-- | mysql-test/t/func_test.test | 10 | ||||
-rw-r--r-- | mysys/mf_pack.c | 7 | ||||
-rw-r--r-- | sql/item_cmpfunc.cc | 2 | ||||
-rw-r--r-- | sql/mysqlbinlog.cc | 14 | ||||
-rw-r--r-- | sql/sql_repl.cc | 5 |
11 files changed, 46 insertions, 39 deletions
diff --git a/Docs/manual.texi b/Docs/manual.texi index da569c67dd1..4720ee760d3 100644 --- a/Docs/manual.texi +++ b/Docs/manual.texi @@ -314,7 +314,6 @@ Windows Notes * Windows and SSH:: Connecting to a remote @strong{MySQL} from Windows with SSH * Windows symbolic links:: Splitting data across different disks under Win32 * Windows compiling:: Compiling MySQL clients on Windows. -* Windows and BDB tables.:: Windows and BDB Tables * Windows vs Unix:: @strong{MySQL}-Windows compared to Unix @strong{MySQL} Post-installation Setup and Testing @@ -553,7 +552,7 @@ InnoDB Tables Creating InnoDB table space -* Error creating InnoDB:: +* Error creating InnoDB:: Backing up and recovering an InnoDB database @@ -8874,7 +8873,6 @@ This is also described in the @file{README} file that comes with the * Windows and SSH:: Connecting to a remote @strong{MySQL} from Windows with SSH * Windows symbolic links:: Splitting data across different disks under Win32 * Windows compiling:: Compiling MySQL clients on Windows. -* Windows and BDB tables.:: Windows and BDB Tables * Windows vs Unix:: @strong{MySQL}-Windows compared to Unix @strong{MySQL} @end menu @@ -8923,9 +8921,8 @@ symbolic links, BDB and InnoDB tables. @item @code{mysqld-opt} @tab Optimized binary with no support for transactional tables. @item @code{mysqld-nt} @tab -Optimized for a Pentium Pro processor. Has support for -named pipes. You can run this version on Win98, but in -this case no named pipes are created and you must +Optimized binary for NT with support for named pipes. You can run this +version on Win98, but in this case no named pipes are created and you must have TCP/IP installed. @item @code{mysqld-max} @tab Optimized binary with support for symbolic links, BDB and InnoDB tables. @@ -9226,7 +9223,7 @@ text @code{D:\data\foo}. After that, all tables created in the database @cindex compiling, on Windows @cindex Windows, compiling on -@node Windows compiling, Windows and BDB tables., Windows symbolic links, Windows +@node Windows compiling, Windows vs Unix, Windows symbolic links, Windows @subsection Compiling MySQL Clients on Windows In your source files, you should include @file{windows.h} before you include @@ -9246,19 +9243,9 @@ with the static @file{mysqlclient.lib} library. Note that as the mysqlclient libraries are compiled as threaded libraries, you should also compile your code to be multi-threaded! -@cindex BDB tables -@cindex tables, BDB -@node Windows and BDB tables., Windows vs Unix, Windows compiling, Windows -@subsection Windows and BDB Tables - -We will shortly do a full test on the new BDB interface on Windows. -When this is done we will start to release binary distributions (for -Windows and Unix) of @strong{MySQL} that will include support for BDB -tables. - @cindex Windows, versus Unix @cindex operating systems, Windows versus Unix -@node Windows vs Unix, , Windows and BDB tables., Windows +@node Windows vs Unix, , Windows compiling, Windows @subsection MySQL-Windows Compared to Unix MySQL @strong{MySQL}-Windows has by now proven itself to be very stable. This version @@ -24898,7 +24885,7 @@ mysqld: ready for connections @end example @menu -* Error creating InnoDB:: +* Error creating InnoDB:: @end menu @node Error creating InnoDB, , InnoDB init, InnoDB init @@ -42562,7 +42549,7 @@ attachments, you should ftp all the relevant files to: @end itemize @node Reporting mysqltest bugs, , extending mysqltest, MySQL test suite -@subsection Extending the MySQL Test Suite +@subsection Reporting bugs in the MySQL Test Suite If your @strong{MySQL} version doesn't pass the test suite you should do the following: @@ -42594,6 +42581,10 @@ description of your system, the version of the mysqld binary and how you compiled it. @item +Try also to run @code{mysql-test-run} with the @code{--force} option to +see if there is any other test that fails. + +@item If you have compiled @strong{MySQL} yourself, check our manual for how to compile @strong{MySQL} on your platform or, preferable, use one of the binaries we have compiled for you at @@ -44538,6 +44529,8 @@ not yet 100% confident in this code. @appendixsubsec Changes in release 3.23.39 @itemize @bullet @item +Fixed problem with @code{IF()} and number of decimals in the result. +@item Fixed that date-part extract functions works with dates where day and/or month is 0. @item diff --git a/client/mysqladmin.c b/client/mysqladmin.c index 1e6bf3c5219..3570cefc4ae 100644 --- a/client/mysqladmin.c +++ b/client/mysqladmin.c @@ -28,7 +28,7 @@ #include <my_pthread.h> /* because of signal() */ #endif -#define ADMIN_VERSION "8.20" +#define ADMIN_VERSION "8.21" #define MAX_MYSQL_VAR 64 #define SHUTDOWN_DEF_TIMEOUT 3600 /* Wait for shutdown */ #define MAX_TRUNC_LENGTH 3 @@ -870,7 +870,7 @@ static int drop_db(MYSQL *mysql, const char *db) return -1; } } - sprintf(name_buff,"drop database %.*s",FN_REFLEN,db); + sprintf(name_buff,"drop database `%.*s`",FN_REFLEN,db); if (mysql_query(mysql,name_buff)) { my_printf_error(0,"DROP DATABASE %s failed;\nerror: '%s'",MYF(ME_BELL), diff --git a/client/mysqlcheck.c b/client/mysqlcheck.c index 3d4d4597ef5..a9379837847 100644 --- a/client/mysqlcheck.c +++ b/client/mysqlcheck.c @@ -338,7 +338,7 @@ static int get_options(int *argc, char ***argv) { int pnlen = strlen(my_progname); - if (pnlen < 6) // name too short + if (pnlen < 6) /* name too short */ what_to_do = DO_CHECK; else if (!strcmp("repair", my_progname + pnlen - 6)) what_to_do = DO_REPAIR; diff --git a/libmysql/net.c b/libmysql/net.c index f60a2a20ce0..11497cc7077 100644 --- a/libmysql/net.c +++ b/libmysql/net.c @@ -34,7 +34,6 @@ #include <signal.h> #include <errno.h> #include <sys/types.h> -#include <violite.h> #ifdef MYSQL_SERVER ulong max_allowed_packet=65536; diff --git a/mysql-test/mysql-test-run.sh b/mysql-test/mysql-test-run.sh index ece2e42f40b..0dfdbda701e 100644 --- a/mysql-test/mysql-test-run.sh +++ b/mysql-test/mysql-test-run.sh @@ -300,8 +300,9 @@ show_failed_diff () echo "-------------------------------------------------------" $DIFF -c $result_file $reject_file echo "-------------------------------------------------------" - echo "Please e-mail the above, along with the output of mysqlbug" - echo "and any other relevant info to bugs@lists.mysql.com" + echo "Please follow the instructions outlined at" + echo "http://www.mysql.com/doc/R/e/Reporting_mysqltest_bugs.html" + echo "to find the reason to this problem and how to report this." fi } diff --git a/mysql-test/r/func_test.result b/mysql-test/r/func_test.result index 3dc0fc19848..5d2211baf50 100644 --- a/mysql-test/r/func_test.result +++ b/mysql-test/r/func_test.result @@ -34,3 +34,5 @@ this is a 2 2.0 1 1 1 and 0 or 2 2 or 1 and 0 1 1 +sum(if(num is null,0.00,num)) +144.54 diff --git a/mysql-test/t/func_test.test b/mysql-test/t/func_test.test index 9562ae5f77b..0439a96f077 100644 --- a/mysql-test/t/func_test.test +++ b/mysql-test/t/func_test.test @@ -24,3 +24,13 @@ select -1.49 or -1.49,0.6 or 0.6; select 5 between 0 and 10 between 0 and 1,(5 between 0 and 10) between 0 and 1; select 1 and 2 between 2 and 10, 2 between 2 and 10 and 1; select 1 and 0 or 2, 2 or 1 and 0; + +# +# Problem with IF() +# + +drop table if exists t1; +create table t1 (num double(12,2)); +insert into t1 values (144.54); +select sum(if(num is null,0.00,num)) from t1; +drop table t1; diff --git a/mysys/mf_pack.c b/mysys/mf_pack.c index c18d37888b8..b442af7e9e5 100644 --- a/mysys/mf_pack.c +++ b/mysys/mf_pack.c @@ -236,11 +236,16 @@ void symdirget(char *dir) *pos++=temp; *pos=0; /* Restore old filename */ if (fp) { - if (fgets(buff, sizeof(buff), fp)) + if (fgets(buff, sizeof(buff)-1, fp)) { for (pos=strend(buff); pos > buff && (iscntrl(pos[-1]) || isspace(pos[-1])) ; pos --); + + /* Ensure that the symlink ends with the directory symbol */ + if (pos == buff || pos[-1] != FN_LIBCHAR) + *pos++=FN_LIBCHAR; + strmake(dir,buff, (uint) (pos-buff)); } my_fclose(fp,MYF(0)); 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; } |