Commit 5134b084 authored by monty@donna.mysql.com's avatar monty@donna.mysql.com
Browse files

merge

parents ba6b6193 da0c16dd
Loading
Loading
Loading
Loading
+59 −38
Original line number Diff line number Diff line
@@ -315,7 +315,7 @@ Is There Anything Special to Do when Upgrading/Downgrading MySQL?
How Standards-compatible Is MySQL?
* Extensions to ANSI::          @strong{MySQL} extensions to ANSI SQL92
* Ansi mode::                   Running @strong{MySQL} in ANSI mode
* ANSI mode::                   Running @strong{MySQL} in ANSI mode
* Differences from ANSI::       @strong{MySQL} differences compared to ANSI SQL92
* Missing functions::           Functionality missing from @strong{MySQL}
* Standards::                   What standards does @strong{MySQL} follow?
@@ -1550,7 +1550,8 @@ clauses. Support for group functions (@code{COUNT()},
@code{MAX()} and @code{MIN()}).
@item
Support for @code{LEFT OUTER JOIN} with ANSI SQL and ODBC syntax.
Support for @code{LEFT OUTER JOIN} and @code{RIGHT OUTER JOIN} with ANSI
SQL and ODBC syntax.
@item
You can mix tables from different databases in the same query (as of
@@ -6028,6 +6029,16 @@ you are probably using @code{gcc} (or using an old binary compiled with
/usr/bin/perl: can't resolve symbol '__divdi3'
@end example
Add @code{-L/usr/lib/gcc-lib/... -lgcc} to the link command when the
@file{mysql.so} library gets built (check the output from @code{make} for
@file{mysql.so} when you compile the Perl client).  The @code{-L} option
should specify the pathname of the directory where @file{libgcc.a} is located
on your system.
Another cause of this problem may be that Perl and @strong{MySQL} aren't both
compiled with @code{gcc}.  In this case, you can solve the mismatch by
compiling both with @code{gcc}.
If you get the following error from @code{Msql-Mysql-modules}
when you run the tests:
@@ -6036,7 +6047,8 @@ t/00base............install_driver(mysql) failed: Can't load '../blib/arch/auto/
@end example
it means that you need to include the compression library, -lz, to the
link line. This can be done by changing the line:
link line. This can be doing the following change in the file
@file{lib/DBD/mysql/Install.pm}:
@example
$sysliblist .= " -lm";
@@ -6046,20 +6058,9 @@ to
$sysliblist .= " -lm -lz";
@end example
in file lib/DBD/mysql/Install.pm in the Msql-Mysql-modules directory.
After this, you MUST run 'make realclean' and then proceed with the
installation from the beginning.
Add @code{-L/usr/lib/gcc-lib/... -lgcc} to the link command when the
@file{mysql.so} library gets built (check the output from @code{make} for
@file{mysql.so} when you compile the Perl client).  The @code{-L} option
should specify the pathname of the directory where @file{libgcc.a} is located
on your system.
Another cause of this problem may be that Perl and @strong{MySQL} aren't both
compiled with @code{gcc}.  In this case, you can solve the mismatch by
compiling both with @code{gcc}.
If you want to use the Perl module on a system that doesn't support dynamic
linking (like SCO) you can generate a static version of Perl that includes
@code{DBI} and @code{DBD-mysql}.  The way this works is that you generate a
@@ -8935,7 +8936,7 @@ The @code{mysql.server} script uses the following variables:
@table @code
@item --ansi
Use ANSI SQL syntax instead of MySQL syntax. @xref{Ansi mode}.
Use ANSI SQL syntax instead of MySQL syntax. @xref{ANSI mode}.
@item -b, --basedir=path
Path to installation directory. All paths are
@@ -9635,14 +9636,14 @@ information.
@menu
* Extensions to ANSI::          @strong{MySQL} extensions to ANSI SQL92
* Ansi mode::                   Running @strong{MySQL} in ANSI mode
* ANSI mode::                   Running @strong{MySQL} in ANSI mode
* Differences from ANSI::       @strong{MySQL} differences compared to ANSI SQL92
* Missing functions::           Functionality missing from @strong{MySQL}
* Standards::                   What standards does @strong{MySQL} follow?
* Commit-rollback::             How to cope without @code{COMMIT}-@code{ROLLBACK}
@end menu
@node Extensions to ANSI, Ansi mode, Compatibility, Compatibility
@node Extensions to ANSI, ANSI mode, Compatibility, Compatibility
@section MySQL Extensions to ANSI SQL92
@strong{MySQL} includes some extensions that you probably will not find in
@@ -9886,7 +9887,7 @@ SELECT @@t1:=(@@t2:=1)+@@t3:=4,@@t1,@@t2,@@t3;
@end itemize
@node Ansi mode, Differences from ANSI, Extensions to ANSI, Compatibility
@node ANSI mode, Differences from ANSI, Extensions to ANSI, Compatibility
@section Running MySQL in ANSI Mode
@cindex running, ANSI mode
@cindex ANSI mode, running
@@ -9899,7 +9900,7 @@ of @strong{MySQL} changes:
@code{||} is string concatenation instead of @code{OR}.
@item
You can have any number of spaces between a function name and the @samp{(}. 
This makes also all function names reserved words.
This forces all function names to be treated as reserved words.
@item
@samp{"} will be an identifier quote character (like the @strong{MySQL}
@samp{`} quote character) and not a string quote character.
@@ -9908,7 +9909,7 @@ This makes also all function names reserved words.
@code{DOUBLE}.
@end itemize
@node Differences from ANSI, Missing functions, Ansi mode, Compatibility
@node Differences from ANSI, Missing functions, ANSI mode, Compatibility
@section MySQL Differences Compared to ANSI SQL92
We try to make @strong{MySQL} follow the ANSI SQL standard and the
@@ -9917,7 +9918,8 @@ differently:
@itemize @bullet
@item
@code{--} is only a comment if followed by a white space. @xref{Missing comments}.
@code{--} is only a comment if followed by a white space. @xref{Missing
comments}.
@item
For @code{VARCHAR} columns, trailing spaces are removed when the value is
stored. @xref{Bugs}.
@@ -9940,11 +9942,11 @@ extra conditions in this case.
@cindex functionality, missing
The following functionality is missing in the current version of
@strong{MySQL}.  For a prioritized list indicating when new extensions may be
added to @strong{MySQL}, you should consult
@uref{http://www.mysql.com/documentation/manual.php?section=TODO, the online
@strong{MySQL} TODO list}. That is the latest version of the TODO list in
this manual. @xref{TODO}.
@strong{MySQL}.  For a prioritized list indicating when new extensions
may be added to @strong{MySQL}, you should consult
@uref{http://www.mysql.com/documentation/manual.php?section=TODO, the
online @strong{MySQL} TODO list}. That is the latest version of the TODO
list in this manual. @xref{TODO}.
@menu
* Missing Sub-selects::         Sub-selects
@@ -12730,8 +12732,8 @@ Database, table, index, column, and alias names all follow the same rules in
@tindex "
Note that the rules changed starting with @strong{MySQL} Version 3.23.6 when we
introduced quoting of identifiers (database, table, and column names)
with @samp{`} (@samp{"} will also work to quote identifiers if you run
in ANSI mode).
with @samp{`}. @samp{"} will also work to quote identifiers if you run
in ANSI mode. @xref{ANSI mode}.
@multitable @columnfractions .15 .15 .70
@item @strong{Identifier} @tab @strong{Max length} @tab @strong{Allowed characters}
@@ -13409,7 +13411,7 @@ standard, @strong{MySQL} recognizes @code{DOUBLE} as a synonym for the
@code{DOUBLE PRECISION} type.  In contrast with the standard's
requirement that the precision for @code{REAL} be smaller than that used
for @code{DOUBLE PRECISION}, @strong{MySQL} implements both as 8-byte
double-precision floating-point values (when not running in ``Ansi mode'').
double-precision floating-point values (when not running in ``ANSI mode'').
For maximum portability, code requiring storage of approximate numeric
data values should use @code{FLOAT} or @code{DOUBLE PRECISION} with no
specification of precision or number of decimal points.
@@ -17842,7 +17844,9 @@ running!
@section @code{CHECK TABLE} Syntax
@example
CHECK TABLE tbl_name[,tbl_name...] [TYPE = [QUICK | FAST | EXTEND | CHANGED]]
CHECK TABLE tbl_name[,tbl_name...] [option [option...]]
option = QUICK | FAST | EXTEND | CHANGED
@end example
@code{CHECK TABLE} only works on @code{MyISAM} tables and is the same thing
@@ -17876,6 +17880,14 @@ The different check types stand for the following:
@item @code{EXTENDED} @tab Do a full key lookup for all keys for each row.  This ensures that the table is 100 % consistent, but will take a long time!
@end multitable
You can combine check options as in:
@example
CHECK TABLE test_table FAST QUICK;
@end example
Which only would do a quick check on the table if it wasn't closed properly.
If a table is corrupted, then it's most likely that the problem is in
the indexes and not in the data part.  All of the above check types
checks the indexes throughly and should thus find most errors.
@@ -17885,7 +17897,8 @@ no check options or the @code{QUICK} option. The later should be used
when you are in a hurry and can take the very small risk that
@code{QUICK} didn't find an error in the data file (In most cases
@strong{MySQL} should find, under normal usage, any error in the data
file. If this happens then the table will be marked as 'corrupted'.
file. If this happens then the table will be marked as 'corrupted',
in which case the table can't be used until it's repaired).
@code{FAST} and @code{CHANGED} are mostly intended to be used from a
script (for example to be executed from cron) if you want to check your
@@ -17992,7 +18005,7 @@ the table will not be analyzed again.
@section @code{REPAIR TABLE} syntax
@example
REPAIR TABLE tbl_name[,tbl_name...] [TYPE = QUICK]
REPAIR TABLE tbl_name[,tbl_name...] [QUICK]
@end example
@code{REPAIR TABLE} only works on @code{MyISAM} tables and is the same things
@@ -18016,7 +18029,7 @@ repairing the table with @code{myisamchk -o}, as @code{REPAIR TABLE}
does not yet implement all the options of @code{myisamchk}. In the near
future, we will make it more flexible.
If @code{TYPE=QUICK} is given then @strong{MySQL} will try to do a
If @code{QUICK} is given then @strong{MySQL} will try to do a
@code{REPAIR} of only the index tree.
@findex DELETE
@@ -19696,7 +19709,7 @@ indicates 16 megabytes. The case of suffix letters does not matter;
@table @code
@item @code{ansi_mode}.
Is @code{ON} if @code{mysqld} was started with @code{--ansi}.
@xref{Ansi mode}.
@xref{ANSI mode}.
@item @code{back_log}
The number of outstanding connection requests @strong{MySQL} can have. This
@@ -30231,6 +30244,10 @@ with these, change the columns to @code{DATETIME}.
In some cases, Access may generate illegal SQL queries that
@strong{MySQL} can't understand. You can fix this by selecting
@code{"Query|SQLSpecific|Pass-Through"} from the Access menu.
@item
If you have in Access a column defined as BYTE, Access will try to export this
as @code{TINYINT} instead of @code{TINYINT UNSIGNED}.  This will give you
problems if you have values > 127 in the column!
@end itemize
@cindex ADO program
@@ -37901,7 +37918,6 @@ though, so 3.23 is not released as a stable version yet.
* News-3.23.4::                 Changes in release 3.23.4
* News-3.23.3::                 Changes in release 3.23.3
* News-3.23.2::                 Changes in release 3.23.2
* News-3.23.1::                 Changes in release 3.23.1
* News-3.23.0::                 Changes in release 3.23.0
@end menu
@@ -37909,6 +37925,13 @@ though, so 3.23 is not released as a stable version yet.
@appendixsubsec Changes in release 3.23.26
@itemize @bullet
@item
Automatic repair of @code{MyISAM} tables if you start @code{mysqld} with
@code{--myisam-recover}.
@item
Removed the @code{TYPE=} keyword from @code{CHECK} and
@code{REPAIR}. Allow one to combine @code{CHECK} options. (One can still
use @code{TYPE=} but this usage is deprecated).
@item
Fixed mutex bug in the binary replication log - long update queries could
be read only in part by the slave if it did it at the wrong time, which
was not fatal, but resulted in a performance-degrading reconnect and
@@ -37939,8 +37962,6 @@ Allow floating point numbers where there are no sign after the exponent
@item
Added @code{--default-extra-file=#} to all @strong{MySQL} clients.
@item
Automatic repair of @code{MyISAM} tables.
@item
Columns referenced in @code{INSERT} are are now properly initialized.
@item
@code{UPDATE} didn't always work when used with a range on a timestamp that
+12 −6
Original line number Diff line number Diff line
@@ -17,7 +17,7 @@

/* Return error-text for system error messages and nisam messages */

#define PERROR_VERSION "2.4"
#define PERROR_VERSION "2.5"

#include <global.h>
#include <my_sys.h>
@@ -31,6 +31,7 @@ static struct option long_options[] =
  {"help",       no_argument,        0, '?'},
  {"info",       no_argument,        0, 'I'},
  {"all",        no_argument,        0, 'a'},
  {"silent",	 no_argument,	     0, 's'},
  {"verbose",    no_argument,        0, 'v'},
  {"version",    no_argument,        0, 'V'},
  {0, 0, 0, 0}
@@ -41,7 +42,7 @@ typedef struct ha_errors {
  const char *msg;
} HA_ERRORS;

static int verbose=0,print_all_codes=0;
static int verbose=1,print_all_codes=0;

static HA_ERRORS ha_errlist[]=
{
@@ -79,7 +80,8 @@ static void usage(void)
{
  print_version();
  puts("This software comes with ABSOLUTELY NO WARRANTY. This is free software,\nand you are welcome to modify and redistribute it under the GPL license\n");
  printf("Usage: %s [OPTIONS] [ERRORCODES]\n",my_progname);
  printf("Print a description for a system error code or a error code from\na MyISAM/ISAM table handler\n");
  printf("Usage: %s [OPTIONS] [ERRORCODE [ERRORCODE...]]\n",my_progname);
  printf("\n\
   -?, --help     Displays this help and exits.\n\
   -I, --info     Synonym for the above.");
@@ -88,7 +90,8 @@ static void usage(void)
   -a, --all      Print all the error messages and the number.");
#endif
  printf("\n\
   -v, --verbose  Print info about various stages.\n\
   -s, --silent	  Only print the error message\n\
   -v, --verbose  Print error code and message (default).\n\
   -V, --version  Displays version information and exits.\n");
} 

@@ -97,7 +100,7 @@ static int get_options(int *argc,char ***argv)
{
  int c,option_index;

  while ((c=getopt_long(*argc,*argv,"avVI?",long_options,
  while ((c=getopt_long(*argc,*argv,"asvVI?",long_options,
			&option_index)) != EOF)
  {
      switch (c) {
@@ -109,6 +112,9 @@ static int get_options(int *argc,char ***argv)
      case 'v':
      	verbose=1;
      	break;
      case 's':
	verbose=0;
	break;
      case 'V':
	print_version();
	exit(0);
@@ -183,7 +189,7 @@ int main(int argc,char *argv[])
      {
	found=1;
	if (verbose)
	  printf("%3d = %s\n",code,msg);
	  printf("Error code %3d:  %s\n",code,msg);
	else
	  puts(msg);
      }
+1 −0
Original line number Diff line number Diff line
@@ -46,6 +46,7 @@
#define HA_OPEN_TMP_TABLE		4	/* Table is a temp table */
#define HA_OPEN_DELAY_KEY_WRITE		8	/* Don't update index  */
#define HA_OPEN_ABORT_IF_CRASHED	16
#define HA_OPEN_FOR_REPAIR		32	/* open even if crashed */

	/* The following is parameter to ha_rkey() how to use key */

+3 −3
Original line number Diff line number Diff line
@@ -91,9 +91,9 @@ void pthread_exit(unsigned A); /* was #define pthread_exit(A) ExitThread(A)*/
#define pthread_key_create(A,B) ((*A=TlsAlloc())==0xFFFFFFFF)
#define pthread_getspecific(A) (TlsGetValue(A))
#define my_pthread_getspecific(T,A) ((T) TlsGetValue(A))
#define my_pthread_getspecific_ptr(T,V) ((T) TlsGetValue(A))
#define my_pthread_setspecific_ptr(T,V) TlsSetValue(T,V)
#define pthread_setspecific(A,B) TlsSetValue(A,B)
#define my_pthread_getspecific_ptr(T,V) ((T) TlsGetValue(V))
#define my_pthread_setspecific_ptr(T,V) (!TlsSetValue((T),(V)))
#define pthread_setspecific(A,B) (!TlsSetValue((A),(B)))
#else
#define pthread_key(T,V) __declspec(thread) T V
#define pthread_key_create(A,B) pthread_dummy(0)
+10 −9
Original line number Diff line number Diff line
@@ -308,22 +308,23 @@ typedef struct st_sort_info {

typedef struct st_mi_check_param
{
  ulonglong auto_increment_value;
  ulonglong max_data_file_length;
  ulonglong keys_in_use;
  my_off_t search_after_block;
  my_off_t new_file_pos,key_file_blocks;
  my_off_t keydata,totaldata,key_blocks,start_check_pos;
  ha_rows total_records,total_deleted;
  ha_checksum record_checksum,glob_crc;
  ulong	use_buffers,read_buffer_length,write_buffer_length,
	sort_buffer_length,sort_key_blocks;
  uint out_flag,warning_printed,error_printed,
       opt_rep_quick,verbose;
  uint opt_sort_key,total_files,max_level;
  uint testflag;
  uint8 language;
  my_bool using_global_keycache, opt_lock_memory, opt_follow_links;
  uint testflag;
  ha_rows total_records,total_deleted;
  ulonglong auto_increment_value;
  my_off_t search_after_block;
  ulonglong max_data_file_length;
  ulonglong keys_in_use;
  my_off_t new_file_pos,key_file_blocks;
  my_off_t keydata,totaldata,key_blocks,start_check_pos;
  ha_checksum record_checksum,glob_crc;
  my_bool retry_repair,retry_without_quick;
  char temp_filename[FN_REFLEN],*isam_file_name,*tmpdir;
  int tmpfile_createflag;
  myf myf_rw;
Loading