Commit 771f5502 authored by monty@hundin.mysql.fi's avatar monty@hundin.mysql.fi
Browse files

Merge work:/my/mysql-4.0 into hundin.mysql.fi:/my/mysql-4.0

parents 36f3c41e ec0820b7
Loading
Loading
Loading
Loading
+14 −8
Original line number Diff line number Diff line
@@ -8,13 +8,13 @@ use Getopt::Long;
$opt_distribution=$opt_user=$opt_config_env="";
$opt_dbd_options=$opt_perl_options=$opt_config_options=$opt_make_options=$opt_suffix="";
$opt_tmp=$opt_version_suffix="";
$opt_help=$opt_delete=$opt_debug=$opt_stage=$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_use_old_distribution=$opt_enable_shared=$opt_no_crash_me=$opt_no_strip=0;
$opt_help=$opt_delete=$opt_debug=$opt_stage=$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_use_old_distribution=$opt_enable_shared=$opt_no_crash_me=$opt_no_strip=$opt_with_debug=0;
$opt_innodb=$opt_bdb=$opt_raid=$opt_libwrap=0;

GetOptions(
	"bdb",
	"build-thread=i",
	"config-env=s",
	"config-env=s" => \@config_env,
	"config-options=s" => \@config_options,
	"dbd-options=s",
	"debug",
@@ -45,6 +45,7 @@ GetOptions(
	"use-old-distribution",
	"user=s",
	"version-suffix=s",
	"with-debug",
	"with-low-memory",
	"with-other-libc=s",
	"with-small-disk",
@@ -53,11 +54,6 @@ GetOptions(
usage() if ($opt_help);
usage() if (!$opt_distribution);

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

if (@make_options > 0)
{
	chomp(@make_options);
@@ -70,6 +66,12 @@ if (@config_options > 0)
	$opt_config_options= join(" ", @config_options);
}

if (@config_env > 0)
{
	chomp(@config_env);
	$opt_config_env= join(" ", @config_env);
}

chomp($host=`hostname`);
$full_host_name=$host;
$connect_option= ($opt_tcpip ? "--host=$host" : "");
@@ -208,6 +210,7 @@ if ($opt_stage <= 1)
  $opt_config_options.= " --disable-shared" if (!$opt_enable_shared); # Default for binary versions
  $opt_config_options.= " --with-berkeley-db" if ($opt_bdb);
  $opt_config_options.= " --with-client-ldflags=-all-static" if ($opt_static_client);
	$opt_config_options.= " --with-debug" if ($opt_with_debug);
  $opt_config_options.= " --with-libwrap" if ($opt_libwrap);
  $opt_config_options.= " --with-low-memory" if ($opt_with_low_memory);
  $opt_config_options.= " --with-mysqld-ldflags=-all-static" if ($opt_static_server);
@@ -258,7 +261,7 @@ if ($opt_stage <= 3)
  log_system("rm -fr mysql-3* mysql-4* $pwd/$host/*.tar.gz");
  log_system("nm -n sql/mysqld | gzip -9 -v 2>&1 > sql/mysqld.sym.gz | cat");

  $flags.= "--no-strip" if ($opt_no_strip);
  $flags.= "--no-strip" if ($opt_no_strip || $opt_with_debug);
  check_system("scripts/make_binary_distribution --tmp=$opt_tmp --suffix=$opt_suffix $flags",".tar.gz created");
  safe_system("mv mysql*.tar.gz $pwd/$host");
  if (-f "client/.libs/mysqladmin")
@@ -500,6 +503,9 @@ If user is empty then no mail is sent.
--version-suffix suffix
Set name suffix (e.g. 'com' or '-max') for a distribution

--with-debug
Build binaries with debug information (implies "--no-strip")

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

+7 −0
Original line number Diff line number Diff line
@@ -51774,6 +51774,8 @@ not yet 100% confident in this code.
Allow one to start multiple MySQL servers on windows (code backported
from 4.0.2).
@item
Fixed that @code{--core-file} works on Linux (at least on kernel 2.4.18).
@item
Fixed a problem with BDB and @code{ALTER TABLE}.
@item
Fixed reference to freed memory when doing complicated @code{GROUP BY
@@ -51859,6 +51861,11 @@ Changed initialisation of @code{RND()} to make it less predicatable.
Fixed problem with @code{GROUP BY} on result with expression that created a
@code{BLOB} field.
@item
Fixed problem with @code{GROUP BY} on columns that have NULL values.  To
solve this we now create an MyISAM temporary table when doing a group by
on a possible NULL item.  In MySQL 4.0.5 we can again use in memory HEAP
tables for this case.
@item
Fixed problem with privilege tables when downgrading from 4.0.2 to 3.23.
@item
Fixed thread bug in @code{SLAVE START}, @code{SLAVE STOP} and automatic repair

dbug/dbug_add_tags.pl

0 → 100755
+73 −0
Original line number Diff line number Diff line
#!/usr/bin/perl

die "No files specified\n" unless $ARGV[0];

$ctags="exctags -x -f - --c-types=f -u";

sub get_tag {
  local $.; local $_=<TAGS>;
  ($symbol, $line)= /^(.*\S)\s+function\s+(\d+)/;
  $symbol=$1 if /\s(\S+)\s*\(/;
  $line=1e50 unless $line;
}

while($src=shift)
{
  warn "==> $src\n";
 
  $dst=$src.$$;
  open(TAGS, "$ctags $src|") || die "Cannot exec('$ctags $src'): $!";
  open(SRC, "<$src") || die "Cannot open $src: $!";
  open(DST, ">$dst") || die "Cannot create $dst: $!";
  select DST;

  &get_tag;
  $in_func=0;
  while(<SRC>)
  {
    my $orig=$_;
    if ($in_func)
    {
      if (/\breturn\b/ && !/\/\*.*\breturn\b.*\*\// && !/;/ )
      {
        $_.=<SRC> until /;/;
      }
      s/(?<=\s)return\s*;/DBUG_VOID_RETURN;/;
      s/(?<=\s)return\s*(.+)\s*;/DBUG_RETURN(\1);/s;
      $ret_line=$. if /DBUG_(VOID_)?RETURN/; #{{
      print "$tab  DBUG_VOID_RETURN;\n" if /^$tab}/ && $ret_line < $.-1;
      $in_func=0 if /^$tab}/;
      warn "$src:".($.-1)."\t$orig" if /\breturn\b/;
    }
    print;
    next if $. < $line;
    die "Something wrong: \$.=$., \$line=$line, \$symbol=$symbol\n" if $. > $line;
    &get_tag && next if /^\s*inline /;
    print $_=<SRC> until /{/; $tab=$`;
    &get_tag && next if /}/; # skip one-liners
    $semicolon=1;
    while(<SRC>)
    {
      $skip=!$semicolon;
      $semicolon= /;\s*$/;
      print && next if $skip ||
        (/^\s+\w+((::\w+)?|<\w+>)\s+\**\w+/ && !/^\s*return/);
      last if /DBUG_ENTER/;
      print "$tab  DBUG_ENTER(\"$symbol\");\n";
      print "\n" unless $_ eq "\n";
      last;
    }
    $in_func=1;
    &get_tag;
    redo;
  }
  close SRC;
  close DST;
  close TAGS;
  unlink("$src.orig");
  rename($src, "$src.orig") || die "Cannot rename $src to $src.orig: $!";
  rename($dst, $src) || die "Cannot rename $dst to $src: $!";
}

warn "All done!\n";
+8 −0
Original line number Diff line number Diff line
@@ -2310,6 +2310,14 @@ btr_index_rec_validate(
	ulint	i;
	char	err_buf[1000];
	
	if (index->type & DICT_UNIVERSAL) {
	        /* The insert buffer index tree can contain records from any
	        other index: we cannot check the number of fields or
	        their length */

	        return(TRUE);
	}

	n = dict_index_get_n_fields(index);

	if (rec_get_n_fields(rec) != n) {
+5 −5
Original line number Diff line number Diff line
@@ -1358,11 +1358,6 @@ buf_page_create(

	free_block = buf_LRU_get_free_block();
	
	/* Delete possible entries for the page from the insert buffer:
	such can exist if the page belonged to an index which was dropped */

	ibuf_merge_or_delete_for_page(NULL, space, offset);	
	
	mutex_enter(&(buf_pool->mutex));

	block = buf_page_hash_get(space, offset);
@@ -1410,6 +1405,11 @@ buf_page_create(

	mutex_exit(&(buf_pool->mutex));

	/* Delete possible entries for the page from the insert buffer:
	such can exist if the page belonged to an index which was dropped */

	ibuf_merge_or_delete_for_page(NULL, space, offset);	

	/* Flush pages from the end of the LRU list if necessary */
	buf_flush_free_margin();

Loading