Commit 4331c705 authored by Sinisa@sinisa.nasamreza.org's avatar Sinisa@sinisa.nasamreza.org

Merge sinisa@work.mysql.com:/home/bk/mysql-4.0

into sinisa.nasamreza.org:/mnt/work/mysql-4.0
parents 581c60d1 b4e72ab3
...@@ -70,3 +70,4 @@ zak@linux.local ...@@ -70,3 +70,4 @@ zak@linux.local
salle@geopard.(none) salle@geopard.(none)
walrus@mysql.com walrus@mysql.com
zgreant@mysql.com zgreant@mysql.com
salle@geopard.online.bg
...@@ -1097,11 +1097,9 @@ as a training partner, please visit the training section at ...@@ -1097,11 +1097,9 @@ as a training partner, please visit the training section at
@uref{http://www.mysql.com/training/} or contact us at: @uref{http://www.mysql.com/training/} or contact us at:
@email{training@@mysql.com}. @email{training@@mysql.com}.
We plan to release the @code{MySQL Certification Program} in 2002. For The @code{MySQL Certification Program} is being released in the second
details see @uref{http://www.mysql.com/training/certification.html}. half of 2002. For details please see
If you would like to be kept informed about the @uref{http://www.mysql.com/training/certification.html}.
@code{MySQL Certification Program},
please e-mail @email{certification@@mysql.com}.
@node Business Services Consulting, Business Services Commercial licenses, Business Services Training, MySQL AB business model and services @node Business Services Consulting, Business Services Commercial licenses, Business Services Training, MySQL AB business model and services
...@@ -1222,9 +1220,6 @@ training staff at @email{training@@mysql.com}. ...@@ -1222,9 +1220,6 @@ training staff at @email{training@@mysql.com}.
For information on the @code{MySQL Certification Program}, please see For information on the @code{MySQL Certification Program}, please see
@uref{http://www.mysql.com/training/certification.html}. @uref{http://www.mysql.com/training/certification.html}.
If you would like to be kept informed about the
@code{MySQL Certification Program}, please e-mail
@email{certification@@mysql.com}.
@xref{Business Services Training}. @xref{Business Services Training}.
If you're interested in consulting, please visit the consulting If you're interested in consulting, please visit the consulting
...@@ -5653,26 +5648,12 @@ see @ref{Windows}. ...@@ -5653,26 +5648,12 @@ see @ref{Windows}.
Check the MySQL homepage (@uref{http://www.mysql.com/}) for Check the MySQL homepage (@uref{http://www.mysql.com/}) for
information about the current version and for downloading instructions. information about the current version and for downloading instructions.
Our main download mirror is located at: Our main mirror is located at @uref{http://mirrors.sunsite.dk/mysql/}.
@uref{http://mirrors.sunsite.dk/mysql/}
If you are interested in becoming a MySQL mirror site, you may
anonymously rsync with: @code{rsync://sunsite.dk/mysql/}. Please
send e-mail to @email{webmaster@@mysql.com} notifying us of your mirror to be
added to the following list.
If you have problems downloading from our main site, try using one of the
following mirrors.
Please report bad or out-of-date mirrors to @email{webmaster@@mysql.com}. For a complete upto-date list of MySQL web/download mirrors, see
@uref{http://www.mysql.com/downloads/mirrors.html}.
@c START_OF_MIRROR_LISTING There you will also find information about becoming a MySQL mirror
site and how to report a bad or out-of-date mirror.
@c Mirrors list is created by PHP script (that really needs to be documented!) from database (tfr@mysql.com)
@include mirrors.texi
@c END_OF_MIRROR_LISTING
@node Which OS, Which version, Getting MySQL, General Installation Issues @node Which OS, Which version, Getting MySQL, General Installation Issues
...@@ -7012,17 +6993,17 @@ You will need GNU @code{autoconf 2.52}, @code{automake 1.4}, ...@@ -7012,17 +6993,17 @@ You will need GNU @code{autoconf 2.52}, @code{automake 1.4},
@code{automake} (1.5) doesn't yet work. @code{automake} (1.5) doesn't yet work.
If you get some strange error during this stage, check that you really
have @code{libtool} installed!
@example @example
shell> cd mysql shell> cd mysql-4.0
shell> bk -r edit shell> bk -r get -Sq
shell> aclocal; autoheader; autoconf; automake; shell> aclocal; autoheader; autoconf; automake;
shell> ./configure # Add your favorite options here shell> ./configure # Add your favorite options here
shell> make shell> make
@end example @end example
If you get some strange error during this stage, check that you really
have @code{libtool} installed!
A collection of our standard configure scripts is located in the A collection of our standard configure scripts is located in the
@file{BUILD/} subdirectory. If you are lazy, you can use @file{BUILD/} subdirectory. If you are lazy, you can use
@file{BUILD/compile-pentium-debug}. To compile on a different architecture, @file{BUILD/compile-pentium-debug}. To compile on a different architecture,
...@@ -8165,7 +8146,7 @@ should check if you need some of the new grants that you didn't need ...@@ -8165,7 +8146,7 @@ should check if you need some of the new grants that you didn't need
before. In particular, you will need @code{REPLICATION SLAVE} before. In particular, you will need @code{REPLICATION SLAVE}
(instead of @code{FILE}) for new slaves. (instead of @code{FILE}) for new slaves.
@item @item
@code{DOUBLE} and @code{FLOAT} columns are now honoring the @code{DOUBLE} and @code{FLOAT} columns now honour the
@code{UNSIGNED} flag on storage (before, @code{UNSIGNED} was ignored for @code{UNSIGNED} flag on storage (before, @code{UNSIGNED} was ignored for
these columns). these columns).
@item @item
...@@ -22199,8 +22180,6 @@ Monty ...@@ -22199,8 +22180,6 @@ Monty
1 row in set (0.09 sec) 1 row in set (0.09 sec)
@end example @end example
@itemize @bullet
@item
For logging, you can use the @code{tee} option. The @code{tee} can be For logging, you can use the @code{tee} option. The @code{tee} can be
started with option @code{--tee=...}, or from the command-line started with option @code{--tee=...}, or from the command-line
interactively with command @code{tee}. All the data displayed on the interactively with command @code{tee}. All the data displayed on the
...@@ -22212,7 +22191,6 @@ used. Note that @code{tee} will flush the results into the file after ...@@ -22212,7 +22191,6 @@ used. Note that @code{tee} will flush the results into the file after
each command, just before the command-line appears again waiting for the each command, just before the command-line appears again waiting for the
next command. next command.
@item
Browsing, or searching the results in the interactive mode in Unix less, Browsing, or searching the results in the interactive mode in Unix less,
more, or any other similar program, is now possible with option more, or any other similar program, is now possible with option
@code{--pager[=...]}. Without argument, @code{mysql} client will look @code{--pager[=...]}. Without argument, @code{mysql} client will look
...@@ -22227,8 +22205,10 @@ the popen() function, which doesn't exist in Windows. In Windows, the ...@@ -22227,8 +22205,10 @@ the popen() function, which doesn't exist in Windows. In Windows, the
@code{tee} option can be used instead, although it may not be as handy @code{tee} option can be used instead, although it may not be as handy
as @code{pager} can be in some situations. as @code{pager} can be in some situations.
A few tips about @code{pager}:
@itemize @bullet
@item @item
A few tips about @code{pager}: You can use it to write to a file: You can use it to write to a file:
@example @example
mysql> pager cat > /tmp/log.txt mysql> pager cat > /tmp/log.txt
@end example @end example
...@@ -22237,6 +22217,8 @@ for the programs that you want to use with the @code{pager}: ...@@ -22237,6 +22217,8 @@ for the programs that you want to use with the @code{pager}:
@example @example
mysql> pager less -n -i -S mysql> pager less -n -i -S
@end example @end example
@item
From the above do note the option '-S'. You may find it very useful when From the above do note the option '-S'. You may find it very useful when
browsing the results; try the option with horizontal output (end browsing the results; try the option with horizontal output (end
commands with '\g', or ';') and with vertical output (end commands with commands with '\g', or ';') and with vertical output (end commands with
...@@ -22248,8 +22230,7 @@ readable. You can swith the mode between on and off within the interactive ...@@ -22248,8 +22230,7 @@ readable. You can swith the mode between on and off within the interactive
less with '-S'. See the 'h' for more help about less. less with '-S'. See the 'h' for more help about less.
@item @item
Last (unless you already understood this from the above examples ;) you You can combine very complex ways to handle the results, for example the
can combine very complex ways to handle the results, for example the
following would send the results to two files in two different following would send the results to two files in two different
directories, on two different hard-disks mounted on /dr1 and /dr2, yet directories, on two different hard-disks mounted on /dr1 and /dr2, yet
let the results still be seen on the screen via less: let the results still be seen on the screen via less:
...@@ -22258,7 +22239,8 @@ mysql> pager cat | tee /dr1/tmp/res.txt | \ ...@@ -22258,7 +22239,8 @@ mysql> pager cat | tee /dr1/tmp/res.txt | \
tee /dr2/tmp/res2.txt | less -n -i -S tee /dr2/tmp/res2.txt | less -n -i -S
@end example @end example
@item @end itemize
You can also combine the two functions above; have the @code{tee} You can also combine the two functions above; have the @code{tee}
enabled, @code{pager} set to 'less' and you will be able to browse the enabled, @code{pager} set to 'less' and you will be able to browse the
results in unix 'less' and still have everything appended into a file results in unix 'less' and still have everything appended into a file
...@@ -22270,10 +22252,10 @@ on the screen, where the Unix @code{tee} used with @code{pager} doesn't ...@@ -22270,10 +22252,10 @@ on the screen, where the Unix @code{tee} used with @code{pager} doesn't
log quite that much. Last, but not least, the interactive @code{tee} is log quite that much. Last, but not least, the interactive @code{tee} is
more handy to switch on and off, when you want to log something into a more handy to switch on and off, when you want to log something into a
file, but want to be able to turn the feature off sometimes. file, but want to be able to turn the feature off sometimes.
@end itemize
@cindex @code{prompt} command @cindex @code{prompt} command
You can change the prompt in the @code{mysql} command-line client. From MySQL version 4.0.2 it is possible to change the prompt in the
@code{mysql} command-line client.
You can use the following prompt options: You can use the following prompt options:
@c FIX these columnfractions have NOT been measured! @c FIX these columnfractions have NOT been measured!
...@@ -23554,12 +23536,23 @@ logging on the master. If you start your slaves with data that doesn't ...@@ -23554,12 +23536,23 @@ logging on the master. If you start your slaves with data that doesn't
agree with what was on the master @strong{when the binary log was agree with what was on the master @strong{when the binary log was
started}, your slaves may fail. started}, your slaves may fail.
Starting in 4.0.0, one can use @code{LOAD DATA FROM MASTER} to set up Please see the following table for an indication of master-slave
a slave. Note that 4.0.0 slaves cannot communicate with 3.23 masters, but 4.0.1 compatibility between different versions. With regard to version 4.0,
and later version slaves can. 3.23 slave cannot talk to 4.0 master. we recommend using same version on both sides.
@c FIX arjen 2002-07-17 new table, not yet measured for XML/DocBook.
@multitable @columnfractions .10 .15 .15 .10 .10 .10
@item @tab @tab @strong{Master} @tab @strong{Master} @tab @strong{Master} @tab @strong{Master}
@item @tab @tab @strong{3.23.33 and up} @tab @strong{4.0.0} @tab @strong{4.0.1} @tab @strong{4.0.2}
@item @strong{Slave} @tab @strong{3.23.33 and up} @tab yes @tab no @tab no @tab no
@item @strong{Slave} @tab @strong{4.0.0} @tab no @tab yes @tab no @tab no
@item @strong{Slave} @tab @strong{4.0.1} @tab yes @tab no @tab yes @tab no
@item @strong{Slave} @tab @strong{4.0.2} @tab yes @tab no @tab no @tab yes
@end multitable
You must also be aware that @code{LOAD DATA FROM MASTER} currently works only Starting from 4.0.0, one can use @code{LOAD DATA FROM MASTER} to set up
if all the tables on the master are @code{MyISAM} type, and will acuire a a slave. Be aware that @code{LOAD DATA FROM MASTER} currently works only
if all the tables on the master are @code{MyISAM} type, and will acquire a
global read lock, so no writes are possible while the tables are being global read lock, so no writes are possible while the tables are being
transferred from the master. This limitation is of a temporary nature, and is transferred from the master. This limitation is of a temporary nature, and is
due to the fact that we have not yet implemented hot lock-free table backup. due to the fact that we have not yet implemented hot lock-free table backup.
...@@ -33787,6 +33780,13 @@ The offset of the initial row is 0 (not 1): ...@@ -33787,6 +33780,13 @@ The offset of the initial row is 0 (not 1):
mysql> SELECT * FROM table LIMIT 5,10; # Retrieve rows 6-15 mysql> SELECT * FROM table LIMIT 5,10; # Retrieve rows 6-15
@end example @end example
To retrieve all rows from a certain offset upto the end of the result set,
you can use -1 for the second parameter:
@example
mysql> SELECT * FROM table LIMIT 95,-1; # Retrieve rows 96-last.
@end example
If one argument is given, it indicates the maximum number of rows to return: If one argument is given, it indicates the maximum number of rows to return:
@example @example
...@@ -49652,6 +49652,8 @@ find on the MySQL download page ...@@ -49652,6 +49652,8 @@ find on the MySQL download page
(@uref{http://www.mysql.com/downloads/}), (@uref{http://www.mysql.com/downloads/}),
this means that the version has not yet been released! this means that the version has not yet been released!
@c Please don't add a new version here without also updating ../configure.in!
@menu @menu
* News-4.0.x:: Changes in release 4.0.x (Development; Alpha) * News-4.0.x:: Changes in release 4.0.x (Development; Alpha)
* News-3.23.x:: Changes in release 3.23.x (Stable) * News-3.23.x:: Changes in release 3.23.x (Stable)
...@@ -40,6 +40,10 @@ WWW (@uref{http://www.mysql.cz/}) ...@@ -40,6 +40,10 @@ WWW (@uref{http://www.mysql.cz/})
@image{Flags/denmark} Denmark [Borsen] @@ @image{Flags/denmark} Denmark [Borsen] @@
WWW (@uref{http://mysql.borsen.dk/}) WWW (@uref{http://mysql.borsen.dk/})
@item
@image{Flags/denmark} Denmark [Cybercity Internet] @@
WWW (@uref{http://mysql.mirrors.cybercity.dk/})
@item @item
@image{Flags/denmark} Denmark [SunSITE] @@ @image{Flags/denmark} Denmark [SunSITE] @@
WWW (@uref{http://mirrors.sunsite.dk/mysql/}) WWW (@uref{http://mirrors.sunsite.dk/mysql/})
...@@ -53,6 +57,10 @@ WWW (@uref{http://mysql.mirror.ok.ee/}) ...@@ -53,6 +57,10 @@ WWW (@uref{http://mysql.mirror.ok.ee/})
@image{Flags/finland} Finland [KPNQwest] @@ @image{Flags/finland} Finland [KPNQwest] @@
WWW (@uref{http://mysql.kpnqwest.fi/}) WWW (@uref{http://mysql.kpnqwest.fi/})
@item
@image{Flags/finland} Finland [Mediatraffic] @@
WWW (@uref{http://mysql.mediatraffic.fi/})
@item @item
@image{Flags/finland} Finland [tonnikala.net] @@ @image{Flags/finland} Finland [tonnikala.net] @@
WWW (@uref{http://mysql.tonnikala.org/}) WWW (@uref{http://mysql.tonnikala.org/})
...@@ -221,6 +229,10 @@ FTP (@uref{ftp://sunsite.cnlab-switch.ch/mirror/mysql/}) ...@@ -221,6 +229,10 @@ FTP (@uref{ftp://sunsite.cnlab-switch.ch/mirror/mysql/})
@image{Flags/turkey} Turkey [proGEN] @@ @image{Flags/turkey} Turkey [proGEN] @@
WWW (@uref{http://mysql.progen.com.tr/}) WWW (@uref{http://mysql.progen.com.tr/})
@item
@image{Flags/turkey} Turkey [Turkish National Academic Network & Information Center] @@
WWW (@uref{http://mysql.ulak.net.tr/})
@item @item
@image{Flags/great-britain} UK [PLiG/UK] @@ @image{Flags/great-britain} UK [PLiG/UK] @@
WWW (@uref{http://ftp.plig.org/pub/mysql/}) WWW (@uref{http://ftp.plig.org/pub/mysql/})
...@@ -391,7 +403,7 @@ WWW (@uref{http://mysql.webiiz.com/}) ...@@ -391,7 +403,7 @@ WWW (@uref{http://mysql.webiiz.com/})
@item @item
@image{Flags/taiwan} Taiwan [I-SHOU University] @@ @image{Flags/taiwan} Taiwan [I-SHOU University] @@
WWW (@uref{http://mysql.isu.edu.tw}) WWW (@uref{http://mysql.isu.edu.tw/})
@item @item
@image{Flags/taiwan} Taiwan [nctu.edu/HsinChu] @@ @image{Flags/taiwan} Taiwan [nctu.edu/HsinChu] @@
...@@ -426,10 +438,6 @@ WWW (@uref{http://mysql.soa.co.nz/}) ...@@ -426,10 +438,6 @@ WWW (@uref{http://mysql.soa.co.nz/})
@itemize @bullet @itemize @bullet
@item
@image{Flags/south-africa} South African Republic [Mweb] @@
WWW (@uref{http://www.mysql.mweb.co.za/})
@item @item
@image{Flags/south-africa} South African Republic [The Internet Solution/Johannesburg] @@ @image{Flags/south-africa} South African Republic [The Internet Solution/Johannesburg] @@
FTP (@uref{ftp://ftp.is.co.za/linux/mysql/}) FTP (@uref{ftp://ftp.is.co.za/linux/mysql/})
......
...@@ -4,7 +4,7 @@ dnl Process this file with autoconf to produce a configure script. ...@@ -4,7 +4,7 @@ dnl Process this file with autoconf to produce a configure script.
AC_INIT(sql/mysqld.cc) AC_INIT(sql/mysqld.cc)
AC_CANONICAL_SYSTEM AC_CANONICAL_SYSTEM
# The Docs Makefile.am parses this line! # The Docs Makefile.am parses this line!
AM_INIT_AUTOMAKE(mysql, 4.0.2-alpha) AM_INIT_AUTOMAKE(mysql, 4.0.3-alpha)
AM_CONFIG_HEADER(config.h) AM_CONFIG_HEADER(config.h)
PROTOCOL_VERSION=10 PROTOCOL_VERSION=10
......
...@@ -64,10 +64,10 @@ ...@@ -64,10 +64,10 @@
#define NO_FCNTL_NONBLOCK #define NO_FCNTL_NONBLOCK
#define EFBIG E2BIG #define EFBIG E2BIG
//#define ENFILE EMFILE /*#define ENFILE EMFILE */
//#define ENAMETOOLONG (EOS2ERR+2) /*#define ENAMETOOLONG (EOS2ERR+2) */
//#define ETIMEDOUT 145 /*#define ETIMEDOUT 145 */
//#define EPIPE 146 /*#define EPIPE 146 */
#define EROFS 147 #define EROFS 147
#define sleep(A) DosSleep((A)*1000) #define sleep(A) DosSleep((A)*1000)
...@@ -129,7 +129,7 @@ typedef unsigned long long os_off_t; ...@@ -129,7 +129,7 @@ typedef unsigned long long os_off_t;
#define HAVE_ALLOCA 1 #define HAVE_ALLOCA 1
/* Define if you have <alloca.h> and it should be used (not on Ultrix). */ /* Define if you have <alloca.h> and it should be used (not on Ultrix). */
//#define HAVE_ALLOCA_H 1 /* #define HAVE_ALLOCA_H 1 */
/* Define if you don't have vprintf but do have _doprnt. */ /* Define if you don't have vprintf but do have _doprnt. */
/* #undef HAVE_DOPRNT */ /* #undef HAVE_DOPRNT */
...@@ -145,7 +145,7 @@ typedef unsigned long long os_off_t; ...@@ -145,7 +145,7 @@ typedef unsigned long long os_off_t;
#define HAVE_ST_RDEV 1 #define HAVE_ST_RDEV 1
/* Define if you have <sys/wait.h> that is POSIX.1 compatible. */ /* Define if you have <sys/wait.h> that is POSIX.1 compatible. */
//#define HAVE_SYS_WAIT_H 1 /* #define HAVE_SYS_WAIT_H 1 */
/* Define if you don't have tm_zone but do have the external array /* Define if you don't have tm_zone but do have the external array
tzname. */ tzname. */
...@@ -216,7 +216,7 @@ typedef unsigned long long os_off_t; ...@@ -216,7 +216,7 @@ typedef unsigned long long os_off_t;
#define HAVE_BOOL 1 #define HAVE_BOOL 1
/* Have berkeley db installed */ /* Have berkeley db installed */
//#define HAVE_BERKELEY_DB 1 /* #define HAVE_BERKELEY_DB 1 */
/* DSB style signals ? */ /* DSB style signals ? */
/* #undef HAVE_BSD_SIGNALS */ /* #undef HAVE_BSD_SIGNALS */
...@@ -395,7 +395,7 @@ typedef unsigned long long os_off_t; ...@@ -395,7 +395,7 @@ typedef unsigned long long os_off_t;
#define HAVE_CHSIZE 1 #define HAVE_CHSIZE 1
/* Define if you have the cuserid function. */ /* Define if you have the cuserid function. */
//#define HAVE_CUSERID 1 /* #define HAVE_CUSERID 1 */
/* Define if you have the dlerror function. */ /* Define if you have the dlerror function. */
#define HAVE_DLERROR 1 #define HAVE_DLERROR 1
...@@ -407,7 +407,7 @@ typedef unsigned long long os_off_t; ...@@ -407,7 +407,7 @@ typedef unsigned long long os_off_t;
/* #undef HAVE_FCHMOD */ /* #undef HAVE_FCHMOD */
/* Define if you have the fcntl function. */ /* Define if you have the fcntl function. */
//#define HAVE_FCNTL 1 /* #define HAVE_FCNTL 1 */
/* Define if you have the fconvert function. */ /* Define if you have the fconvert function. */
/* #undef HAVE_FCONVERT */ /* #undef HAVE_FCONVERT */
...@@ -425,7 +425,7 @@ typedef unsigned long long os_off_t; ...@@ -425,7 +425,7 @@ typedef unsigned long long os_off_t;
/* #undef HAVE_FSEEKO */ /* #undef HAVE_FSEEKO */
/* Define if you have the ftruncate function. */ /* Define if you have the ftruncate function. */
//#define HAVE_FTRUNCATE 1 /* #define HAVE_FTRUNCATE 1 */
/* Define if you have the getcwd function. */ /* Define if you have the getcwd function. */
#define HAVE_GETCWD 1 #define HAVE_GETCWD 1
...@@ -440,16 +440,16 @@ typedef unsigned long long os_off_t; ...@@ -440,16 +440,16 @@ typedef unsigned long long os_off_t;
#define HAVE_GETPAGESIZE 1 #define HAVE_GETPAGESIZE 1
/* Define if you have the getpass function. */ /* Define if you have the getpass function. */
//#define HAVE_GETPASS 1 /*#define HAVE_GETPASS 1 */
/* Define if you have the getpassphrase function. */ /* Define if you have the getpassphrase function. */
/* #undef HAVE_GETPASSPHRASE */ /* #undef HAVE_GETPASSPHRASE */
/* Define if you have the getpwnam function. */ /* Define if you have the getpwnam function. */
//#define HAVE_GETPWNAM 1 /* #define HAVE_GETPWNAM 1 */
/* Define if you have the getpwuid function. */ /* Define if you have the getpwuid function. */
//#define HAVE_GETPWUID 1 /* #define HAVE_GETPWUID 1 */
/* Define if you have the getrlimit function. */ /* Define if you have the getrlimit function. */
/* #undef HAVE_GETRLIMIT */ /* #undef HAVE_GETRLIMIT */
...@@ -491,7 +491,7 @@ typedef unsigned long long os_off_t; ...@@ -491,7 +491,7 @@ typedef unsigned long long os_off_t;
#define HAVE_MEMMOVE 1 #define HAVE_MEMMOVE 1
/* Define if you have the mkstemp function. */ /* Define if you have the mkstemp function. */
//#define HAVE_MKSTEMP 1 /* #define HAVE_MKSTEMP 1 */
/* Define if you have the mlockall function. */ /* Define if you have the mlockall function. */
/* #undef HAVE_MLOCKALL */ /* #undef HAVE_MLOCKALL */
...@@ -581,7 +581,7 @@ typedef unsigned long long os_off_t; ...@@ -581,7 +581,7 @@ typedef unsigned long long os_off_t;
/* #undef HAVE_SIGTHREADMASK */ /* #undef HAVE_SIGTHREADMASK */
/* Define if you have the snprintf function. */ /* Define if you have the snprintf function. */
//#define HAVE_SNPRINTF 1 /* #define HAVE_SNPRINTF 1 */
/* Define if you have the socket function. */ /* Define if you have the socket function. */
#define HAVE_SOCKET 1 #define HAVE_SOCKET 1
...@@ -635,7 +635,7 @@ typedef unsigned long long os_off_t; ...@@ -635,7 +635,7 @@ typedef unsigned long long os_off_t;
/* #undef HAVE_VIDATTR */ /* #undef HAVE_VIDATTR */
/* Define if you have the <alloca.h> header file. */ /* Define if you have the <alloca.h> header file. */
//#define HAVE_ALLOCA_H 1 /* #define HAVE_ALLOCA_H 1 */
/* Define if you have the <arpa/inet.h> header file. */ /* Define if you have the <arpa/inet.h> header file. */
#define HAVE_ARPA_INET_H 1 #define HAVE_ARPA_INET_H 1
...@@ -647,10 +647,10 @@ typedef unsigned long long os_off_t; ...@@ -647,10 +647,10 @@ typedef unsigned long long os_off_t;
#define HAVE_CRYPT_H 1 #define HAVE_CRYPT_H 1
/* Define if you have the <curses.h> header file. */ /* Define if you have the <curses.h> header file. */
//#define HAVE_CURSES_H 1 /* #define HAVE_CURSES_H 1 */
/* Define if you have the <dirent.h> header file. */ /* Define if you have the <dirent.h> header file. */
//#define HAVE_DIRENT_H 1 /* #define HAVE_DIRENT_H 1 */
/* Define if you have the <fcntl.h> header file. */ /* Define if you have the <fcntl.h> header file. */
#define HAVE_FCNTL_H 1 #define HAVE_FCNTL_H 1
...@@ -662,7 +662,7 @@ typedef unsigned long long os_off_t; ...@@ -662,7 +662,7 @@ typedef unsigned long long os_off_t;
/* #undef HAVE_FLOATINGPOINT_H */ /* #undef HAVE_FLOATINGPOINT_H */
/* Define if you have the <grp.h> header file. */ /* Define if you have the <grp.h> header file. */
//#define HAVE_GRP_H 1 /* #define HAVE_GRP_H 1 */
/* Define if you have the <ieeefp.h> header file. */ /* Define if you have the <ieeefp.h> header file. */
/* #undef HAVE_IEEEFP_H */ /* #undef HAVE_IEEEFP_H */
...@@ -686,7 +686,7 @@ typedef unsigned long long os_off_t; ...@@ -686,7 +686,7 @@ typedef unsigned long long os_off_t;
/* #undef HAVE_PATHS_H */ /* #undef HAVE_PATHS_H */
/* Define if you have the <pwd.h> header file. */ /* Define if you have the <pwd.h> header file. */
//#define HAVE_PWD_H 1 /* #define HAVE_PWD_H 1 */
/* Define if you have the <sched.h> header file. */ /* Define if you have the <sched.h> header file. */
/* #undef HAVE_SCHED_H */ /* #undef HAVE_SCHED_H */
...@@ -707,16 +707,16 @@ typedef unsigned long long os_off_t; ...@@ -707,16 +707,16 @@ typedef unsigned long long os_off_t;
#define HAVE_STRING_H 1 #define HAVE_STRING_H 1
/* Define if you have the <strings.h> header file. */ /* Define if you have the <strings.h> header file. */
//#define HAVE_STRINGS_H 1 /* #define HAVE_STRINGS_H 1 */
/* Define if you have the <synch.h> header file. */ /* Define if you have the <synch.h> header file. */
/* #undef HAVE_SYNCH_H */ /* #undef HAVE_SYNCH_H */
/* Define if you have the <sys/dir.h> header file. */ /* Define if you have the <sys/dir.h> header file. */
//#define HAVE_SYS_DIR_H 1 /* #define HAVE_SYS_DIR_H 1 */
/* Define if you have the <sys/file.h> header file. */ /* Define if you have the <sys/file.h> header file. */
//#define HAVE_SYS_FILE_H 1 /* #define HAVE_SYS_FILE_H 1 */
/* Define if you have the <sys/ioctl.h> header file. */ /* Define if you have the <sys/ioctl.h> header file. */
#define HAVE_SYS_IOCTL_H 1 #define HAVE_SYS_IOCTL_H 1
...@@ -758,7 +758,7 @@ typedef unsigned long long os_off_t; ...@@ -758,7 +758,7 @@ typedef unsigned long long os_off_t;
/* #undef HAVE_SYS_VADVISE_H */ /* #undef HAVE_SYS_VADVISE_H */
/* Define if you have the <sys/wait.h> header file. */ /* Define if you have the <sys/wait.h> header file. */
//#define HAVE_SYS_WAIT_H 1 /* #define HAVE_SYS_WAIT_H 1 */
/* Define if you have the <term.h> header file. */ /* Define if you have the <term.h> header file. */
/* #undef HAVE_TERM_H */ /* #undef HAVE_TERM_H */
...@@ -767,13 +767,13 @@ typedef unsigned long long os_off_t; ...@@ -767,13 +767,13 @@ typedef unsigned long long os_off_t;
/* #undef HAVE_TERMBITS_H */ /* #undef HAVE_TERMBITS_H */
/* Define if you have the <termcap.h> header file. */ /* Define if you have the <termcap.h> header file. */
//#define HAVE_TERMCAP_H 1 /* #define HAVE_TERMCAP_H 1 */
/* Define if you have the <termio.h> header file. */ /* Define if you have the <termio.h> header file. */
//#define HAVE_TERMIO_H 1 /* /#define HAVE_TERMIO_H 1 */
/* Define if you have the <termios.h> header file. */ /* Define if you have the <termios.h> header file. */
//#define HAVE_TERMIOS_H 1 /* #define HAVE_TERMIOS_H 1 */
/* Define if you have the <unistd.h> header file. */ /* Define if you have the <unistd.h> header file. */
#define HAVE_UNISTD_H 1 #define HAVE_UNISTD_H 1
...@@ -826,4 +826,4 @@ typedef unsigned long long os_off_t; ...@@ -826,4 +826,4 @@ typedef unsigned long long os_off_t;
/* Define for large files, on AIX-style hosts. */ /* Define for large files, on AIX-style hosts. */
/* #undef _LARGE_FILES */ /* #undef _LARGE_FILES */
#endif // __CONFIG_OS2_H__ #endif /* __CONFIG_OS2_H__ */
...@@ -20,8 +20,8 @@ ...@@ -20,8 +20,8 @@
break; break;
case OPT_SSL_KEY: case OPT_SSL_KEY:
opt_use_ssl = 1; /* true */ opt_use_ssl = 1; /* true */
//QQ to be removed??? my_free(opt_ssl_key, MYF(MY_ALLOW_ZERO_PTR)); /* QQ to be removed??? my_free(opt_ssl_key, MYF(MY_ALLOW_ZERO_PTR)); */
//QQ to be removed??? opt_ssl_key = my_strdup(optarg, MYF(0)); /* QQ to be removed??? opt_ssl_key = my_strdup(optarg, MYF(0)); */
break; break;
case OPT_SSL_CERT: case OPT_SSL_CERT:
opt_use_ssl = 1; /* true */ opt_use_ssl = 1; /* true */
......
...@@ -122,10 +122,10 @@ File create_temp_file(char *to, const char *dir, const char *prefix, ...@@ -122,10 +122,10 @@ File create_temp_file(char *to, const char *dir, const char *prefix,
dir=to; dir=to;
} }
#ifdef OS2 #ifdef OS2
// changing environ variable doesn't work with VACPP /* changing environ variable doesn't work with VACPP */
char buffer[256]; char buffer[256];
sprintf( buffer, "TMP=%s", dir); sprintf( buffer, "TMP=%s", dir);
// remove ending backslash /* remove ending backslash */
if (buffer[strlen(buffer)-1] == '\\') if (buffer[strlen(buffer)-1] == '\\')
buffer[strlen(buffer)-1] = '\0'; buffer[strlen(buffer)-1] = '\0';
putenv( buffer); putenv( buffer);
......
...@@ -37,20 +37,20 @@ class Field { ...@@ -37,20 +37,20 @@ class Field {
static void *operator new(size_t size) {return (void*) sql_alloc((uint) size); } static void *operator new(size_t size) {return (void*) sql_alloc((uint) size); }
static void operator delete(void *ptr_arg, size_t size) {} /*lint -e715 */ static void operator delete(void *ptr_arg, size_t size) {} /*lint -e715 */
char *ptr; // Position to field in record char *ptr; /* Position to field in record */
uchar *null_ptr; // Byte where null_bit is uchar *null_ptr; /* Byte where null_bit is */
struct st_table *table; // Pointer for table struct st_table *table; /* Pointer for table */
const char *table_name,*field_name; const char *table_name,*field_name;
ulong query_id; // For quick test of used fields ulong query_id; /* For quick test of used fields */
// Field is part of the following keys /* Field is part of the following keys */
key_map key_start,part_of_key,part_of_sortkey; key_map key_start,part_of_key,part_of_sortkey;
enum utype { NONE,DATE,SHIELD,NOEMPTY,CASEUP,PNR,BGNR,PGNR,YES,NO,REL, enum utype { NONE,DATE,SHIELD,NOEMPTY,CASEUP,PNR,BGNR,PGNR,YES,NO,REL,
CHECK,EMPTY,UNKNOWN_FIELD,CASEDN,NEXT_NUMBER,INTERVAL_FIELD, CHECK,EMPTY,UNKNOWN_FIELD,CASEDN,NEXT_NUMBER,INTERVAL_FIELD,
BIT_FIELD, TIMESTAMP_FIELD,CAPITALIZE,BLOB_FIELD}; BIT_FIELD, TIMESTAMP_FIELD,CAPITALIZE,BLOB_FIELD};
utype unireg_check; utype unireg_check;
uint32 field_length; // Length of field uint32 field_length; /* Length of field */
uint16 flags; uint16 flags;
uchar null_bit; // Bit used to test null bit uchar null_bit; /* Bit used to test null bit */
Field(char *ptr_arg,uint32 length_arg,uchar *null_ptr_arg,uchar null_bit_arg, Field(char *ptr_arg,uint32 length_arg,uchar *null_ptr_arg,uchar null_bit_arg,
utype unireg_check_arg, const char *field_name_arg, utype unireg_check_arg, const char *field_name_arg,
...@@ -90,11 +90,12 @@ class Field { ...@@ -90,11 +90,12 @@ class Field {
{ return cmp(ptr,(char*) str); } { return cmp(ptr,(char*) str); }
virtual uint decimals() const { return 0; } virtual uint decimals() const { return 0; }
virtual void sql_type(String &str) const =0; virtual void sql_type(String &str) const =0;
// Caller beware: sql_type can change str.Ptr, so check /*
// ptr() to see if it changed if you are using your own buffer Caller beware: sql_type can change str.Ptr, so check
// in str and restore it with set() if needed ptr() to see if it changed if you are using your own buffer
in str and restore it with set() if needed
virtual uint size_of() const =0; // For new field */
virtual uint size_of() const =0; /* For new field */
inline bool is_null(uint row_offset=0) inline bool is_null(uint row_offset=0)
{ return null_ptr ? (null_ptr[row_offset] & null_bit ? 1 : 0) : table->null_row; } { return null_ptr ? (null_ptr[row_offset] & null_bit ? 1 : 0) : table->null_row; }
inline bool is_real_null(uint row_offset=0) inline bool is_real_null(uint row_offset=0)
...@@ -186,7 +187,7 @@ class Field { ...@@ -186,7 +187,7 @@ class Field {
{ return cmp(a,b); } { return cmp(a,b); }
virtual int pack_cmp(const char *b, uint key_length_arg) virtual int pack_cmp(const char *b, uint key_length_arg)
{ return cmp(ptr,b); } { return cmp(ptr,b); }
uint offset(); // Should be inline ... uint offset(); /* Should be inline ... */
void copy_from_tmp(int offset); void copy_from_tmp(int offset);
uint fill_cache_field(struct st_cache_field *copy); uint fill_cache_field(struct st_cache_field *copy);
virtual bool get_date(TIME *ltime,bool fuzzydate); virtual bool get_date(TIME *ltime,bool fuzzydate);
...@@ -211,7 +212,7 @@ class Field { ...@@ -211,7 +212,7 @@ class Field {
class Field_num :public Field { class Field_num :public Field {
public: public:
const uint8 dec; const uint8 dec;
bool zerofill,unsigned_flag; // Purify cannot handle bit fields bool zerofill,unsigned_flag; /* Purify cannot handle bit fields */
Field_num(char *ptr_arg,uint32 len_arg, uchar *null_ptr_arg, Field_num(char *ptr_arg,uint32 len_arg, uchar *null_ptr_arg,
uchar null_bit_arg, utype unireg_check_arg, uchar null_bit_arg, utype unireg_check_arg,
const char *field_name_arg, const char *field_name_arg,
...@@ -823,7 +824,7 @@ class Field_varstring :public Field_str { ...@@ -823,7 +824,7 @@ class Field_varstring :public Field_str {
class Field_blob :public Field_str { class Field_blob :public Field_str {
uint packlength; uint packlength;
String value; // For temporaries String value; /* For temporaries */
bool binary_flag; bool binary_flag;
public: public:
Field_blob(char *ptr_arg, uchar *null_ptr_arg, uchar null_bit_arg, Field_blob(char *ptr_arg, uchar *null_ptr_arg, uchar null_bit_arg,
...@@ -975,23 +976,23 @@ class Field_set :public Field_enum { ...@@ -975,23 +976,23 @@ class Field_set :public Field_enum {
/* /*
** Create field class for CREATE TABLE Create field class for CREATE TABLE
*/ */
class create_field :public Sql_alloc { class create_field :public Sql_alloc {
public: public:
const char *field_name; const char *field_name;
const char *change; // If done with alter table const char *change; /* If done with alter table */
const char *after; // Put column after this one const char *after; /* Put column after this one */
Item *def; // Default value Item *def; /* Default value */
enum enum_field_types sql_type; enum enum_field_types sql_type;
uint32 length; uint32 length;
uint decimals,flags,pack_length; uint decimals,flags,pack_length;
Field::utype unireg_check; Field::utype unireg_check;
TYPELIB *interval; // Which interval to use TYPELIB *interval; /* Which interval to use */
Field *field; // For alter table Field *field; /* For alter table */
uint8 row,col,sc_length,interval_id; // For rea_create_table uint8 row,col,sc_length,interval_id; /* For rea_create_table */
uint offset,pack_flag; uint offset,pack_flag;
create_field() :after(0) {} create_field() :after(0) {}
create_field(Field *field, Field *orig_field); create_field(Field *field, Field *orig_field);
...@@ -999,7 +1000,7 @@ class create_field :public Sql_alloc { ...@@ -999,7 +1000,7 @@ class create_field :public Sql_alloc {
/* /*
** A class for sending info to the client A class for sending info to the client
*/ */
class Send_field { class Send_field {
...@@ -1024,14 +1025,14 @@ class Copy_field :public Sql_alloc { ...@@ -1024,14 +1025,14 @@ class Copy_field :public Sql_alloc {
uint from_bit,to_bit; uint from_bit,to_bit;
uint from_length,to_length; uint from_length,to_length;
Field *from_field,*to_field; Field *from_field,*to_field;
String tmp; // For items String tmp; /* For items */
Copy_field() {} Copy_field() {}
~Copy_field() {} ~Copy_field() {}
void set(Field *to,Field *from,bool save); // Field to field void set(Field *to,Field *from,bool save); /* Field to field */
void set(char *to,Field *from); // Field to string void set(char *to,Field *from); /* Field to string */
void (*do_copy)(Copy_field *); void (*do_copy)(Copy_field *);
void (*do_copy2)(Copy_field *); // Used to handle null values void (*do_copy2)(Copy_field *); /* Used to handle null values */
}; };
...@@ -1052,18 +1053,18 @@ bool test_if_int(const char *str,int length); ...@@ -1052,18 +1053,18 @@ bool test_if_int(const char *str,int length);
*/ */
#define FIELDFLAG_DECIMAL 1 #define FIELDFLAG_DECIMAL 1
#define FIELDFLAG_BINARY 1 // Shares same flag #define FIELDFLAG_BINARY 1 /*Shares same flag */
#define FIELDFLAG_NUMBER 2 #define FIELDFLAG_NUMBER 2
#define FIELDFLAG_ZEROFILL 4 #define FIELDFLAG_ZEROFILL 4
#define FIELDFLAG_PACK 120 // Bits used for packing #define FIELDFLAG_PACK 120 /* Bits used for packing */
#define FIELDFLAG_INTERVAL 256 #define FIELDFLAG_INTERVAL 256
#define FIELDFLAG_BITFIELD 512 // mangled with dec! #define FIELDFLAG_BITFIELD 512 /* mangled with dec! */
#define FIELDFLAG_BLOB 1024 // mangled with dec! #define FIELDFLAG_BLOB 1024 /* mangled with dec! */
#define FIELDFLAG_LEFT_FULLSCREEN 8192 #define FIELDFLAG_LEFT_FULLSCREEN 8192
#define FIELDFLAG_RIGHT_FULLSCREEN 16384 #define FIELDFLAG_RIGHT_FULLSCREEN 16384
#define FIELDFLAG_FORMAT_NUMBER 16384 // predit: ###,,## in output #define FIELDFLAG_FORMAT_NUMBER 16384 /* predit: ###,,## in output */
#define FIELDFLAG_SUM ((uint) 32768)// predit: +#fieldflag #define FIELDFLAG_SUM ((uint) 32768)/* predit: +#fieldflag */
#define FIELDFLAG_MAYBE_NULL ((uint) 32768)// sql #define FIELDFLAG_MAYBE_NULL ((uint) 32768)/* sql */
#define FIELDFLAG_PACK_SHIFT 3 #define FIELDFLAG_PACK_SHIFT 3
#define FIELDFLAG_DEC_SHIFT 8 #define FIELDFLAG_DEC_SHIFT 8
#define FIELDFLAG_MAX_DEC 31 #define FIELDFLAG_MAX_DEC 31
......
...@@ -24,11 +24,11 @@ ...@@ -24,11 +24,11 @@
#include <myisam.h> #include <myisam.h>
#include <ft_global.h> #include <ft_global.h>
#define HA_RECOVER_NONE 0 // No automatic recover #define HA_RECOVER_NONE 0 /* No automatic recover */
#define HA_RECOVER_DEFAULT 1 // Automatic recover active #define HA_RECOVER_DEFAULT 1 /* Automatic recover active */
#define HA_RECOVER_BACKUP 2 // Make a backupfile on recover #define HA_RECOVER_BACKUP 2 /* Make a backupfile on recover */
#define HA_RECOVER_FORCE 4 // Recover even if we loose rows #define HA_RECOVER_FORCE 4 /* Recover even if we loose rows */
#define HA_RECOVER_QUICK 8 // Don't check rows in data file #define HA_RECOVER_QUICK 8 /* Don't check rows in data file */
extern ulong myisam_sort_buffer_size; extern ulong myisam_sort_buffer_size;
extern TYPELIB myisam_recover_typelib; extern TYPELIB myisam_recover_typelib;
......
...@@ -29,7 +29,7 @@ ...@@ -29,7 +29,7 @@
#include <my_bitmap.h> #include <my_bitmap.h>
#ifdef __EMX__ #ifdef __EMX__
#undef write // remove pthread.h macro definition for EMX #undef write /* remove pthread.h macro definition for EMX */
#endif #endif
typedef ulong table_map; /* Used for table bits in join */ typedef ulong table_map; /* Used for table bits in join */
......
...@@ -77,11 +77,11 @@ typedef struct st_relay_log_info ...@@ -77,11 +77,11 @@ typedef struct st_relay_log_info
cur_log_fd - file descriptor of the current read relay log cur_log_fd - file descriptor of the current read relay log
*/ */
File info_fd,cur_log_fd; File info_fd,cur_log_fd;
// name of current read relay log /* name of current read relay log */
char relay_log_name[FN_REFLEN]; char relay_log_name[FN_REFLEN];
// master log name corresponding to current read position /* master log name corresponding to current read position */
char master_log_name[FN_REFLEN]; char master_log_name[FN_REFLEN];
// original log position of last processed event /* original log position of last processed event */
volatile my_off_t master_log_pos; volatile my_off_t master_log_pos;
/* /*
...@@ -92,9 +92,9 @@ typedef struct st_relay_log_info ...@@ -92,9 +92,9 @@ typedef struct st_relay_log_info
LOG_INFO linfo; LOG_INFO linfo;
IO_CACHE cache_buf,*cur_log; IO_CACHE cache_buf,*cur_log;
/*** The following variables are safe to read any time ***/ /* The following variables are safe to read any time */
// IO_CACHE of the info file - set only during init or end /* IO_CACHE of the info file - set only during init or end */
IO_CACHE info_file; IO_CACHE info_file;
/* /*
...@@ -117,7 +117,7 @@ typedef struct st_relay_log_info ...@@ -117,7 +117,7 @@ typedef struct st_relay_log_info
*/ */
pthread_cond_t start_cond, stop_cond, data_cond; pthread_cond_t start_cond, stop_cond, data_cond;
// parent master info structure /* parent master info structure */
struct st_master_info *mi; struct st_master_info *mi;
/* /*
...@@ -153,7 +153,7 @@ typedef struct st_relay_log_info ...@@ -153,7 +153,7 @@ typedef struct st_relay_log_info
#endif #endif
char last_slave_error[MAX_SLAVE_ERRMSG]; char last_slave_error[MAX_SLAVE_ERRMSG];
// if not set, the value of other members of the structure are undefined /* if not set, the value of other members of the structure are undefined */
bool inited; bool inited;
volatile bool abort_slave, slave_running; volatile bool abort_slave, slave_running;
bool log_pos_current; bool log_pos_current;
...@@ -189,7 +189,7 @@ typedef struct st_relay_log_info ...@@ -189,7 +189,7 @@ typedef struct st_relay_log_info
{ {
pending += val; pending += val;
} }
// TODO: this probably needs to be fixed /* TODO: this probably needs to be fixed */
inline void inc_pos(ulonglong val, ulonglong log_pos, bool skip_lock=0) inline void inc_pos(ulonglong val, ulonglong log_pos, bool skip_lock=0)
{ {
if (!skip_lock) if (!skip_lock)
...@@ -254,7 +254,7 @@ typedef struct st_master_info ...@@ -254,7 +254,7 @@ typedef struct st_master_info
File fd; File fd;
IO_CACHE file; IO_CACHE file;
// the variables below are needed because we can change masters on the fly /* the variables below are needed because we can change masters on the fly */
char host[HOSTNAME_LENGTH+1]; char host[HOSTNAME_LENGTH+1];
char user[USERNAME_LENGTH+1]; char user[USERNAME_LENGTH+1];
char password[HASH_PASSWORD_LENGTH+1]; char password[HASH_PASSWORD_LENGTH+1];
...@@ -262,7 +262,7 @@ typedef struct st_master_info ...@@ -262,7 +262,7 @@ typedef struct st_master_info
pthread_cond_t data_cond,start_cond,stop_cond; pthread_cond_t data_cond,start_cond,stop_cond;
THD *io_thd; THD *io_thd;
MYSQL* mysql; MYSQL* mysql;
uint32 file_id; // for 3.23 load data infile uint32 file_id; /* for 3.23 load data infile */
RELAY_LOG_INFO rli; RELAY_LOG_INFO rli;
uint port; uint port;
uint connect_retry; uint connect_retry;
...@@ -270,7 +270,7 @@ typedef struct st_master_info ...@@ -270,7 +270,7 @@ typedef struct st_master_info
int events_till_abort; int events_till_abort;
#endif #endif
bool inited; bool inited;
bool old_format; // master binlog is in 3.23 format bool old_format; /* master binlog is in 3.23 format */
volatile bool abort_slave, slave_running; volatile bool abort_slave, slave_running;
bool ignore_stop_event; bool ignore_stop_event;
...@@ -352,18 +352,18 @@ int start_slave_thread(pthread_handler h_func, pthread_mutex_t* start_lock, ...@@ -352,18 +352,18 @@ int start_slave_thread(pthread_handler h_func, pthread_mutex_t* start_lock,
volatile bool* slave_running, volatile bool* slave_running,
MASTER_INFO* mi); MASTER_INFO* mi);
// If fd is -1, dump to NET /* If fd is -1, dump to NET */
int mysql_table_dump(THD* thd, const char* db, int mysql_table_dump(THD* thd, const char* db,
const char* tbl_name, int fd = -1); const char* tbl_name, int fd = -1);
// retrieve non-exitent table from master /* retrieve non-exitent table from master */
int fetch_master_table(THD* thd, const char* db_name, const char* table_name, int fetch_master_table(THD* thd, const char* db_name, const char* table_name,
MASTER_INFO* mi, MYSQL* mysql); MASTER_INFO* mi, MYSQL* mysql);
int show_master_info(THD* thd, MASTER_INFO* mi); int show_master_info(THD* thd, MASTER_INFO* mi);
int show_binlog_info(THD* thd); int show_binlog_info(THD* thd);
// See if the query uses any tables that should not be replicated /* See if the query uses any tables that should not be replicated */
int tables_ok(THD* thd, TABLE_LIST* tables); int tables_ok(THD* thd, TABLE_LIST* tables);
/* /*
...@@ -382,7 +382,7 @@ int check_expected_error(THD* thd, RELAY_LOG_INFO* rli, int error_code); ...@@ -382,7 +382,7 @@ int check_expected_error(THD* thd, RELAY_LOG_INFO* rli, int error_code);
void skip_load_data_infile(NET* net); void skip_load_data_infile(NET* net);
void slave_print_error(RELAY_LOG_INFO* rli,int err_code, const char* msg, ...); void slave_print_error(RELAY_LOG_INFO* rli,int err_code, const char* msg, ...);
void end_slave(); // clean up void end_slave(); /* clean up */
int init_master_info(MASTER_INFO* mi, const char* master_info_fname, int init_master_info(MASTER_INFO* mi, const char* master_info_fname,
const char* slave_info_fname); const char* slave_info_fname);
void end_master_info(MASTER_INFO* mi); void end_master_info(MASTER_INFO* mi);
...@@ -400,7 +400,7 @@ extern bool opt_log_slave_updates ; ...@@ -400,7 +400,7 @@ extern bool opt_log_slave_updates ;
pthread_handler_decl(handle_slave_io,arg); pthread_handler_decl(handle_slave_io,arg);
pthread_handler_decl(handle_slave_sql,arg); pthread_handler_decl(handle_slave_sql,arg);
extern bool volatile abort_loop; extern bool volatile abort_loop;
extern MASTER_INFO main_mi, *active_mi; // active_mi for multi-master extern MASTER_INFO main_mi, *active_mi; /* active_mi for multi-master */
extern volatile int active_mi_in_use; extern volatile int active_mi_in_use;
extern LIST master_list; extern LIST master_list;
extern HASH replicate_do_table, replicate_ignore_table; extern HASH replicate_do_table, replicate_ignore_table;
...@@ -411,7 +411,7 @@ extern bool table_rules_on; ...@@ -411,7 +411,7 @@ extern bool table_rules_on;
extern int disconnect_slave_event_count, abort_slave_event_count ; extern int disconnect_slave_event_count, abort_slave_event_count ;
// the master variables are defaults read from my.cnf or command line /* the master variables are defaults read from my.cnf or command line */
extern uint master_port, master_connect_retry, report_port; extern uint master_port, master_connect_retry, report_port;
extern my_string master_user, master_password, master_host, extern my_string master_user, master_password, master_host,
master_info_file, relay_log_info_file, report_user, report_host, master_info_file, relay_log_info_file, report_user, report_host,
......
...@@ -145,7 +145,7 @@ terribly wrong...\n"); ...@@ -145,7 +145,7 @@ terribly wrong...\n");
fprintf(stderr, "Warning: Alpha stacks are difficult -\ fprintf(stderr, "Warning: Alpha stacks are difficult -\
will be taking some wild guesses, stack trace may be incorrect or \ will be taking some wild guesses, stack trace may be incorrect or \
terminate abruptly\n"); terminate abruptly\n");
// On Alpha, we need to get pc /* On Alpha, we need to get pc */
__asm __volatile__ ("bsr %0, do_next; do_next: " __asm __volatile__ ("bsr %0, do_next; do_next: "
:"=r"(pc) :"=r"(pc)
:"r"(pc)); :"r"(pc));
...@@ -210,8 +210,8 @@ resolve it\n"); ...@@ -210,8 +210,8 @@ resolve it\n");
void write_core(int sig) void write_core(int sig)
{ {
signal(sig, SIG_DFL); signal(sig, SIG_DFL);
if (fork() != 0) exit(1); // Abort main program if (fork() != 0) exit(1); /* Abort main program */
// Core will be written at exit /* Core will be written at exit */
} }
#else #else
void write_core(int sig) void write_core(int sig)
......
...@@ -50,14 +50,14 @@ typedef struct st_keyfile_info { /* used with ha_info() */ ...@@ -50,14 +50,14 @@ typedef struct st_keyfile_info { /* used with ha_info() */
typedef struct st_key_part_info { /* Info about a key part */ typedef struct st_key_part_info { /* Info about a key part */
Field *field; Field *field;
uint offset; /* offset in record (from 0) */ uint offset; /* offset in record (from 0) */
uint null_offset; // Offset to null_bit in record uint null_offset; /* Offset to null_bit in record */
uint16 length; /* Length of key_part */ uint16 length; /* Length of key_part */
uint16 store_length; uint16 store_length;
uint16 key_type; uint16 key_type;
uint16 fieldnr; /* Fieldnum in UNIREG */ uint16 fieldnr; /* Fieldnum in UNIREG */
uint8 key_part_flag; /* 0 or HA_REVERSE_SORT */ uint8 key_part_flag; /* 0 or HA_REVERSE_SORT */
uint8 type; uint8 type;
uint8 null_bit; // Position to null_bit uint8 null_bit; /* Position to null_bit */
} KEY_PART_INFO ; } KEY_PART_INFO ;
......
...@@ -84,7 +84,7 @@ long my_gmt_sec(TIME *t) ...@@ -84,7 +84,7 @@ long my_gmt_sec(TIME *t)
/* Get difference in days */ /* Get difference in days */
int days= t->day - l_time->tm_mday; int days= t->day - l_time->tm_mday;
if (days < -1) if (days < -1)
days= 1; // Month has wrapped days= 1; /* Month has wrapped */
else if (days > 1) else if (days > 1)
days= -1; days= -1;
diff=(3600L*(long) (days*24+((int) t->hour - (int) l_time->tm_hour)) + diff=(3600L*(long) (days*24+((int) t->hour - (int) l_time->tm_hour)) +
...@@ -100,15 +100,15 @@ long my_gmt_sec(TIME *t) ...@@ -100,15 +100,15 @@ long my_gmt_sec(TIME *t)
{ {
int days= t->day - l_time->tm_mday; int days= t->day - l_time->tm_mday;
if (days < -1) if (days < -1)
days=1; // Month has wrapped days=1; /* Month has wrapped */
else if (days > 1) else if (days > 1)
days= -1; days= -1;
diff=(3600L*(long) (days*24+((int) t->hour - (int) l_time->tm_hour))+ diff=(3600L*(long) (days*24+((int) t->hour - (int) l_time->tm_hour))+
(long) (60*((int) t->minute - (int) l_time->tm_min))); (long) (60*((int) t->minute - (int) l_time->tm_min)));
if (diff == 3600) if (diff == 3600)
tmp+=3600 - t->minute*60 - t->second; // Move to next hour tmp+=3600 - t->minute*60 - t->second; /* Move to next hour */
else if (diff == -3600) else if (diff == -3600)
tmp-=t->minute*60 + t->second; // Move to next hour tmp-=t->minute*60 + t->second; /* Move to next hour */
} }
if ((my_time_zone >=0 ? my_time_zone: -my_time_zone) > 3600L*12) if ((my_time_zone >=0 ? my_time_zone: -my_time_zone) > 3600L*12)
my_time_zone=0; /* Wrong date */ my_time_zone=0; /* Wrong date */
...@@ -183,7 +183,7 @@ uint calc_week(TIME *l_time, bool with_year, bool sunday_first_day_of_week, ...@@ -183,7 +183,7 @@ uint calc_week(TIME *l_time, bool with_year, bool sunday_first_day_of_week,
/* Last week of the previous year */ /* Last week of the previous year */
if (!with_year) if (!with_year)
return 0; return 0;
with_year=0; // Don't check the week again with_year=0; /* Don't check the week again */
(*year)--; (*year)--;
first_daynr-= (days=calc_days_in_year(*year)); first_daynr-= (days=calc_days_in_year(*year));
weekday= (weekday + 53*7- days) % 7; weekday= (weekday + 53*7- days) % 7;
...@@ -198,7 +198,7 @@ uint calc_week(TIME *l_time, bool with_year, bool sunday_first_day_of_week, ...@@ -198,7 +198,7 @@ uint calc_week(TIME *l_time, bool with_year, bool sunday_first_day_of_week,
/* Check if we are on the first week of the next year (or week 53) */ /* Check if we are on the first week of the next year (or week 53) */
weekday= (weekday + calc_days_in_year(*year)) % 7; weekday= (weekday + calc_days_in_year(*year)) % 7;
if (weekday < 4) if (weekday < 4)
{ // We are at first week on next year { /* We are at first week on next year */
(*year)++; (*year)++;
return 1; return 1;
} }
...@@ -434,7 +434,7 @@ str_to_TIME(const char *str, uint length, TIME *l_time,bool fuzzy_date) ...@@ -434,7 +434,7 @@ str_to_TIME(const char *str, uint length, TIME *l_time,bool fuzzy_date)
DBUG_ENTER("str_to_TIME"); DBUG_ENTER("str_to_TIME");
DBUG_PRINT("enter",("str: %.*s",length,str)); DBUG_PRINT("enter",("str: %.*s",length,str));
for (; str != end && !isdigit(*str) ; str++) ; // Skip garbage for (; str != end && !isdigit(*str) ; str++) ; /* Skip garbage */
if (str == end) if (str == end)
DBUG_RETURN(TIMESTAMP_NONE); DBUG_RETURN(TIMESTAMP_NONE);
/* /*
...@@ -456,18 +456,18 @@ str_to_TIME(const char *str, uint length, TIME *l_time,bool fuzzy_date) ...@@ -456,18 +456,18 @@ str_to_TIME(const char *str, uint length, TIME *l_time,bool fuzzy_date)
} }
date[i]=tmp_value; date[i]=tmp_value;
if (i == 2 && str != end && *str == 'T') if (i == 2 && str != end && *str == 'T')
str++; // ISO8601: CCYYMMDDThhmmss str++; /* ISO8601: CCYYMMDDThhmmss */
else if ( i != 5 ) // Skip inter-field delimiters else if ( i != 5 ) /* Skip inter-field delimiters */
{ {
while (str != end && (ispunct(*str) || isspace(*str))) while (str != end && (ispunct(*str) || isspace(*str)))
{ {
// Only allow space between days and hours /* Only allow space between days and hours */
if (isspace(*str) && i != 2) if (isspace(*str) && i != 2)
DBUG_RETURN(TIMESTAMP_NONE); DBUG_RETURN(TIMESTAMP_NONE);
str++; str++;
} }
} }
field_length=1; // Rest fields can only be 2 field_length=1; /* Rest fields can only be 2 */
} }
/* Handle second fractions */ /* Handle second fractions */
if (i == 6 && (uint) (end-str) >= 2 && *str == '.' && isdigit(str[1])) if (i == 6 && (uint) (end-str) >= 2 && *str == '.' && isdigit(str[1]))
...@@ -572,9 +572,9 @@ bool str_to_time(const char *str,uint length,TIME *l_time) ...@@ -572,9 +572,9 @@ bool str_to_time(const char *str,uint length,TIME *l_time)
/* Check first if this is a full TIMESTAMP */ /* Check first if this is a full TIMESTAMP */
if (length >= 12) if (length >= 12)
{ // Probably full timestamp { /* Probably full timestamp */
if (str_to_TIME(str,length,l_time,1) == TIMESTAMP_FULL) if (str_to_TIME(str,length,l_time,1) == TIMESTAMP_FULL)
return 0; // Was an ok timestamp return 0; /* Was an ok timestamp */
} }
/* Not a timestamp. Try to get this as a DAYS_TO_SECOND string */ /* Not a timestamp. Try to get this as a DAYS_TO_SECOND string */
...@@ -590,19 +590,19 @@ bool str_to_time(const char *str,uint length,TIME *l_time) ...@@ -590,19 +590,19 @@ bool str_to_time(const char *str,uint length,TIME *l_time)
LINT_INIT(state); LINT_INIT(state);
found_days=found_hours=0; found_days=found_hours=0;
if ((uint) (end-str) > 1 && (*str == ' ' && isdigit(str[1]))) if ((uint) (end-str) > 1 && (*str == ' ' && isdigit(str[1])))
{ // days ! { /* days ! */
date[0]=value; date[0]=value;
state=1; // Assume next is hours state=1; /* Assume next is hours */
found_days=1; found_days=1;
str++; // Skip space; str++; /* Skip space; */
} }
else if ((end-str) > 1 && *str == ':' && isdigit(str[1])) else if ((end-str) > 1 && *str == ':' && isdigit(str[1]))
{ {
date[0]=0; // Assume we found hours date[0]=0; /* Assume we found hours */
date[1]=value; date[1]=value;
state=2; state=2;
found_hours=1; found_hours=1;
str++; // skip ':' str++; /* skip ':' */
} }
else else
{ {
...@@ -623,11 +623,11 @@ bool str_to_time(const char *str,uint length,TIME *l_time) ...@@ -623,11 +623,11 @@ bool str_to_time(const char *str,uint length,TIME *l_time)
date[state++]=value; date[state++]=value;
if (state == 4 || (end-str) < 2 || *str != ':' || !isdigit(str[1])) if (state == 4 || (end-str) < 2 || *str != ':' || !isdigit(str[1]))
break; break;
str++; // Skip ':' str++; /* Skip ':' */
} }
if (state != 4) if (state != 4)
{ // Not HH:MM:SS { /* Not HH:MM:SS */
/* Fix the date to assume that seconds was given */ /* Fix the date to assume that seconds was given */
if (!found_hours && !found_days) if (!found_hours && !found_days)
{ {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment