From: monty Date: August 18 2001 11:24am Subject: bk commit into 3.23 tree List-Archive: http://lists.mysql.com/internals/1495 Message-Id: <200108181124.f7IBO3J21319@hundin.mysql.fi> Below is the list of changes that have just been commited into a local 3.23. repository of monty. When monty does a push, they will be propogaged to the main repository and within 24 hours after the push into the public repository. For information on how to access the public repository see http://www.mysql.com/doc/I/n/Installing_source_tree.html ChangeSet@stripped, 2001-08-18 14:24:01+03:00, monty@stripped Fix for handling of floats inside val_int() of +, - * and /. Docs/manual.texi 1.686 01/08/18 14:23:56 monty@stripped +40 -16 Fix of bad merge sql/item_func.cc 1.39 01/08/18 14:23:56 monty@stripped +34 -20 Fix for handling of floats inside val_int() of +, - * and /. sql/log.cc 1.58 01/08/18 14:23:56 monty@stripped +5 -5 cleanup sql/sql_acl.cc 1.28 01/08/18 14:23:56 monty@stripped +1 -1 cleanup Build-tools/Do-compile 1.29 01/08/18 14:23:55 monty@stripped +16 -12 Make shutdown safer # 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: monty # Host: hundin.mysql.fi # Root: /my/bk/mysql --- 1.28/Build-tools/Do-compile Tue Jun 12 12:06:14 2001 +++ 1.29/Build-tools/Do-compile Sat Aug 18 14:23:55 2001 @@ -68,17 +68,20 @@ $ENV{'MYSQL_TCP_PORT'}= $mysql_tcp_port= 3334 + $opt_build_thread; $ENV{'MYSQL_UNIX_PORT'}=$mysql_unix_port="$opt_tmp/mysql$opt_suffix.build"; $ENV{"PERL5LIB"}="$pwd/$host/perl5:$pwd/$host/perl5/site_perl"; +$slave_port=$mysql_tcp_port+16; + +if (-x "$host/bin/mysqladmin") +{ + log_system("$host/bin/mysqladmin --no-defaults -u root -S $mysql_unix_port -s shutdown"); + log_system("$host/bin/mysqladmin --no-defaults -u root -P $mysql_tcp_port -h $host -s shutdown"); + log_system("$host/bin/mysqladmin --no-defaults -u root -P $slave_port -h $host -s shutdown"); + log_system("$host/bin/mysqladmin --no-defaults -u root -P 9306 -h $host -s shutdown"); + log_system("$host/bin/mysqladmin --no-defaults -u root -P 9307 -h $host -s shutdown"); +} if ($opt_stage == 0) { print "$host: Removing old distribution\n" if ($opt_debug); - if (-x "$host/bin/mysqladmin") - { - log_system("$host/bin/mysqladmin --no-defaults -u root -S $mysql_unix_port -s shutdown"); - log_system("$host/bin/mysqladmin --no-defaults -u root -P $mysql_tcp_port -h $host -s shutdown"); - log_system("$host/bin/mysqladmin --no-defaults -u root -P 9306 -h $host -s shutdown"); - log_system("$host/bin/mysqladmin --no-defaults -u root -P 9307 -h $host -s shutdown"); - } if (!$opt_use_old_distribution) { system("mkdir $host") if (! -d $host); @@ -86,7 +89,6 @@ rm_all(<$host/mysql-*>); system("mkdir $host/bin") if (! -d "$host/bin"); } - system("mkdir $bench_tmpdir") if (! -d $bench_tmpdir); rm_all("$host/test"); system("mkdir $host/test") if (! -d "$host/test"); system("mkdir Logs") if (! -d "Logs"); @@ -184,13 +186,14 @@ if ($opt_stage <= 5 && !$opt_no_test && !$opt_no_mysqltest) { - my ($slave_port); - $slave_port=$mysql_tcp_port+16; + system("mkdir $bench_tmpdir") if (! -d $bench_tmpdir); safe_cd("${test_dir}/mysql-test"); check_system("./mysql-test-run --tmpdir=$bench_tmpdir --master_port=$mysql_tcp_port --slave_port=$slave_port --sleep=10", "tests were successful"); } -if ($opt_stage <= 6 && !$opt_no_test) +# Start the server if we are going to run any of the benchmarks + +if (!$opt_no_test) { my $extra; safe_cd($test_dir); @@ -207,9 +210,10 @@ { $extra.=" --innodb_data_file_path=ibdata1:100M"; } - safe_system("./bin/mysqld --no-defaults --basedir . --datadir ./data --skip-locking $extra >> $log 2>&1 &"); + safe_system("./bin/mysqld --no-defaults --basedir . --datadir ./data --skip-l\ocking $extra >> $log 2>&1 &"); sleep(2); } + if ($opt_stage <= 7 && $opt_perl_files && !$opt_no_perl && !$opt_no_test) { --- 1.685/Docs/manual.texi Sat Aug 18 12:17:55 2001 +++ 1.686/Docs/manual.texi Sat Aug 18 14:23:56 2001 @@ -1523,7 +1523,7 @@ @subheading Tutorials and Manuals @table @asis -@item @uref{http://netgraft.com/~mbac/research/mysqlmyths.html, MySQL Myths Debunked} +@item @uref{http://michael.bacarella.com/research/mysqlmyths.html, MySQL Myths Debunked} MySQL used in the real world. @item @uref{http://www.4t2.com/mysql} @@ -9620,7 +9620,7 @@ If you build MySQL yourself and do not what to mess with patching LinuxThreads, you should set @code{max_connections} to a value no higher than 500. It should be even less if you have a large key buffer, large -heap tables, or some other things that make @strong{mysqld} allocate a lot +heap tables, or some other things that make @code{mysqld} allocate a lot of memory or if you are running a 2.2 kernel with a 2GB patch. If you are using our binary or RPM version 3.23.25 or later, you can safely set @code{max_connections} at 1500, assuming no large key buffer or heap tables @@ -10031,8 +10031,15 @@ make_install @end example -and @strong{mysqld} should be ready to run. +and @code{mysqld} should be ready to run. +On Ia64 the MySQL client binaries are using shared libraries. This means +that if you install our binary distribution in some other place than +@file{/usr/local/mysql} you need to either modify @file{/etc/ld.so.conf} +or add the path to the directory where you have @file{libmysqlclient.so} +to the @code{LD_LIBRARY_PATH} environment variable. + +@xref{Link errors}. @node Windows, Solaris, Linux, Operating System Specific Notes @subsection Windows Notes @@ -10638,7 +10645,7 @@ If you have a ultra sparc, you can get 4 % more performance by adding "-mcpu=v8 -Wa,-xarch=v8plusa" to CFLAGS and CXXFLAGS. -If you have the Sun Workshop (SunPro) 4.2 (or newer) compiler, you can +If you have Sun Workshop (Fortre) 5.3 (or newer) compiler, you can run @code{configure} like this: @example @@ -10647,6 +10654,15 @@ ./configure --prefix=/usr/local/mysql --enable-assembler @end example +In the MySQL benchmarks, we got a 6 % speedup on an Ultrasparc when +using Sun Workshop 5.3 compared to using gcc with -mcpu flags. + +If you get a problem with @code{fdatasync} or @code{sched_yield}, +you can fix this by adding @code{LIBS=-lrt} to the configure line + +The following paragraph is only relevant for older compilers than +WorkShop 5.3: + You may also have to edit the @code{configure} script to change this line: @example @@ -10851,7 +10867,7 @@ @node Solaris x86, , Solaris 2.7, Solaris @subsubsection Solaris x86 Notes -On Solaris 2.8 on x86, @strong{mysqld} will core dump if you run +On Solaris 2.8 on x86, @code{mysqld} will core dump if you run 'strip' in. If you are using @code{gcc} or @code{egcs} on Solaris x86 and you @@ -10919,9 +10935,8 @@ Versions 3 and up. It is possible to run with native threads on some late 2.2.x versions but you may encounter problems shutting down @code{mysqld}. -The @strong{MYSQL} Makefiles require GNU make (@code{gmake}) to work. -If you want to compile @strong{MYSQL} you need to install GNU make -first. +The MySQL @file{Makefile}s require GNU make (@code{gmake}) to work. If +you want to compile MySQL you need to install GNU @code{make} first. Be sure to have your name resolver setup correct. Otherwise you may experience resolver delays or failures when connecting to @code{mysqld}. @@ -15499,7 +15514,7 @@ @code{SHOW DATABASES} returns only those databases for which the user has some kind of privilege. -@item @code{--safe-user-create} +@item --safe-user-create If this is enabled, an user can't create new users with the @code{GRANT} command, if the user doesn't have @code{INSERT} privilege to the @code{mysql.user} table. If you want to give a user access to just create @@ -21371,7 +21386,7 @@ @uref{http://www.mysql.com/downloads/mysql-max-3.23.html}. The Windows MySQL 3.23 binary distribution includes both the -standard @strong{mysqld.exe} binary and the @code{mysqld-max.exe} binary. +standard @code{mysqld.exe} binary and the @code{mysqld-max.exe} binary. @uref{http://www.mysql.com/downloads/mysql-3.23.html}. @xref{Windows installation}. @@ -21388,7 +21403,7 @@ | have_bdb | YES | | have_innodb | NO | | have_isam | YES | -| have_raid | YES | +| have_raid | NO | | have_ssl | NO | +---------------+-------+ @end example @@ -35830,7 +35845,7 @@ @code{PRIMARY KEY} as short as possible to save disk and get better speed. @item @code{LOCK TABLES} works on @code{BDB} tables as with other tables. If -you don't use @code{LOCK TABLE}, @strong{MYSQL} will issue an internal +you don't use @code{LOCK TABLE}, MYSQL will issue an internal multiple-write lock on the table to ensure that the table will be properly locked if another thread issues a table lock. @item @@ -46464,6 +46479,7 @@ not yet 100% confident in this code. @menu +* News-3.23.42:: Changes in release 3.23.42 * News-3.23.41:: Changes in release 3.23.41 * News-3.23.40:: Changes in release 3.23.40 * News-3.23.39:: Changes in release 3.23.39 @@ -46509,8 +46525,19 @@ * News-3.23.0:: Changes in release 3.23.0 @end menu +@node News-3.23.42, News-3.23.41, News-3.23.x, News-3.23.x +@appendixsubsec Changes in release 3.23.42 +@itemize @bullet +@item +Use real arithmetic operations even in integer context if not +all arguments are integers. (Fixes uncommon bug in some integer +context). +@item +Don't force everything to lower cases on windows. (To fix problem +with windows and @code{ALTER TABLE}). +@end itemize -@node News-3.23.41, News-3.23.40, News-3.23.x, News-3.23.x +@node News-3.23.41, News-3.23.40, News-3.23.42, News-3.23.x @appendixsubsec Changes in release 3.23.41 @itemize @bullet @@ -46547,9 +46574,6 @@ @file{mysql_com.h} @item Added option @code{--safe-user-create} to @code{mysqld}. -@item -Added options to the @code{--ansi} startup options to let the user -decide which @code{ansi} options one to enable. @item Fixed bug in @code{SELECT DISTINCT ... HAVING} that casued error message @code{Can't find record in '#...} --- 1.38/sql/item_func.cc Thu Aug 16 21:01:34 2001 +++ 1.39/sql/item_func.cc Sat Aug 18 14:23:56 2001 @@ -259,10 +259,14 @@ longlong Item_func_plus::val_int() { - longlong value=args[0]->val_int()+args[1]->val_int(); - if ((null_value=args[0]->null_value || args[1]->null_value)) - return 0; - return value; + if (hybrid_type == INT_RESULT) + { + longlong value=args[0]->val_int()+args[1]->val_int(); + if ((null_value=args[0]->null_value || args[1]->null_value)) + return 0; + return value; + } + return (longlong) Item_func_plus::val(); } double Item_func_minus::val() @@ -275,12 +279,17 @@ longlong Item_func_minus::val_int() { - longlong value=args[0]->val_int() - args[1]->val_int(); - if ((null_value=args[0]->null_value || args[1]->null_value)) - return 0; - return value; + if (hybrid_type == INT_RESULT) + { + longlong value=args[0]->val_int() - args[1]->val_int(); + if ((null_value=args[0]->null_value || args[1]->null_value)) + return 0; + return value; + } + return (longlong) Item_func_minus::val(); } + double Item_func_mul::val() { double value=args[0]->val()*args[1]->val(); @@ -291,10 +300,14 @@ longlong Item_func_mul::val_int() { - longlong value=args[0]->val_int()*args[1]->val_int(); - if ((null_value=args[0]->null_value || args[1]->null_value)) - return 0; /* purecov: inspected */ - return value; + if (hybrid_type == INT_RESULT) + { + longlong value=args[0]->val_int()*args[1]->val_int(); + if ((null_value=args[0]->null_value || args[1]->null_value)) + return 0; /* purecov: inspected */ + return value; + } + return (longlong) Item_func_mul::val(); } @@ -309,14 +322,15 @@ longlong Item_func_div::val_int() { - // the integer result of division of two arguments needs to be computed - // as a type-cast division of val(), not as diviion of val_int() of each - // argument. For example, val_int(41.5/3.4) = val_int(12.206) = 12, but - // if you do val_int(41.5)/val_int(3.4), as in the old code, we get 42/3= - // 14, which is wrong. This would break sec_to_time(a/b), - // from_unixtime(a/b), and - // all functions that do val_int() on their arguments - return (longlong)val(); + if (hybrid_type == INT_RESULT) + { + longlong value=args[0]->val_int(); + longlong val2=args[1]->val_int(); + if ((null_value= val2 == 0 || args[0]->null_value || args[1]->null_value)) + return 0; + return value/val2; + } + return (longlong) Item_func_div::val(); } void Item_func_div::fix_length_and_dec() --- 1.57/sql/log.cc Thu Jul 12 04:29:14 2001 +++ 1.58/sql/log.cc Sat Aug 18 14:23:56 2001 @@ -149,11 +149,11 @@ void MYSQL_LOG::close_index() { - if(index_file >= 0) - { - my_close(index_file, MYF(0)); - index_file = -1; - } + if (index_file >= 0) + { + my_close(index_file, MYF(0)); + index_file = -1; + } } void MYSQL_LOG::open(const char *log_name, enum_log_type log_type_arg, --- 1.27/sql/sql_acl.cc Fri Aug 10 17:37:36 2001 +++ 1.28/sql/sql_acl.cc Sat Aug 18 14:23:56 2001 @@ -354,7 +354,7 @@ /* - return a number with if sorted put string in this order: + return a number which, if sorted 'desc', puts strings in this order: no wildcards wildcards empty string