Commit acf598c5 authored by monty@donna.mysql.fi's avatar monty@donna.mysql.fi

Merge work:/home/bk/mysql into donna.mysql.fi:/home/my/bk/mysql

parents 444afa75 3dc4b35a
...@@ -3,3 +3,4 @@ sasha@mysql.sashanet.com ...@@ -3,3 +3,4 @@ sasha@mysql.sashanet.com
heikki@donna.mysql.fi heikki@donna.mysql.fi
miguel@linux.local miguel@linux.local
monty@tik.mysql.fi monty@tik.mysql.fi
monty@donna.mysql.fi
...@@ -314,7 +314,6 @@ Windows Notes ...@@ -314,7 +314,6 @@ Windows Notes
* Windows and SSH:: Connecting to a remote @strong{MySQL} from Windows with SSH * Windows and SSH:: Connecting to a remote @strong{MySQL} from Windows with SSH
* Windows symbolic links:: Splitting data across different disks under Win32 * Windows symbolic links:: Splitting data across different disks under Win32
* Windows compiling:: Compiling MySQL clients on Windows. * 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} * Windows vs Unix:: @strong{MySQL}-Windows compared to Unix @strong{MySQL}
Post-installation Setup and Testing Post-installation Setup and Testing
...@@ -553,7 +552,7 @@ InnoDB Tables ...@@ -553,7 +552,7 @@ InnoDB Tables
Creating InnoDB table space Creating InnoDB table space
* Error creating InnoDB:: * Error creating InnoDB::
Backing up and recovering an InnoDB database Backing up and recovering an InnoDB database
...@@ -8870,7 +8869,6 @@ This is also described in the @file{README} file that comes with the ...@@ -8870,7 +8869,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 and SSH:: Connecting to a remote @strong{MySQL} from Windows with SSH
* Windows symbolic links:: Splitting data across different disks under Win32 * Windows symbolic links:: Splitting data across different disks under Win32
* Windows compiling:: Compiling MySQL clients on Windows. * 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} * Windows vs Unix:: @strong{MySQL}-Windows compared to Unix @strong{MySQL}
@end menu @end menu
...@@ -8919,9 +8917,8 @@ symbolic links, BDB and InnoDB tables. ...@@ -8919,9 +8917,8 @@ symbolic links, BDB and InnoDB tables.
@item @code{mysqld-opt} @tab @item @code{mysqld-opt} @tab
Optimized binary with no support for transactional tables. Optimized binary with no support for transactional tables.
@item @code{mysqld-nt} @tab @item @code{mysqld-nt} @tab
Optimized for a Pentium Pro processor. Has support for Optimized binary for NT with support for named pipes. You can run this
named pipes. You can run this version on Win98, but in version on Win98, but in this case no named pipes are created and you must
this case no named pipes are created and you must
have TCP/IP installed. have TCP/IP installed.
@item @code{mysqld-max} @tab @item @code{mysqld-max} @tab
Optimized binary with support for symbolic links, BDB and InnoDB tables. Optimized binary with support for symbolic links, BDB and InnoDB tables.
...@@ -9223,7 +9220,7 @@ text @code{D:\data\foo}. After that, all tables created in the database ...@@ -9223,7 +9220,7 @@ text @code{D:\data\foo}. After that, all tables created in the database
@cindex compiling, on Windows @cindex compiling, on Windows
@cindex Windows, compiling on @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 @subsection Compiling MySQL Clients on Windows
In your source files, you should include @file{windows.h} before you include In your source files, you should include @file{windows.h} before you include
...@@ -9243,19 +9240,9 @@ with the static @file{mysqlclient.lib} library. ...@@ -9243,19 +9240,9 @@ with the static @file{mysqlclient.lib} library.
Note that as the mysqlclient libraries are compiled as threaded libraries, Note that as the mysqlclient libraries are compiled as threaded libraries,
you should also compile your code to be multi-threaded! 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 Windows, versus Unix
@cindex operating systems, 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 @subsection MySQL-Windows Compared to Unix MySQL
@strong{MySQL}-Windows has by now proven itself to be very stable. This version @strong{MySQL}-Windows has by now proven itself to be very stable. This version
...@@ -24906,7 +24893,7 @@ mysqld: ready for connections ...@@ -24906,7 +24893,7 @@ mysqld: ready for connections
@end example @end example
@menu @menu
* Error creating InnoDB:: * Error creating InnoDB::
@end menu @end menu
@node Error creating InnoDB, , InnoDB init, InnoDB init @node Error creating InnoDB, , InnoDB init, InnoDB init
...@@ -42718,7 +42705,7 @@ attachments, you should ftp all the relevant files to: ...@@ -42718,7 +42705,7 @@ attachments, you should ftp all the relevant files to:
@end itemize @end itemize
@node Reporting mysqltest bugs, , extending mysqltest, MySQL test suite @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 If your @strong{MySQL} version doesn't pass the test suite you should
do the following: do the following:
...@@ -42749,6 +42736,10 @@ so that we can examine it. Please remember to also include a full ...@@ -42749,6 +42736,10 @@ so that we can examine it. Please remember to also include a full
description of your system, the version of the mysqld binary and how you description of your system, the version of the mysqld binary and how you
compiled it. 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 @item
If you have compiled @strong{MySQL} yourself, check our manual for how If you have compiled @strong{MySQL} yourself, check our manual for how
to compile @strong{MySQL} on your platform or, preferable, use one of to compile @strong{MySQL} on your platform or, preferable, use one of
...@@ -44707,6 +44698,8 @@ not yet 100% confident in this code. ...@@ -44707,6 +44698,8 @@ not yet 100% confident in this code.
@appendixsubsec Changes in release 3.23.39 @appendixsubsec Changes in release 3.23.39
@itemize @bullet @itemize @bullet
@item @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 Fixed that date-part extract functions works with dates where day
and/or month is 0. and/or month is 0.
@item @item
...@@ -28,7 +28,7 @@ ...@@ -28,7 +28,7 @@
#include <my_pthread.h> /* because of signal() */ #include <my_pthread.h> /* because of signal() */
#endif #endif
#define ADMIN_VERSION "8.20" #define ADMIN_VERSION "8.21"
#define MAX_MYSQL_VAR 64 #define MAX_MYSQL_VAR 64
#define SHUTDOWN_DEF_TIMEOUT 3600 /* Wait for shutdown */ #define SHUTDOWN_DEF_TIMEOUT 3600 /* Wait for shutdown */
#define MAX_TRUNC_LENGTH 3 #define MAX_TRUNC_LENGTH 3
...@@ -870,7 +870,7 @@ static int drop_db(MYSQL *mysql, const char *db) ...@@ -870,7 +870,7 @@ static int drop_db(MYSQL *mysql, const char *db)
return -1; 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)) if (mysql_query(mysql,name_buff))
{ {
my_printf_error(0,"DROP DATABASE %s failed;\nerror: '%s'",MYF(ME_BELL), my_printf_error(0,"DROP DATABASE %s failed;\nerror: '%s'",MYF(ME_BELL),
......
...@@ -338,7 +338,7 @@ static int get_options(int *argc, char ***argv) ...@@ -338,7 +338,7 @@ static int get_options(int *argc, char ***argv)
{ {
int pnlen = strlen(my_progname); int pnlen = strlen(my_progname);
if (pnlen < 6) // name too short if (pnlen < 6) /* name too short */
what_to_do = DO_CHECK; what_to_do = DO_CHECK;
else if (!strcmp("repair", my_progname + pnlen - 6)) else if (!strcmp("repair", my_progname + pnlen - 6))
what_to_do = DO_REPAIR; what_to_do = DO_REPAIR;
......
...@@ -34,7 +34,6 @@ ...@@ -34,7 +34,6 @@
#include <signal.h> #include <signal.h>
#include <errno.h> #include <errno.h>
#include <sys/types.h> #include <sys/types.h>
#include <violite.h>
#ifdef MYSQL_SERVER #ifdef MYSQL_SERVER
ulong max_allowed_packet=65536; ulong max_allowed_packet=65536;
......
...@@ -300,8 +300,9 @@ show_failed_diff () ...@@ -300,8 +300,9 @@ show_failed_diff ()
echo "-------------------------------------------------------" echo "-------------------------------------------------------"
$DIFF -c $result_file $reject_file $DIFF -c $result_file $reject_file
echo "-------------------------------------------------------" echo "-------------------------------------------------------"
echo "Please e-mail the above, along with the output of mysqlbug" echo "Please follow the instructions outlined at"
echo "and any other relevant info to bugs@lists.mysql.com" 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 fi
} }
......
...@@ -34,3 +34,5 @@ this is a 2 2.0 ...@@ -34,3 +34,5 @@ this is a 2 2.0
1 1 1 1
1 and 0 or 2 2 or 1 and 0 1 and 0 or 2 2 or 1 and 0
1 1 1 1
sum(if(num is null,0.00,num))
144.54
...@@ -24,3 +24,13 @@ select -1.49 or -1.49,0.6 or 0.6; ...@@ -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 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 2 between 2 and 10, 2 between 2 and 10 and 1;
select 1 and 0 or 2, 2 or 1 and 0; 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;
...@@ -236,11 +236,16 @@ void symdirget(char *dir) ...@@ -236,11 +236,16 @@ void symdirget(char *dir)
*pos++=temp; *pos=0; /* Restore old filename */ *pos++=temp; *pos=0; /* Restore old filename */
if (fp) if (fp)
{ {
if (fgets(buff, sizeof(buff), fp)) if (fgets(buff, sizeof(buff)-1, fp))
{ {
for (pos=strend(buff); for (pos=strend(buff);
pos > buff && (iscntrl(pos[-1]) || isspace(pos[-1])) ; pos > buff && (iscntrl(pos[-1]) || isspace(pos[-1])) ;
pos --); 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)); strmake(dir,buff, (uint) (pos-buff));
} }
my_fclose(fp,MYF(0)); my_fclose(fp,MYF(0));
......
...@@ -487,7 +487,7 @@ Item_func_if::fix_length_and_dec() ...@@ -487,7 +487,7 @@ Item_func_if::fix_length_and_dec()
{ {
maybe_null=args[1]->maybe_null || args[2]->maybe_null; maybe_null=args[1]->maybe_null || args[2]->maybe_null;
max_length=max(args[1]->max_length,args[2]->max_length); 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 arg1_type=args[1]->result_type();
enum Item_result arg2_type=args[2]->result_type(); enum Item_result arg2_type=args[2]->result_type();
if (arg1_type == STRING_RESULT || arg2_type == STRING_RESULT) if (arg1_type == STRING_RESULT || arg2_type == STRING_RESULT)
......
...@@ -303,14 +303,12 @@ static void dump_remote_log_entries(const char* logname) ...@@ -303,14 +303,12 @@ static void dump_remote_log_entries(const char* logname)
uint len; uint len;
NET* net = &mysql->net; NET* net = &mysql->net;
if(!position) position = 4; // protect the innocent from spam if(!position) position = 4; // protect the innocent from spam
if(position < 4) if (position < 4)
{ {
position = 4; position = 4;
// warn the guity // warn the guity
fprintf(stderr, sql_print_error("Warning: The position in the binary log can't be less than 4.\nStarting from position 4\n");
"Warning: with the position so small you would hit the magic number\n\ }
Unfortunately, no sweepstakes today, adjusted position to 4\n");
}
int4store(buf, position); int4store(buf, position);
int2store(buf + 4, binlog_flags); int2store(buf + 4, binlog_flags);
len = (uint) strlen(logname); len = (uint) strlen(logname);
......
...@@ -297,10 +297,9 @@ void mysql_binlog_send(THD* thd, char* log_ident, ulong pos, ushort flags) ...@@ -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) if ((file=open_binlog(&log, log_file_name, &errmsg)) < 0)
goto err; goto err;
if(pos < 4) if (pos < 4)
{ {
errmsg = "Congratulations! You have hit the magic number and can win \ errmsg = "Client requested master to start repliction from impossible position.\n";
sweepstakes if you report the bug";
goto err; goto err;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment