Commit 29456f6e authored by monty@donna.mysql.com's avatar monty@donna.mysql.com
Browse files

Merge

parents 3eaa2494 c5842d42
Loading
Loading
Loading
Loading
+55 −31
Original line number Diff line number Diff line
@@ -761,6 +761,7 @@ MySQL change history
Changes in release 3.23.x  (Released as beta)
* News-3.23.23::                Changes in release 3.23.23
* News-3.23.22::                Changes in release 3.23.22
* News-3.23.21::                Changes in release 3.23.21
* News-3.23.20::                Changes in release 3.23.20
@@ -5724,6 +5725,9 @@ If you are using gcc and have problems with loading @code{UDF} functions
into @code{MySQL}, try adding @code{-lgcc} to the link line for the
@code{UDF} function.
For an automatic start of MySQL you can copy @file{support-files/mysql.server}
to @file{/etc/init.d} and link from there to @code{/etc/rc3.d/S99mysql.server}.
@node Solaris 2.7, Solaris x86, Solaris, Source install system issues
@subsection Solaris 2.7 / 2.8 notes
@@ -5760,9 +5764,9 @@ Alternatively, you can edit @file{/usr/include/widec.h} directly. Either
way, after you make the fix, you should remove @file{config.cache} and run
@code{configure} again!
If you get errors like this when you run @code{make}, it's because @code{configure}
didn't detect the @file{curses.h} file (probably because of the error in
@code{/usr/include/widec.h}:
If you get errors like this when you run @code{make}, it's because
@code{configure} didn't detect the @file{curses.h} file (probably
because of the error in @code{/usr/include/widec.h}:
@example
In file included from mysql.cc:50:
@@ -8962,7 +8966,7 @@ and @file{.frm} files to which the table corresponds.
In SQL statements, you can access tables from different databases
with the @code{db_name.tbl_name} syntax.  Some SQL servers provide
the same functionality but call this @code{User space}.
@strong{MySQL} doesn't support tablespaces like in:
@strong{MySQL} dosen't support tablespaces like in:
@code{create table ralph.my_table...IN my_tablespace}.
@item
@@ -16792,11 +16796,14 @@ are automatically redirected to the new table without any failed updates.
@section @code{CHECK TABLE} syntax
@example
CHECK TABLE tbl_name[,tbl_name...] [TYPE = QUICK]
CHECK TABLE tbl_name[,tbl_name...] [TYPE = [QUICK | FAST | EXTEND | CHANGED]]
@end example
Check the table(s) for errors. The command returns a table with the following
columns:
@code{CHECK TABLE} only works on @code{MyISAM} tables and is the same things
as running @code{myisamchk -m table_name} on the table.
Check the table(s) for errors and updates the key statistics for the table.
The command returns a table with the following columns:
@multitable @columnfractions .35 .65
@item Table @tab Table name
@@ -16805,16 +16812,21 @@ columns:
@item Msg_text @tab The message.
@end multitable
Note that you can get many rows of information for each checked table. The
last one row will be of @code{Msg_type status} and should normally be
@code{OK}.  If you don't get @code{OK}, you should normally run a repair of
the table. @xref{Table maintenance}.
Note that you can get many rows of information for each checked
table. The last one row will be of @code{Msg_type status} and should
normally be @code{OK}.  If you don't get @code{OK}, or @code{Not
checked} you should normally run a repair of the table. @xref{Table
maintenance}. @code{Not checked} means that the table the given @code{TYPE}
told @code{MySQL} that there wasn't any need to check the table.
If @code{TYPE=QUICK} is given then @strong{MySQL} will not scan the rows
for table with fixed size records.
The different check types stands for the following:
@code{CHECK TABLE} only works on @code{MyISAM} tables and is the same things
as running @code{myisamchk -m table_name} on the table.
@multitable @columnfractions .20 .80
@item @code{QUICK} @tab Don't scan the rows for fixed size record tables.
@item @code{FAST}  @tab Only check tables which hasn't been closed properly.
@item @code{CHANGED} @tab Only check tables which has been changed since last check or hasn't been closed properly.
@item @code{EXTENDED} @tab Do a full key lookup for all keys for each row.  This enasures that the table is 100 % consistent, but will take a long time!
@end multitable
@findex ANALYZE TABLE
@node ANALYZE TABLE, REPAIR TABLE, CHECK TABLE, Reference
@@ -26250,7 +26262,7 @@ to start using the new table.
@node Table maintenance, Maintenance regimen, Maintenance, Maintenance
@section Using @code{myisamchk} for table maintenance and crash recovery
Starting with @strong{MySQL} 3.23.13, you can check tables MyISAM with the
Starting with @strong{MySQL} 3.23.13, you can check MyISAM tables with the
@code{CHECK TABLE} command. @xref{CHECK TABLE}.  You can repair tables
with the @code{REPAIR TABLE} command. @xref{REPAIR TABLE}.
@@ -26562,6 +26574,10 @@ If you have a problem with disk space during repair, you can try to use
@node Maintenance regimen, Table-info, Table maintenance, Maintenance
@section Setting up a table maintenance regimen
Starting with @strong{MySQL} 3.23.13, you can check MyISAM tables with the
@code{CHECK TABLE} command. @xref{CHECK TABLE}.  You can repair tables
with the @code{REPAIR TABLE} command. @xref{REPAIR TABLE}.
It is a good idea to perform table checks on a regular basis rather than
waiting for problems to occur.  For maintenance purposes, you can use
@code{myisamchk -s} to check tables.  The @code{-s} option causes
@@ -27020,7 +27036,7 @@ case you should at least make a backup before running @code{myisamchk}.
@node Check, Repair, Crash recovery, Crash recovery
@subsection How to check tables for errors
To check a table, use the following commands:
To check a MyISAM table, use the following commands:
@table @code
@item myisamchk tbl_name
@@ -28026,11 +28042,11 @@ some user that it works:
To make Access work:
@itemize @bullet
@item
If you are using Access 2000, you should get and install Microsoft MDAC from
@uref{http://www.microsoft.com/data/download_21242023.htm}.  This will
fix the bug in Access that when you export data to @strong{MySQL}, the
table and column names aren't specified.
If you are using Access 2000, you should get and install the newest
Microsoft MDAC (@code{Microsoft Data Access Components}) from
@uref{http://www.microsoft.com/data}.  This will fix the bug in Access
that when you export data to @strong{MySQL}, the table and column names
aren't specified.
@item
You should have a primary key in the table.
@item
@@ -35310,11 +35326,10 @@ and will soon be declared beta, gamma and release.
@appendixsubsec Changes in release 3.23.23
@itemize @bullet
@item
Changed @code{ALTER TABLE} to create non-unique indexes in a separate batch
(which should make @code{ALTER TABLE} much faster when you have many indexes).
@item
Added delayed index handling to @code{LOAD DATA INFILE}, when you are
reading into an empty file.
Changed @code{ALTER TABLE}, @code{LOAD DATA INFILE} on empty tables and
@code{INSERT ... SELECT...} on empty tables to create non-unique indexs
in a separate batch with sorting. This will make the above calls much
faster when you have many index.
@item
@code{ALTER TABLE} now logs the first used insert_id correctly.
@item
@@ -35335,12 +35350,20 @@ always deleted.
@item
Fixed that BDB tables work on part keys.
@item
Check table now updates key statistics for the table.
@item
Added @code{CHANGE MASTER TO} command
@item
Added @code{FAST}, @code{QUICK} @code{EXTENDED} check types to
@code{CHECK TABLES}.
@item
Fixed fatal bug in @code{LOAD TABLE FROM MASTER} that did not lock the table during index re-build
@item @code{LOAD DATA INFILE} broke replication if the database was excluded from replication 
@item More variables in @code{SHOW SLAVE STATUS} and @code{SHOW MASTER STATUS}
@item @code{SLAVE STOP} now will not return until the slave thread actually exits
@item
@code{LOAD DATA INFILE} broke replication if the database was excluded from replication 
@item
More variables in @code{SHOW SLAVE STATUS} and @code{SHOW MASTER STATUS}
@item
@code{SLAVE STOP} now will not return until the slave thread actually exits
@end itemize
@node News-3.23.22, News-3.23.21, News-3.23.23, News-3.23.x
@@ -35381,7 +35404,8 @@ Added @code{auto-rehash} on reconnect for the @code{mysql} client.
@item
Fixed a newly introduced bug in @code{MyISAM}, where the index file couldn't
get bigger than 64M.
@item Added @code{SHOW MASTER STATUS} and @code{SHOW SLAVE STATUS}
@item
Added @code{SHOW MASTER STATUS} and @code{SHOW SLAVE STATUS}
@end itemize
@node News-3.23.21, News-3.23.20, News-3.23.22, News-3.23.x
+14 −0
Original line number Diff line number Diff line
@@ -339,7 +339,14 @@ int chk_key(MI_CHECK *param, register MI_INFO *info)
  {
    param->key_crc[key]=0;
    if (!(((ulonglong) 1 << key) & share->state.key_map))
    {
      /* Remember old statistics for key */
      memcpy((char*) rec_per_key_part,
	     (char*) share->state.rec_per_key_part+
	     (uint) (rec_per_key_part - param->rec_per_key_part),
	     keyinfo->keysegs*sizeof(*rec_per_key_part));
      continue;
    }
    found_keys++;

    param->record_checksum=init_checksum;
@@ -1730,7 +1737,14 @@ int mi_repair_by_sort(MI_CHECK *param, register MI_INFO *info,
  {
    sort_info->keyinfo=share->keyinfo+sort_info->key;
    if (!(((ulonglong) 1 << sort_info->key) & key_map))
    {
      /* Remember old statistics for key */
      memcpy((char*) rec_per_key_part,
	     (char*) share->state.rec_per_key_part+
	     (uint) (rec_per_key_part - param->rec_per_key_part),
	     sort_info->keyinfo->keysegs*sizeof(*rec_per_key_part));
      continue;
    }

    if ((!(param->testflag & T_SILENT)))
      printf ("- Fixing index %d\n",sort_info->key+1);
+2 −2
Original line number Diff line number Diff line
#@PERL@
#!@PERL@
# Copyright (C) 2000 MySQL AB & MySQL Finland AB & TCX DataKonsult AB
#
# This library is free software; you can redistribute it and/or
@@ -31,7 +31,7 @@
# $server	Object for current server
# $limits	Hash reference to limits for benchmark

$benchmark_version="2.8";
$benchmark_version="2.9";
use Getopt::Long;

require "$pwd/server-cfg" || die "Can't read Configuration file: $!\n";
+21 −5
Original line number Diff line number Diff line
#@PERL@
#!@PERL@
# Copyright (C) 2000 MySQL AB & MySQL Finland AB & TCX DataKonsult AB
#
# This library is free software; you can redistribute it and/or
@@ -159,6 +159,7 @@ sub new
  $limits{'NEG'}		= 1; # Supports -id
  $limits{'func_extra_in_num'}	= 1; # Has function in
  $limits{'limit'}		= 1;		# supports the limit attribute
  $limits{'unique_index'}	= 1; # Unique index works or not

  $smds{'time'}			= 1;
  $smds{'q1'} 	= 'b';		# with time not supp by mysql ('')
@@ -355,6 +356,7 @@ sub new
  $limits{'alter_table_dropcol'}= 0;
  $limits{'group_func_extra_std'} = 0;
  $limits{'limit'}		= 1;		# supports the limit attribute
  $limits{'unique_index'}	= 1; # Unique index works or not

  $limits{'func_odbc_mod'}	= 0;
  $limits{'func_extra_%'}	= 0;
@@ -551,7 +553,8 @@ sub new
  $limits{'max_index'}		= 64;		# Is this true ?
  $limits{'max_index_parts'}	= 16;		# Is this true ?
  $limits{'max_text_size'}	= 7000;		# 8000 crashes pg 6.3
  $limits{'query_size'}		= 8191;
  $limits{'query_size'}		= 16777216;
  $limits{'unique_index'}	= 0; # Unique index works or not

  # the different cases per query ...
  $smds{'q1'} 	= 'b'; # with time
@@ -642,13 +645,17 @@ sub create
    $index =~ s/primary key/unique index primary_key/i;
    if ($index =~ /^unique.*\(([^\(]*)\)$/i)
    {
      $indfield="using btree (" .$1.")";
      # original: $indfield="using btree (" .$1.")";
      # using btree doesnt seem to work with Postgres anymore; it creates
      # the table and adds the index, but it isnt unique
      $indfield=" (" .$1.")";	
      $in="unique index";
      $table="index_$nr"; $nr++;
    }
    elsif ($index =~ /^(.*index)\s+(\w*)\s+(\(.*\))$/i)
    {
      $indfield="using btree " .$3;
      # original: $indfield="using btree (" .$1.")";
      $indfield=" " .$3;
      $in="index";
      $table="index_$nr"; $nr++;
    }
@@ -820,6 +827,7 @@ sub new
  $limits{'column_alias'}	= 1;
  $limits{'NEG'}		= 1;
  $limits{'func_extra_in_num'}	= 1;
  $limits{'unique_index'}	= 1; # Unique index works or not

  # for the smds small benchmark test ....
  # the different cases per query ...
@@ -1057,6 +1065,7 @@ sub new
  $limits{'column_alias'}	= 0;
  $limits{'NEG'}		= 1;
  $limits{'func_extra_in_num'}	= 0;
  $limits{'unique_index'}	= 1; # Unique index works or not

  # for the smds small benchmark test ....
  # the different cases per query ... EMPRESS
@@ -1333,6 +1342,7 @@ sub new
  $limits{'column_alias'}	= 1; # Alias for fields in select statement.
  $limits{'NEG'}		= 1; # Supports -id
  $limits{'func_extra_in_num'}	= 1; # Has function in
  $limits{'unique_index'}	= 1; # Unique index works or not

  $smds{'time'}			= 1;
  $smds{'q1'} 	= 'b';		# with time not supp by mysql ('')
@@ -1580,7 +1590,7 @@ sub new
  $limits{'select_without_from'}= 0; # Can do 'select 1';
  $limits{'subqueries'}		= 1; # Doesn't support sub-queries.
  $limits{'table_wildcard'}	= 1; # Has SELECT table_name.*

  $limits{'unique_index'}	= 1; # Unique index works or not

  return $self;
}
@@ -1777,6 +1787,7 @@ sub new
  $limits{'column_alias'}	= 1; # Alias for fields in select statement.
  $limits{'NEG'}		= 1; # Supports -id
  $limits{'func_extra_in_num'}	= 1; # Has function in
  $limits{'unique_index'}	= 1; # Unique index works or not
  return $self;
}

@@ -1947,6 +1958,7 @@ sub new
  $limits{'column_alias'}	= 1; # Alias for fields in select statement.
  $limits{'NEG'}		= 1; # Supports -id
  $limits{'func_extra_in_num'}	= 0; # Has function in
  $limits{'unique_index'}	= 1; # Unique index works or not
  return $self;
}

@@ -2129,6 +2141,7 @@ sub new
  $limits{'column_alias'}	= 1; # Alias for fields in select statement.
  $limits{'NEG'}		= 1; # Supports -id
  $limits{'func_extra_in_num'}	= 0; # Has function in
  $limits{'unique_index'}	= 1; # Unique index works or not
  return $self;
}

@@ -2314,6 +2327,7 @@ sub new
  $limits{'column_alias'}	= 1; # Alias for fields in select statement.
  $limits{'NEG'}		= 1; # Supports -id
  $limits{'func_extra_in_num'}	= 1; # Has function in
  $limits{'unique_index'}	= 1; # Unique index works or not

  $smds{'time'}			= 1;
  $smds{'q1'} 	= 'b';		# with time not supp by mysql ('')
@@ -2522,6 +2536,7 @@ sub new
  $limits{'column_alias'}	= 1; # Alias for fields in select statement.
  $limits{'NEG'}		= 1; # Supports -id
  $limits{'func_extra_in_num'}	= 0; # Has function in
  $limits{'unique_index'}	= 1; # Unique index works or not
  return $self;
}

@@ -2689,6 +2704,7 @@ sub new
  $limits{'NEG'}		= 1; # Supports -id
  $limits{'func_extra_in_num'}	= 1; # Has function in
  $limits{'limit'}		= 0; # Does not support the limit attribute
  $limits{'unique_index'}	= 1; # Unique index works or not

  $smds{'time'}			= 1;
  $smds{'q1'} 	= 'b';		# with time not supp by mysql ('')
+12 −9
Original line number Diff line number Diff line
#@PERL@
#!@PERL@
# Copyright (C) 2000 MySQL AB & MySQL Finland AB & TCX DataKonsult AB
#
# This library is free software; you can redistribute it and/or
@@ -215,6 +215,8 @@ if ($opt_fast && defined($server->{vacuum}))
#### insert $opt_loop_count records with duplicate id
####

if ($limits->{'unique_index'})
{
  print "Testing insert of duplicates\n";
  $loop_time=new Benchmark;
  for ($i=0 ; $i < $opt_loop_count ; $i++)
@@ -227,6 +229,7 @@ for ($i=0 ; $i < $opt_loop_count ; $i++)
      die "Didn't get an error when inserting duplicate record $tmp\n";
    }
  }
}

$end_time=new Benchmark;
print "Time for insert_duplicates (" . ($total_rows) . "): " .
Loading