Commit 4abd402b authored by monty@hundin.mysql.fi's avatar monty@hundin.mysql.fi
Browse files

merge with 3.23.48

parents 28670e47 1efcc3e3
Loading
Loading
Loading
Loading
+17 −11
Original line number Diff line number Diff line
@@ -3,30 +3,30 @@
use Getopt::Long;
$opt_distribution=$opt_user=$opt_result=$opt_config_options=$opt_config_env="";
$opt_dbd_options=$opt_perl_options=$opt_suffix="";
$opt_tmp=$version_suffix="";
$opt_tmp=$opt_version_suffix="";
$opt_help=$opt_Information=$opt_delete=$opt_debug=$opt_stage=$opt_rsh_mail=$opt_no_test=$opt_no_perl=$opt_with_low_memory=$opt_fast_benchmark=$opt_static_client=$opt_static_server=$opt_static_perl=$opt_sur=$opt_with_small_disk=$opt_local_perl=$opt_tcpip=$opt_build_thread=$opt_no_mysqltest=$opt_use_old_distribution=$opt_enable_shared=$opt_no_crash_me=$opt_no_strip=0;
$opt_innodb=$opt_bdb=0;

GetOptions("Information","help","distribution=s","user=s","result=s","delete","no-test","no-mysqltest","perl-files=s","debug","config-options=s","config-env=s","stage=i","rsh-mail","with-low-memory","fast-benchmark","tmp=s","static-client","static-server","static-perl","no-perl","local-perl","perl-options=s","sur","with-small-disk","dbd-options=s","tcpip","suffix=s","build-thread=i","innodb","bdb","use-old-distribution","enable-shared","no-crash-me","no-strip") || usage();
GetOptions("Information","help","distribution=s","user=s","result=s","delete","no-test","no-mysqltest","perl-files=s","debug","config-options=s","config-env=s","stage=i","rsh-mail","with-low-memory","fast-benchmark","tmp=s","static-client","static-server","static-perl","no-perl","local-perl","perl-options=s","sur","with-small-disk","dbd-options=s","tcpip","suffix=s","build-thread=i","innodb","bdb","use-old-distribution","enable-shared","no-crash-me","no-strip","version-suffix=s") || usage();

usage() if ($opt_help || $opt_Information);
usage() if (!$opt_distribution);

if ($opt_innodb || $opt_bdb)
if (($opt_innodb || $opt_bdb) && $opt_version_suffix eq "")
{
  $version_suffix="-max";
  $opt_version_suffix="-max";
}

chomp($host=`hostname`);
$full_host_name=$host;
info("Compiling MySQL$version_suffix at $host$suffix, stage: $opt_stage\n");
info("Compiling MySQL$opt_version_suffix at $host$suffix, stage: $opt_stage\n");
$connect_option= ($opt_tcpip ? "--host=$host" : "");
$host =~ /^([^.-]*)/;
$host=$1 . $opt_suffix;
$email="$opt_user\@mysql.com";
$pwd = `pwd`; chomp($pwd);
$log="$pwd/Logs/$host$version_suffix.log";
$opt_distribution =~ /(mysql-[^\/]*)\.tar/;
$log="$pwd/Logs/$host$opt_version_suffix.log";
$opt_distribution =~ /(mysql[^\/]*)\.tar/;
$ver=$1;
$gcc_version=which("gcc");
if (defined($gcc_version) && ! $opt_config_env)
@@ -108,7 +108,7 @@ $|=1;
select STDOUT;
$|=1;

safe_cd("$host");
safe_cd($host);
if ($opt_stage == 0 && ! $opt_use_old_distribution)
{
  safe_system("gunzip < $opt_distribution | $tar xf -");
@@ -118,6 +118,7 @@ if ($opt_stage == 0 && ! $opt_use_old_distribution)
  system("touch timestamp; find . -newer timestamp -print | xargs touch; rm -f timestamp");
  sleep(2);
  # Ensure that files we don't want to rebuild are newer than other files
  safe_cd($ver);
  foreach $name ("configure",
		 "Docs/include.texi",
		 "Docs/*.html", "Docs/manual.txt", "Docs/mysql.info",
@@ -125,9 +126,11 @@ if ($opt_stage == 0 && ! $opt_use_old_distribution)
  {
    system("touch $name");
  }
  # Fix some file modes in BDB tables that makes life harder.
  system("chmod -R u+rw .");
}

safe_cd($ver);
safe_cd("$pwd/$host/$ver");
if ($opt_stage <= 1)
{
  $opt_config_options.=" --with-low-memory" if ($opt_with_low_memory);
@@ -156,7 +159,7 @@ if ($opt_stage <= 1)
  {
    $opt_config_options.= " --with-innodb"
  }
  check_system("$opt_config_env ./configure --prefix=/usr/local/mysql \"--with-comment=Official MySQL$version_suffix binary\" --with-extra-charsets=complex \"--with-server-suffix=$version_suffix\" --enable-thread-safe-client $opt_config_options","Thank you for choosing MySQL");
  check_system("$opt_config_env ./configure --prefix=/usr/local/mysql \"--with-comment=Official MySQL$opt_version_suffix binary\" --with-extra-charsets=complex \"--with-server-suffix=$opt_version_suffix\" --enable-thread-safe-client $opt_config_options","Thank you for choosing MySQL");
  if (-d "$pwd/$host/include-mysql")
  {
    safe_system("cp -r $pwd/$host/include-mysql/* $pwd/$host/$ver/include");
@@ -209,7 +212,7 @@ if ($opt_stage <= 4 && !$opt_no_test)
  safe_system("gunzip < $tar_file | $tar xf -");
}

$tar_file =~ /(mysql-[^\/]*)\.tar/;
$tar_file =~ /(mysql[^\/]*)\.tar/;
$ver=$1;
$test_dir="$pwd/$host/test/$ver";
$ENV{"LD_LIBRARY_PATH"}= "$test_dir/lib:" . $ENV{"LD_LIBRARY_PATH"};
@@ -361,6 +364,9 @@ To set up the environment, like 'CC=cc CXX=gcc CXXFLAGS=-O3'
--dbd-options 'options'
Options for Makefile.PL when configuring msql-mysql-modules.

--version-suffix suffix
Can be used to set a suffix (normally 'com' or '-max') for a distribution

--with-low-memory
Use less memory when compiling.

+2 −2
Original line number Diff line number Diff line
@@ -96,7 +96,7 @@ sub main
    # remove the 'PUBLIC' file from distribution and copy LICENSE
    # on the toplevel of the directory instead. file 'PUBLIC' shouldn't
    # exist in the new mysql distributions, but let's be sure..
    `rm -f $destdir/PUBLIC`;
    `rm -f $destdir/PUBLIC $destdir/README`;
    `cp -p $WD/Docs/LICENSE $destdir/`;
    
    # fix file copyrights
@@ -129,7 +129,7 @@ sub fix_usage_copyright
  foreach my $Cfile (@Cfiles)
  {
    chop $Cfile;
    `replace \"This is free software,\\\\\\nand you are welcome to modify and redistribute it under the GPL license\" \"This is commercial software,\\\\nplease see the file LICENSE for details\" -- $Cfile`;
    `replace "This is free software," "This is commercial software," "and you are welcome to modify and redistribute it under the GPL license" "please see the file LICENSE for details" -- $Cfile`;
  }
}

+52 −1
Original line number Diff line number Diff line
@@ -48720,6 +48720,7 @@ users use this code as the rest of the code and because of this we are
not yet 100% confident in this code.
@menu
* News-3.23.49::                Changes in release 3.23.49
* News-3.23.48::                Changes in release 3.23.48
* News-3.23.47::                Changes in release 3.23.47
* News-3.23.46::                Changes in release 3.23.46
@@ -48772,14 +48773,64 @@ not yet 100% confident in this code.
* News-3.23.0::                 Changes in release 3.23.0
@end menu
@node News-3.23.48, News-3.23.47, News-3.23.x, News-3.23.x
@node News-3.23.49, News-3.23.48, News-3.23.x, News-3.23.x
@appendixsubsec Changes in release 3.23.49
@itemize @bullet
@item
Fixed unlikely caching bug when doing a join without keys. In this case
the last used field for a table always returned @code{NULL}.
@end itemize
@node News-3.23.48, News-3.23.47, News-3.23.49, News-3.23.x
@appendixsubsec Changes in release 3.23.48
@itemize @bullet
@item
Changed to use @code{autoconf} 2.52 (from @code{autoconf} 2.13)
@item
Fixed bug in complicated join with @code{const} tables.
@item
Added internal safety checks for InnoDB.
@item
Some InnoDB variables was always shown in @code{SHOW VARIABLES} as
@code{OFF} on high-byte-first systems (like sparc).
@item
Fixed problem with one thread using an InnoDB table and another
thread doing an @code{ALTER TABLE} on the same table. Before that,
mysqld could crash with an assertion failure in row0row.c, line 474.
@item
Tuned the InnoDB SQL optimizer to favor more often index searches
over table scans.
@item
Fixed a performance problem with InnoDB tables when several large SELECT
queries are run concurrently on a multiprocessor Linux computer.  Large
CPU-bound SELECT queries will now also generally run faster on all
platforms.
@item
If MySQL binlogging is used, InnoDB now prints after crash recovery the
latest MySQL binlog name and the offset InnoDB was able to recover
to. This is useful, for example, when resynchronizing a master and a
slave database in replication.
@item
Added better error messages to help in installation problems of InnoDB tables.
@item
One can now recover also MySQL temporary tables which have become
orphaned inside the InnoDB tablespace.
@item
InnoDB now prevents a @code{FOREIGN KEY} declaration where the signedness
is not the same in the referencing and referenced integer columns.
@item
Calling @code{SHOW CREATE TABLE} or @code{SHOW TABLE STATUS} could cause
memory corruption and make mysqld to crash.  Especially at risk was
@code{mysqldump}, because it calls frequently @code{SHOW CREATE TABLE}.
@item
If inserts to several tables containing an auto-inc column were wrapped
inside one @code{LOCK TABLES}, InnoDB asserted in lock0lock.c.
@item
In 3.23.47 we allowed several @code{NULLS} in a @code{UNIQUE} secondary
index for an InnoDB table.  But @code{CHECK TABLE} was not relaxed: it
reports the table as corrupt.  @code{CHECK TABLE} no longer complains in
this situation.
@item
@code{SHOW GRANTS} now shows @code{REFERENCES} instead of @code{REFERENCE}.
@end itemize
+19 −1
Original line number Diff line number Diff line
@@ -2552,6 +2552,7 @@ btr_estimate_number_of_different_key_vals(
	ulint		total_external_size = 0;
	ulint		i;
	ulint		j;
	ulint		add_on;
	mtr_t		mtr;

	n_cols = dict_index_get_n_unique(index);
@@ -2624,6 +2625,23 @@ btr_estimate_number_of_different_key_vals(
				 + not_empty_flag)
		                	/ (BTR_KEY_VAL_ESTIMATE_N_PAGES
		                	   + total_external_size);
	
		/* If the tree is small, smaller than <
		10 * BTR_KEY_VAL_ESTIMATE_N_PAGES + total_external_size, then
		the above estimate is ok. For bigger trees it is common that we
		do not see any borders between key values in the few pages
		we pick. But still there may be BTR_KEY_VAL_ESTIMATE_N_PAGES
		different key values, or even more. Let us try to approximate
		that: */

		add_on = index->stat_n_leaf_pages /
		   (10 * (BTR_KEY_VAL_ESTIMATE_N_PAGES + total_external_size));

		if (add_on > BTR_KEY_VAL_ESTIMATE_N_PAGES) {
			add_on = BTR_KEY_VAL_ESTIMATE_N_PAGES;
		}
		
		index->stat_n_diff_key_vals[j] += add_on;
	}
		
	mem_free(n_diff);
+0 −1
Original line number Diff line number Diff line
@@ -243,7 +243,6 @@ buf_LRU_get_free_block(void)
	if (n_iterations > 30) {
		ut_print_timestamp(stderr);
		fprintf(stderr,
		" ***********************************************\n"
		"InnoDB: Warning: difficult to find free blocks from\n"
		"InnoDB: the buffer pool (%lu search iterations)! Consider\n"
		"InnoDB: increasing the buffer pool size.\n",
Loading