summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormonty@narttu.mysql.fi <>2003-03-16 19:17:54 +0200
committermonty@narttu.mysql.fi <>2003-03-16 19:17:54 +0200
commita434bca70425e4497c8397d073b11be3620be999 (patch)
tree956d20750d7fec498888d037be8d588dab6412f0
parentce7db2827ee3ae8866882b777f2643914f56ead8 (diff)
parentba46c7289c3ce1517e595a37cef48ffb3c993bb0 (diff)
downloadmariadb-git-a434bca70425e4497c8397d073b11be3620be999.tar.gz
Merge with 4.0
-rw-r--r--BitKeeper/etc/logging_ok1
-rwxr-xr-xBuild-tools/Do-pkg42
-rw-r--r--Docs/internals.texi3867
-rwxr-xr-xVC++Files/InstallShield/4.0.XX-classic/4.0.XX-classic.ipr51
-rwxr-xr-xVC++Files/InstallShield/4.0.XX-classic/Component Definitions/Default.cdf192
-rwxr-xr-xVC++Files/InstallShield/4.0.XX-classic/Component Definitions/Default.fgl42
-rwxr-xr-xVC++Files/InstallShield/4.0.XX-classic/File Groups/Clients and Tools.fgl31
-rwxr-xr-xVC++Files/InstallShield/4.0.XX-classic/File Groups/Default.fdf82
-rwxr-xr-xVC++Files/InstallShield/4.0.XX-classic/File Groups/Development.fgl239
-rwxr-xr-xVC++Files/InstallShield/4.0.XX-classic/File Groups/Documentation.fgl99
-rwxr-xr-xVC++Files/InstallShield/4.0.XX-classic/File Groups/Grant Tables.fgl36
-rwxr-xr-xVC++Files/InstallShield/4.0.XX-classic/File Groups/Servers.fgl226
-rwxr-xr-xVC++Files/InstallShield/4.0.XX-classic/Registry Entries/Default.rge4
-rwxr-xr-xVC++Files/InstallShield/4.0.XX-classic/Script Files/Setup.dbgbin0 -> 28458 bytes
-rwxr-xr-xVC++Files/InstallShield/4.0.XX-classic/Script Files/Setup.inobin0 -> 58611 bytes
-rwxr-xr-xVC++Files/InstallShield/4.0.XX-classic/Script Files/Setup.insbin0 -> 57122 bytes
-rwxr-xr-xVC++Files/InstallShield/4.0.XX-classic/Script Files/Setup.obsbin0 -> 65611 bytes
-rwxr-xr-xVC++Files/InstallShield/4.0.XX-classic/Script Files/Setup.rul640
-rwxr-xr-xVC++Files/InstallShield/4.0.XX-classic/Setup Files/Compressed Files/Language Independent/OS Independent/infolist.txt25
-rwxr-xr-xVC++Files/InstallShield/4.0.XX-classic/Setup Files/Uncompressed Files/Language Independent/OS Independent/setup.bmpbin0 -> 15694 bytes
-rwxr-xr-xVC++Files/InstallShield/4.0.XX-classic/Shell Objects/Default.shl12
-rwxr-xr-xVC++Files/InstallShield/4.0.XX-classic/String Tables/0009-English/value.shl23
-rwxr-xr-xVC++Files/InstallShield/4.0.XX-classic/String Tables/Default.shl74
-rwxr-xr-xVC++Files/InstallShield/4.0.XX-classic/Text Substitutions/Build.tsb56
-rwxr-xr-xVC++Files/InstallShield/4.0.XX-classic/Text Substitutions/Setup.tsb76
-rwxr-xr-xVC++Files/InstallShield/4.0.XX-gpl/4.0.XX-gpl.ipr51
-rwxr-xr-xVC++Files/InstallShield/4.0.XX-gpl/Component Definitions/Default.cdf192
-rwxr-xr-xVC++Files/InstallShield/4.0.XX-gpl/Component Definitions/Default.fgl42
-rwxr-xr-xVC++Files/InstallShield/4.0.XX-gpl/File Groups/Clients and Tools.fgl31
-rwxr-xr-xVC++Files/InstallShield/4.0.XX-gpl/File Groups/Default.fdf82
-rwxr-xr-xVC++Files/InstallShield/4.0.XX-gpl/File Groups/Development.fgl241
-rwxr-xr-xVC++Files/InstallShield/4.0.XX-gpl/File Groups/Documentation.fgl101
-rwxr-xr-xVC++Files/InstallShield/4.0.XX-gpl/File Groups/Grant Tables.fgl36
-rwxr-xr-xVC++Files/InstallShield/4.0.XX-gpl/File Groups/Servers.fgl229
-rwxr-xr-xVC++Files/InstallShield/4.0.XX-gpl/Registry Entries/Default.rge4
-rwxr-xr-xVC++Files/InstallShield/4.0.XX-gpl/Script Files/Setup.dbgbin0 -> 28458 bytes
-rwxr-xr-xVC++Files/InstallShield/4.0.XX-gpl/Script Files/Setup.inobin0 -> 58611 bytes
-rwxr-xr-xVC++Files/InstallShield/4.0.XX-gpl/Script Files/Setup.insbin0 -> 57122 bytes
-rwxr-xr-xVC++Files/InstallShield/4.0.XX-gpl/Script Files/Setup.obsbin0 -> 65611 bytes
-rwxr-xr-xVC++Files/InstallShield/4.0.XX-gpl/Script Files/Setup.rul640
-rwxr-xr-xVC++Files/InstallShield/4.0.XX-gpl/Setup Files/Compressed Files/Language Independent/OS Independent/infolist.txt25
-rwxr-xr-xVC++Files/InstallShield/4.0.XX-gpl/Setup Files/Uncompressed Files/Language Independent/OS Independent/setup.bmpbin0 -> 15694 bytes
-rwxr-xr-xVC++Files/InstallShield/4.0.XX-gpl/Shell Objects/Default.shl12
-rwxr-xr-xVC++Files/InstallShield/4.0.XX-gpl/String Tables/0009-English/value.shl23
-rwxr-xr-xVC++Files/InstallShield/4.0.XX-gpl/String Tables/Default.shl74
-rwxr-xr-xVC++Files/InstallShield/4.0.XX-gpl/Text Substitutions/Build.tsb56
-rwxr-xr-xVC++Files/InstallShield/4.0.XX-gpl/Text Substitutions/Setup.tsb76
-rwxr-xr-xVC++Files/InstallShield/4.0.XX-pro/4.0.XX-pro.ipr52
-rwxr-xr-xVC++Files/InstallShield/4.0.XX-pro/Component Definitions/Default.cdf192
-rwxr-xr-xVC++Files/InstallShield/4.0.XX-pro/Component Definitions/Default.fgl42
-rwxr-xr-xVC++Files/InstallShield/4.0.XX-pro/File Groups/Clients and Tools.fgl31
-rwxr-xr-xVC++Files/InstallShield/4.0.XX-pro/File Groups/Default.fdf82
-rwxr-xr-xVC++Files/InstallShield/4.0.XX-pro/File Groups/Development.fgl239
-rwxr-xr-xVC++Files/InstallShield/4.0.XX-pro/File Groups/Documentation.fgl99
-rwxr-xr-xVC++Files/InstallShield/4.0.XX-pro/File Groups/Grant Tables.fgl36
-rwxr-xr-xVC++Files/InstallShield/4.0.XX-pro/File Groups/Servers.fgl226
-rwxr-xr-xVC++Files/InstallShield/4.0.XX-pro/Registry Entries/Default.rge4
-rwxr-xr-xVC++Files/InstallShield/4.0.XX-pro/Script Files/Setup.dbgbin0 -> 28458 bytes
-rwxr-xr-xVC++Files/InstallShield/4.0.XX-pro/Script Files/Setup.inobin0 -> 58611 bytes
-rwxr-xr-xVC++Files/InstallShield/4.0.XX-pro/Script Files/Setup.insbin0 -> 57122 bytes
-rwxr-xr-xVC++Files/InstallShield/4.0.XX-pro/Script Files/Setup.obsbin0 -> 65611 bytes
-rwxr-xr-xVC++Files/InstallShield/4.0.XX-pro/Script Files/Setup.rul640
-rwxr-xr-xVC++Files/InstallShield/4.0.XX-pro/Setup Files/Compressed Files/Language Independent/OS Independent/infolist.txt25
-rwxr-xr-xVC++Files/InstallShield/4.0.XX-pro/Setup Files/Uncompressed Files/Language Independent/OS Independent/setup.bmpbin0 -> 15694 bytes
-rwxr-xr-xVC++Files/InstallShield/4.0.XX-pro/Shell Objects/Default.shl12
-rwxr-xr-xVC++Files/InstallShield/4.0.XX-pro/String Tables/0009-English/value.shl23
-rwxr-xr-xVC++Files/InstallShield/4.0.XX-pro/String Tables/Default.shl74
-rwxr-xr-xVC++Files/InstallShield/4.0.XX-pro/Text Substitutions/Build.tsb56
-rwxr-xr-xVC++Files/InstallShield/4.0.XX-pro/Text Substitutions/Setup.tsb76
-rw-r--r--VC++Files/bdb/bdb.dsp14
-rw-r--r--VC++Files/client/mysqlclient.dsp16
-rw-r--r--VC++Files/innobase/innobase.dsp14
-rw-r--r--VC++Files/libmysql/libmysql.dsp54
-rw-r--r--VC++Files/libmysql/libmysql.dsw2
-rw-r--r--VC++Files/mysql.dsw6
-rw-r--r--VC++Files/mysqldemb/mysqldemb.dsp14
-rw-r--r--VC++Files/mysqlmanager/MySqlManager.dsp2
-rw-r--r--VC++Files/mysys/mysys.dsp18
-rw-r--r--VC++Files/sql/mysqld.dsp110
-rw-r--r--VC++Files/strings/strings.dsp14
-rw-r--r--client/mysqlbinlog.cc2
-rw-r--r--client/mysqltest.c26
-rw-r--r--configure.in2
-rw-r--r--dbug/dbug.c1
-rw-r--r--include/Makefile.am4
-rw-r--r--include/my_global.h1
-rw-r--r--include/my_sys.h1
-rw-r--r--include/myisam.h1
-rw-r--r--include/thr_lock.h1
-rw-r--r--include/violite.h6
-rw-r--r--innobase/buf/buf0buf.c14
-rw-r--r--innobase/include/srv0start.h1
-rw-r--r--innobase/os/os0file.c28
-rw-r--r--innobase/row/row0sel.c21
-rw-r--r--innobase/srv/srv0start.c23
-rw-r--r--innobase/trx/trx0roll.c49
-rw-r--r--innobase/trx/trx0sys.c26
-rw-r--r--libmysql/libmysql.c16
-rw-r--r--libmysqld/lib_vio.c2
-rw-r--r--man/perror.115
-rw-r--r--myisam/mi_check.c2
-rw-r--r--myisam/mi_create.c2
-rw-r--r--myisam/mi_open.c18
-rw-r--r--mysql-test/include/have_openssl_1.inc2
-rw-r--r--mysql-test/mysql-test-run.sh23
-rw-r--r--mysql-test/r/auto_increment.result10
-rw-r--r--mysql-test/r/create.result7
-rw-r--r--mysql-test/r/ctype_latin1_de.result210
-rw-r--r--mysql-test/r/delete.result15
-rw-r--r--mysql-test/r/func_like.result10
-rw-r--r--mysql-test/r/group_by.result5
-rw-r--r--mysql-test/r/have_openssl_1.require2
-rw-r--r--mysql-test/r/innodb.result17
-rw-r--r--mysql-test/r/join.result23
-rw-r--r--mysql-test/r/lock_multi.result9
-rw-r--r--mysql-test/r/openssl_1.result34
-rw-r--r--mysql-test/r/rpl000001.result2
-rw-r--r--mysql-test/r/rpl_loaddatalocal.result14
-rw-r--r--mysql-test/r/select.result11
-rw-r--r--mysql-test/r/type_datetime.result6
-rw-r--r--mysql-test/r/type_timestamp.result20
-rw-r--r--mysql-test/t/analyse.test5
-rw-r--r--mysql-test/t/auto_increment.test8
-rwxr-xr-xmysql-test/t/backup-master.sh5
-rw-r--r--mysql-test/t/backup.test31
-rw-r--r--mysql-test/t/create.test8
-rw-r--r--mysql-test/t/ctype_latin1_de.test4
-rw-r--r--mysql-test/t/delete.test19
-rw-r--r--mysql-test/t/func_like.test11
-rw-r--r--mysql-test/t/group_by.test11
-rw-r--r--mysql-test/t/innodb.test11
-rw-r--r--mysql-test/t/join.test24
-rw-r--r--mysql-test/t/lock_multi.test21
-rw-r--r--mysql-test/t/openssl_1.test45
-rw-r--r--mysql-test/t/rpl_loaddatalocal.test36
-rw-r--r--mysql-test/t/select.test16
-rw-r--r--mysql-test/t/type_datetime.test5
-rw-r--r--mysql-test/t/type_timestamp.test14
-rw-r--r--mysys/default.c19
-rw-r--r--mysys/my_copy.c30
-rw-r--r--mysys/my_getopt.c4
-rw-r--r--mysys/my_lib.c2
-rw-r--r--mysys/my_tempnam.c10
-rw-r--r--mysys/thr_lock.c48
-rwxr-xr-xnetware/BUILD/compile-netware-START2
-rwxr-xr-xnetware/BUILD/mwenv12
-rw-r--r--netware/mysql_fix_privilege_tables.pl125
-rw-r--r--netware/mysqld_safe.c54
-rw-r--r--scripts/mysql_tableinfo.sh114
-rw-r--r--scripts/mysqld_safe.sh7
-rw-r--r--sql-bench/crash-me.sh37
-rw-r--r--sql/field.h2
-rw-r--r--sql/filesort.cc11
-rw-r--r--sql/ha_innodb.cc32
-rw-r--r--sql/ha_innodb.h4
-rw-r--r--sql/ha_myisam.cc29
-rw-r--r--sql/handler.cc33
-rw-r--r--sql/handler.h2
-rw-r--r--sql/item.cc11
-rw-r--r--sql/item.h11
-rw-r--r--sql/item_cmpfunc.cc12
-rw-r--r--sql/item_func.cc18
-rw-r--r--sql/lock.cc95
-rw-r--r--sql/log.cc9
-rw-r--r--sql/log_event.cc10
-rw-r--r--sql/mf_iocache.cc8
-rw-r--r--sql/mysql_priv.h4
-rw-r--r--sql/mysqld.cc27
-rw-r--r--sql/opt_range.cc12
-rw-r--r--sql/repl_failsafe.cc38
-rw-r--r--sql/repl_failsafe.h2
-rw-r--r--sql/set_var.cc3
-rw-r--r--sql/share/polish/errmsg.txt2
-rw-r--r--sql/share/russian/errmsg.txt445
-rw-r--r--sql/slave.cc67
-rw-r--r--sql/slave.h1
-rw-r--r--sql/sql_analyse.cc63
-rw-r--r--sql/sql_base.cc56
-rw-r--r--sql/sql_class.cc20
-rw-r--r--sql/sql_class.h8
-rw-r--r--sql/sql_insert.cc55
-rw-r--r--sql/sql_parse.cc24
-rw-r--r--sql/sql_rename.cc34
-rw-r--r--sql/sql_repl.cc6
-rw-r--r--sql/sql_select.cc15
-rw-r--r--sql/sql_show.cc12
-rw-r--r--sql/sql_table.cc30
-rw-r--r--sql/sql_update.cc22
-rw-r--r--sql/stacktrace.c2
-rw-r--r--sql/table.cc7
-rw-r--r--sql/unireg.h3
-rw-r--r--support-files/MacOSX/Info.plist.sh2
-rw-r--r--support-files/mysql.spec.sh6
-rw-r--r--tests/grant.pl60
-rw-r--r--tests/grant.res17
-rw-r--r--vio/viosocket.c4
196 files changed, 11755 insertions, 905 deletions
diff --git a/BitKeeper/etc/logging_ok b/BitKeeper/etc/logging_ok
index 754cca32249..b00af7095d7 100644
--- a/BitKeeper/etc/logging_ok
+++ b/BitKeeper/etc/logging_ok
@@ -74,6 +74,7 @@ paul@teton.kitebird.com
pem@mysql.com
peter@linux.local
peter@mysql.com
+pgulutzan@linux.local
ram@gw.udmsearch.izhnet.ru
ram@mysql.r18.ru
ram@ram.(none)
diff --git a/Build-tools/Do-pkg b/Build-tools/Do-pkg
index 67c0e612828..e95d86c0f6e 100755
--- a/Build-tools/Do-pkg
+++ b/Build-tools/Do-pkg
@@ -3,6 +3,15 @@
# Do-pkg - convert a binary distribution into a Mac OS X PKG and put it
# inside a Disk Image (.dmg)
#
+# The script currently assumes the following environment (which should exist
+# like that, if the Do-compile script was used to build the binary
+# distribution)
+#
+# - there must be a binary distribution (*.tar.gz) in the directory
+# `hostname` of the current directory
+# - the extracted and compiled source tree should be located in the
+# `hostname` directory, too
+#
# Use the "--help" option for more info!
#
# written by Lenz Grimmer <lenz@mysql.com>
@@ -15,6 +24,7 @@ $opt_dry_run= undef;
$opt_help= undef;
$opt_log= undef;
$opt_mail= "";
+$opt_skip_dmg= undef;
$opt_suffix= undef;
$opt_verbose= undef;
$opt_version= undef;
@@ -24,6 +34,7 @@ GetOptions(
"help|h",
"log|l:s",
"mail|m=s",
+ "skip-dmg|skip-disk-image|s",
"suffix=s",
"verbose|v",
"version=s",
@@ -32,7 +43,7 @@ GetOptions(
# Include helper functions
chomp($PWD= `pwd`);
$LOGGER= "$PWD/logger.pm";
-if (-f $LOGGER)
+if (-f "$LOGGER")
{
do "$LOGGER";
}
@@ -42,7 +53,8 @@ else
}
$PM= "/Developer/Applications/PackageMaker.app/Contents/MacOS/PackageMaker";
-$TMP= "/tmp/PKGBUILD";
+$TMP= $ENV{TMPDIR};
+$TMP eq "" ? $TMP= $TMP . "/PKGBUILD": $TMP= "/tmp/PKGBUILD";
$PKGROOT= "$TMP/PMROOT";
$PKGDEST= "$TMP/PKG";
$RESOURCE_DIR= "$TMP/Resources";
@@ -56,11 +68,13 @@ $HOST=~ /^([^.-]*)/;
$HOST= $1;
$LOGFILE= "$PWD/Logs/$HOST-$MAJOR.$MINOR$SUFFIX.log";
$BUILDDIR= "$PWD/$HOST";
-$SUPFILEDIR= <$BUILDDIR/mysql*-$VERSION/support-files/MacOSX>;
+$SRCBASEDIR= <$BUILDDIR/mysql*-$VERSION>;
+$SUPFILEDIR= <$SRCBASEDIR/support-files/MacOSX>;
$TAR= <$BUILDDIR/$NAME-apple-darwin*-powerpc.tar.gz>;
$INFO= <$SUPFILEDIR/Info.plist>;
$DESC= <$SUPFILEDIR/Description.plist>;
@RESOURCES= qw/ ReadMe.txt postinstall preinstall /;
+@LICENSES= ("$SRCBASEDIR/COPYING","$SRCBASEDIR/MySQLEULA.txt");
&print_help("") if ($opt_help || !$opt_suffix || !$opt_version);
@@ -87,7 +101,7 @@ die("You must be root to run this script!") if ($ID ne "root" && !$opt_dry_run);
foreach $file ($TAR, $INFO, $DESC)
{
- &abort("Unable to find $file!") if (!-f $file);
+ &abort("Unable to find $file!") unless (-f "$file");
}
# Remove old temporary build directories first
@@ -108,6 +122,18 @@ foreach $resfile (@RESOURCES)
&run_command($command, "Error while copying $SUPFILEDIR/$resfile to $RESOURCE_DIR");
}
+# Search for license file
+foreach $license (@LICENSES)
+{
+ if (-f "$license")
+ {
+ $command= "cp $license $RESOURCE_DIR/License.txt";
+ &run_command($command, "Error while copying $license to $RESOURCE_DIR");
+ }
+}
+
+&abort("Could not find a license file!") unless (-f "$RESOURCE_DIR/License.txt");
+
# Extract the binary tarball and create the "mysql" symlink
&logger("Extracting $TAR to $PKGROOT");
&run_command("gnutar zxf $TAR -C $PKGROOT", "Unable to extract $TAR!");
@@ -124,6 +150,12 @@ $command= "$PM -build -p $PKGDEST/$NAME.pkg -f $PKGROOT -r $RESOURCE_DIR -i $INF
&logger("Removing $PKGROOT");
&run_command("rm -rf $PKGROOT", "Unable to remove $PKGROOT!");
+if ($opt_skip_dmg)
+{
+ &logger("SUCCESS: Package $PKGDEST/$NAME.pkg created");
+ exit 0;
+}
+
# Determine the size of the Disk image to be created and add a 5% safety
# margin for filesystem overhead
&logger("Determining required disk image size for $PKGDEST");
@@ -198,6 +230,8 @@ Options:
is enabled)
Note that the \@-Sign needs to be quoted!
Example: --mail=user\\\@domain.com
+-s, --skip-disk-image Just build the PKG, don't put it into a
+ disk image afterwards
--suffix=<suffix> The package suffix (e.g. "-standard" or "-pro)
--version=<version> The MySQL version number (e.g. 4.0.11-gamma)
-v, --verbose Verbose execution
diff --git a/Docs/internals.texi b/Docs/internals.texi
index 8fc7a041f78..97256d49db6 100644
--- a/Docs/internals.texi
+++ b/Docs/internals.texi
@@ -51,6 +51,7 @@ This is a manual about @strong{MySQL} internals.
@menu
* caching:: How MySQL Handles Caching
+* join_buffer_size::
* flush tables:: How MySQL Handles @code{FLUSH TABLES}
* filesort:: How MySQL Does Sorting (@code{filesort})
* selects:: How MySQL performs different selects
@@ -60,10 +61,15 @@ This is a manual about @strong{MySQL} internals.
* DBUG:: DBUG Tags To Use
* protocol:: MySQL Client/Server Protocol
* Fulltext Search:: Fulltext Search in MySQL
+* MyISAM Record Structure:: MyISAM Record Structure
+* InnoDB Record Structure:: InnoDB Record Structure
+* InnoDB Page Structure:: InnoDB Page Structure
+* Files in MySQL Sources:: Annotated List Of Files in the MySQL Source Code Distribution
+* Files in InnoDB Sources:: Annotated List Of Files in the InnoDB Source Code Distribution
@end menu
-@node caching, flush tables, Top, Top
+@node caching, join_buffer_size, Top, Top
@chapter How MySQL Handles Caching
@strong{MySQL} has the following caches:
@@ -106,7 +112,7 @@ use many join caches in the worst case.
@end table
@node join_buffer_size, flush tables, caching, Top
-@subchapter How MySQL uses the join_buffer cache
+@chapter How MySQL uses the join_buffer cache
Basic information about @code{join_buffer_size}:
@@ -177,7 +183,7 @@ same algorithm described above to handle it. (In other words, we store
the same row combination several times into different buffers)
@end itemize
-@node flush tables, filesort, caching, Top
+@node flush tables, filesort, join_buffer_size, Top
@chapter How MySQL Handles @code{FLUSH TABLES}
@itemize @bullet
@@ -2228,8 +2234,8 @@ fe 00 . .
@c @printindex fn
-@node 4.1 protocol,,,
-@subchapter MySQL 4.1 protocol
+@c @node 4.1 protocol,,,
+@c @chapter MySQL 4.1 protocol
@node 4.1 protocol changes,,,
@section Changes to 4.0 protocol in 4.1
@@ -2272,7 +2278,7 @@ results will sent as binary (low-byte-first).
The field description packet is sent as a response to a query that
contains a result set. It can be distinguished from a ok packet by
the fact that the first byte can't be 0 for a field packet.
-@xref {4.1 ok packet}.
+@xref{4.1 ok packet}.
The header packet has the following structure:
@@ -2405,7 +2411,7 @@ parameter in the query:
@item 2 @tab 2 byte column flags (NOT_NULL_FLAG etc)
@item 1 @tab Number of decimals
@item 4 @tab Max column length.
-@end itemize
+@end multitable
Note that the above is not yet in 4.1 but will be added this month.
@@ -2438,7 +2444,7 @@ This packet is sent from client -> server:
@item 2 @tab Parameter number
@item 2 @tab Type of parameter (not used at this point)
@item # @tab data (Rest of packet)
-@end itemize
+@end multitable
The server will NOT send an @code{ok} or @code{error} packet in
responce for this. If there is any errors (like to big string), one
@@ -2460,7 +2466,7 @@ execute or if one has rebound the parameters.
@item 2*param_count @tab Type of parameters (only given if new_parameter_bound flag is 1)
@item # @tab Parameter data, repeated for each parameter that are
NOT NULL and not used with mysql_send_long_data().
-@end itemize
+@end multitable
The null-bit-map is for all parameters (including parameters sent with
'mysql_send_long_data). If parameter 0 is NULL, then bit 0 in the
@@ -2518,7 +2524,7 @@ DATETIME, DATE and TIME are sent to the server in a binary format as follows:
The first byte is a length byte and then comes all parameters that are
not 0. (Always counted from the beginning).
-@node Fulltext Search, , protocol, Top
+@node Fulltext Search, MyISAM Record Structure, protocol, Top
@chapter Fulltext Search in MySQL
Hopefully, sometime there will be complete description of
@@ -2560,6 +2566,3847 @@ weight as number of matched B's increases, because it assigns
higher weights to individual B's. Also the first expression in
much simplier. So it is the first one, that is implemented in MySQL.
+
+@node MyISAM Record Structure, InnoDB Record Structure, Fulltext Search, Top
+@chapter MyISAM Record Structure
+
+@section Introduction
+
+When you say:
+@*
+
+@strong{CREATE TABLE Table1 ...}
+@*
+
+MySQL creates files named Table1.MYD ("MySQL Data"), Table1.MYI
+("MySQL Index"), and Table1.FRM ("Format"). These files will be in the
+directory: @*
+/<datadir>/<database>/
+@*
+
+For example, if you use Linux, you might find the files here (assume
+your database name is "test"): @*
+/usr/local/var/test
+@*
+
+And if you use Windows, you might find the files in this directory: @*
+\mysql\data\test\
+@*@*
+
+Let's look at the .MYD Data file (MyISAM SQL Data file) more closely.
+
+@table @strong
+@item Page Size
+Unlike most DBMSs, MySQL doesn't store on disk using pages. Therefore
+you will not see filler space between rows. (Reminder: This does not
+refer to BDB and INNODB tables, which do use pages).
+@*
+
+@item Record Header
+The minimal record header is a set of flags:
+@itemize @bullet
+@item
+"X bit" = 0 if row is deleted, = 1 if row is not deleted
+@item
+"Null Bits" = 0 if column is not NULL, = 1 if column is NULL
+@item
+"Filler Bits" = 1
+@end itemize
+@end table
+@*
+
+Here's an example. Suppose you say:
+@*
+
+@strong{CREATE TABLE Table1 (column1 CHAR(1), column2 CHAR(1), column3 CHAR(1))}
+@*
+
+@strong{INSERT INTO Table1 VALUES ('a', 'b', 'c')}
+@*
+
+@strong{INSERT INTO Table1 VALUES ('d', NULL, 'e')}
+@*
+
+A CHAR(1) column takes precisely one byte (plus one bit of overhead
+that is assigned to every column -- I'll describe the details of
+column storage later). So the file Table1.MYD looks like this:
+@*
+
+@strong{Hexadecimal Display of Table1.MYD file}@*
+@code{
+F1 61 62 63 00 F5 64 00 66 00 ... .abc..d e.
+}
+@*
+
+Here's how to read this hexadecimal-dump display:@*
+@itemize @bullet
+@item
+The hexadecimal numbers @code{F1 61 62 63 00 F5 64 20 66 00} are byte
+values and the column on the right is an attempt to show the
+same bytes in ASCII.
+@item
+The @code{F1} byte means that there are no null fields in the first row.
+@item
+The @code{F5} byte means that the second column of the second row is NULL.
+@end itemize
+
+(It's probably easier to understand the flag setting if you restate
+@code{F5} as @code{11110101 binary}, and (a) notice that the third flag bit from the
+right is @code{on}, and (b) remember that the first flag bit is the X bit.)
+@*
+
+There are complications -- the record header is more complex if there
+are variable-length fields -- but the simple display shown in the
+example is exactly what you'd see if you took a debugger and looked
+at the MySQL Data file.
+@*
+
+@section Physical Attributes of Columns
+
+Next I'll describe the physical attributes of each column in a row.
+The format depends entirely on the data type and the size of the
+column, so, for every data type, I'll give a description and an example.
+@*
+
+@table @strong
+@item The character data types
+
+@strong{CHAR}
+@itemize @bullet
+@item
+Storage: fixed-length string with space padding on the right.
+@item
+Example: a CHAR(5) column containing the value 'A' looks like:@*
+@code{hexadecimal 41 20 20 20 20} -- (length = 5, value = @code{'A '})
+@end itemize
+
+@strong{VARCHAR}
+@itemize @bullet
+@item
+Storage: variable-length string with a preceding length.
+@item
+Example: a VARCHAR(7) column containing 'A' looks like:@*
+@code{hexadecimal 01 41} -- (length = 1, value = @code{'A'})
+@end itemize
+
+@item The numeric data types
+
+Important: MySQL stores all multi-byte binary numbers with the
+high byte first. This is called "little-endian" numeric storage;
+it's normal on Intel x86 machines; MySQL uses it even for non-Intel
+machines so that databases will be portable.
+@*
+
+@strong{TINYINT}
+@itemize @bullet
+@item
+Storage: fixed-length binary, always one byte.
+@item
+Example: a TINYINT column containing 65 looks like:@*
+@code{hexadecimal 41} -- (length = 1, value = 65)
+@end itemize
+
+@strong{SMALLINT}
+@itemize @bullet
+@item
+Storage: fixed-length binary, always two bytes.
+@item
+Example: a SMALLINT column containing 65 looks like:@*
+@code{hexadecimal 41 00} -- (length = 2, value = 65)
+@end itemize
+
+@strong{MEDIUMINT}
+@itemize @bullet
+@item
+Storage: fixed-length binary, always three bytes.
+@item
+Example: a MEDIUMINT column containing 65 looks like:@*
+@code{hexadecimal 41 00 00} -- (length = 3, value = 65)
+@end itemize
+
+@strong{INT}
+@itemize @bullet
+@item
+Storage: fixed-length binary, always four bytes.
+@item
+Example: an INT column containing 65 looks like:@*
+@code{hexadecimal 41 00 00 00} -- (length = 4, value = 65)
+@end itemize
+
+@strong{BIGINT}
+@itemize @bullet
+@item
+Storage: fixed-length binary, always eight bytes.
+@item
+Example: a BIGINT column containing 65 looks like:@*
+@code{hexadecimal 41 00 00 00 00 00 00 00} -- (length = 8, value = 65)
+@end itemize
+
+@strong{FLOAT}
+@itemize @bullet
+@item
+Storage: fixed-length binary, always four bytes.
+@item
+Example: a FLOAT column containing approximately 65 looks like:@*
+@code{hexadecimal 00 00 82 42} -- (length = 4, value = 65)
+@end itemize
+
+@strong{DOUBLE PRECISION}
+@itemize @bullet
+@item
+Storage: fixed-length binary, always eight bytes.
+@item
+Example: a DOUBLE PRECISION column containing approximately 65 looks like:@*
+@code{hexadecimal 00 00 00 00 00 40 50 40} -- (length = 8, value = 65)
+@end itemize
+
+@strong{REAL}
+@itemize @bullet
+@item
+Storage: same as FLOAT, or same as DOUBLE PRECISION, depending on setting of the --ansi switch.
+@end itemize
+
+@strong{DECIMAL}
+@itemize @bullet
+@item
+Storage: fixed-length string, with a leading byte for the sign, if any.
+@item
+Example: a DECIMAL(2) column containing 65 looks like:@*
+@code{hexadecimal 20 36 35} -- (length = 3, value = @code{' 65'})
+@item
+Example: a DECIMAL(2) UNSIGNED column containing 65 looks like:@*
+@code{hexadecimal 36 35} -- (length = 2, value = @code{'65'})
+@item
+Example: a DECIMAL(4,2) UNSIGNED column containing 65 looks like:@*
+@code{hexadecimal 36 35 2E 30 30} -- (length = 5, value = @code{'65.00'})
+@end itemize
+
+@strong{NUMERIC}
+@itemize @bullet
+@item
+Storage: same as DECIMAL.
+@end itemize
+
+@strong{BOOL}
+@itemize @bullet
+@item
+Storage: same as TINYINT.
+@end itemize
+
+@item The temporal data types
+
+@strong{DATE}
+@itemize @bullet
+@item
+Storage: fixed-length series of binary integers, always three bytes
+long.
+@item
+Example: a DATE column containing '0001-01-01' looks like:@*
+@code{hexadecimal 21 02 00}
+@end itemize
+
+@strong{DATETIME}
+@itemize @bullet
+@item
+Storage: eight bytes.
+@item
+Part 1 is a 32-bit integer containing year*10000 + month*100 + day.
+@item
+Part 2 is a 32-bit integer containing hour*10000 + minute*100 + second.
+@item
+Example: a DATETIME column for '0001-01-01 01:01:01' looks like:@*
+@code{hexadecimal B5 2E 11 5A 02 00 00 00}
+@end itemize
+
+@strong{TIME}
+@itemize @bullet
+@item
+Storage: a value offset from 8385959, always three bytes long.
+@item
+Example: a TIME column containing '01:01:01' looks like:@*
+@code{hexadecimal 75 27 00}
+@end itemize
+
+@strong{TIMESTAMP}
+@itemize @bullet
+@item
+Storage: four bytes long (NOTE TO SELF: not figured out)
+@item
+Example: a TIMESTAMP column containing '2003-01-01 01:01:01' looks like:@*
+@code{hexadecimal 4D AE 12 23}
+@end itemize
+
+@strong{YEAR}
+@itemize @bullet
+@item
+Storage: same as unsigned TINYINT with a base value of 0 = 1901.
+@end itemize
+
+@item Others
+
+@strong{SET}
+@itemize @bullet
+@item
+Storage: one byte for each eight members in the set.
+@item
+Maximum length: eight bytes (for maximum 64 members).
+@item
+This is a bit list. The least significant bit corresponds to the
+first listed member of the set.
+@item
+Example: a SET('A','B','C') column containing 'A' looks like:@*
+@code{01} -- (length = 1, value = 'A')
+@end itemize
+
+@strong{ENUM}
+@itemize @bullet
+@item
+Storage: one byte if less than 256 alternatives, else two bytes.
+@item
+This is an index. The value 1 corresponds to the first listed
+alternative. (Note: ENUM always reserves 0 for a blank '' value. This
+explains why 'A' is 1 instead of 0.)
+@item
+Example: an ENUM('A','B','C') column containing 'A' looks like:@*
+@code{01} -- (length = 1, value = 'A')
+@end itemize
+
+@item The Large-Object data types
+
+Warning: Because TINYBLOB's preceding length is one byte long (the
+size of a TINYINT) and MEDIUMBLOB's preceding length is three bytes
+long (the size of a MEDIUMINT), it's easy to think there's some sort
+of correspondence between the BLOB and the INT types. There isn't -- a
+BLOB's preceding length is not four bytes long (the size of an INT).
+@*
+
+(NOTE TO SELF: BLOB storage has not been fully addressed here.)
+@*
+
+@strong{TINYBLOB}
+@itemize @bullet
+@item
+Storage: variable-length string with a preceding one-byte length.
+@item
+Example: a TINYBLOB column containing 'A' looks like:@*
+@code{hexadecimal 01 41} -- (length = 2, value = 'A')
+@end itemize
+
+@strong{TINYTEXT}
+@itemize @bullet
+@item
+Storage: same as TINYBLOB.
+@end itemize
+
+@strong{BLOB}
+@itemize @bullet
+@item
+Storage: variable-length string with a preceding two-byte length.
+@item
+Example: a BLOB column containing 'A' looks like:@*
+@code{hexadecimal 01 00 41} -- (length = 2, value = 'A')
+@end itemize
+
+@strong{TEXT}
+@itemize @bullet
+@item
+Storage: same as BLOB.
+@end itemize
+
+@strong{MEDIUMBLOB}
+@itemize @bullet
+@item
+Storage: variable-length string with a preceding length.
+@item
+Example: a MEDIUMBLOB column containing 'A' looks like:@*
+@code{hexadecimal 01 00 00 41} -- (length = 4, value = 'A')
+@end itemize
+
+@strong{MEDIUMTEXT}
+@itemize @bullet
+@item
+Storage: same as MEDIUMBLOB.
+@end itemize
+
+@strong{LONGBLOB}
+@itemize @bullet
+@item
+Storage: variable-length string with a preceding four-byte length.
+@item
+Example: a LONGBLOB column containing 'A' looks like:@*
+@code{hexadecimal 01 00 00 00 41} -- (length = 5, value = 'A')
+@end itemize
+
+@strong{LONGTEXT}
+@itemize @bullet
+@item
+Storage: same as LONGBLOB.
+@end itemize
+
+@end table
+
+@section Where to Look For More Information
+
+@strong{References:} @*
+Most of the formatting work for MyISAM columns is visible
+in the program /sql/field.cc in the source code directory.
+@*
+
+@node InnoDB Record Structure,InnoDB Page Structure,MyISAM Record Structure,Top
+@chapter InnoDB Record Structure
+
+This page contains:
+@itemize @bullet
+@item
+A high-altitude "summary" picture of the parts of a MySQL/InnoDB
+record structure.
+@item
+A description of each part.
+@item
+An example.
+@end itemize
+
+After reading this page, you will know how MySQL/InnoDB stores a
+physical record.
+@*
+
+@section High-Altitude Picture
+
+The chart below shows the three parts of a physical record.
+
+@multitable @columnfractions .10 .35
+
+@item @strong{Name} @tab @strong{Size}
+@item Field Start Offsets
+@tab (F*1) or (F*2) bytes
+@item Extra Bytes
+@tab 6 bytes
+@item Field Contents
+@tab depends on content
+
+@end multitable
+
+Legend: The letter 'F' stands for 'Number Of Fields'.
+
+The meaning of the parts is as follows:
+@itemize @bullet
+@item
+The FIELD START OFFSETS is a list of numbers containing the
+information "where a field starts".
+@item
+The EXTRA BYTES is a fixed-size header.
+@item
+The FIELD CONTENTS contains the actual data.
+@end itemize
+
+@strong{An Important Note About The Word "Origin"}@*
+The "Origin" or "Zero Point" of a record is the first byte of the
+Field Contents -- not the first byte of the Field Start Offsets. If
+there is a pointer to a record, that pointer is pointing to the
+Origin. Therefore the first two parts of the record are addressed by
+subtracting from the pointer, and only the third part is addressed by
+adding to the pointer.
+
+@subsection FIELD START OFFSETS
+
+The Field Start Offsets is a list in which each entry is the
+position, relative to the Origin, of the start of the next field. The
+entries are in reverse order, that is, the first field's offset is at
+the end of the list.
+@*
+
+An example: suppose there are three columns. The first column's length
+is 1, the second column's length is 2, and the third column's length is 4.
+In this case, the offset values are, respectively, 1, 3 (1+2), and 7 (1+2+4).
+Because values are reversed, a core dump of the Field Start Offsets
+would look like this: @code{07,03,01}.
+@*
+
+There are two complications for special cases:
+@itemize @bullet
+@item
+Complication #1: The size of each offset can be either one byte or
+two bytes. One-byte offsets are only usable if the total record size
+is less than 127. There is a flag in the "Extra Bytes" part which will
+tell you whether the size is one byte or two bytes.
+@item
+Complication #2: The most significant bits of an offset may contain
+flag values. The next two paragraphs explain what the contents are.
+@end itemize
+
+@strong{When The Size Of Each Offset Is One Byte}
+@itemize @bullet
+@item
+1 bit = 0 if field is non-NULL, = 1 if field is NULL
+@item
+7 bits = the actual offset, a number between 0 and 127
+@end itemize
+
+@strong{When The Size Of Each Offset Is Two Bytes}
+@itemize @bullet
+@item
+1 bit = 0 if field is non-NULL, = 1 if field is NULL
+@item
+1 bit = 0 if field is on same page as offset, = 1 if field and offset are on different pages
+@item
+14 bits = the actual offset, a number between 0 and 16383
+@end itemize
+
+It is unlikely that the "field and offset are on different pages"
+unless the record contains a large BLOB.
+
+@subsection EXTRA BYTES
+
+The Extra Bytes are a fixed six-byte header.
+
+@multitable @columnfractions .10 .25 .35
+
+@item @strong{Name} @tab @strong{Size} @tab @strong{Description}
+@item @strong{info_bits:}
+@item ()
+@tab 1 bit
+@tab unused or unknown
+@item ()
+@tab 1 bit
+@tab unused or unknown
+@item deleted_flag
+@tab 1 bit
+@tab 1 if record is deleted
+@item min_rec_flag
+@tab 1 bit
+@tab 1 if record is predefined minimum record
+@item n_owned
+@tab 4 bits
+@tab number of records owned by this record
+@item heap_no
+@tab 13 bits
+@tab record's order number in heap of index page
+@item n_fields
+@tab 10 bits
+@tab number of fields in this record, 1 to 1023
+@item 1byte_offs_flag
+@tab 1 bit
+@tab 1 if each Field Start Offsets is 1 byte long (this item is also called the "short" flag)
+@item @strong{next 16 bits}
+@tab 16 bits
+@tab pointer to next record in page
+@item @strong{TOTAL}
+@tab 48 bits
+
+@end multitable
+
+Total size is 48 bits, which is six bytes.
+@*
+
+If you're just trying to read the record, the key bit in the Extra
+Bytes is 1byte_offs_flag -- you need to know if 1byte_offs_flag is 1
+(i.e.: "short 1-byteoffsets") or 0 (i.e.: "2-byte offsets").
+@*
+
+Given a pointer to the Origin, InnoDB finds the start of the record as follows:
+@itemize @bullet
+@item
+Let X = n_fields (the number of fields is by definition equal to the
+number of entries in the Field Start Offsets Table).
+@item
+If 1byte_offs_flag equals 0, then let X = X * 2 because there are
+two bytes for each entry instead of just one.
+@item
+Let X = X + 6, because the fixed size of Extra Bytes is 6.
+@item
+The start of the record is at (pointer value minus X).
+@end itemize
+
+@subsection FIELD CONTENTS
+
+The Field Contents part of the record has all the data. Fields are
+stored in the order they were defined in.
+@*
+
+There are no markers between fields, and there is no marker or filler
+at the end of a record.
+@*
+
+Here's an example.
+@itemize @bullet
+@item
+I made a table with this definition:
+@*@*
+
+@strong{CREATE TABLE T
+ (FIELD1 VARCHAR(3), FIELD2 VARCHAR(3), FIELD3 VARCHAR(3))
+ Type=InnoDB;}
+@*@*
+
+To understand what follows, you must know that table T has six columns
+-- not three -- because InnoDB automatically added three "system
+columns" at the start for its own housekeeping. It happens that these
+system columns are the row ID, the transaction ID, and the rollback
+pointer, but their values don't matter now. Regard them as three black
+boxes.
+@*@*
+
+@item
+I put some rows in the table. My last three INSERTs were:
+@*@*
+
+@strong{INSERT INTO T VALUES ('PP', 'PP', 'PP')}
+@*@*
+
+@strong{INSERT INTO T VALUES ('Q', 'Q', 'Q')}
+@*@*
+
+@strong{INSERT INTO T VALUES ('R', NULL, NULL)}
+@*@*
+
+@item
+I ran Borland's TDUMP to get a hexadecimal dump of
+the contents of \mysql\data\ibdata1, which (in my case) is the
+MySQL/InnoDB data file (on Windows).
+@end itemize
+
+Here is an extract of the dump:
+
+@multitable @columnfractions .05 .95
+
+@item @strong{Address Values In Hexadecimal} @tab @strong{Values In ASCII}
+@item @code{0D4280: 00 00 2D 00 84 4F 4F 4F 4F 4F 4F 4F 4F 4F 19 17}
+@tab @code{..-..OOOOOOOOO..}
+@item @code{0D4290: 15 13 0C 06 00 00 78 0D 02 BF 00 00 00 00 04 21}
+@tab @code{......x........!}
+@item @code{0D42A0: 00 00 00 00 09 2A 80 00 00 00 2D 00 84 50 50 50}
+@tab @code{.....*....-..PPP}
+@item @code{0D42B0: 50 50 50 16 15 14 13 0C 06 00 00 80 0D 02 E1 00}
+@tab @code{PPP.............}
+@item @code{0D42C0: 00 00 00 04 22 00 00 00 00 09 2B 80 00 00 00 2D}
+@tab @code{....".....+....-}
+@item @code{0D42D0: 00 84 51 51 51 94 94 14 13 0C 06 00 00 88 0D 00}
+@tab @code{..QQQ...........}
+@item @code{0D42E0: 74 00 00 00 00 04 23 00 00 00 00 09 2C 80 00 00}
+@tab @code{t.....#.....,...}
+@item @code{0D42F0: 00 2D 00 84 52 00 00 00 00 00 00 00 00 00 00 00}
+@tab @code{.-..R...........}
+
+@end multitable
+
+A reformatted version of the dump, showing only the relevant bytes,
+looks like this (I've put a line break after each field and added labels):
+
+@strong{Reformatted Hexadecimal Dump}@*
+@code{
+ 19 17 15 13 0C 06 Field Start Offsets /* First Row */@*
+ 00 00 78 0D 02 BF Extra Bytes@*
+ 00 00 00 00 04 21 System Column #1@*
+ 00 00 00 00 09 2A System Column #2@*
+ 80 00 00 00 2D 00 84 System Column #3@*
+ 50 50 Field1 'PP'@*
+ 50 50 Field2 'PP'@*
+ 50 50 Field3 'PP'}@*
+
+@code{
+ 16 15 14 13 0C 06 Field Start Offsets /* Second Row */@*
+ 00 00 80 0D 02 E1 Extra Bytes@*
+ 00 00 00 00 04 22 System Column #1@*
+ 00 00 00 00 09 2B 80 System Column #2@*
+ 00 00 00 2D 00 84 System Column #3@*
+ 51 Field1 'Q'@*
+ 51 Field2 'Q'@*
+ 51 Field3 'Q'}@*
+
+@code{
+ 94 94 14 13 0C 06 Field Start Offsets /* Third Row */@*
+ 00 00 88 0D 00 74 Extra Bytes@*
+ 00 00 00 00 04 23 System Column #1@*
+ 00 00 00 00 09 2C System Column #2@*
+ 80 00 00 00 2D 00 84 System Column #3@*
+ 52 Field1 'R'}@*
+@*
+
+You won't need explanation if you followed everything I've said, but
+I'll add helpful notes for the three trickiest details.
+@itemize @bullet
+@item
+Helpful Notes About "Field Start Offsets": @*
+Notice that the sizes of the record's fields, in forward order, are:
+6, 6, 7, 2, 2, 2. Since each offset is for the start of the "next"
+field, the hexadecimal offsets are 06, 0c (6+6), 13 (6+6+7), 15
+(6+6+7+2), 17 (6+6+7+2+2), 19 (6+6+7+2+2+2). Reversing the order, the
+Field Start Offsets of the first record are: @code{19,17,15,13,0c,06}.
+@item
+Helpful Notes About "Extra Bytes": @*
+Look at the Extra Bytes of the first record: @code{00 00 78 0D 02 BF}. The
+fourth byte is @code{0D hexadecimal}, which is @code{1101 binary} ... the 110 is the
+last bits of n_fields (@code{110 binary} is 6 which is indeed the number of
+fields in the record) and the final 1 bit is 1byte_offs_flag. The
+fifth and sixth bytes, which contain @code{02 BF}, constitute the "next"
+field. Looking at the original hexadecimal dump, at address
+@code{0D42BF} (which is position @code{02BF} within the page), you'll see the beginning bytes of
+System Column #1 of the second row. In other words, the "next" field
+points to the "Origin" of the following row.
+@item
+Helpful Notes About NULLs:@*
+For the third row, I inserted NULLs in FIELD2 and FIELD3. Therefore in
+the Field Start Offsets the top bit is @code{on} for these fields (the
+values are @code{94 hexadecimal}, @code{94 hexadecimal}, instead of
+@code{14 hexadecimal}, @code{14 hexadecimal}). And the row is
+shorter because the NULLs take no space.
+@end itemize
+
+@section Where to Look For More Information
+
+@strong{References:} @*
+The most relevant InnoDB source-code files are rem0rec.c, rem0rec.ic,
+and rem0rec.h in the rem ("Record Manager") directory.
+
+@node InnoDB Page Structure,Files in MySQL Sources,InnoDB Record Structure,Top
+@chapter InnoDB Page Structure
+
+InnoDB stores all records inside a fixed-size unit which is commonly called a
+"page" (though InnoDB sometimes calls it a "block" instead).
+Currently all pages are the same size, 16KB.
+@*
+
+A page contains records, but it also contains headers and trailers.
+I'll start this description with a high-altitude view of a page's parts,
+then I'll describe each part of a page. Finally, I'll show an example. This
+discussion deals only with the most common format, for the leaf page of a data file.
+@*
+
+@section High-Altitude View
+
+An InnoDB page has seven parts:
+@itemize @bullet
+@item
+Fil Header
+@item
+Page Header
+@item
+Infimum + Supremum Records
+@item
+User Records
+@item
+Free Space
+@item
+Page Directory
+@item
+Fil Trailer
+@end itemize
+
+As you can see, a page has two header/trailer pairs. The inner pair, "Page Header" and
+"Page Directory", are mostly the concern of the \page program group,
+while the outer pair, "Fil Header" and "Fil Trailer", are mostly the
+concern of the \fil program group. The "Fil" header also goes goes by
+the name of "File Page Header".
+@*
+
+Sandwiched between the headers and trailers, are the records and
+the free (unused) space. A page always begins with two unchanging
+records called the Infimum and the Supremum. Then come the user
+records. Between the user records (which grow downwards) and the page
+directory (which grows upwards) there is space for new records.
+@*
+
+@subsection Fil Header
+
+The Fil Header has eight parts, as follows:
+
+@multitable @columnfractions .10 .30 .35
+
+@item @strong{Name} @tab @strong{Size} @tab @strong{Remarks}
+@item FIL_PAGE_SPACE
+@tab 4
+@tab 4 ID of the space the page is in
+@item FIL_PAGE_OFFSET
+@tab 4
+@tab ordinal page number from start of space
+@item FIL_PAGE_PREV
+@tab 4
+@tab offset of previous page in key order
+@item FIL_PAGE_NEXT
+@tab 4
+@tab offset of next page in key order
+@item FIL_PAGE_LSN
+@tab 8
+@tab log serial number of page's latest log record
+@item FIL_PAGE_TYPE
+@tab 2
+@tab current defined types are: FIL_PAGE_INDEX, FIL_PAGE_UNDO_LOG, FIL_PAGE_INODE, FIL_PAGE_IBUF_FREE_LIST
+@item FIL_PAGE_FILE_FLUSH_LSN
+@tab 8
+@tab "the file has been flushed to disk at least up to this lsn" (log serial number),
+ valid only on the first page of the file
+@item FIL_PAGE_ARCH_LOG_NO
+@tab 4
+@tab the latest archived log file number at the time that FIL_PAGE_FILE_FLUSH_LSN was written (in the log)
+@end multitable
+
+@itemize
+@item
+FIL_PAGE_SPACE is a necessary identifier because different pages might belong to
+different (table) spaces within the same file. The word
+"space" is generic jargon for either "log" or "tablespace".
+@*@*
+
+@item
+FIL_PAGE_PREV and FIL_PAGE_NEXT are the page's "backward" and
+"forward" pointers. To show what they're about, I'll draw a two-level
+B-tree.
+@*@*
+
+@example
+ --------
+ - root -
+ --------
+ |
+ ----------------------
+ | |
+ | |
+ -------- --------
+ - leaf - <--> - leaf -
+ -------- --------
+@end example
+@*
+
+Everyone has seen a B-tree and knows that the entries in the root page
+point to the leaf pages. (I indicate those pointers with vertical '|'
+bars in the drawing.) But sometimes people miss the detail that leaf
+pages can also point to each other (I indicate those pointers with a horizontal
+two-way pointer '<-->' in the drawing). This feature allows InnoDB to navigate from
+leaf to leaf without having to back up to the root level. This is a
+sophistication which you won't find in the classic B-tree, which is
+why InnoDB should perhaps be called a B+-tree instead.
+@*@*
+
+@item
+The fields FIL_PAGE_FILE_FLUSH_LSN, FIL_PAGE_PREV, and FIL_PAGE_NEXT
+all have to do with logs, so I'll refer you to my article "How Logs
+Work With MySQL And InnoDB" on devarticles.com.
+@*@*
+
+@item
+FIL_PAGE_FILE_FLUSH_LSN and FIL_PAGE_ARCH_LOG_NO are only valid for
+the first page of a data file.
+@end itemize
+
+@subsection Page Header
+
+The Page Header has 14 parts, as follows:
+@*@*
+
+@multitable @columnfractions .10 .20 .30
+
+@item @strong{Name} @tab @strong{Size} @tab @strong{Remarks}
+@item PAGE_N_DIR_SLOTS
+@tab 2
+@tab number of directory slots in the Page Directory part; initial value = 2
+@item PAGE_HEAP_TOP
+@tab 2
+@tab record pointer to first record in heap
+@item PAGE_N_HEAP
+@tab 2
+@tab number of heap records; initial value = 2
+@item PAGE_FREE
+@tab 2
+@tab record pointer to first free record
+@item PAGE_GARBAGE
+@tab 2
+@tab "number of bytes in deleted records"
+@item PAGE_LAST_INSERT
+@tab 2
+@tab record pointer to the last inserted record
+@item PAGE_DIRECTION
+@tab 2
+@tab either PAGE_LEFT, PAGE_RIGHT, or PAGE_NO_DIRECTION
+@item PAGE_N_DIRECTION
+@tab 2
+@tab number of consecutive inserts in the same direction, e.g. "last 5 were all to the left"
+@item PAGE_N_RECS
+@tab 2
+@tab number of user records
+@item PAGE_MAX_TRX_ID
+@tab 8
+@tab the highest ID of a transaction which might have changed a record on the page (only set for secondary indexes)
+@item PAGE_LEVEL
+@tab 2
+@tab level within the index (0 for a leaf page)
+@item PAGE_INDEX_ID
+@tab 8
+@tab identifier of the index the page belongs to
+@item PAGE_BTR_SEG_LEAF
+@tab 10
+@tab "file segment header for the leaf pages in a B-tree" (this is irrelevant here)
+@item PAGE_BTR_SEG_TOP
+@tab 10
+@tab "file segment header for the non-leaf pages in a B-tree" (this is irrelevant here)
+
+@end multitable
+@*
+
+(Note: I'll clarify what a "heap" is when I discuss the User Records part of the page.)
+@*@*
+
+Some of the Page Header parts require further explanation:
+@itemize @bullet
+@item
+PAGE_FREE: @*
+Records which have been freed (due to deletion or migration) are in a
+one-way linked list. The PAGE_FREE pointer in the page header points
+to the first record in the list. The "next" pointer in the record
+header (specifically, in the record's Extra Bytes) points to the next
+record in the list.
+@item
+PAGE_DIRECTION and PAGE_N_DIRECTION: @*
+It's useful to know whether inserts are coming in a constantly
+ascending sequence. That can affect InnoDB's efficiency.
+@item
+PAGE_HEAP_TOP and PAGE_FREE and PAGE_LAST_INSERT: @*
+Warning: Like all record pointers, these point not to the beginning of the
+record but to its Origin (see the earlier discussion of Record
+Structure).
+@item
+PAGE_BTR_SEG_LEAF and PAGE_BTR_SEG_TOP: @*
+These variables contain information (space ID, page number, and byte offset) about
+index node file segments. InnoDB uses the information for allocating new pages.
+There are two different variables because InnoDB allocates separately for leaf
+pages and upper-level pages.
+@end itemize
+
+@subsection The Infimum And Supremum Records
+
+"Infimum" and "supremum" are real English words but they are found
+only in arcane mathematical treatises, and in InnoDB comments. To
+InnoDB, an infimum is lower than the the lowest possible real value
+(negative infinity) and a supremum is greater than the greatest
+possible real value (positive infinity). InnoDB sets up an infimum
+record and a supremum record automatically at page-create time, and
+never deletes them. They make a useful barrier to navigation so that
+"get-prev" won't pass the beginning and "get-next" won't pass the end.
+Also, the infimum record can be a dummy target for temporary record
+locks.
+@*@*
+
+The InnoDB code comments distinguish between "the infimum and supremum
+records" and the "user records" (all other kinds).
+@*@*
+
+It's sometimes unclear whether InnoDB considers the infimum and
+supremum to be part of the header or not. Their size is fixed and
+their position is fixed, so I guess so.
+
+@subsection User Records
+
+In the User Records part of a page, you'll find all the records that the user
+inserted.
+@*@*
+
+There are two ways to navigate through the user records, depending
+whether you want to think of their organization as an unordered or an
+ordered list.
+@*@*
+
+An unordered list is often called a "heap". If you make a pile of
+stones by saying "whichever one I happen to pick up next will go on
+top" -- rather than organizing them according to size and colour --
+then you end up with a heap. Similarly, InnoDB does not want to insert
+new rows according to the B-tree's key order (that would involve
+expensive shifting of large amounts of data), so it inserts new rows
+right after the end of the existing rows (at the
+top of the Free Space part) or wherever there's space left by a
+deleted row.
+@*@*
+
+But by definition the records of a B-tree must be accessible in order
+by key value, so there is a record pointer in each record (the "next"
+field in the Extra Bytes) which points to the next record in key
+order. In other words, the records are a one-way linked list. So
+InnoDB can access rows in key order when searching.
+
+@subsection Free Space
+
+I think it's clear what the Free Space part of a page is, from the discussion of
+other parts.
+
+@subsection Page Directory
+
+The Page Directory part of a page has a variable number of record pointers.
+Sometimes the record pointers are called "slots" or "directory slots".
+Unlike other DBMSs, InnoDB does not have a slot for every record in
+the page. Instead it keeps a sparse directory. In a fullish page,
+there will be one slot for every six records.
+@*@*
+
+The slots track the records' logical order (the order by key rather
+than the order by placement on the heap). Therefore, if the records
+are @code{'A' 'B' 'F' 'D'} the slots will be @code{(pointer to 'A') (pointer to
+'B') (pointer to 'D') (pointer to 'F')}. Because the slots are in key
+order, and each slot has a fixed size, it's easy to do a binary
+search of the records on the page via the slots.
+@*@*
+
+(Since the Page Directory does not have a slot for every record,
+binary search can only give a rough position and then InnoDB must
+follow the "next" record pointers. InnoDB's "sparse slots" policy also
+accounts for the n_owned field in the Extra Bytes part of a record:
+n_owned indicates how many more records must be gone through because
+they don't have their own slots.)
+
+@subsection Fil Trailer
+
+The Fil Trailer has one part, as follows:
+@*@*
+
+@multitable @columnfractions .10 .35 .40
+
+@item @strong{Name} @tab @strong{Size} @tab @strong{Remarks}
+@item FIL_PAGE_END_LSN
+@tab 8
+@tab low 4 bytes = checksum of page, last 4 bytes = same as FIL_PAGE_LSN
+@end multitable
+@*
+
+The final part of a page, the fil trailer (or File Page Trailer),
+exists because InnoDB's architect worried about integrity. It's
+impossible for a page to be only half-written, or corrupted by
+crashes, because the log-recovery mechanism restores to a consistent
+state. But if something goes really wrong, then it's nice to have a
+checksum, and to have a value at the very end of the page which must
+be the same as a value at the very beginning of the page.
+
+@section Example
+
+For this example, I used Borland's TDUMP again, as I did for the earlier chapter on
+Record Format. This is what a page looked like:
+@*@*
+
+@multitable @columnfractions .05 .95
+
+@item @strong{Address Values In Hexadecimal} @tab @strong{Values In ASCII}
+@item @code{0D4000: 00 00 00 00 00 00 00 35 FF FF FF FF FF FF FF FF}
+@tab @code{.......5........}
+@item @code{0D4010: 00 00 00 00 00 00 E2 64 45 BF 00 00 00 00 00 00}
+@tab @code{.......dE.......}
+@item @code{0D4020: 00 00 00 00 00 00 00 05 02 F5 00 12 00 00 00 00}
+@tab @code{................}
+@item @code{0D4030: 02 E1 00 02 00 0F 00 10 00 00 00 00 00 00 00 00}
+@tab @code{................}
+@item @code{0D4040: 00 00 00 00 00 00 00 00 00 14 00 00 00 00 00 00}
+@tab @code{................}
+@item @code{0D4050: 00 02 16 B2 00 00 00 00 00 00 00 02 15 F2 08 01}
+@tab @code{................}
+@item @code{0D4060: 00 00 03 00 89 69 6E 66 69 6D 75 6D 00 09 05 00}
+@tab @code{.....infimum....}
+@item @code{0D4070: 08 03 00 00 73 75 70 72 65 6D 75 6D 00 22 1D 18}
+@tab @code{....supremum."..}
+@item @code{0D4080: 13 0C 06 00 00 10 0D 00 B7 00 00 00 00 04 14 00}
+@tab @code{................}
+@item @code{0D4090: 00 00 00 09 1D 80 00 00 00 2D 00 84 41 41 41 41}
+@tab @code{.........-..AAAA}
+@item @code{0D40A0: 41 41 41 41 41 41 41 41 41 41 41 1F 1B 17 13 0C}
+@tab @code{AAAAAAAAAAA.....}
+@item @code{ ... }
+@item @code{ ... }
+@item @code{0D7FE0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 74}
+@tab @code{...............t}
+@item @code{0D7FF0: 02 47 01 AA 01 0A 00 65 3A E0 AA 71 00 00 E2 64}
+@tab @code{.G.....e:..q...d}
+@end multitable
+@*@*
+
+Let's skip past the first 38 bytes, which are Fil Header. The bytes
+of the Page Header start at location @code{0d4026 hexadecimal}:
+@*@*
+
+@multitable @columnfractions .10 .45 .60
+
+@item @strong{Location} @tab @strong{Name} @tab @strong{Description}
+@item @code{00 05}
+@tab PAGE_N_DIR_SLOTS
+@tab There are 5 directory slots.
+@item @code{02 F5}
+@tab PAGE_HEAP_TOP
+@tab At location @code{0402F5}, not shown, is the beginning of free space.
+Maybe a better name would have been PAGE_HEAP_END
+@item @code{00 12}
+@tab PAGE_N_HEAP
+@tab There are 18 (hexadecimal 12) records in the page.
+@item @code{00 00}
+@tab PAGE_FREE
+@tab There are zero free (deleted) records.
+@item @code{00 00}
+@tab PAGE_GARBAGE
+@tab There are zero bytes in deleted records.
+@item @code{02 E1}
+@tab PAGE_LAST_INSERT
+@tab The last record was inserted at location @code{02E1}, not shown, within the page.
+@item @code{00 02}
+@tab PAGE_DIRECTION
+@tab A glance at page0page.h will tell you that 2 is the #defined value for PAGE_RIGHT.
+@item @code{00 0F}
+@tab PAGE_N_DIRECTION
+@tab The last 15 (hexadecimal 0F) inserts were all done "to the right"
+because I was inserting in ascending order.
+@item @code{00 10}
+@tab PAGE_N_RECS
+@tab There are 16 (hexadecimal 10) user records. Notice that PAGE_N_RECS is
+smaller than the earlier field, PAGE_N_HEAP.
+@item @code{00 00 00 00 00 00 00}
+@tab PAGE_MAX_TRX_ID
+@item @code{00 00}
+@tab PAGE_LEVEL
+@tab Zero because this is a leaf page.
+@item @code{00 00 00 00 00 00 00 14}
+@tab PAGE_INDEX_ID
+@tab This is index number 20.
+@item @code{00 00 00 00 00 00 00 02 16 B2}
+@tab PAGE_BTR_SEG_LEAF
+@item @code{00 00 00 00 00 00 00 02 15 F2}
+@tab PAGE_BTR_SEG_TOP
+@end multitable
+@*
+
+Immediately after the page header are the infimum and supremum
+records. Looking at the "Values In ASCII" column in the hexadecimal
+dump, you will see that the contents are in fact the words "infimum"
+and "supremum" respectively.
+@*@*
+
+Skipping past the User Records and the Free Space, many bytes later,
+is the end of the 16KB page. The values shown there are the two trailers.
+@itemize @bullet
+@item
+The first trailer (@code{00 74, 02 47, 01 AA, 01 0A, 00 65}) is the page
+directory. It has 5 entries, because the header field PAGE_N_DIR_SLOTS
+says there are 5.
+@item
+The next trailer (@code{3A E0 AA 71, 00 00 E2 64}) is the fil trailer. Notice
+that the last four bytes, @code{00 00 E2 64}, appeared before in the fil
+header.
+@end itemize
+
+@section Where to Look For More Information
+
+@strong{References:} @*
+The most relevant InnoDB source-code files are page0page.c,
+page0page.ic, and page0page.h in \page directory.
+
+@node Files in MySQL Sources,Files in InnoDB Sources,InnoDB Page Structure,Top
+@chapter Annotated List Of Files in the MySQL Source Code Distribution
+
+This is a description of the files that you get when you download the
+source code of MySQL. This description begins with a list
+of the 43 directories and a short comment about each one. Then, for
+each directory, in alphabetical order, a longer description is
+supplied. When a directory contains significant program files, a list of each C
+program is given along with an explanation of its intended function.
+
+@section Directory Listing
+
+@strong{Directory -- Short Comment}
+@itemize @bullet
+@item
+bdb -- The Berkeley Database table handler
+@item
+BitKeeper -- BitKeeper administration
+@item
+BUILD -- Build switches
+@item
+Build-tools -- Build tools
+@item
+client -- Client library
+@item
+cmd-line-utils -- Command-line utilities
+@item
+dbug -- Fred Fish's dbug library
+@item
+div -- Deadlock test
+@item
+Docs -- Preliminary documents about internals and new modules
+@item
+extra -- Eight minor standalone utility programs
+@item
+fs -- File System
+@item
+heap -- The HEAP table handler
+@item
+Images -- Empty directory
+@item
+include -- Include (*.h) files
+@item
+innobase -- The Innobase (InnoDB) table handler
+@item
+isam -- The ISAM (MySQL) table handler
+@item
+libmysql -- For producing MySQL as a library (e.g. a Windows DLL)
+@item
+libmysql_r -- Only one file, a makefile
+@item
+libmysqld -- The MySQL Library
+@item
+man -- Manual pages
+@item
+merge -- The MERGE table handler (see Reference Manual section 7.2)
+@item
+myisam -- The MyISAM table handler
+@item
+myisammrg -- The MyISAM Merge table handler
+@item
+mysql-test -- A test suite for mysqld
+@item
+mysys -- MySQL system library (Low level routines for file access
+etc.)
+@item
+netware -- Files related to the Novell NetWare version of MySQL
+@item
+NEW-RPMS -- New "RPM Package Manager" files
+@item
+os2 -- Routines for working with the OS/2 operating system
+@item
+pstack -- Process stack display
+@item
+regex -- Regular Expression library for support of REGEXP function
+@item
+repl-tests -- Test cases for replication
+@item
+SCCS -- Source Code Control System
+@item
+scripts -- SQL batches, e.g. for converting msql to MySQL
+@item
+sql -- Programs for handling SQL commands. The "core" of MySQL
+@item
+sql-bench -- The MySQL benchmarks
+@item
+SSL -- Secure Sockets Layer
+@item
+strings -- Library for C string routines, e.g. atof, strchr
+@item
+support-files -- 15 files used for building, containing switches?
+@item
+tests -- Tests in Perl
+@item
+tools -- mysqlmanager.c
+@item
+VC++Files -- Includes this entire directory, repeated for VC++
+(Windows) use
+@item
+vio -- Virtual I/O Library
+@item
+zlib -- data compression library
+@end itemize
+
+@subsection bdb
+
+The Berkeley Database table handler.
+@*@*
+
+The Berkeley Database (BDB) is maintained by Sleepycat Software.
+@*@*
+
+The documentation for BDB is available at
+http://www.sleepycat.com/docs/. Since it's reasonably thorough
+documentation, a description of the BDB program files is not included
+in this document.
+@*@*
+
+@subsection BitKeeper
+
+BitKeeper administration.
+@*@*
+
+This directory may be present if you downloaded the MySQL source using
+BitKeeper rather than via the mysql.com site. The files in the
+BitKeeper directory are for maintenance purposes only -- they are not
+part of the MySQL package.
+@*@*
+
+@subsection BUILD
+
+Build switches.
+@*@*
+
+This directory contains the build switches for compilation on various
+platforms. There is a subdirectory for each set of options. The main
+ones are:
+@itemize @bullet
+@item
+alpha
+@item
+ia64
+@item
+pentium (with and without debug or bdb, etc.)
+@item
+solaris
+@end itemize
+@*@*
+
+@subsection Build-tools
+
+Build tools.
+@*@*
+
+This directory contains batch files for extracting, making
+directories, and making programs from source files. There are several
+subdirectories -- for building Linux executables, for compiling, for
+performing all build steps, etc.
+@*@*
+
+@subsection client
+
+Client library.
+@*@*
+
+The client library includes mysql.cc (the source of the 'mysql'
+executable) and other utilities. Most of the utilities are mentioned
+in the MySQL Reference Manual. Generally these are standalone C
+programs which one runs in "client mode", that is, they call the
+server.
+@*@*
+
+The C program files in the directory are:
+@itemize @bullet
+@item
+connect_test.c -- test that a connect is possible
+@item
+get_password.c -- ask for a password from the console
+@item
+insert_test.c -- test that an insert is possible
+@item
+list_test.c -- test that a select is possible
+@item
+mysql.cc -- "The MySQL command tool"
+@item
+mysqladmin.c -- maintenance of MYSQL databases
+@item
+mysqlcheck.c -- check all databases, check connect, etc.
+@item
+mysqldump.c -- dump table's contents in ascii
+@item
+mysqlimport.c -- import file into a table
+@item
+mysqlmanager-pwgen.c -- pwgen seems to stand for "password
+generation"
+@item
+mysqlmanagerc.c -- entry point for mysql manager
+@item
+mysqlshow.c -- show databases, tables or columns
+@item
+mysqltest.c -- test program
+@item
+password.c -- password checking routines
+@item
+select_test.c -- test that a select is possible
+@item
+showdb_test.c -- test that a show-databases is possible
+@item
+ssl_test.c -- test that SSL is possible
+@item
+thread_test.c -- test that threading is possible
+@end itemize
+@*@*
+
+@subsection cmd-line-utils
+
+Command-line utilities.
+@*@*
+
+There are two subdirectories: \readline and \libedit. All the files
+here are "non-MYSQL" files, in the sense that MySQL AB didn't produce
+them, it just uses them. It should be unnecessary to study the
+programs in these files unless
+you are writing or debugging a tty-like client for MySQL, such as
+mysql.exe.
+@*@*
+
+The \readline subdirectory contains the files of the GNU Readline
+Library, "a library for reading lines of text with interactive input
+and history editing". The programs are copyrighted by the Free
+Software Foundation.
+@*@*
+
+The \libedit (library of edit functions) subdirectory has files
+written by Christos Zoulas. They are for editing the line contents.
+These are the program files in the \libedit subdirectory:
+@itemize @bullet
+@item
+chared.c -- character editor
+@item
+common.c -- common editor functions
+@item
+el.c -- editline interface functions
+@item
+emacs.c -- emacs functions
+@item
+fgetln.c -- get line
+@item
+hist.c -- history access functions
+@item
+history.c -- more history access functions
+@item
+key.c -- procedures for maintaining the extended-key map
+@item
+map.c -- editor function definitions
+@item
+parse.c -- parse an editline extended command
+@item
+prompt.c -- prompt printing functions
+@item
+read.c -- terminal read functions
+@item
+readline.c -- read line
+@item
+refresh.c -- "lower level screen refreshing functions"
+@item
+search.c -- "history and character search functions"
+@item
+sig.c -- for signal handling
+@item
+strlcpy.c -- string copy
+@item
+term.c -- "editor/termcap-curses interface"
+@item
+tokenizer.c -- Bourne shell line tokenizer
+@item
+tty.c -- for a tty interface
+@item
+vi.c -- commands used when in the vi (editor) mode
+@end itemize
+@*@*
+
+@subsection dbug
+
+Fred Fish's dbug library.
+@*@*
+
+This is not really part of the MySQL package. Rather, it's a set of
+public-domain routines which are useful for debugging MySQL programs.
+@*@*
+
+How it works: One inserts a function call that begins with DBUG_* in
+one of the regular MYSQL programs. For example, in get_password.c, you
+will find this line: @*
+DBUG_ENTER("get_tty_password"); @*
+at the start of a routine, and this line: @*
+DBUG_RETURN(my_strdup(to,MYF(MY_FAE))); @*
+at the end of the routine. These lines don't affect production code.
+Features of the dbug library include profiling and state pushing.
+@*@*
+
+The C programs in this directory are:
+@itemize @bullet
+@item
+dbug.c -- The main module
+@item
+dbug_analyze.c -- Reads a file produced by trace functions
+@item
+example1.c -- A tiny example
+@item
+example2.c -- A tiny example
+@item
+example3.c -- A tiny example
+@item
+factorial.c -- A tiny example
+@item
+main.c -- A tiny example
+@item
+sanity.c -- Declaration of a variable
+@end itemize
+@*@*
+
+@subsection div
+
+Deadlock test.
+@*@*
+
+This file contains only one program, deadlock_test.c.
+@*@*
+
+@subsection Docs
+
+Preliminary documents about internals and new modules.
+@*@*
+
+This directory doesn't have much at present that's very useful to the
+student, but the plan is that some documentation related to the source
+files and the internal workings of MySQL, including perhaps some
+documentation from developers themselves, will be placed here.
+@*@*
+
+These sub-directories are part of this directory:
+@itemize @bullet
+@item
+books -- .gif images and empty .txt files; no real information
+@item
+flags -- images of flags of countries
+@item
+images -- flag backgrounds and the MySQL dolphin logo
+@item
+mysql-logos -- more MySQL-related logos, some of them moving
+@item
+raw-flags -- more country flags, all .gif files
+@item
+support -- various files for generating texinfo/docbook
+documentation
+@item
+to-be-included... -- an empty subdirectory
+@item
+translations -- some Portuguese myodbc documentation
+@end itemize
+@*@*
+
+In the main directory, you'll find some .txt files related to the
+methods that MySQL uses to produce its printed and html documents, odd
+bits in various languages, and the single file in the directory which
+has any importance -- internals.texi -- The "MySQL Internals"
+document.
+@*@*
+
+Despite the name, internals.texi is not really much of a description
+of MySQL internals. However, there is some useful description of the
+functions in the mysys directory (see below), and of the structure of
+client/server messages (doubtless very useful for people who want to
+make their own JDBC drivers, or just sniff).
+@*@*
+
+@subsection extra
+
+Eight minor standalone utility programs.
+@*@*
+
+These eight programs are all standalone utilities, that is, they have
+a main() function and their main role is to show information that the
+MySQL server needs or produces. Most are unimportant. They are as
+follows:
+@itemize @bullet
+@item
+my_print_defaults.c -- print all parameters in a default file
+@item
+mysql_install.c -- startup: install MySQL server
+@item
+mysql_waitpid.c -- wait for a program to terminate
+@item
+perror.c -- "print error" -- given error number, display message
+@item
+replace.c -- replace strings in text files
+@item
+resolve_stack_dump.c -- show symbolic info from a stack dump
+@item
+resolveip.c -- convert an IP address to a hostname, or vice versa
+@end itemize
+@*@*
+
+@subsection fs
+
+File System.
+@*@*
+
+Here the word "File System" does not refer to the mere idea of a
+directory of files on a disk drive, but to object-based access. The
+concept has been compared with Oracle's Internet File System (iFS).
+@*@*
+
+The original developer of the files on this directory is Tonu Samuel,
+a former MySQL AB employee. Here is a quote (somewhat edited) from
+Tonu Samuel's web page (http://no.spam.ee/~tonu/index.php):
+"Question: What is it?
+Answer: Actually this is not filesystem in common terms. MySQL FS
+makes it possible to make SQL tables and some functions available over
+a filesystem. MySQL does not require disk space, it uses an ordinary
+MySQL daemon to store data."
+The descriptions imply that this is a development project.
+@*@*
+
+There are four program files in the directory:
+@itemize @bullet
+@item
+database.c -- "emulate filesystem behaviour on top of SQL database"
+@item
+libmysqlfs.c -- Search/replace, show-functions, and parse routines
+@item
+mysqlcorbafs.c -- Connection with the CORBA "Object Request Broker"
+@item
+mysqlcorbafs_test.c -- Utility to test the working of mysqlcorbafs.c
+
+@*@*
+
+@subsection heap
+
+The HEAP table handler.
+@*@*
+
+All the MySQL table handlers (i.e. the handlers that MySQL itself
+produces) have files with similar names and functions. Thus, this
+(heap) directory contains a lot of duplication of the myisam directory
+(for the MyISAM table handler). Such duplicates have been marked with
+an "*" in the following list. For example, you will find that
+\heap\hp_extra.c has a close equivalent in the myisam directory
+(\myisam\mi_extra.c) with the same descriptive comment.
+@*@*
+
+@item
+hp_block.c -- Read/write a block (i.e. a page)
+@item
+hp_clear.c -- Remove all records in the database
+@item
+hp_close.c -- * close database
+@item
+hp_create.c -- * create a table
+@item
+hp_delete.c -- * delete a row
+@item
+hp_extra.c -- * for setting options and buffer sizes when optimizing
+@item
+hp_hash.c -- Hash functions used for saving keys
+@item
+hp_info.c -- * Information about database status
+@item
+hp_open.c -- * open database
+@item
+hp_panic.c -- * the hp_panic routine, probably for sudden shutdowns
+@item
+hp_rename.c -- * rename a table
+@item
+hp_rfirst.c -- * read first row through a specific key (very short)
+@item
+hp_rkey.c -- * read record using a key
+@item
+hp_rlast.c -- * read last row with same key as previously-read row
+@item
+hp_rnext.c -- * read next row with same key as previously-read row
+@item
+hp_rprev.c -- * read previous row with same key as previously-read
+row
+@item
+hp_rrnd.c -- * read a row based on position
+@item
+hp_rsame.c -- * find current row using positional read or key-based
+read
+@item
+hp_scan.c -- * read all rows sequentially
+@item
+hp_static.c -- * static variables (very short)
+@item
+hp_test1.c -- * testing basic functions
+@item
+hp_test2.c -- * testing database and storing results
+@item
+hp_update.c -- * update an existing row
+@item
+hp_write.c -- * insert a new row
+@end itemize
+@*@*
+
+There are fewer files in the heap directory than in the myisam
+directory, because fewer are necessary. For example, there is no need
+for a \myisam\mi_cache.c equivalent (to cache reads) or a
+\myisam\log.c equivalent (to log statements).
+@*@*
+
+@subsection Images
+
+Empty directory.
+@*@*
+
+There are no files in this directory.
+@*@*
+
+@subsection include
+
+Include (*.h) files.
+@*@*
+
+These files may be included in C program files. Note that each
+individual directory will also have its own *.h files, for including
+in its own *.c programs. The *.h files in the include directory are
+ones that might be included from more than one place.
+@*@*
+
+For example, the mysys directory contains a C file named rijndael.c,
+but does not include rijndael.h. The include directory contains
+rijndael.h. Looking further, you'll find that rijndael.h is also
+included in other places: by my_aes.c and my_aes.h.
+@*@*
+
+The include directory contains 51 *.h (include) files.
+@*@*
+
+@subsection innobase
+
+The Innobase (InnoDB) table handler.
+@*@*
+
+A full description of these files can be found elsewhere in this
+document.
+@*@*
+
+@subsection isam
+
+The ISAM table handler.
+@*@*
+
+The C files in this directory are:
+@itemize @bullet
+@item
+_cache.c -- for reading records from a cache
+@item
+changed.c -- a single routine for setting a "changed" flag (very
+short)
+@item
+close.c -- close database
+@item
+create.c -- create a table
+@item
+_dbug.c -- support routines for use with "dbug" (see the \dbug
+description)
+@item
+delete.c -- delete a row
+@item
+_dynrec.c -- functions to handle space-packed records and blobs
+@item
+extra.c -- setting options and buffer sizes when optimizing table
+handling
+@item
+info.c -- Information about database status
+@item
+_key.c -- for handling keys
+@item
+_locking.c -- lock database
+@item
+log.c -- save commands in log file which myisamlog program can read
+@item
+_packrec.c -- compress records
+@item
+_page.c -- read and write pages containing keys
+@item
+panic.c -- the mi_panic routine, probably for sudden shutdowns
+@item
+range.c -- approximate count of how many records lie between two
+keys
+@item
+rfirst.c -- read first row through a specific key (very short)
+@item
+rkey.c -- read a record using a key
+@item
+rlast.c -- read last row with same key as previously-read row
+@item
+rnext.c -- read next row with same key as previously-read row
+@item
+rprev.c -- read previous row with same key as previously-read row
+@item
+rrnd.c -- read a row based on position
+@item
+rsame.c -- find current row using positional read or key-based read
+@item
+rsamepos.c -- positional read
+@item
+_search.c -- key-handling functions
+@item
+static.c -- static variables (very short)
+@item
+_statrec.c -- functions to handle fixed-length records
+@item
+test1.c -- testing basic functions
+@item
+test2.c -- testing database and storing results
+@item
+test3.c -- testing locking
+@item
+update.c -- update an existing row
+@item
+write.c -- insert a new row
+@item
+pack_isam.c -- pack isam file (NOTE TO SELF ?? equivalent to
+\myisam\myisampack.c)
+@end itemize
+@*@*
+
+Except for one minor C file (pack_isam.c) every program in the ISAM
+directory has a counterpart in the MyISAM directory. For example
+\isam\update.c corresponds to \myisam\mi_update.c. However, the
+reverse is not true -- there are many files in the MyISAM directory
+which have no counterpart in the ISAM directory.
+@*@*
+
+The reason is simple -- it's because the ISAM files are becoming
+obsolete. When MySQL programmers add new features, they add them for
+MyISAM only. The student can therefore ignore all files in this
+directory and study the MyISAM programs instead.
+@*@*
+
+@subsection libmysql
+
+The MySQL Library, Part 1.
+@*@*
+
+The files here are for producing MySQL as a library (e.g. a Windows
+DLL). The idea is that, instead of producing separate mysql (client)
+and mysqld (server) programs, one produces a library. Instead of
+sending messages, the client part merely calls the server part.
+@*@*
+
+The libmysql files are split into three directories: libmysql (this
+one), libmysql_r (the next one), and libmysqld (the next one after
+that). It may be that the original intention was that the libmysql
+directory would hold the "client part" files, and the libmysqld
+directory would hold the "server part" files.
+@*@*
+
+The program files on this directory are:
+@itemize @bullet
+@item
+conf_to_src.c -- has to do with charsets
+@item
+dll.c -- initialization of the dll library
+@item
+errmsg.c -- English error messages, compare \mysys\errors.c
+@item
+get_password.c -- get password
+@item
+libmysql.c -- the main "packet-sending emulation" program
+@item
+manager.c -- initialize/connect/fetch with MySQL manager
+@end itemize
+@*@*
+
+@subsection libmysql_r
+
+The MySQL Library, Part 2.
+@*@*
+
+This is a continuation of the libmysql directory. There is only one
+file here:
+@itemize @bullet
+@item
+makefile.am
+@end itemize
+@*@*
+
+@subsection libmysqld
+
+The MySQL library, Part 3.
+@*@*
+
+This is a continuation of the libmysql directory. The program files on
+this directory are:
+@itemize @bullet
+@item
+libmysqld.c -- The called side, compare the mysqld.exe source
+@item
+lib_vio.c -- Emulate the vio directory's communication buffer
+@end itemize
+@*@*
+
+@subsection man
+
+Manual pages.
+@*@*
+
+These are not the actual "man" (manual) pages, they are switches for
+the production.
+@*@*
+
+@subsection merge
+
+The MERGE table handler.
+@*@*
+
+For a description of the MERGE table handler, see the MySQL Reference
+Manual, section 7.2.
+@*@*
+
+You'll notice that there seem to be several directories with
+similar-sounding names of C files in them. That's because the MySQL
+table handlers are all quite similar.
+@*@*
+
+The related directories are:
+@itemize @bullet
+@item
+\isam -- for ISAM
+@item
+\myisam -- for MyISAM
+@item
+\merge -- for ISAM MERGE (mostly call functions in \isam programs)
+@item
+\myisammrg -- for MyISAM MERGE (mostly call functions in \myisam
+programs)
+@end itemize
+@*@*
+
+To avoid duplication, only the \myisam program versions are discussed.
+@*@*
+
+The C programs in this (merge) directory are:
+@itemize @bullet
+@item
+mrg_close.c -- compare \isam's close.c
+@item
+mrg_create.c -- "" create.c
+@item
+mrg_delete.c -- "" delete.c
+@item
+mrg_extra.c -- "" extra.c
+@item
+mrg_info.c -- "" info.c
+@item
+mrg_locking.c -- "" locking.c
+@item
+mrg_open.c -- "" open.c
+@item
+mrg_panic.c -- "" panic.c
+@item
+mrg_rrnd.c -- "" rrnd.c
+@item
+mrg_rsame.c -- "" rsame.c
+@item
+mrg_static.c -- "" static.c
+@item
+mrg_update.c -- "" update.c
+@end itemize
+@*@*
+
+@subsection myisam
+
+The MyISAM table handler.
+@*@*
+
+The C files in this subdirectory come in six main groups:
+@itemize @bullet
+@item
+ft*.c files -- ft stands for "Full Text", code contributed by Sergei
+Golubchik
+@item
+mi*.c files -- mi stands for "My Isam", these are the main programs
+for Myisam
+@item
+myisam*.c files -- for example, "myisamchk" utility routine
+functions source
+@item
+rt*.c files -- rt stands for "rtree", some code was written by
+Alexander Barkov
+@item
+sp*.c files -- sp stands for "spatial", some code was written by
+Ramil Kalimullin
+@item
+sort.c -- this is a single file that sorts keys for index-create
+purposes
+@end itemize
+@*@*
+
+The "full text" and "rtree" and "spatial" program sets are for special
+purposes, so this document focuses only on the mi*.c "myisam" C
+programs. They are:
+@itemize @bullet
+@item
+mi_cache.c -- for reading records from a cache
+@item
+mi_changed.c -- a single routine for setting a "changed" flag (very
+short)
+@item
+mi_check.c -- doesn't just do checks, ?? for myisamchk program?
+@item
+mi_checksum.c -- calculates a checksum for a row
+@item
+mi_close.c -- close database
+@item
+mi_create.c -- create a table
+@item
+mi_dbug.c -- support routines for use with "dbug" (see \dbug
+description)
+@item
+mi_delete.c -- delete a row
+@item
+mi_delete_all.c -- delete all rows
+@item
+mi_delete_table.c -- delete a table (very short)
+@item
+mi_dynrec.c -- functions to handle space-packed records and blobs
+@item
+mi_extra.c -- setting options and buffer sizes when optimizing
+@item
+mi_info.c -- "Ger tillbaka en struct med information om isam-filen"
+@item
+mi_key.c -- for handling keys
+@item
+mi_locking.c -- lock database
+@item
+mi_log.c -- save commands in log file which myisamlog program can
+read
+@item
+mi_open.c -- open database
+@item
+mi_packrec.c -- compress records
+@item
+mi_page.c -- read and write pages containing keys
+@item
+mi_panic.c -- the mi_panic routine, probably for sudden shutdowns
+@item
+mi_range.c -- approximate count of how many records lie between two
+keys
+@item
+mi_rename.c -- rename a table
+@item
+mi_rfirst.c -- read first row through a specific key (very short)
+@item
+mi_rkey.c -- read a record using a key
+@item
+mi_rlast.c -- read last row with same key as previously-read row
+@item
+mi_rnext.c -- read next row with same key as previously-read row
+@item
+mi_rnext_same.c -- same as mi_rnext.c, but abort if the key changes
+@item
+mi_rprev.c -- read previous row with same key as previously-read row
+@item
+mi_rrnd.c -- read a row based on position
+@item
+mi_rsame.c -- find current row using positional read or key-based
+read
+@item
+mi_rsamepos.c -- positional read
+@item
+mi_scan.c -- read all rows sequentially
+@item
+mi_search.c -- key-handling functions
+@item
+mi_static.c -- static variables (very short)
+@item
+mi_statrec.c -- functions to handle fixed-length records
+@item
+mi_test1.c -- testing basic functions
+@item
+mi_test2.c -- testing database and storing results
+@item
+mi_test3.c -- testing locking
+@item
+mi_unique.c -- functions to check if a row is unique
+@item
+mi_update.c -- update an existing row
+@item
+mi_write.c -- insert a new row
+@end itemize
+@*@*
+
+@subsection myisammrg
+
+MyISAM Merge table handler.
+@*@*
+
+As with other table handlers, you'll find that the *.c files in the
+myissammrg directory have counterparts in the myisam directory. In
+fact, this general description of a myisammrg program is almost always
+true: The myisammrg
+function checks an argument, the myisammrg function formulates an
+expression for passing to a myisam function, the myisammrg calls a
+myisam function, the myisammrg function returns.
+@*@*
+
+These are the 21 files in the myisammrg directory, with notes about
+the myisam functions or programs they're connected with:
+@itemize @bullet
+@item
+myrg_close.c -- mi_close.c
+@item
+myrg_create.c -- mi_create.c
+@item
+myrg_delete.c -- mi_delete.c / delete last-read record
+@item
+myrg_extra.c -- mi_extra.c / "extra functions we want to do ..."
+@item
+myrg_info.c -- mi_info.c / display information about a mymerge file
+@item
+myrg_locking.c -- mi_locking.c / lock databases
+@item
+myrg_open.c -- mi_open.c / open a MyISAM MERGE table
+@item
+myrg_panic.c -- mi_panic.c / close in a hurry
+@item
+myrg_queue.c -- read record based on a key
+@item
+myrg_range.c -- mi_range.c / find records in a range
+@item
+myrg_rfirst.c -- mi_rfirst.c / read first record according to
+specific key
+@item
+myrg_rkey.c -- mi_rkey.c / read record based on a key
+@item
+myrg_rlast.c -- mi_rlast.c / read last row with same key as previous
+read
+@item
+myrg_rnext.c -- mi_rnext.c / read next row with same key as previous
+read
+@item
+myrg_rnext_same.c -- mi_rnext_same.c / read next row with same key
+@item
+myrg_rprev.c -- mi_rprev.c / read previous row with same key
+@item
+myrg_rrnd.c -- mi_rrnd.c / read record with random access
+@item
+myrg_rsame.c -- mi_rsame.c / call mi_rsame function, see
+\myisam\mi_rsame.c
+@item
+myrg_static.c -- mi_static.c / static variable declaration
+@item
+myrg_update.c -- mi_update.c / call mi_update function, see
+\myisam\mi_update.c
+@item
+myrg_write.c -- mi_write.c / call mi_write function, see
+\myisam\mi_write.c
+@end itemize
+@*@*
+
+@subsection mysql-test
+
+A test suite for mysqld.
+@*@*
+
+The directory has a README file which explains how to run the tests,
+how to make new tests (in files with the filename extension "*.test"),
+and how to report errors.
+@*@*
+
+There are four subdirectories:
+@itemize @bullet
+@item
+\misc -- contains one minor Perl program
+@item
+\r -- contains *.result, i.e. "what happened" files and
+*.required, i.e. "what should happen" file
+@item
+\std_data -- contains standard data for input to tests
+@item
+\t -- contains tests
+@end itemize
+@*@*
+
+There are 186 *.test files in the \t subdirectory. Primarily these are
+SQL scripts which try out a feature, output a result, and compare the
+result with what's required. Some samples of what the test files check
+are: latin1_de comparisons, date additions, the HAVING clause, outer
+joins, openSSL, load data, logging, truncate, and UNION.
+@*@*
+
+There are other tests in these directories:
+@itemize @bullet
+@item
+sql-bench
+@item
+repl-tests
+@item
+tests
+@end itemize
+
+@subsection mysys
+
+MySQL system library (Low level routines for file access etc.).
+@*@*
+
+There are 115 *.c programs in this directory:
+@itemize @bullet
+@item
+array.c -- Dynamic array handling
+@item
+charset.c -- Using dynamic character sets, set default character
+set, ...
+@item
+charset2html.c -- Checking what character set a browser is using
+@item
+checksum.c -- Calculate checksum for a memory block, used for
+pack_isam
+@item
+default.c -- Find defaults from *.cnf or *.ini files
+@item
+errors.c -- English text of global errors
+@item
+hash.c -- Hash search/compare/free functions "for saving keys"
+@item
+list.c -- Double-linked lists
+@item
+make-conf.c -- "Make a charset .conf file out of a ctype-charset.c
+file"
+@item
+md5.c -- MD5 ("Message Digest 5") algorithm from RSA Data Security
+@item
+mf_brkhant.c -- Prevent user from doing a Break during critical
+execution
+@item
+mf_cache.c -- "Open a temporary file and cache it with io_cache"
+@item
+mf_dirname.c -- Parse/convert directory names
+@item
+mf_fn_ext.c -- Get filename extension
+@item
+mf_format.c -- Format a filename
+@item
+mf_getdate.c -- Get date, return in yyyy-mm-dd hh:mm:ss format
+@item
+mf_iocache.c -- Cached read/write of files in fixed-size units
+@item
+mf_iocache2.c -- Continuation of mf_iocache.c
+@item
+mf_keycache.c -- Key block caching for certain file types
+@item
+mf_loadpath.c -- Return full path name (no ..\ stuff)
+@item
+mf_pack.c -- Packing/unpacking directory names for create purposes
+@item
+mf_path.c -- Determine where a program can find its files
+@item
+mf_qsort.c -- Quicksort
+@item
+mf_qsort2.c -- Quicksort, part 2
+@item
+mf_radix.c -- Radix sort
+@item
+mf_same.c -- Determine whether filenames are the same
+@item
+mf_sort.c -- Sort with choice of Quicksort or Radix sort
+@item
+mf_soundex.c -- Soundex algorithm derived from EDN Nov. 14, 1985
+(pg. 36)
+@item
+mf_strip.c -- Strip trail spaces from a string
+@item
+mf_tempdir.c -- Initialize/find/free temporary directory
+@item
+mf_tempfile.c -- Create a temporary file
+@item
+mf_unixpath.c -- Convert filename to UNIX-style filename
+@item
+mf_util.c -- Routines, #ifdef'd, which may be missing on some
+machines
+@item
+mf_wcomp.c -- Comparisons with wildcards
+@item
+mf_wfile.c -- Finding files with wildcards
+@item
+mulalloc.c -- Malloc many pointers at the same time
+@item
+my_aes.c -- AES encryption
+@item
+my_alarm.c -- Set a variable value when an alarm is received
+@item
+my_alloc.c -- malloc of results which will be freed simultaneously
+@item
+my_append.c -- one file to another
+@item
+my_bit.c -- smallest X where 2^X >= value, maybe useful for
+divisions
+@item
+my_bitmap.c -- Handle uchar arrays as large bitmaps
+@item
+my_chsize.c -- Truncate file if shorter, else fill with a filler
+character
+@item
+my_clock.c -- Time-of-day ("clock()") function, with OS-dependent
+#ifdef's
+@item
+my_compress.c -- Compress packet (see also description of \zlib
+directory)
+@item
+my_copy.c -- Copy files
+@item
+my_create.c -- Create file
+@item
+my_delete.c -- Delete file
+@item
+my_div.c -- Get file's name
+@item
+my_dup.c -- Open a duplicated file
+@item
+my_error.c -- Return formatted error to user
+@item
+my_fopen.c -- File open
+@item
+my_fstream.c -- Streaming file read/write
+@item
+my_getwd.c -- Get working directory
+@item
+my_gethostbyname.c -- Thread-safe version of standard net
+gethostbyname() func
+@item
+my_getopt.c -- Find out what options are in effect
+@item
+my_handler.c -- Compare two keys in various possible formats
+@item
+my_init.c -- Initialize variables and functions in the mysys library
+@item
+my_lib.c -- Compare/convert directory names and file names
+@item
+my_lock.c -- Lock part of a file
+@item
+my_lockmem.c -- "Allocate a block of locked memory"
+@item
+my_lread.c -- Read a specified number of bytes from a file into
+memory
+@item
+my_lwrite.c -- Write a specified number of bytes from memory into a
+file
+@item
+my_malloc.c -- Malloc (memory allocate) and dup functions
+@item
+my_messnc.c -- Put out a message on stderr with "no curses"
+@item
+my_mkdir.c -- Make directory
+@item
+my_net.c -- Thread-safe version of net inet_ntoa function
+@item
+my_netware.c -- Functions used only with the Novell Netware version
+of MySQL
+@item
+my_once.c -- Allocation / duplication for "things we don't need to
+free"
+@item
+my_open.c -- Open a file
+@item
+my_os2cond.c -- OS2-specific: "A simple implementation of posix
+conditions"
+@item
+my_os2dirsrch.c -- OS2-specific: Emulate a Win32 directory search
+@item
+my_os2dlfcn.c -- OS2-specific: Emulate UNIX dynamic loading
+@item
+my_os2file64.c -- OS2-specific: For File64bit setting
+@item
+my_os2mutex.c -- OS2-specific: For mutex handling
+@item
+my_os2thread.c -- OS2-specific: For thread handling
+@item
+my_os2tls.c -- OS2-specific: For thread-local storage
+@item
+my_port.c -- AIX-specific: my_ulonglong2double()
+@item
+my_pread.c -- Read a specified number of bytes from a file
+@item
+my_pthread.c -- A wrapper for thread-handling functions in different
+OSs
+@item
+my_quick.c -- Read/write (labelled a "quicker" interface, perhaps
+obsolete)
+@item
+my_read.c -- Read a specified number of bytes from a file, possibly
+retry
+@item
+my_realloc.c -- Reallocate memory allocated with my_alloc.c
+(probably)
+@item
+my_redel.c -- Rename and delete file
+@item
+my_rename.c -- Rename without delete
+@item
+my_seek.c -- Seek, i.e. point to a spot within a file
+@item
+my_semaphore.c -- Semaphore routines, for use on OS that doesn't
+support them
+@item
+my_sleep.c -- Wait n microseconds
+@item
+my_static.c -- Static-variable definitions
+@item
+my_symlink.c -- Read a symbolic link (symlinks are a UNIX thing, I
+guess)
+@item
+my_symlink2.c -- Part 2 of my_symlink.c
+@item
+my_tempnam.c -- Obsolete temporary-filename routine used by ISAM
+table handler
+@item
+my_thr_init.c -- initialize/allocate "all mysys & debug thread
+variables"
+@item
+my_wincond.c -- Windows-specific: emulate Posix conditions
+@item
+my_winsem.c -- Windows-specific: emulate Posix threads
+@item
+my_winthread.c -- Windows-specific: emulate Posix threads
+@item
+my_write.c -- Write a specified number of bytes to a file
+@item
+ptr_cmp.c -- Point to an optimal byte-comparison function
+@item
+queues.c -- Handle priority queues as in Robert Sedgewick's book
+@item
+raid2.c -- RAID support (the true implementation is in raid.cc)
+@item
+rijndael.c -- "Optimised ANSI C code for the Rijndael cipher (now
+AES")
+@item
+safemalloc.c -- A version of the standard malloc() with safety
+checking
+@item
+sha1.c -- Implementation of Secure Hashing Algorithm 1
+@item
+string.c -- Initialize/append/free dynamically-sized strings
+@item
+testhash.c -- Standalone program: test the hash library routines
+@item
+test_charset.c -- Standalone program: display character set
+information
+@item
+test_dir.c -- Standalone program: placeholder for "test all
+functions" idea
+@item
+test_fn.c -- Standalone program: apparently tests a function
+@item
+test_xml.c -- Standalone program: test XML routines
+@item
+thr_alarm.c -- Thread alarms and signal handling
+@item
+thr_lock.c -- "Read and write locks for Posix threads"
+@item
+thr_mutex.c -- A wrapper for mutex functions
+@item
+thr_rwlock.c -- Synchronizes the readers' thread locks with the
+writer's lock
+@item
+tree.c -- Initialize/search/free binary trees
+@item
+typelib.c -- Determine what type a field has
+@end itemize
+@*@*
+
+You can find documentation for the main functions in these files
+elsewhere in this document.
+For example, the main functions in my_getwd.c are described thus:
+@*@*
+
+@example
+"int my_getwd _A((string buf, uint size, myf MyFlags)); @*
+ int my_setwd _A((const char *dir, myf MyFlags)); @*
+ Get and set working directory." @*
+@end example
+
+@subsection netware
+
+Files related to the Novell NetWare version of MySQL.
+@*@*
+
+There are 39 files on this directory. Most have filename extensions of
+*.def, *.sql, or *.c.
+@*@*
+
+The twenty-five *.def files are all from Novell Inc. They contain import or
+export symbols. (".def" is a common filename extension for
+"definition".)
+@*@*
+
+The two *.sql files are short scripts of SQL statements used in
+testing.
+@*@*
+
+These are the five *.c files, all from Novell Inc.:
+@itemize @bullet
+@item
+libmysqlmain.c -- Only one function: init_available_charsets()
+@item
+my_manage.c -- Standalone management utility
+@item
+mysql_install_db.c -- Compare \scripts\mysql_install_db.sh
+@item
+mysql_test_run.c -- Short test program
+@item
+mysqld_safe.c -- Compare \scripts\mysqld_safe.sh
+@end itemize
+
+Perhaps the most important file is:
+@itemize @bullet
+@item
+netware.patch -- NetWare-specific build instructions and switches
+(compare \mysql-4.1\ltmain.sh)
+@end itemize
+@*@*
+
+For instructions about basic installation, see "Deployment Guide For
+NetWare AMP" at:
+@url{http://developer.novell.com/ndk/whitepapers/namp.htm}
+@*
+
+@subsection NEW-RPMS
+
+New "RPM Package Manager" files.
+@*@*
+
+This directory is not part of the Windows distribution. Perhaps in
+MYSQL's Linux distribution it has files for use with Red Hat
+installations -- a point that needs checking someday.
+@*@*
+
+@subsection os2
+
+Routines for working with the OS2 operating system.
+@*@*
+
+The files in this directory are the product of the efforts of three
+people from outside MySQL: Yuri Dario, Timo Maier, and John M
+Alfredsson. There are no .C program files in this directory.
+@*@*
+
+The contents of \os2 are:
+@itemize @bullet
+@item
+A Readme.Txt file
+@item
+An \include subdirectory containing .h files which are for OS/2 only
+@item
+Files used in the build process (configuration, switches, and one
+.obj)
+@end itemize
+@*@*
+
+The README file refers to MySQL version 3.23, which suggests that
+there have been no updates for MySQL 4.0 for this section.
+@*@*
+
+@subsection pstack
+
+Process stack display.
+@*@*
+
+This is a set of publicly-available debugging aids which all do pretty
+well the same thing: display the contents of the stack, along with
+symbolic information, for a running process. There are versions for
+various object file formats (such as ELF and IEEE-695). Most of the
+programs are copyrighted by the Free Software Foundation and are
+marked as "part of GNU Binutils".
+@*@*
+
+In other words, the pstack files are not really part of the MySQL
+library. They are merely useful when you re-program some MYSQL code
+and it crashes.
+@*@*
+
+@subsection regex
+
+Regular Expression library for support of REGEXP function.
+@*@*
+
+This is the copyrighted product of Henry Spencer from the University
+of Toronto. It's a fairly-well-known implementation of the
+requirements of POSIX 1003.2 Section 2.8. The library is bundled with
+Apache and is the default implementation for regular-expression
+handling in BSD Unix. MySQL's Monty Widenius has made minor changes in
+three programs (debug.c, engine.c, regexec.c) but this is not a MySQL
+package. MySQL calls it only in order to support two MySQL functions:
+REGEXP and RLIKE.
+@*@*
+
+Some of Mr Spencer's documentation for the regex library can be found
+in the README and WHATSNEW files.
+@*@*
+
+One MySQL program which uses regex is \cmd-line-utils\libedit\search.c
+@*@*
+
+This program calls the 'regcomp' function, which is the entry point in
+\regex\regexp.c.
+@*@*
+
+@subsection repl-tests
+
+Test cases for replication.
+@*@*
+
+There are six short and trivial-looking tests in these subdirectories:
+@itemize @bullet
+@item
+\test-auto-inc -- Do auto-Increment columns work?
+@item
+\test-bad-query -- Does insert in PK column work?
+@item
+\test-dump -- Do LOAD statements work?
+@item
+\test-repl -- Does replication work?
+@item
+\test-repl-alter -- Does ALTER TABLE work?
+@item
+\test-repl-ts -- Does TIMESTAMP column work?
+@end itemize
+@*@*
+
+@subsection SCCS
+
+Source Code Control System.
+@*@*
+
+You will see this directory if and only if you used BitKeeper for
+downloading the source. The files here are for BitKeeper
+administration and are not of interest to application programmers.
+@*@*
+
+@subsection scripts
+
+SQL batches, e.g. for converting msql to MySQL.
+@*@*
+
+The *.sh filename extension apparently stands for "shell script".
+Linux programmers use it where Windows programmers would use a *.bat
+(batch filename extension).
+@*@*
+
+The *.sh files on this directory are:
+@itemize @bullet
+@item
+fill_help_tables.sh -- Create help-information tables and insert
+@item
+make_binary_distribution.sh -- Get configure information, make,
+produce tar
+@item
+msql2mysql.sh -- Convert mSQL to MySQL
+@item
+mysqlbug.sh -- Create a bug report and mail it
+@item
+mysqld_multi.sh -- Start/stop any number of mysqld instances
+@item
+mysqld_safe-watch.sh -- Start/restart in safe mode
+@item
+mysqld_safe.sh -- Start/restart in safe mode
+@item
+mysqldumpslow.sh -- Parse and summarize the slow query log
+@item
+mysqlhotcopy.sh -- Hot backup
+@item
+mysql_config.sh -- Get configure information that client might need
+@item
+mysql_convert_table_format.sh -- Conversion, e.g. from ISAM to
+MyISAM
+@item
+mysql_explain_log.sh -- Put a log (made with --log) into a MySQL
+table
+@item
+mysql_find_rows.sh -- Search for queries containing <regexp>
+@item
+mysql_fix_extensions.sh -- Renames some file extensions, not
+recommended
+@item
+mysql_fix_privilege_tables.sh -- Fix mysql.user etc. if upgrading to
+MySQL 3.23.14+
+@item
+mysql_install_db.sh -- Create privilege tables and func table
+@item
+mysql_secure_installation.sh -- Disallow remote root login,
+eliminate test, etc.
+@item
+mysql_setpermission.sh -- Aid to add users or databases, sets
+privileges
+@item
+mysql_tableinfo.sh -- Puts info re MySQL tables into a MySQL table
+@item
+mysql_zap.sh -- Kill processes which match pattern
+@end itemize
+@*@*
+
+@subsection sql
+
+Programs for handling SQL commands. The "core" of MySQL.
+@*@*
+
+These are the .c and .cc files in the sql directory:
+@itemize @bullet
+@item
+cache_manager.cc -- manages a number of blocks
+@item
+convert.cc -- convert tables between different character sets
+@item
+derror.cc -- read language-dependent message file
+@item
+des_key_file.cc -- load DES keys from plaintext file
+@item
+field.cc -- "implement classes defined in field.h" (long)
+@item
+field_conv.cc -- functions to copy data to or from fields
+@item
+filesort.cc -- sort file
+@item
+frm_crypt.cc -- contains only one short function: get_crypt_for_frm
+@item
+gen_lex_hash.cc -- Knuth's algorithm from Vol 3 Sorting and
+Searching, Chapter 6.3
+@item
+gstream.cc -- GTextReadStream
+@item
+handler.cc -- handler-calling functions
+@item
+hash_filo.cc -- static-sized hash tables
+@item
+ha_berkeley.cc -- Handler: BDB
+@item
+ha_heap.cc -- Handler: Heap
+@item
+ha_innodb.cc -- Handler: InnoDB
+@item
+ha_isam.cc -- Handler: ISAM
+@item
+ha_isammrg.cc -- Handler: (ISAM MERGE)
+@item
+ha_myisam.cc -- Handler: MyISAM
+@item
+ha_myisammrg.cc -- Handler: (MyISAM MERGE)
+@item
+hostname.cc -- Given IP, return hostname
+@item
+init.cc -- Init and dummy functions for interface with unireg
+@item
+item.cc -- Item functions
+@item
+item_buff.cc -- Buffers to save and compare item values
+@item
+item_cmpfunc.cc -- Definition of all compare functions
+@item
+item_create.cc -- Create an item. Used by lex.h.
+@item
+item_func.cc -- Numerical functions
+@item
+item_row.cc -- Row items for comparing rows and for IN on rows
+@item
+item_sum.cc -- Set functions (sum, avg, etc.)
+@item
+item_strfunc.cc -- String functions
+@item
+item_subselect.cc -- Item subselect
+@item
+item_timefunc.cc -- Date/time functions, e.g. week of year
+@item
+item_uniq.cc -- Empty file, here for compatibility reasons
+@item
+key.cc -- Functions to handle keys and fields in forms
+@item
+lock.cc -- Locks
+@item
+log.cc -- Logs
+@item
+log_event.cc -- Log event
+@item
+matherr.c -- Handling overflow, underflow, etc.
+@item
+mf_iocache.cc -- Caching of (sequential) reads
+@item
+mini_client.cc -- Client included in server for server-server
+messaging
+@item
+mysqld.cc -- Source of mysqld.exe
+@item
+my_lock.c -- Lock part of a file
+@item
+net_serv.cc -- Read/write of packets on a network socket
+@item
+nt_servc.cc -- Initialize/register/remove an NT service
+@item
+opt_ft.cc -- Create a FT or QUICK RANGE based on a key (very short)
+* opt_range.cc -- Range of keys
+@item
+opt_sum.cc -- Optimize functions in presence of (implied) GROUP BY
+@item
+password.c -- Password checking
+@item
+procedure.cc -- Procedure
+@item
+protocol.cc -- Low level functions for storing data to be sent to
+client
+@item
+records.cc -- Functions to read, write, and lock records
+@item
+repl_failsafe.cc -- Replication fail-save
+@item
+set_var.cc -- MySQL variables
+@item
+slave.cc -- Procedures for a slave in a master/slave (replication?)
+relation
+@item
+spatial.cc -- Geometry stuff (lines, points, etc.)
+@item
+sql_acl.cc -- Functions related to ACL security
+@item
+sql_analyse.cc -- Analyse an input string (?)
+@item
+sql_base.cc -- Basic functions needed by many modules
+@item
+sql_cache.cc -- SQL cache, with long comments about how caching
+works
+@item
+sql_class.cc -- SQL class
+@item
+sql_crypt.cc -- Encode / decode, very short
+@item
+sql_db.cc -- Create / drop database
+@item
+sql_delete.cc -- The DELETE statement
+@item
+sql_derived.cc -- Derived tables, with long comments
+@item
+sql_do.cc -- The DO statement
+@item
+sql_error.cc -- Errors and warnings
+@item
+sql_handler.cc -- Direct access to ISAM
+@item
+sql_help.cc -- The HELP statement (if there is one?)
+@item
+sql_insert.cc -- The INSERT statement
+@item
+sql_lex.cc -- Related to lex or yacc
+@item
+sql_list.cc -- Only list_node_end_of_list, short
+@item
+sql_load.cc -- The LOAD DATA statement?
+@item
+sql_map.cc -- Memory-mapped files?
+@item
+sql_manager.cc -- Maintenance tasks, e.g. flushing the buffers
+periodically
+@item
+sql_olap.cc -- ROLLUP
+@item
+sql_parse.cc -- Parse an SQL statement
+@item
+sql_prepare.cc -- Prepare an SQL statement
+@item
+sql_repl.cc -- Replication
+@item
+sql_rename.cc -- Rename table
+@item
+sql_select.cc -- Select and join optimisation
+@item
+sql_show.cc -- The SHOW statement
+@item
+sql_string.cc -- String functions: alloc, realloc, copy, convert,
+etc.
+@item
+sql_table.cc -- The DROP TABLE and ALTER TABLE statements
+@item
+sql_test.cc -- Some debugging information
+@item
+sql_udf.cc -- User-defined functions
+@item
+sql_union.cc -- The UNION operator
+@item
+sql_update.cc -- The UPDATE statement
+@item
+stacktrace.c -- Display stack trace (Linux/Intel only?)
+@item
+table.cc -- Table metadata retrieval, mostly
+@item
+thr_malloc.cc -- Mallocs used in threads
+@item
+time.cc -- Date and time functions
+@item
+udf_example.cc -- Example file of user-defined functions
+@item
+uniques.cc -- Function to handle quick removal of duplicates
+@item
+unireg.cc -- Create a unireg form file from a FIELD and field-info struct
+@end itemize
+@*@*
+
+@subsection sql-bench
+
+The MySQL Benchmarks.
+@*@*
+
+This directory has the programs and input files which MySQL uses for
+its comparisons of MySQL, PostgreSQL, mSQL, Solid, etc. Since MySQL
+publishes the comparative results, it's only right that it should make
+available all the material necessary to reproduce all the tests.
+@*@*
+
+There are five subdirectories and sub-subdirectories:
+@itemize @bullet
+@item
+\Comments -- Comments about results from tests of Access, Adabas,
+etc.
+@item
+\Data\ATIS -- .txt files containing input data for the "ATIS" tests
+@item
+\Data\Wisconsin -- .txt files containing input data for the
+"Wisconsin" tests
+@item
+\Results -- old test results
+@item
+\Results-win32 -- old test results from Windows 32-bit tests
+@end itemize
+@*@*
+
+There are twenty-four *.sh (shell script) files, which involve Perl
+programs.
+@*@*
+
+There are three *.bat (batch) files.
+@*@*
+
+There is one README file and one TODO file.
+@*@*
+
+@subsection SSL
+
+Secure Sockets Layer.
+@*@*
+
+This isn't a code directory. It contains a short note from Tonu Samuel
+(the NOTES file) and seven *.pem files. PEM stands for "Privacy
+Enhanced Mail" and is an Internet standard for adding security to
+electronic mail. Finally, there are two short scripts for running
+clients and servers over SSL connections.
+@*@*
+
+@subsection strings
+
+The string library.
+@*@*
+
+Many of the files in this subdirectory are equivalent to well-known
+functions that appear in most C string libraries. For those, there is
+documentation available in most compiler handbooks.
+@*@*
+
+On the other hand, some of the files are MySQL additions or
+improvements. Often the MySQL changes are attempts to optimize the
+standard libraries. It doesn't seem that anyone tried to optimize for
+recent Pentium class processors, though.
+@*@*
+
+The .C files are:
+@itemize @bullet
+@item
+atof.c -- ascii-to-float, MySQL version
+@item
+bchange.c -- short replacement routine written by Monty Widenius in
+1987
+@item
+bcmp.c -- binary compare, rarely used
+@item
+bcopy-duff.c -- block copy: attempt to copy memory blocks faster
+than cmemcpy
+@item
+bfill.c -- byte fill, to fill a buffer with (length) copies of a
+byte
+@item
+bmove.c -- block move
+@item
+bmove512.c -- "should be the fastest way to move a multiple of 512
+bytes"
+@item
+bmove_upp.c -- bmove.c variant, starting with last byte
+@item
+bzero.c -- something like bfill with an argument of 0
+@item
+conf_to_src.c -- reading a configuration file (NOTE TO SELF ? what's
+this doing here?)
+@item
+ctype*.c -- string handling programs for each char type MySQL
+handles
+@item
+do_ctype.c -- display case-conversion and sort-conversion tables
+@item
+int2str.c -- integer-to-string
+@item
+is_prefix.c -- checks whether string1 starts with string2
+@item
+llstr.c -- convert long long to temporary-buffer string, return
+pointer
+@item
+longlong2str.c -- ditto, but to argument-buffer
+@item
+memcmp.c -- memory compare
+@item
+memset.c -- memory set
+@item
+my_vsnprintf.c -- variant of printf
+@item
+r_strinstr.c -- see if one string is within another
+@item
+str2int.c -- convert string to integer
+@item
+strappend.c -- append one string to another
+@item
+strcat.c -- concatenate strings
+@item
+strcend.c -- point to where a character C occurs within str, or NULL
+@item
+strchr.c -- point to first place in string where character occurs
+@item
+strcmp.c -- compare two strings
+@item
+strcont.c -- point to where any one of a set of characters appears
+@item
+strend.c -- point to the '\0' byte which terminates str
+@item
+strfill.c -- fill a string with n copies of a byte
+@item
+strinstr.c -- find string within string
+@item
+strlen.c -- return length of string in bytes
+@item
+strmake.c -- move n characters, or move till end
+@item
+strmov.c -- move source to dest and return pointer to end
+@item
+strnlen.c -- return length of string, or return n
+@item
+strnmov.c -- move source to dest for source size, or for n bytes
+@item
+strrchr.c -- find a character within string, searching from end
+@item
+strstr.c -- find an instance of pattern within source
+@item
+strto.c -- string to long, to long long, to unsigned long, etc.
+@item
+strtol.c -- string to long
+@item
+strtoll.c -- string to long long
+@item
+strtoul.c -- string to unsigned long
+@item
+strtoull.c -- string to unsigned long long
+@item
+strxmov.c -- move a series of concatenated source strings to dest
+@item
+strxnmov.c -- like strxmov.c but with a maximum length n
+@item
+str_test.c -- test of all the string functions encoded in assembler
+@item
+udiv.c -- unsigned long divide
+@item
+xml.c -- read and parse XML strings
+@end itemize
+@*@*
+
+There are also four .ASM files -- macros.asm, ptr_cmp.asm,
+strings.asm, and strxmov.asm -- which can replace some of the
+C-program functions. But again, they look like optimizations for old
+members of the Intel processor family.
+@*@*
+
+@subsection support-files
+
+Support files.
+@*@*
+
+The files here are for building ("making") MySQL given a package
+manager, compiler, linker, and other build tools. The support files
+provide instructions and switches for the build processes.
+@*@*
+
+@subsection tests
+
+Tests in Perl.
+@*@*
+
+These are tests that were run once to check for bugs in various
+scenarios: forks, locks, big records, exporting, truncating, etc.
+@*@*
+
+@subsection tools
+
+Tools -- well, actually, one tool.
+@*@*
+
+The only file is:
+@itemize @bullet
+@item
+mysqlmanager.c -- A "server management daemon" by Sasha Pachev
+@end itemize
+@*@*
+
+@subsection VC++Files
+
+Visual C++ Files.
+@*@*
+
+Includes this entire directory, repeated for VC++ (Windows) use.
+@*@*
+
+VC++Files has subdirectories which are copies of the main directories.
+For example there is a subdirectory \VC++Files\heap, which has the
+same files as \heap. So for a description of the files in
+\VC++Files\heap, see the description of the files in \heap. The same
+applies for almost all of VC++Files's subdirectories (bdb, client,
+isam, libmysql, etc.). The difference is that the \VC++Files variants
+are specifically for compilation with Microsoft Visual C++ in 32-bit
+Windows environments.
+@*@*
+
+In addition to the "subdirectories which are duplicates of
+directories", VC++Files contains these subdirectories, which are not
+duplicates:
+@itemize @bullet
+@item
+comp_err -- (nearly empty)
+@item
+contrib -- (nearly empty)
+@item
+InstallShield script files
+@item
+isamchk -- (nearly empty)
+@item
+libmysqltest -- one small non-MySQL test program: mytest.c
+@item
+myisamchk -- (nearly empty)
+@item
+myisamlog -- (nearly empty)
+@item
+myisammrg -- (nearly empty)
+@item
+mysqlbinlog -- (nearly empty)
+@item
+mysqlmanager -- MFC foundation class files created by AppWizard
+@item
+mysqlserver -- (nearly empty)
+@item
+mysqlshutdown -- one short program, mysqlshutdown.c
+@item
+mysqlwatch.c -- Windows service initialization and monitoring
+@item
+my_print_defaults -- (nearly empty)
+@item
+pack_isam -- (nearly empty)
+@item
+perror -- (nearly empty)
+@item
+prepare -- (nearly empty)
+@item
+replace -- (nearly empty)
+@item
+SCCS -- source code control system
+@item
+test1 -- tests connecting via X threads
+@item
+thr_insert_test -- (nearly empty)
+@item
+thr_test -- one short program used to test for memory-allocation bug
+@item
+winmysqladmin -- the winmysqladmin.exe source. machine-generated?
+@end itemize
+@*@*
+
+@subsection vio
+
+Virtual I/O Library.
+@*@*
+
+The VIO routines are wrappers for the various network I/O calls that
+happen with different protocols. The idea is that in the main modules
+one won't have to write separate bits of code for each protocol. Thus
+vio's purpose is somewhat like the purpose of Microsoft's winsock
+library.
+@*@*
+
+The underlying protocols at this moment are: TCP/IP, Named Pipes (for
+WindowsNT), Shared Memory, and Secure Sockets (SSL).
+@*@*
+
+The C programs are:
+@itemize @bullet
+@item
+test-ssl.c -- Short standalone test program: SSL
+@item
+test-sslclient.c -- Short standalone test program: clients
+@item
+test-sslserver.c -- Short standalone test program: server
+@item
+vio.c -- Declarations + open/close functions
+@item
+viosocket.c -- Send/retrieve functions
+@item
+viossl.c -- SSL variations for the above
+@item
+viosslfactories.c -- Certification / Verification
+@item
+viotest.cc -- Short standalone test program: general
+@item
+viotest-ssl.c -- Short standalone test program: SSL
+@item
+viotest-sslconnect.cc -- Short standalone test program: SSL connect
+@end itemize
+@*@*
+
+The older functions -- raw_net_read, raw_net_write -- are now
+obsolete.
+@*@*
+
+@subsection zlib
+
+Data compression library.
+@*@*
+
+Zlib -- which presumably stands for "Zip Library" -- is not a MySQL
+package. It was produced by the GNU Zip (gzip.org) people. Zlib is a
+variation of the famous "Lempel-Ziv" method, which is also used by
+"Zip". The method for reducing the size of any arbitrary string of
+bytes is as follows:
+@itemize @bullet
+@item
+Find a substring which occurs twice in the string.
+@item
+Replace the second occurrence of the substring with (a) a pointer to
+the first occurrence, plus (b) an indication of the length of the
+first occurrence.
+@end itemize
+
+There is a full description of the library's functions in the gzip
+manual at: @*
+@url{http://www.gzip.org/zlib/manual.html} @*
+There is therefore no need to list the modules in this document.
+@*@*
+
+The MySQL program that uses zlib is \mysys\my_compress.c. The use is
+for packet compression. The client sends messages to the server which
+are compressed by zlib. See also: \sql\net_serv.cc.
+
+@node Files in InnoDB Sources,,Files in MySQL Sources,Top
+@chapter Annotated List Of Files in the InnoDB Source Code Distribution
+
+ERRATUM BY HEIKKI TUURI (START)
+@*@*
+
+Errata about InnoDB row locks:@*@*
+
+@example
+ #define LOCK_S 4 /* shared */
+ #define LOCK_X 5 /* exclusive */
+...
+@strong{/* Waiting lock flag */}
+ #define LOCK_WAIT 256
+/* this wait bit should be so high that it can be ORed to the lock
+mode and type; when this bit is set, it means that the lock has not
+yet been granted, it is just waiting for its turn in the wait queue */
+...
+@strong{/* Precise modes */}
+ #define LOCK_ORDINARY 0
+/* this flag denotes an ordinary next-key lock in contrast to LOCK_GAP
+or LOCK_REC_NOT_GAP */
+ #define LOCK_GAP 512
+/* this gap bit should be so high that it can be ORed to the other
+flags; when this bit is set, it means that the lock holds only on the
+gap before the record; for instance, an x-lock on the gap does not
+give permission to modify the record on which the bit is set; locks of
+this type are created when records are removed from the index chain of
+records */
+ #define LOCK_REC_NOT_GAP 1024
+/* this bit means that the lock is only on the index record and does
+NOT block inserts to the gap before the index record; this is used in
+the case when we retrieve a record with a unique key, and is also used
+in locking plain SELECTs (not part of UPDATE or DELETE) when the user
+has set the READ COMMITTED isolation level */
+ #define LOCK_INSERT_INTENTION 2048
+/* this bit is set when we place a waiting gap type record lock
+request in order to let an insert of an index record to wait until
+there are no conflicting locks by other transactions on the gap; note
+that this flag remains set when the waiting lock is granted, or if the
+lock is inherited to a neighboring record */
+@end example
+@*
+
+ERRATUM BY HEIKKI TUURI (END)
+@*@*
+
+The InnoDB source files are the best place to look for information
+about internals of the file structure that MySQLites can optionally
+use for transaction support. But when you first look at all the
+subdirectories and file names you'll wonder: Where Do I Start? It can
+be daunting.
+@*@*
+
+Well, I've been through that phase, so I'll pass on what I had to
+learn on the first day that I looked at InnoDB source files. I am very
+sure that this will help you grasp, in overview, the organization of
+InnoDB modules. I'm also going to add comments about what is going on
+-- which you should mistrust! These comments are reasonable working
+hypotheses; nevertheless, they have not been subjected to expert peer
+review.
+@*@*
+
+Here's how I'm going to organize the discussion. I'll take each of the
+32 InnoDB subdirectories that come with the MySQL 4.0 source code in
+\mysql\innobase (on my Windows directory). The format of each section
+will be like this every time:
+@*@*
+
+@strong{\subdirectory-name (LONGER EXPLANATORY NAME)}@*
+@multitable @columnfractions .10 .20 .40 .50
+@item @strong{File Name} @tab @strong{What Name Stands For} @tab @strong{Size} @tab @strong{Comment Inside File}
+@item file-name
+@tab my-own-guess
+@tab in-bytes
+@tab from-the-file-itself
+@end multitable
+...@*
+My-Comments@*
+@*
+
+For example: @*
+@example
+"
+@strong{\ha (HASHING)}
+ File Name What Name Stands For Size Comment Inside File
+ --------- -------------------- ------ -------------------
+ ha0ha.c Hashing/Hashing 7,452 Hash table with external chains
+
+ Comments about hashing will be here.
+"
+@end example
+@*
+
+The "Comment Inside File" column is a direct copy from the first /*
+comment */ line inside the file. All other comments are mine. After
+I've discussed each directory, I'll finish with some notes about
+naming conventions and a short list of URLs that you can use for
+further reference.
+@*@*
+
+Now let's begin.
+@*@*
+
+@example
+
+@strong{\ha (HASHING)}
+ File Name What Name Stands For Size Comment Inside File
+ --------- -------------------- ------ -------------------
+ ha0ha.c Hashing / Hashing 7,452 Hash table with external chains
+
+I'll hold my comments until the next section, \hash (HASHING).
+
+@strong{\hash (HASHING)}
+ File Name What Name Stands For Size Comment Inside File
+ --------- -------------------- ------ -------------------
+ hash0hash.c Hashing / Hashing 3,257 Simple hash table utility
+
+The two C programs in the \ha and \hashing directories -- ha0ha.c and
+hash0hash.c -- both refer to a "hash table" but hash0hash.c is
+specialized, it is mostly about accessing points in the table under
+mutex control.
+
+When a "database" is so small that InnoDB can load it all into memory
+at once, it's more efficient to access it via a hash table. After all,
+no disk i/o can be saved by using an index lookup, if there's no disk.
+
+@strong{\os (OPERATING SYSTEM)}
+ File Name What Name Stands For Size Comment Inside File
+ --------- -------------------- ------ -------------------
+ os0shm.c OS / Shared Memory 3,150 To shared memory primitives
+ os0file.c OS / File 64,412 To i/o primitives
+ os0thread.c OS / Thread 6,827 To thread control primitives
+ os0proc.c OS / Process 3,700 To process control primitives
+ os0sync.c OS / Synchronization 10,208 To synchronization primitives
+
+This is a group of utilities that other modules may call whenever they
+want to use an operating-system resource. For example, in os0file.c
+there is a public InnoDB function named os_file_create_simple(), which
+simply calls the Windows-API function CreateFile. Naturally the
+contents of this group are somewhat different for other operating systems.
+
+The "Shared Memory" functions in os0shm.c are only called from the
+communications program com0shm.c (see \com COMMUNICATIONS). The i/o
+and thread-control primitives are called extensively. The word
+"synchronization" in this context refers to the mutex-create and
+mutex-wait functionality.
+
+@strong{\ut (UTILITIES)}
+ File Name What Name Stands For Size Comment Inside File
+ --------- -------------------- ------ -------------------
+ ut0ut.c Utilities / Utilities 7,041 Various utilities
+ ut0byte.c Utilities / Debug 1,856 Byte utilities
+ ut0rnd.c Utilities / Random 1,475 Random numbers and hashing
+ ut0mem.c Utilities / Memory 5,530 Memory primitives
+ ut0dbg.c Utilities / Debug 642 Debug utilities
+
+The two functions in ut0byte.c are just for lower/upper case
+conversion and comparison. The single function in ut0rnd.c is for
+finding a prime slightly greater than the given argument, which is
+useful for hash functions, but unrelated to randomness. The functions
+in ut0mem.c are wrappers for "malloc" and "free" calls -- for the
+real "memory" module see section \mem (MEMORY). Finally, the
+functions in ut0ut.c are a miscellany that didn't fit better elsewhere:
+get_high_bytes, clock, time, difftime, get_year_month_day, and "sprintf"
+for various diagnostic purposes.
+
+In short: the \ut group is trivial.
+
+@strong{\buf (BUFFERING)}
+ File Name What Name Stands For Size Comment Inside File
+ --------- -------------------- ------ -------------------
+ buf0buf.c Buffering / Buffering 53,246 The database buffer buf_pool
+ buf0flu.c Buffering / Flush 23,711 ... flush algorithm
+ buf0lru.c / least-recently-used 20,245 ... replacement algorithm
+ buf0rea.c Buffering / read 17,399 ... read
+
+There is a separate file group (\mem MEMORY) which handles memory
+requests in general.A "buffer" usually has a more specific
+definition, as a memory area which contains copies of pages that
+ordinarily are in the main data file. The "buffer pool" is the set
+of all buffers (there are lots of them because InnoDB doesn't
+depend on the OS's caching to make things faster).
+
+The pool size is fixed (at the time of this writing) but the rest of
+the buffering architecture is sophisticated, involving a host of
+control structures. In general: when InnoDB needs to access a new page
+it looks first in the buffer pool; InnoDB reads from disk to a new
+buffer when the page isn't there; InnoDB chucks old buffers (basing
+its decision on a conventional Least-Recently-Used algorithm) when it
+has to make space for a new buffer.
+
+There are routines for checking a page's validity, and for read-ahead.
+An example of "read-ahead" use: if a sequential scan is going on, then
+a DBMS can read more than one page at a time, which is efficient
+because reading 32,768 bytes (two pages) takes less than twice as long
+as reading 16,384 bytes (one page).
+
+@strong{\btr (B-TREE)}
+ File Name What Name Stands For Size Comment Inside File
+ --------- -------------------- ------ -------------------
+ btr0btr.c B-tree / B-tree 74,255 B-tree
+ btr0cur.c B-tree / Cursor 94,950 index tree cursor
+ btr0sea.c B-tree / Search 36,580 index tree adaptive search
+ btr0pcur.c B-tree / persistent cursor 14,548 index tree persistent cursor
+
+If you total up the sizes of the C files, you'll see that \btr is the
+second-largest file group in InnoDB. This is understandable because
+maintaining a B-tree is a relatively complex task. Luckily, there has
+been a lot of work done to describe efficient management of B-tree and
+B+-tree structures, much of it open-source or public-domain, since
+their original invention over thirty years ago.
+
+InnoDB likes to put everything in B-trees. This is what I'd call a
+"distinguishing characteristic" because in all the major DBMSs (like
+IBM DB2, Microsoft SQL Server, and Oracle), the main or default or
+classic structure is the heap-and-index. In InnoDB the main structure
+is just the index. To put it another way: InnoDB keeps the rows in the
+leaf node of the index, rather than in a separate file. Compare
+Oracle's Index Organized Tables, and Microsoft SQL Server's Clustered
+Indexes.
+
+This, by the way, has some consequences. For example, you may as well
+have a primary key since otherwise InnoDB will make one anyway. And
+that primary key should be the shortest of the candidate keys, since
+InnoDB
+will use it as a pointer if there are secondary indexes.
+
+Most importantly, it means that rows have no fixed address. Therefore
+the routines for managing file pages should be good. We'll see about
+that when we look at the \row (ROW) program group later.
+
+@strong{\com (COMMUNCATION)}
+ File Name What Name Stands For Size Comment Inside File
+ --------- -------------------- ------ -------------------
+ com0com.c Communication 6,913 Communication primitives
+ com0shm.c Communication / 24,633 ... through shared memory
+ Shared Memory
+
+The communication primitives in com0com.c are said to be modelled
+after the ones in Microsoft's winsock library (the Windows Sockets
+interface). The communication primitives in com0shm.c are at a
+slightly lower level, and are called from the routines in com0com.c.
+
+I was interested in seeing how InnoDB would handle inter-process
+communication, since there are many options -- named pipes, TCP/IP,
+Windows messaging, and Shared Memory being the main ones that come to
+mind. It appears that InnoDB prefers Shared Memory. The main idea is:
+there is an area of memory which two different processes (or threads,
+of course) can both access. To communicate, a thread gets an
+appropriate mutex, puts in a request, and waits for a response. Thread
+interaction is also a subject for the os0thread.c program in another
+program group, \os (OPERATING SYSTEM).
+
+@strong{\dyn (DYNAMICALLY ALLOCATED ARRAY)}
+ File Name What Name Stands For Size Comment Inside File
+ --------- -------------------- ------ -------------------
+ dyn0dyn.c Dynamic / Dynamic 994 dynamically allocated array
+
+There is a single function in the dyn0dyn.c program, for adding a
+block to the dynamically allocated array. InnoDB might use the array
+for managing concurrency between threads.
+
+At the moment, the \dyn program group is trivial.
+
+@strong{\fil (FILE)}
+ File Name What Name Stands For Size Comment Inside File
+ --------- -------------------- ------ -------------------
+ fil0fil.c File / File 39,725 The low-level file system
+
+The reads and writes to the database files happen here, in
+co-ordination with the low-level file i/o routines (see os0file.h in
+the \os program group).
+
+Briefly: a table's contents are in pages, which are in files, which
+are in tablespaces. Files do not grow; instead one can add new files
+to the tablespace. As we saw earlier (discussing the \btr program group)
+the pages are nodes of B-trees. Since that's the case, new additions can
+happen at various places in the logical file structure, not
+necessarily at the end. Reads and writes are asynchronous, and go into
+buffers, which are set up by routines in the \buf program group.
+
+@strong{\fsp (FILE SPACE)}
+ File Name What Name Stands For Size Comment Inside File
+ --------- -------------------- ------ -------------------
+ fsp0fsp.c File Space Management 100,271 File space management
+
+I would have thought that the \fil (FILE) and \fsp (FILE SPACE)
+MANAGEMENT programs would fit together in the same program group;
+however, I guess the InnoDB folk are splitters rather than lumpers.
+
+It's in fsp0fsp.c that one finds some of the descriptions and comments
+of extents, segments, and headers. For example, the "descriptor bitmap
+of the pages in the extent" is in here, and you can find as well how
+the free-page list is maintained, what's in the bitmaps, and what
+various header fields' contents are.
+
+@strong{\fut (FILE UTILITY)}
+ File Name What Name Stands For Size Comment Inside File
+ --------- -------------------- ------ -------------------
+ fut0fut.c File Utility / Utility 293 File-based utilities
+ fut0lst.c File Utility / List 14,129 File-based list utilities
+
+Mainly these small programs affect only file-based lists, so maybe
+saying "File Utility" is too generic. The real work with data files
+goes on in the \fsp program group.
+
+@strong{\log (LOGGING)}
+ File Name What Name Stands For Size Comment Inside File
+ --------- -------------------- ------ -------------------
+ log0log.c Logging / Logging 77,834 Database log
+ log0recv.c Logging / Recovery 80,701 Recovery
+
+I've already written about the \log program group, so here's a link to
+my previous article: "How Logs work with MySQL and InnoDB":
+@url{http://www.devarticles.com/art/1/181/2}
+
+@strong{\mem (MEMORY)}
+ File Name What Name Stands For Size Comment Inside File
+ --------- -------------------- ------ -------------------
+ mem0mem.c Memory / Memory 9,971 The memory management
+ mem0dbg.c Memory / Debug 21,297 ... the debug code
+ mem0pool.c Memory / Pool 16,293 ... the lowest level
+
+There is a long comment at the start of the mem0pool.c program, which
+explains what the memory-consumers are, and how InnoDB tries to
+satisfy them. The main thing to know is that there are really three
+pools: the buffer pool (see the \buf program group), the log pool (see the \log
+program group), and the common pool, which is where everything that's
+not in the buffer or log pools goes (for example the parsed SQL
+statements and the data dictionary cache).
+
+@strong{\mtr (MINI-TRANSACTION)}
+ File Name What Name Stands For Size Comment Inside File
+ --------- -------------------- ------ -------------------
+ mtr0mtr.c Mini-transaction / 12,433 Mini-transaction buffer
+ mtr0log.c Mini-transaction / Log 8,180 ... log routines
+
+The mini-transaction routines are called from most of the other
+program groups. I'd describe this as a low-level utility set.
+
+@strong{\que (QUERY GRAPH)}
+ File Name What Name Stands For Size Comment Inside File
+ --------- -------------------- ------ -------------------
+ que0que.c Query Graph / Query 35,964 Query graph
+
+The program que0que.c ostensibly is about the execution of stored
+procedures which contain commit/rollback statements. I took it that
+this has little importance for the average MySQL user.
+
+@strong{\rem (RECORD MANAGER)}
+ File Name What Name Stands For Size Comment Inside File
+ --------- -------------------- ------ -------------------
+ rem0rec.c Record Manager 14,961 Record Manager
+ rem0cmp.c Record Manager / 25,263 Comparison services for records
+ Comparison
+
+There's an extensive comment near the start of rem0rec.c title
+"Physical Record" and it's recommended reading. At some point you'll
+ask what are all those bits that surround the data in the rows on a page,
+and this is where you'll find the answer.
+
+@strong{\row (ROW)}
+ File Name What Name Stands For Size Comment Inside File
+ --------- -------------------- ------ -------------------
+ row0row.c Row / Row 16,764 General row routines
+ row0uins.c Row / Undo Insert 7,199 Fresh insert undo
+ row0umod.c Row / Undo Modify 17,147 Undo modify of a row
+ row0undo.c Row / Undo 10,254 Row undo
+ row0vers.c Row / Version 12,288 Row versions
+ row0mysql.c Row / MySQL 63,556 Interface [to MySQL]
+ row0ins.c Row / Insert 42,829 Insert into a table
+ row0sel.c Row / Select 85,923 Select
+ row0upd.c Row / Update 44,456 Update of a row
+ row0purge.c Row / Purge 14,961 Purge obsolete records
+
+Rows can be selected, inserted, updated/deleted, or purged (a
+maintenance activity). These actions have ancillary actions, for
+example after insert there can be an index-update test, but it seems
+to me that sometimes the ancillary action has no MySQL equivalent (yet)
+and so is inoperative.
+
+Speaking of MySQL, notice that one of the larger programs in the \row
+program group is the "interface between Innobase row operations and
+MySQL" (row0mysql.c) -- information interchange happens at this level
+because rows in InnoDB and in MySQL are analogous, something which
+can't be said for pages and other levels.
+
+@strong{\srv (Server)}
+ File Name What Name Stands For Size Comment Inside File
+ --------- -------------------- ------ -------------------
+ srv0srv.c Server / Server 79,058 Server main program
+ srv0que.c Server / Query 2,361 Server query execution
+ srv0start.c Server / Start 34,586 Starts the server
+
+This is where the server reads the initial configuration files, splits
+up the threads, and gets going. There is a long comment deep in the
+program (you might miss it at first glance) titled "IMPLEMENTATION OF
+THE SERVER MAIN PROGRAM" in which you'll find explanations about
+thread priority, and about what the responsibiities are for various
+thread types.
+
+InnoDB has many threads, for example "user threads" (which wait for
+client requests and reply to them), "parallel communication threads"
+(which take part of a user thread's job if a query process can be
+split), "utility threads" (background priority), and a "master thread"
+(high priority, usually asleep).
+
+@strong{\thr (Thread Local Storage)}
+ File Name What Name Stands For Size Comment Inside File
+ --------- -------------------- ------ -------------------
+ thr0loc.c Thread / Local 5,261 The thread local storage
+
+InnoDB doesn't use the Windows-API thread-local-storage functions,
+perhaps because they're not portable enough.
+
+@strong{\trx (Transaction)}
+ File Name What Name Stands For Size Comment Inside File
+ --------- -------------------- ------ -------------------
+ trx0trx.c Transaction / 37,447 The transaction
+ trx0purge.c Transaction / Purge 26,782 ... Purge old versions
+ trx0rec.c Transaction / Record 36,525 ... Undo log record
+ trx0sys.c Transaction / System 20,671 ... System
+ trx0rseg.c / Rollback segment 6,214 ... Rollback segment
+ trx0undo.c Transaction / Undo 46,595 ... Undo log
+
+InnoDB's transaction management is supposedly "in the style of Oracle"
+and that's close to true but can mislead you.
+@itemize
+@item
+First: InnoDB uses rollback segments like Oracle8i does -- but
+Oracle9i uses a different name
+@item
+Second: InnoDB uses multi-versioning like Oracle does -- but I see
+nothing that looks like an Oracle ITL being stored in the InnoDB data
+pages.
+@item
+Third: InnoDB and Oracle both have short (back-to-statement-start)
+versioning for the READ COMMITTED isolation level and long
+(back-to-transaction-start) versioning for higher levels -- but InnoDB
+and Oracle have different "default" isolation levels.
+@item
+Finally: InnoDB's documentation says it has to lock "the gaps before
+index keys" to prevent phantoms -- but any Oracle user will tell you that
+phantoms are impossible anyway at the SERIALIZABLE isolation level, so
+key-locks are unnecessary.
+@end itemize
+
+The main idea, though, is that InnoDB has multi-versioning. So does
+Oracle. This is very different from the way that DB2 and SQL Server do
+things.
+
+@strong{\usr (USER)}
+ File Name What Name Stands For Size Comment Inside File
+ --------- -------------------- ------ -------------------
+ usr0sess.c User / Session 27,415 Sessions
+
+One user can have multiple sessions (the session being all the things
+that happen betweeen a connect and disconnect). This is where InnoDB
+tracks session IDs, and server/client messaging. It's another of those
+items which is usually MySQL's job, though.
+
+@strong{\data (DATA)}
+ File Name What Name Stands For Size Comment Inside File
+ --------- -------------------- ------ -------------------
+ data0data.c Data / Data 26,002 SQL data field and tuple
+ data0type.c Data / Type 2,122 Data types
+
+This is a collection of minor utility routines affecting rows.
+
+@strong{\dict (DICTIONARY)}
+ File Name What Name Stands For Size Comment Inside File
+ --------- -------------------- ------ -------------------
+ dict0dict.c Dictionary / Dictionary 84,667 Data dictionary system
+ dict0boot.c Dictionary / boot 12,134 ... creation and booting
+ dict0load.c Dictionary / load 26,546 ... load to memory cache
+ dict0mem.c Dictionary / memory 8,221 ... memory object creation
+
+The data dictionary (known in some circles as the catalog) has the
+metadata information about objects in the database -- column sizes,
+table names, and the like.
+
+@strong{\eval (EVALUATING)}
+ File Name What Name Stands For Size Comment Inside File
+ --------- -------------------- ------ -------------------
+ eval0eval.c Evaluating/Evaluating 15,682 SQL evaluator
+ eval0proc.c Evaluating/Procedures 5,000 Executes SQL procedures
+
+The evaluating step is a late part of the process of interpreting an
+SQL statement -- parsing has already occurred during \pars (PARSING).
+
+The ability to execute SQL stored procedures is an InnoDB feature, but
+not a MySQL feature, so the eval0proc.c program is unimportant.
+
+@strong{\ibuf (INSERT BUFFER)}
+ File Name What Name Stands For Size Comment Inside File
+ --------- -------------------- ------ -------------------
+ ibuf0ibuf.c Insert Buffer / 69,884 Insert buffer
+
+The words "Insert Buffer" mean not "buffer used for INSERT" but
+"insertion of a buffer into the buffer pool" (see the \buf BUFFER
+program group description). The matter is complex due to possibilities
+for deadlocks, a problem to which the comments in the ibuf0ibuf.c
+program devote considerable attention.
+
+@strong{\mach (MACHINE FORMAT)}
+ File Name What Name Stands For Size Comment Inside File
+ --------- -------------------- ------ -------------------
+ mach0data.c Machine/Data 2,319 Utilities for converting
+
+The mach0data.c program has two small routines for reading compressed
+ulints (unsigned long integers).
+
+@strong{\lock (LOCKING)}
+ File Name What Name Stands For Size Comment Inside File
+ --------- -------------------- ------ -------------------
+ lock0lock.c Lock / Lock 127,646 The transaction lock system
+
+If you've used DB2 or SQL Server, you might think that locks have their
+own in-memory table, that row locks might need occasional escalation to
+table locks, and that there are three lock types: Shared, Update, Exclusive.
+
+All those things are untrue with InnoDB! Locks are kept in the database
+pages. A bunch of row locks can't be rolled together into a single table
+lock. And most importantly there's only one lock type. I call this type
+"Update" because it has the characteristics of DB2 / SQL Server Update
+locks, that is, it blocks other updates but doesn't block reads.
+Unfortunately, InnoDB comments refer to them as "x-locks" etc.
+
+To sum it up: if your background is Oracle you won't find too much
+surprising, but if your background is DB2 or SQL Server the locking
+concepts and terminology will probably confuse you at first.
+
+You can find an online article about the differences between
+Oracle-style and DB2/SQL-Server-style locks at:
+@url{http://dbazine.com/gulutzan6.html}
+
+@strong{\odbc (ODBC)}
+ File Name What Name Stands For Size Comment Inside File
+ --------- -------------------- ------ -------------------
+ odbc0odbc.c ODBC / ODBC 16,865 ODBC client library
+
+The odbc0odbc.c program has a small selection of old ODBC-API
+functions: SQLAllocEnv, SQLAllocConnect, SQLAllocStmt, SQLConnect,
+SQLError, SQLPrepare, SQLBindParameter, SQLExecute.
+
+@strong{\page (PAGE)}
+ File Name What Name Stands For Size Comment Inside File
+ --------- -------------------- ------ -------------------
+ page0page.c Page / Page 44,309 Index page routines
+ page0cur.c Page / Cursor 30,305 The page cursor
+
+It's in the page0page.c program that you'll learn as follows: index
+pages start with a header, entries in the page are in order, at the
+end of the page is a sparse "page directory" (what I would have called
+a slot table) which makes binary searches easier.
+
+Incidentally, the program comments refer to "a page size of 8 kB"
+which seems obsolete. In univ.i (a file containing universal
+constants) the page size is now #defined as 16KB.
+
+@strong{\pars (PARSING)}
+ File Name What Name Stands For Size Comment Inside File
+ --------- -------------------- ------ -------------------
+ pars0pars.c Parsing/Parsing 49,947 SQL parser
+ pars0grm.c Parsing/Grammar 62,685 A Bison parser
+ pars0opt.c Parsing/Optimizer 30,809 Simple SQL Optimizer
+ pars0sym.c Parsing/Symbol Table 5,541 SQL parser symbol table
+ lexyy.c ?/Lexer 59,948 Lexical scanner
+
+The job is to input a string containing an SQL statement and output an
+in-memory parse tree. The EVALUATING (subdirectory \eval) programs
+will use the tree.
+
+As is common practice, the Bison and Flex tools were used -- pars0grm.c
+is what the Bison parser produced from an original file named pars0grm.y
+(not supplied), and lexyy.c is what Flex produced.
+
+Since InnoDB is a DBMS by itself, it's natural to find SQL parsing in
+it. But in the MySQL/InnoDB combination, MySQL handles most of the
+parsing. These files are unimportant.
+
+@strong{\read (READ)}
+ File Name What Name Stands For Size Comment Inside File
+ --------- -------------------- ------ -------------------
+ read0read.c Read / Read 6,244 Cursor read
+
+The read0read.c program opens a "read view" of a query result, using
+some functions in the \trx program group.
+
+@strong{\sync (SYNCHRONIZATION)}
+ File Name What Name Stands For Size Comment Inside File
+ --------- -------------------- ------ -------------------
+ sync0sync.c Synchronization / 35,918 Mutex, the basic sync primitive
+ sync0arr.c ... / array 26,461 Wait array used in primitives
+ sync0ipm.c ... / interprocess 4,027 for interprocess sync
+ sync0rw.c ... / read-write 22,220 read-write lock for thread sync
+
+A mutex (Mutual Exclusion) is an object which only one thread/process
+can hold at a time. Any modern operating system API has some functions
+for mutexes; however, as the comments in the sync0sync.c code indicate, it
+can be faster to write one's own low-level mechanism. In fact the old
+assembly-language XCHG trick is in here -- this is the only program
+that contains any assembly code.
+@end example
+@*
+@*
+
+This is the end of the section-by-section account of InnoDB
+subdirectories.
+@*@*
+
+@strong{A Note About File Naming} @*@*
+
+There appears to be a naming convention. The first letters of the file
+name are the same as the subdirectory name, then there is a '0'
+separator, then there is an individual name. For the main program in a
+subdirectory, the individual name may be a repeat of the subdirectory
+name. For example, there is a file named ha0ha.c (the first two
+letters ha mean "it's in in subdirectory ..\ha", the next letter 0
+means "0 separator", the next two letters mean "this is the main ha
+program"). This naming convention is not strict, though: for example
+the file lexyy.c is in the \pars subdirectory.
+@*@*
+
+@strong{A Note About Copyrights} @*@*
+
+Most of the files begin with a copyright notice or a creation date,
+for example "Created 10/25/1995 Heikki Tuuri". I don't know a great
+deal about the history of InnoDB, but found it interesting that most
+creation dates were between 1994 and 1998.
+@*@*
+
+@strong{References} @*@*
+
+Ryan Bannon, Alvin Chin, Faryaaz Kassam and Andrew Roszko @*
+"InnoDB Concrete Architecture" @*
+@url{http://www.swen.uwaterloo.ca/~mrbannon/cs798/assignment_02/innodb.pdf}
+
+A student paper. It's an interesting attempt to figure out InnoDB's
+architecture using tools, but I didn't end up using it for the specific
+purposes of this article.
+@*@*
+
+Peter Gulutzan @*
+"How Logs Work With MySQL And InnoDB" @*
+@url{http://www.devarticles.com/art/1/181/2}
+@*@*
+
+Heikki Tuuri @*
+"InnoDB Engine in MySQL-Max-3.23.54 / MySQL-4.0.9: The Up-to-Date
+Reference Manual of InnoDB" @*
+@url{http://www.innodb.com/ibman.html}
+
+This is the natural starting point for all InnoDB information. Mr
+Tuuri also appears frequently on MySQL forums.
+@*@*
+
@summarycontents
@contents
diff --git a/VC++Files/InstallShield/4.0.XX-classic/4.0.XX-classic.ipr b/VC++Files/InstallShield/4.0.XX-classic/4.0.XX-classic.ipr
new file mode 100755
index 00000000000..ef8404545fb
--- /dev/null
+++ b/VC++Files/InstallShield/4.0.XX-classic/4.0.XX-classic.ipr
@@ -0,0 +1,51 @@
+[Language]
+LanguageSupport0=0009
+
+[OperatingSystem]
+OSSupport=0000000000010010
+
+[Data]
+CurrentMedia=
+CurrentComponentDef=Default.cdf
+ProductName=MySQL Servers and Clients
+set_mifserial=
+DevEnvironment=Microsoft Visual C++ 6
+AppExe=
+set_dlldebug=No
+EmailAddresss=
+Instructions=Instructions.txt
+set_testmode=No
+set_mif=No
+SummaryText=
+Department=
+HomeURL=
+Author=
+Type=Database Application
+InstallRoot=D:\MySQL-Install\4.0.xcom-clas
+Version=1.00.000
+InstallationGUID=40744a4d-efed-4cff-84a9-9e6389550f5c
+set_level=Level 3
+CurrentFileGroupDef=Default.fdf
+Notes=Notes.txt
+set_maxerr=50
+set_args=
+set_miffile=Status.mif
+set_dllcmdline=
+Copyright=
+set_warnaserr=No
+CurrentPlatform=
+Category=
+set_preproc=
+CurrentLanguage=English
+CompanyName=MySQL
+Description=Description.txt
+set_maxwarn=50
+set_crc=Yes
+set_compileb4build=No
+
+[MediaInfo]
+
+[General]
+Type=INSTALLMAIN
+Version=1.10.000
+
diff --git a/VC++Files/InstallShield/4.0.XX-classic/Component Definitions/Default.cdf b/VC++Files/InstallShield/4.0.XX-classic/Component Definitions/Default.cdf
new file mode 100755
index 00000000000..48d37800cd1
--- /dev/null
+++ b/VC++Files/InstallShield/4.0.XX-classic/Component Definitions/Default.cdf
@@ -0,0 +1,192 @@
+[Development]
+required0=Servers
+SELECTED=Yes
+FILENEED=STANDARD
+required1=Grant Tables
+HTTPLOCATION=
+STATUS=Examples, Libraries, Includes and Script files
+UNINSTALLABLE=Yes
+TARGET=<TARGETDIR>
+FTPLOCATION=
+VISIBLE=Yes
+DESCRIPTION=Examples, Libraries, Includes and Script files
+DISPLAYTEXT=Examples, Libraries, Includes and Script files
+IMAGE=
+DEFSELECTION=Yes
+filegroup0=Development
+COMMENT=
+INCLUDEINBUILD=Yes
+INSTALLATION=ALWAYSOVERWRITE
+COMPRESSIFSEPARATE=No
+MISC=
+ENCRYPT=No
+DISK=ANYDISK
+TARGETDIRCDROM=
+PASSWORD=
+TARGETHIDDEN=General Application Destination
+
+[Grant Tables]
+required0=Servers
+SELECTED=Yes
+FILENEED=CRITICAL
+HTTPLOCATION=
+STATUS=The Grant Tables and Core Files
+UNINSTALLABLE=Yes
+TARGET=<TARGETDIR>
+FTPLOCATION=
+VISIBLE=Yes
+DESCRIPTION=The Grant Tables and Core Files
+DISPLAYTEXT=The Grant Tables and Core Files
+IMAGE=
+DEFSELECTION=Yes
+filegroup0=Grant Tables
+requiredby0=Development
+COMMENT=
+INCLUDEINBUILD=Yes
+requiredby1=Clients and Tools
+INSTALLATION=NEVEROVERWRITE
+requiredby2=Documentation
+COMPRESSIFSEPARATE=No
+MISC=
+ENCRYPT=No
+DISK=ANYDISK
+TARGETDIRCDROM=
+PASSWORD=
+TARGETHIDDEN=General Application Destination
+
+[Components]
+component0=Development
+component1=Grant Tables
+component2=Servers
+component3=Clients and Tools
+component4=Documentation
+
+[TopComponents]
+component0=Servers
+component1=Clients and Tools
+component2=Documentation
+component3=Development
+component4=Grant Tables
+
+[SetupType]
+setuptype0=Compact
+setuptype1=Typical
+setuptype2=Custom
+
+[Clients and Tools]
+required0=Servers
+SELECTED=Yes
+FILENEED=HIGHLYRECOMMENDED
+required1=Grant Tables
+HTTPLOCATION=
+STATUS=The MySQL clients and Maintenance Tools
+UNINSTALLABLE=Yes
+TARGET=<TARGETDIR>
+FTPLOCATION=
+VISIBLE=Yes
+DESCRIPTION=The MySQL clients and Maintenance Tools
+DISPLAYTEXT=The MySQL clients and Maintenance Tools
+IMAGE=
+DEFSELECTION=Yes
+filegroup0=Clients and Tools
+COMMENT=
+INCLUDEINBUILD=Yes
+INSTALLATION=NEWERDATE
+COMPRESSIFSEPARATE=No
+MISC=
+ENCRYPT=No
+DISK=ANYDISK
+TARGETDIRCDROM=
+PASSWORD=
+TARGETHIDDEN=General Application Destination
+
+[Servers]
+SELECTED=Yes
+FILENEED=CRITICAL
+HTTPLOCATION=
+STATUS=The MySQL Servers
+UNINSTALLABLE=Yes
+TARGET=<TARGETDIR>
+FTPLOCATION=
+VISIBLE=Yes
+DESCRIPTION=The MySQL Servers
+DISPLAYTEXT=The MySQL Servers
+IMAGE=
+DEFSELECTION=Yes
+filegroup0=Servers
+requiredby0=Development
+COMMENT=
+INCLUDEINBUILD=Yes
+requiredby1=Grant Tables
+INSTALLATION=ALWAYSOVERWRITE
+requiredby2=Clients and Tools
+requiredby3=Documentation
+COMPRESSIFSEPARATE=No
+MISC=
+ENCRYPT=No
+DISK=ANYDISK
+TARGETDIRCDROM=
+PASSWORD=
+TARGETHIDDEN=General Application Destination
+
+[SetupTypeItem-Compact]
+Comment=
+item0=Grant Tables
+item1=Servers
+item2=Clients and Tools
+item3=Documentation
+Descrip=
+DisplayText=
+
+[SetupTypeItem-Custom]
+Comment=
+item0=Development
+item1=Grant Tables
+item2=Servers
+item3=Clients and Tools
+Descrip=
+item4=Documentation
+DisplayText=
+
+[Info]
+Type=CompDef
+Version=1.00.000
+Name=
+
+[SetupTypeItem-Typical]
+Comment=
+item0=Development
+item1=Grant Tables
+item2=Servers
+item3=Clients and Tools
+Descrip=
+item4=Documentation
+DisplayText=
+
+[Documentation]
+required0=Servers
+SELECTED=Yes
+FILENEED=HIGHLYRECOMMENDED
+required1=Grant Tables
+HTTPLOCATION=
+STATUS=The MySQL Documentation with different formats
+UNINSTALLABLE=Yes
+TARGET=<TARGETDIR>
+FTPLOCATION=
+VISIBLE=Yes
+DESCRIPTION=The MySQL Documentation with different formats
+DISPLAYTEXT=The MySQL Documentation with different formats
+IMAGE=
+DEFSELECTION=Yes
+filegroup0=Documentation
+COMMENT=
+INCLUDEINBUILD=Yes
+INSTALLATION=ALWAYSOVERWRITE
+COMPRESSIFSEPARATE=No
+MISC=
+ENCRYPT=No
+DISK=ANYDISK
+TARGETDIRCDROM=
+PASSWORD=
+TARGETHIDDEN=General Application Destination
+
diff --git a/VC++Files/InstallShield/4.0.XX-classic/Component Definitions/Default.fgl b/VC++Files/InstallShield/4.0.XX-classic/Component Definitions/Default.fgl
new file mode 100755
index 00000000000..4e20dcea4ab
--- /dev/null
+++ b/VC++Files/InstallShield/4.0.XX-classic/Component Definitions/Default.fgl
@@ -0,0 +1,42 @@
+[<PROGRAMFILES>\<COMMONFILES>]
+DISPLAYTEXT=Common Files Folder
+TYPE=TEXTSUBFIXED
+fulldirectory=
+
+[<WINDIR>\<WINSYSDIR>]
+DISPLAYTEXT=Windows System Folder
+TYPE=TEXTSUBFIXED
+fulldirectory=
+
+[USERDEFINED]
+DISPLAYTEXT=Script-defined Folders
+TYPE=USERSTART
+fulldirectory=
+
+[<PROGRAMFILES>]
+DISPLAYTEXT=Program Files Folder
+SubDir0=<PROGRAMFILES>\<COMMONFILES>
+TYPE=TEXTSUBFIXED
+fulldirectory=
+
+[<TARGETDIR>]
+DISPLAYTEXT=General Application Destination
+TYPE=TEXTSUBFIXED
+fulldirectory=
+
+[<WINDIR>]
+DISPLAYTEXT=Windows Operating System
+SubDir0=<WINDIR>\<WINSYSDIR>
+TYPE=TEXTSUBFIXED
+fulldirectory=
+
+[TopDir]
+SubDir0=<WINDIR>
+SubDir1=<PROGRAMFILES>
+SubDir2=<TARGETDIR>
+SubDir3=USERDEFINED
+
+[General]
+Type=FILELIST
+Version=1.00.000
+
diff --git a/VC++Files/InstallShield/4.0.XX-classic/File Groups/Clients and Tools.fgl b/VC++Files/InstallShield/4.0.XX-classic/File Groups/Clients and Tools.fgl
new file mode 100755
index 00000000000..7bba3d7474a
--- /dev/null
+++ b/VC++Files/InstallShield/4.0.XX-classic/File Groups/Clients and Tools.fgl
@@ -0,0 +1,31 @@
+[bin]
+file15=C:\mysql\bin\replace.exe
+file16=C:\mysql\bin\winmysqladmin.cnt
+file0=C:\mysql\bin\isamchk.exe
+file17=C:\mysql\bin\WINMYSQLADMIN.HLP
+file1=C:\mysql\bin\myisamchk.exe
+file18=C:\mysql\bin\comp-err.exe
+file2=C:\mysql\bin\myisamlog.exe
+file19=C:\mysql\bin\my_print_defaults.exe
+file3=C:\mysql\bin\myisampack.exe
+file4=C:\mysql\bin\mysql.exe
+file5=C:\mysql\bin\mysqladmin.exe
+file6=C:\mysql\bin\mysqlbinlog.exe
+file7=C:\mysql\bin\mysqlc.exe
+file8=C:\mysql\bin\mysqlcheck.exe
+file9=C:\mysql\bin\mysqldump.exe
+file20=C:\mysql\bin\winmysqladmin.exe
+file10=C:\mysql\bin\mysqlimport.exe
+fulldirectory=
+file11=C:\mysql\bin\mysqlshow.exe
+file12=C:\mysql\bin\mysqlwatch.exe
+file13=C:\mysql\bin\pack_isam.exe
+file14=C:\mysql\bin\perror.exe
+
+[TopDir]
+SubDir0=bin
+
+[General]
+Type=FILELIST
+Version=1.00.000
+
diff --git a/VC++Files/InstallShield/4.0.XX-classic/File Groups/Default.fdf b/VC++Files/InstallShield/4.0.XX-classic/File Groups/Default.fdf
new file mode 100755
index 00000000000..8096a4b74bf
--- /dev/null
+++ b/VC++Files/InstallShield/4.0.XX-classic/File Groups/Default.fdf
@@ -0,0 +1,82 @@
+[FileGroups]
+group0=Development
+group1=Grant Tables
+group2=Servers
+group3=Clients and Tools
+group4=Documentation
+
+[Development]
+SELFREGISTERING=No
+HTTPLOCATION=
+LANGUAGE=
+OPERATINGSYSTEM=
+FTPLOCATION=
+FILETYPE=No
+INFOTYPE=Standard
+COMMENT=
+COMPRESS=Yes
+COMPRESSDLL=
+POTENTIALLY=No
+MISC=
+
+[Grant Tables]
+SELFREGISTERING=No
+HTTPLOCATION=
+LANGUAGE=
+OPERATINGSYSTEM=
+FTPLOCATION=
+FILETYPE=No
+INFOTYPE=Standard
+COMMENT=
+COMPRESS=Yes
+COMPRESSDLL=
+POTENTIALLY=No
+MISC=
+
+[Clients and Tools]
+SELFREGISTERING=No
+HTTPLOCATION=
+LANGUAGE=
+OPERATINGSYSTEM=0000000000000000
+FTPLOCATION=
+FILETYPE=No
+INFOTYPE=Standard
+COMMENT=
+COMPRESS=Yes
+COMPRESSDLL=
+POTENTIALLY=No
+MISC=
+
+[Servers]
+SELFREGISTERING=No
+HTTPLOCATION=
+LANGUAGE=
+OPERATINGSYSTEM=
+FTPLOCATION=
+FILETYPE=No
+INFOTYPE=Standard
+COMMENT=
+COMPRESS=Yes
+COMPRESSDLL=
+POTENTIALLY=No
+MISC=
+
+[Info]
+Type=FileGrp
+Version=1.00.000
+Name=
+
+[Documentation]
+SELFREGISTERING=No
+HTTPLOCATION=
+LANGUAGE=
+OPERATINGSYSTEM=
+FTPLOCATION=
+FILETYPE=No
+INFOTYPE=Standard
+COMMENT=
+COMPRESS=Yes
+COMPRESSDLL=
+POTENTIALLY=No
+MISC=
+
diff --git a/VC++Files/InstallShield/4.0.XX-classic/File Groups/Development.fgl b/VC++Files/InstallShield/4.0.XX-classic/File Groups/Development.fgl
new file mode 100755
index 00000000000..6f9df51965b
--- /dev/null
+++ b/VC++Files/InstallShield/4.0.XX-classic/File Groups/Development.fgl
@@ -0,0 +1,239 @@
+[bench\Data\Wisconsin]
+file0=C:\mysql\bench\Data\Wisconsin\onek.data
+file1=C:\mysql\bench\Data\Wisconsin\tenk.data
+fulldirectory=
+
+[lib\debug]
+file0=C:\mysql\lib\debug\libmySQL.dll
+file1=C:\mysql\lib\debug\libmySQL.lib
+file2=C:\mysql\lib\debug\mysqlclient.lib
+file3=C:\mysql\lib\debug\zlib.lib
+file4=C:\mysql\lib\debug\mysys.lib
+file5=C:\mysql\lib\debug\regex.lib
+file6=C:\mysql\lib\debug\strings.lib
+fulldirectory=
+
+[bench\output]
+fulldirectory=
+
+[examples\libmysqltest]
+file0=C:\mysql\examples\libmysqltest\myTest.c
+file1=C:\mysql\examples\libmysqltest\myTest.dsp
+file2=C:\mysql\examples\libmysqltest\myTest.dsw
+file3=C:\mysql\examples\libmysqltest\myTest.exe
+file4=C:\mysql\examples\libmysqltest\myTest.mak
+file5=C:\mysql\examples\libmysqltest\myTest.ncb
+file6=C:\mysql\examples\libmysqltest\myTest.opt
+file7=C:\mysql\examples\libmysqltest\readme
+fulldirectory=
+
+[include]
+file15=C:\mysql\include\libmysqld.def
+file16=C:\mysql\include\my_alloc.h
+file0=C:\mysql\include\raid.h
+file17=C:\mysql\include\my_getopt.h
+file1=C:\mysql\include\errmsg.h
+file2=C:\mysql\include\Libmysql.def
+file3=C:\mysql\include\m_ctype.h
+file4=C:\mysql\include\m_string.h
+file5=C:\mysql\include\my_list.h
+file6=C:\mysql\include\my_pthread.h
+file7=C:\mysql\include\my_sys.h
+file8=C:\mysql\include\mysql.h
+file9=C:\mysql\include\mysql_com.h
+file10=C:\mysql\include\mysql_version.h
+fulldirectory=
+file11=C:\mysql\include\mysqld_error.h
+file12=C:\mysql\include\dbug.h
+file13=C:\mysql\include\config-win.h
+file14=C:\mysql\include\my_global.h
+
+[examples]
+SubDir0=examples\libmysqltest
+SubDir1=examples\tests
+fulldirectory=
+
+[lib\opt]
+file0=C:\mysql\lib\opt\libmySQL.dll
+file1=C:\mysql\lib\opt\libmySQL.lib
+file2=C:\mysql\lib\opt\mysqlclient.lib
+file3=C:\mysql\lib\opt\zlib.lib
+file4=C:\mysql\lib\opt\mysys.lib
+file5=C:\mysql\lib\opt\regex.lib
+file6=C:\mysql\lib\opt\strings.lib
+fulldirectory=
+
+[bench\Data]
+SubDir0=bench\Data\ATIS
+SubDir1=bench\Data\Wisconsin
+fulldirectory=
+
+[bench\limits]
+file15=C:\mysql\bench\limits\pg.comment
+file16=C:\mysql\bench\limits\solid.cfg
+file0=C:\mysql\bench\limits\access.cfg
+file17=C:\mysql\bench\limits\solid-nt4.cfg
+file1=C:\mysql\bench\limits\access.comment
+file18=C:\mysql\bench\limits\sybase.cfg
+file2=C:\mysql\bench\limits\Adabas.cfg
+file3=C:\mysql\bench\limits\Adabas.comment
+file4=C:\mysql\bench\limits\Db2.cfg
+file5=C:\mysql\bench\limits\empress.cfg
+file6=C:\mysql\bench\limits\empress.comment
+file7=C:\mysql\bench\limits\Informix.cfg
+file8=C:\mysql\bench\limits\Informix.comment
+file9=C:\mysql\bench\limits\msql.cfg
+file10=C:\mysql\bench\limits\ms-sql.cfg
+fulldirectory=
+file11=C:\mysql\bench\limits\Ms-sql65.cfg
+file12=C:\mysql\bench\limits\mysql.cfg
+file13=C:\mysql\bench\limits\oracle.cfg
+file14=C:\mysql\bench\limits\pg.cfg
+
+[TopDir]
+SubDir0=bench
+SubDir1=examples
+SubDir2=include
+SubDir3=lib
+SubDir4=scripts
+
+[bench]
+file15=C:\mysql\bench\test-create
+file16=C:\mysql\bench\test-insert
+file0=C:\mysql\bench\uname.bat
+file17=C:\mysql\bench\test-select
+file1=C:\mysql\bench\compare-results
+file18=C:\mysql\bench\test-wisconsin
+file2=C:\mysql\bench\copy-db
+file19=C:\mysql\bench\bench-init.pl
+file3=C:\mysql\bench\crash-me
+file4=C:\mysql\bench\example.bat
+file5=C:\mysql\bench\print-limit-table
+file6=C:\mysql\bench\pwd.bat
+file7=C:\mysql\bench\Readme
+SubDir0=bench\Data
+file8=C:\mysql\bench\run.bat
+SubDir1=bench\limits
+file9=C:\mysql\bench\run-all-tests
+SubDir2=bench\output
+file10=C:\mysql\bench\server-cfg
+fulldirectory=
+file11=C:\mysql\bench\test-alter-table
+file12=C:\mysql\bench\test-ATIS
+file13=C:\mysql\bench\test-big-tables
+file14=C:\mysql\bench\test-connect
+
+[examples\tests]
+file15=C:\mysql\examples\tests\lock_test.res
+file16=C:\mysql\examples\tests\mail_to_db.pl
+file0=C:\mysql\examples\tests\unique_users.tst
+file17=C:\mysql\examples\tests\table_types.pl
+file1=C:\mysql\examples\tests\auto_increment.tst
+file18=C:\mysql\examples\tests\test_delayed_insert.pl
+file2=C:\mysql\examples\tests\big_record.pl
+file19=C:\mysql\examples\tests\udf_test
+file3=C:\mysql\examples\tests\big_record.res
+file4=C:\mysql\examples\tests\czech-sorting
+file5=C:\mysql\examples\tests\deadlock-script.pl
+file6=C:\mysql\examples\tests\export.pl
+file7=C:\mysql\examples\tests\fork_test.pl
+file8=C:\mysql\examples\tests\fork2_test.pl
+file9=C:\mysql\examples\tests\fork3_test.pl
+file20=C:\mysql\examples\tests\udf_test.res
+file21=C:\mysql\examples\tests\auto_increment.res
+file10=C:\mysql\examples\tests\function.res
+fulldirectory=
+file11=C:\mysql\examples\tests\function.tst
+file12=C:\mysql\examples\tests\grant.pl
+file13=C:\mysql\examples\tests\grant.res
+file14=C:\mysql\examples\tests\lock_test.pl
+
+[bench\Data\ATIS]
+file26=C:\mysql\bench\Data\ATIS\stop1.txt
+file15=C:\mysql\bench\Data\ATIS\flight_class.txt
+file27=C:\mysql\bench\Data\ATIS\time_interval.txt
+file16=C:\mysql\bench\Data\ATIS\flight_day.txt
+file0=C:\mysql\bench\Data\ATIS\transport.txt
+file28=C:\mysql\bench\Data\ATIS\time_zone.txt
+file17=C:\mysql\bench\Data\ATIS\flight_fare.txt
+file1=C:\mysql\bench\Data\ATIS\airline.txt
+file29=C:\mysql\bench\Data\ATIS\aircraft.txt
+file18=C:\mysql\bench\Data\ATIS\food_service.txt
+file2=C:\mysql\bench\Data\ATIS\airport.txt
+file19=C:\mysql\bench\Data\ATIS\ground_service.txt
+file3=C:\mysql\bench\Data\ATIS\airport_service.txt
+file4=C:\mysql\bench\Data\ATIS\city.txt
+file5=C:\mysql\bench\Data\ATIS\class_of_service.txt
+file6=C:\mysql\bench\Data\ATIS\code_description.txt
+file7=C:\mysql\bench\Data\ATIS\compound_class.txt
+file8=C:\mysql\bench\Data\ATIS\connect_leg.txt
+file9=C:\mysql\bench\Data\ATIS\date_day.txt
+file20=C:\mysql\bench\Data\ATIS\month_name.txt
+file21=C:\mysql\bench\Data\ATIS\restrict_carrier.txt
+file10=C:\mysql\bench\Data\ATIS\day_name.txt
+fulldirectory=
+file22=C:\mysql\bench\Data\ATIS\restrict_class.txt
+file11=C:\mysql\bench\Data\ATIS\dual_carrier.txt
+file23=C:\mysql\bench\Data\ATIS\restriction.txt
+file12=C:\mysql\bench\Data\ATIS\fare.txt
+file24=C:\mysql\bench\Data\ATIS\state.txt
+file13=C:\mysql\bench\Data\ATIS\fconnection.txt
+file25=C:\mysql\bench\Data\ATIS\stop.txt
+file14=C:\mysql\bench\Data\ATIS\flight.txt
+
+[General]
+Type=FILELIST
+Version=1.00.000
+
+[scripts]
+file37=C:\mysql\scripts\mysqld_safe-watch.sh
+file26=C:\mysql\scripts\mysql_zap
+file15=C:\mysql\scripts\mysql_fix_privilege_tables
+file38=C:\mysql\scripts\mysqldumpslow
+file27=C:\mysql\scripts\mysql_zap.sh
+file16=C:\mysql\scripts\mysql_fix_privilege_tables.sh
+file0=C:\mysql\scripts\Readme
+file39=C:\mysql\scripts\mysqldumpslow.sh
+file28=C:\mysql\scripts\mysqlaccess
+file17=C:\mysql\scripts\mysql_install_db
+file1=C:\mysql\scripts\make_binary_distribution.sh
+file29=C:\mysql\scripts\mysqlaccess.conf
+file18=C:\mysql\scripts\mysql_install_db.sh
+file2=C:\mysql\scripts\msql2mysql
+file19=C:\mysql\scripts\mysql_secure_installation
+file3=C:\mysql\scripts\msql2mysql.sh
+file4=C:\mysql\scripts\mysql_config
+file5=C:\mysql\scripts\mysql_config.sh
+file6=C:\mysql\scripts\mysql_convert_table_format
+file7=C:\mysql\scripts\mysql_convert_table_format.sh
+file40=C:\mysql\scripts\mysqlhotcopy
+file8=C:\mysql\scripts\mysql_explain_log
+file41=C:\mysql\scripts\mysqlhotcopy.pl
+file30=C:\mysql\scripts\mysqlaccess.sh
+file9=C:\mysql\scripts\mysql_explain_log.sh
+file42=C:\mysql\scripts\mysqlhotcopy.sh
+file31=C:\mysql\scripts\mysqlbug
+file20=C:\mysql\scripts\mysql_secure_installation.sh
+file43=C:\mysql\scripts\make_binary_distribution
+file32=C:\mysql\scripts\mysqlbug.sh
+file21=C:\mysql\scripts\mysql_setpermission
+file10=C:\mysql\scripts\mysql_find_rows
+fulldirectory=
+file33=C:\mysql\scripts\mysqld_multi
+file22=C:\mysql\scripts\mysql_setpermission.pl
+file11=C:\mysql\scripts\mysql_find_rows.pl
+file34=C:\mysql\scripts\mysqld_multi.sh
+file23=C:\mysql\scripts\mysql_setpermission.sh
+file12=C:\mysql\scripts\mysql_find_rows.sh
+file35=C:\mysql\scripts\mysqld_safe
+file24=C:\mysql\scripts\mysql_tableinfo
+file13=C:\mysql\scripts\mysql_fix_extensions
+file36=C:\mysql\scripts\mysqld_safe.sh
+file25=C:\mysql\scripts\mysql_tableinfo.sh
+file14=C:\mysql\scripts\mysql_fix_extensions.sh
+
+[lib]
+SubDir0=lib\debug
+SubDir1=lib\opt
+fulldirectory=
+
diff --git a/VC++Files/InstallShield/4.0.XX-classic/File Groups/Documentation.fgl b/VC++Files/InstallShield/4.0.XX-classic/File Groups/Documentation.fgl
new file mode 100755
index 00000000000..80fe777cf0f
--- /dev/null
+++ b/VC++Files/InstallShield/4.0.XX-classic/File Groups/Documentation.fgl
@@ -0,0 +1,99 @@
+[Docs\Flags]
+file59=C:\mysql\Docs\Flags\romania.gif
+file48=C:\mysql\Docs\Flags\kroatia.eps
+file37=C:\mysql\Docs\Flags\iceland.gif
+file26=C:\mysql\Docs\Flags\france.eps
+file15=C:\mysql\Docs\Flags\china.gif
+file49=C:\mysql\Docs\Flags\kroatia.gif
+file38=C:\mysql\Docs\Flags\ireland.eps
+file27=C:\mysql\Docs\Flags\france.gif
+file16=C:\mysql\Docs\Flags\croatia.eps
+file0=C:\mysql\Docs\Flags\usa.gif
+file39=C:\mysql\Docs\Flags\ireland.gif
+file28=C:\mysql\Docs\Flags\germany.eps
+file17=C:\mysql\Docs\Flags\croatia.gif
+file1=C:\mysql\Docs\Flags\argentina.gif
+file29=C:\mysql\Docs\Flags\germany.gif
+file18=C:\mysql\Docs\Flags\czech-republic.eps
+file2=C:\mysql\Docs\Flags\australia.eps
+file19=C:\mysql\Docs\Flags\czech-republic.gif
+file3=C:\mysql\Docs\Flags\australia.gif
+file80=C:\mysql\Docs\Flags\usa.eps
+file4=C:\mysql\Docs\Flags\austria.eps
+file81=C:\mysql\Docs\Flags\argentina.eps
+file70=C:\mysql\Docs\Flags\spain.eps
+file5=C:\mysql\Docs\Flags\austria.gif
+file71=C:\mysql\Docs\Flags\spain.gif
+file60=C:\mysql\Docs\Flags\russia.eps
+file6=C:\mysql\Docs\Flags\brazil.eps
+file72=C:\mysql\Docs\Flags\sweden.eps
+file61=C:\mysql\Docs\Flags\russia.gif
+file50=C:\mysql\Docs\Flags\latvia.eps
+file7=C:\mysql\Docs\Flags\brazil.gif
+file73=C:\mysql\Docs\Flags\sweden.gif
+file62=C:\mysql\Docs\Flags\singapore.eps
+file51=C:\mysql\Docs\Flags\latvia.gif
+file40=C:\mysql\Docs\Flags\island.eps
+file8=C:\mysql\Docs\Flags\bulgaria.eps
+file74=C:\mysql\Docs\Flags\switzerland.eps
+file63=C:\mysql\Docs\Flags\singapore.gif
+file52=C:\mysql\Docs\Flags\netherlands.eps
+file41=C:\mysql\Docs\Flags\island.gif
+file30=C:\mysql\Docs\Flags\great-britain.eps
+file9=C:\mysql\Docs\Flags\bulgaria.gif
+file75=C:\mysql\Docs\Flags\switzerland.gif
+file64=C:\mysql\Docs\Flags\south-africa.eps
+file53=C:\mysql\Docs\Flags\netherlands.gif
+file42=C:\mysql\Docs\Flags\israel.eps
+file31=C:\mysql\Docs\Flags\great-britain.gif
+file20=C:\mysql\Docs\Flags\denmark.eps
+file76=C:\mysql\Docs\Flags\taiwan.eps
+file65=C:\mysql\Docs\Flags\south-africa.gif
+file54=C:\mysql\Docs\Flags\poland.eps
+file43=C:\mysql\Docs\Flags\israel.gif
+file32=C:\mysql\Docs\Flags\greece.eps
+file21=C:\mysql\Docs\Flags\denmark.gif
+file10=C:\mysql\Docs\Flags\canada.eps
+fulldirectory=
+file77=C:\mysql\Docs\Flags\taiwan.gif
+file66=C:\mysql\Docs\Flags\south-africa1.eps
+file55=C:\mysql\Docs\Flags\poland.gif
+file44=C:\mysql\Docs\Flags\italy.eps
+file33=C:\mysql\Docs\Flags\greece.gif
+file22=C:\mysql\Docs\Flags\estonia.eps
+file11=C:\mysql\Docs\Flags\canada.gif
+file78=C:\mysql\Docs\Flags\ukraine.eps
+file67=C:\mysql\Docs\Flags\south-africa1.gif
+file56=C:\mysql\Docs\Flags\portugal.eps
+file45=C:\mysql\Docs\Flags\italy.gif
+file34=C:\mysql\Docs\Flags\hungary.eps
+file23=C:\mysql\Docs\Flags\estonia.gif
+file12=C:\mysql\Docs\Flags\chile.eps
+file79=C:\mysql\Docs\Flags\ukraine.gif
+file68=C:\mysql\Docs\Flags\south-korea.eps
+file57=C:\mysql\Docs\Flags\portugal.gif
+file46=C:\mysql\Docs\Flags\japan.eps
+file35=C:\mysql\Docs\Flags\hungary.gif
+file24=C:\mysql\Docs\Flags\finland.eps
+file13=C:\mysql\Docs\Flags\chile.gif
+file69=C:\mysql\Docs\Flags\south-korea.gif
+file58=C:\mysql\Docs\Flags\romania.eps
+file47=C:\mysql\Docs\Flags\japan.gif
+file36=C:\mysql\Docs\Flags\iceland.eps
+file25=C:\mysql\Docs\Flags\finland.gif
+file14=C:\mysql\Docs\Flags\china.eps
+
+[Docs]
+file0=C:\mysql\Docs\manual_toc.html
+file1=C:\mysql\Docs\manual.html
+file2=C:\mysql\Docs\manual.txt
+SubDir0=Docs\Flags
+fulldirectory=
+
+[TopDir]
+SubDir0=Docs
+
+[General]
+Type=FILELIST
+Version=1.00.000
+
diff --git a/VC++Files/InstallShield/4.0.XX-classic/File Groups/Grant Tables.fgl b/VC++Files/InstallShield/4.0.XX-classic/File Groups/Grant Tables.fgl
new file mode 100755
index 00000000000..178065a7003
--- /dev/null
+++ b/VC++Files/InstallShield/4.0.XX-classic/File Groups/Grant Tables.fgl
@@ -0,0 +1,36 @@
+[data\test]
+fulldirectory=
+
+[data\mysql]
+file15=C:\mysql\data\mysql\func.frm
+file16=C:\mysql\data\mysql\func.MYD
+file0=C:\mysql\data\mysql\columns_priv.frm
+file17=C:\mysql\data\mysql\func.MYI
+file1=C:\mysql\data\mysql\columns_priv.MYD
+file2=C:\mysql\data\mysql\columns_priv.MYI
+file3=C:\mysql\data\mysql\db.frm
+file4=C:\mysql\data\mysql\db.MYD
+file5=C:\mysql\data\mysql\db.MYI
+file6=C:\mysql\data\mysql\host.frm
+file7=C:\mysql\data\mysql\host.MYD
+file8=C:\mysql\data\mysql\host.MYI
+file9=C:\mysql\data\mysql\tables_priv.frm
+file10=C:\mysql\data\mysql\tables_priv.MYD
+fulldirectory=
+file11=C:\mysql\data\mysql\tables_priv.MYI
+file12=C:\mysql\data\mysql\user.frm
+file13=C:\mysql\data\mysql\user.MYD
+file14=C:\mysql\data\mysql\user.MYI
+
+[TopDir]
+SubDir0=data
+
+[data]
+SubDir0=data\mysql
+SubDir1=data\test
+fulldirectory=
+
+[General]
+Type=FILELIST
+Version=1.00.000
+
diff --git a/VC++Files/InstallShield/4.0.XX-classic/File Groups/Servers.fgl b/VC++Files/InstallShield/4.0.XX-classic/File Groups/Servers.fgl
new file mode 100755
index 00000000000..3f875b574f6
--- /dev/null
+++ b/VC++Files/InstallShield/4.0.XX-classic/File Groups/Servers.fgl
@@ -0,0 +1,226 @@
+[Embedded\Static\release]
+file0=C:\mysql\embedded\Static\release\test_stc.dsp
+file1=C:\mysql\embedded\Static\release\ReadMe.txt
+file2=C:\mysql\embedded\Static\release\StdAfx.cpp
+file3=C:\mysql\embedded\Static\release\StdAfx.h
+file4=C:\mysql\embedded\Static\release\test_stc.cpp
+file5=C:\mysql\embedded\Static\release\mysqlserver.lib
+fulldirectory=
+
+[share\polish]
+file0=C:\mysql\share\polish\errmsg.sys
+file1=C:\mysql\share\polish\errmsg.txt
+fulldirectory=
+
+[share\dutch]
+file0=C:\mysql\share\dutch\errmsg.sys
+file1=C:\mysql\share\dutch\errmsg.txt
+fulldirectory=
+
+[share\spanish]
+file0=C:\mysql\share\spanish\errmsg.sys
+file1=C:\mysql\share\spanish\errmsg.txt
+fulldirectory=
+
+[share\english]
+file0=C:\mysql\share\english\errmsg.sys
+file1=C:\mysql\share\english\errmsg.txt
+fulldirectory=
+
+[bin]
+file0=C:\mysql\bin\mysqld-opt.exe
+file1=C:\mysql\bin\mysqld-nt.exe
+file2=C:\mysql\bin\mysqld.exe
+file3=C:\mysql\bin\cygwinb19.dll
+file4=C:\mysql\bin\libmySQL.dll
+fulldirectory=
+
+[share\korean]
+file0=C:\mysql\share\korean\errmsg.sys
+file1=C:\mysql\share\korean\errmsg.txt
+fulldirectory=
+
+[share\charsets]
+file15=C:\mysql\share\charsets\latin1.conf
+file16=C:\mysql\share\charsets\latin2.conf
+file0=C:\mysql\share\charsets\win1251ukr.conf
+file17=C:\mysql\share\charsets\latin5.conf
+file1=C:\mysql\share\charsets\cp1257.conf
+file18=C:\mysql\share\charsets\Readme
+file2=C:\mysql\share\charsets\croat.conf
+file19=C:\mysql\share\charsets\swe7.conf
+file3=C:\mysql\share\charsets\danish.conf
+file4=C:\mysql\share\charsets\dec8.conf
+file5=C:\mysql\share\charsets\dos.conf
+file6=C:\mysql\share\charsets\estonia.conf
+file7=C:\mysql\share\charsets\german1.conf
+file8=C:\mysql\share\charsets\greek.conf
+file9=C:\mysql\share\charsets\hebrew.conf
+file20=C:\mysql\share\charsets\usa7.conf
+file21=C:\mysql\share\charsets\win1250.conf
+file10=C:\mysql\share\charsets\hp8.conf
+fulldirectory=
+file22=C:\mysql\share\charsets\win1251.conf
+file11=C:\mysql\share\charsets\hungarian.conf
+file23=C:\mysql\share\charsets\cp1251.conf
+file12=C:\mysql\share\charsets\Index
+file13=C:\mysql\share\charsets\koi8_ru.conf
+file14=C:\mysql\share\charsets\koi8_ukr.conf
+
+[Embedded\DLL\debug]
+file0=C:\mysql\embedded\DLL\debug\libmysqld.dll
+file1=C:\mysql\embedded\DLL\debug\libmysqld.exp
+file2=C:\mysql\embedded\DLL\debug\libmysqld.lib
+fulldirectory=
+
+[Embedded]
+file0=C:\mysql\embedded\embedded.dsw
+SubDir0=Embedded\DLL
+SubDir1=Embedded\Static
+fulldirectory=
+
+[share\ukrainian]
+file0=C:\mysql\share\ukrainian\errmsg.sys
+file1=C:\mysql\share\ukrainian\errmsg.txt
+fulldirectory=
+
+[share\hungarian]
+file0=C:\mysql\share\hungarian\errmsg.sys
+file1=C:\mysql\share\hungarian\errmsg.txt
+fulldirectory=
+
+[share\german]
+file0=C:\mysql\share\german\errmsg.sys
+file1=C:\mysql\share\german\errmsg.txt
+fulldirectory=
+
+[share\portuguese]
+file0=C:\mysql\share\portuguese\errmsg.sys
+file1=C:\mysql\share\portuguese\errmsg.txt
+fulldirectory=
+
+[share\estonian]
+file0=C:\mysql\share\estonian\errmsg.sys
+file1=C:\mysql\share\estonian\errmsg.txt
+fulldirectory=
+
+[share\romanian]
+file0=C:\mysql\share\romanian\errmsg.sys
+file1=C:\mysql\share\romanian\errmsg.txt
+fulldirectory=
+
+[share\french]
+file0=C:\mysql\share\french\errmsg.sys
+file1=C:\mysql\share\french\errmsg.txt
+fulldirectory=
+
+[share\swedish]
+file0=C:\mysql\share\swedish\errmsg.sys
+file1=C:\mysql\share\swedish\errmsg.txt
+fulldirectory=
+
+[share\slovak]
+file0=C:\mysql\share\slovak\errmsg.sys
+file1=C:\mysql\share\slovak\errmsg.txt
+fulldirectory=
+
+[share\greek]
+file0=C:\mysql\share\greek\errmsg.sys
+file1=C:\mysql\share\greek\errmsg.txt
+fulldirectory=
+
+[TopDir]
+file0=C:\mysql\my-huge.cnf
+file1=C:\mysql\my-large.cnf
+file2=C:\mysql\my-medium.cnf
+file3=C:\mysql\my-small.cnf
+file4=C:\mysql\MySQLEULA.txt
+SubDir0=bin
+SubDir1=share
+SubDir2=Embedded
+
+[share]
+SubDir8=share\hungarian
+SubDir9=share\charsets
+SubDir20=share\spanish
+SubDir21=share\swedish
+SubDir10=share\italian
+SubDir22=share\ukrainian
+SubDir11=share\japanese
+SubDir12=share\korean
+SubDir13=share\norwegian
+SubDir14=share\norwegian-ny
+SubDir15=share\polish
+SubDir16=share\portuguese
+SubDir0=share\czech
+SubDir17=share\romanian
+SubDir1=share\danish
+SubDir18=share\russian
+SubDir2=share\dutch
+SubDir19=share\slovak
+SubDir3=share\english
+fulldirectory=
+SubDir4=share\estonian
+SubDir5=share\french
+SubDir6=share\german
+SubDir7=share\greek
+
+[share\norwegian-ny]
+file0=C:\mysql\share\norwegian-ny\errmsg.sys
+file1=C:\mysql\share\norwegian-ny\errmsg.txt
+fulldirectory=
+
+[Embedded\DLL]
+file0=C:\mysql\embedded\DLL\test_dll.dsp
+file1=C:\mysql\embedded\DLL\StdAfx.h
+file2=C:\mysql\embedded\DLL\test_dll.cpp
+file3=C:\mysql\embedded\DLL\StdAfx.cpp
+SubDir0=Embedded\DLL\debug
+SubDir1=Embedded\DLL\release
+fulldirectory=
+
+[Embedded\Static]
+SubDir0=Embedded\Static\release
+fulldirectory=
+
+[Embedded\DLL\release]
+file0=C:\mysql\embedded\DLL\release\libmysqld.dll
+file1=C:\mysql\embedded\DLL\release\libmysqld.exp
+file2=C:\mysql\embedded\DLL\release\libmysqld.lib
+file3=C:\mysql\embedded\DLL\release\mysql-server.exe
+fulldirectory=
+
+[share\danish]
+file0=C:\mysql\share\danish\errmsg.sys
+file1=C:\mysql\share\danish\errmsg.txt
+fulldirectory=
+
+[share\czech]
+file0=C:\mysql\share\czech\errmsg.sys
+file1=C:\mysql\share\czech\errmsg.txt
+fulldirectory=
+
+[General]
+Type=FILELIST
+Version=1.00.000
+
+[share\russian]
+file0=C:\mysql\share\russian\errmsg.sys
+file1=C:\mysql\share\russian\errmsg.txt
+fulldirectory=
+
+[share\norwegian]
+file0=C:\mysql\share\norwegian\errmsg.sys
+file1=C:\mysql\share\norwegian\errmsg.txt
+fulldirectory=
+
+[share\japanese]
+file0=C:\mysql\share\japanese\errmsg.sys
+file1=C:\mysql\share\japanese\errmsg.txt
+fulldirectory=
+
+[share\italian]
+file0=C:\mysql\share\italian\errmsg.sys
+file1=C:\mysql\share\italian\errmsg.txt
+fulldirectory=
+
diff --git a/VC++Files/InstallShield/4.0.XX-classic/Registry Entries/Default.rge b/VC++Files/InstallShield/4.0.XX-classic/Registry Entries/Default.rge
new file mode 100755
index 00000000000..537dfd82e48
--- /dev/null
+++ b/VC++Files/InstallShield/4.0.XX-classic/Registry Entries/Default.rge
@@ -0,0 +1,4 @@
+[General]
+Type=REGISTRYDATA
+Version=1.00.000
+
diff --git a/VC++Files/InstallShield/4.0.XX-classic/Script Files/Setup.dbg b/VC++Files/InstallShield/4.0.XX-classic/Script Files/Setup.dbg
new file mode 100755
index 00000000000..0c6d4e6b708
--- /dev/null
+++ b/VC++Files/InstallShield/4.0.XX-classic/Script Files/Setup.dbg
Binary files differ
diff --git a/VC++Files/InstallShield/4.0.XX-classic/Script Files/Setup.ino b/VC++Files/InstallShield/4.0.XX-classic/Script Files/Setup.ino
new file mode 100755
index 00000000000..204d8ea0f36
--- /dev/null
+++ b/VC++Files/InstallShield/4.0.XX-classic/Script Files/Setup.ino
Binary files differ
diff --git a/VC++Files/InstallShield/4.0.XX-classic/Script Files/Setup.ins b/VC++Files/InstallShield/4.0.XX-classic/Script Files/Setup.ins
new file mode 100755
index 00000000000..759009b5c84
--- /dev/null
+++ b/VC++Files/InstallShield/4.0.XX-classic/Script Files/Setup.ins
Binary files differ
diff --git a/VC++Files/InstallShield/4.0.XX-classic/Script Files/Setup.obs b/VC++Files/InstallShield/4.0.XX-classic/Script Files/Setup.obs
new file mode 100755
index 00000000000..5fcfcb62c4e
--- /dev/null
+++ b/VC++Files/InstallShield/4.0.XX-classic/Script Files/Setup.obs
Binary files differ
diff --git a/VC++Files/InstallShield/4.0.XX-classic/Script Files/Setup.rul b/VC++Files/InstallShield/4.0.XX-classic/Script Files/Setup.rul
new file mode 100755
index 00000000000..df143b493c4
--- /dev/null
+++ b/VC++Files/InstallShield/4.0.XX-classic/Script Files/Setup.rul
@@ -0,0 +1,640 @@
+
+////////////////////////////////////////////////////////////////////////////////
+//
+// IIIIIII SSSSSS
+// II SS InstallShield (R)
+// II SSSSSS (c) 1996-1997, InstallShield Software Corporation
+// II SS (c) 1990-1996, InstallShield Corporation
+// IIIIIII SSSSSS All Rights Reserved.
+//
+//
+// This code is generated as a starting setup template. You should
+// modify it to provide all necessary steps for your setup.
+//
+//
+// File Name: Setup.rul
+//
+// Description: InstallShield script
+//
+// Comments: This template script performs a basic setup on a
+// Windows 95 or Windows NT 4.0 platform. With minor
+// modifications, this template can be adapted to create
+// new, customized setups.
+//
+////////////////////////////////////////////////////////////////////////////////
+
+
+ // Include header file
+#include "sdlang.h"
+#include "sddialog.h"
+
+////////////////////// string defines ////////////////////////////
+
+#define UNINST_LOGFILE_NAME "Uninst.isu"
+
+//////////////////// installation declarations ///////////////////
+
+ // ----- DLL prototypes -----
+
+
+ // your DLL prototypes
+
+
+ // ---- script prototypes -----
+
+ // generated
+ prototype ShowDialogs();
+ prototype MoveFileData();
+ prototype HandleMoveDataError( NUMBER );
+ prototype ProcessBeforeDataMove();
+ prototype ProcessAfterDataMove();
+ prototype SetupRegistry();
+ prototype SetupFolders();
+ prototype CleanUpInstall();
+ prototype SetupInstall();
+ prototype SetupScreen();
+ prototype CheckRequirements();
+ prototype DialogShowSdWelcome();
+ prototype DialogShowSdShowInfoList();
+ prototype DialogShowSdAskDestPath();
+ prototype DialogShowSdSetupType();
+ prototype DialogShowSdComponentDialog2();
+ prototype DialogShowSdFinishReboot();
+
+ // your prototypes
+
+
+ // ----- global variables ------
+
+ // generated
+ BOOL bWinNT, bIsShellExplorer, bInstallAborted, bIs32BitSetup;
+ STRING svDir;
+ STRING svName, svCompany, svSerial;
+ STRING szAppPath;
+ STRING svSetupType;
+
+
+ // your global variables
+
+
+///////////////////////////////////////////////////////////////////////////////
+//
+// MAIN PROGRAM
+//
+// The setup begins here by hiding the visible setup
+// window. This is done to allow all the titles, images, etc. to
+// be established before showing the main window. The following
+// logic then performs the setup in a series of steps.
+//
+///////////////////////////////////////////////////////////////////////////////
+program
+ Disable( BACKGROUND );
+
+ CheckRequirements();
+
+ SetupInstall();
+
+ SetupScreen();
+
+ if (ShowDialogs()<0) goto end_install;
+
+ if (ProcessBeforeDataMove()<0) goto end_install;
+
+ if (MoveFileData()<0) goto end_install;
+
+ if (ProcessAfterDataMove()<0) goto end_install;
+
+ if (SetupRegistry()<0) goto end_install;
+
+ if (SetupFolders()<0) goto end_install;
+
+
+ end_install:
+
+ CleanUpInstall();
+
+ // If an unrecoverable error occurred, clean up the partial installation.
+ // Otherwise, exit normally.
+
+ if (bInstallAborted) then
+ abort;
+ endif;
+
+endprogram
+
+///////////////////////////////////////////////////////////////////////////////
+// //
+// Function: ShowDialogs //
+// //
+// Purpose: This function manages the display and navigation //
+// the standard dialogs that exist in a setup. //
+// //
+///////////////////////////////////////////////////////////////////////////////
+function ShowDialogs()
+ NUMBER nResult;
+ begin
+
+ Dlg_Start:
+ // beginning of dialogs label
+
+ Dlg_SdWelcome:
+ nResult = DialogShowSdWelcome();
+ if (nResult = BACK) goto Dlg_Start;
+
+ Dlg_SdShowInfoList:
+ nResult = DialogShowSdShowInfoList();
+ if (nResult = BACK) goto Dlg_SdWelcome;
+
+ Dlg_SdAskDestPath:
+ nResult = DialogShowSdAskDestPath();
+ if (nResult = BACK) goto Dlg_SdShowInfoList;
+
+ Dlg_SdSetupType:
+ nResult = DialogShowSdSetupType();
+ if (nResult = BACK) goto Dlg_SdAskDestPath;
+
+ Dlg_SdComponentDialog2:
+ if ((nResult = BACK) && (svSetupType != "Custom") && (svSetupType != "")) then
+ goto Dlg_SdSetupType;
+ endif;
+ nResult = DialogShowSdComponentDialog2();
+ if (nResult = BACK) goto Dlg_SdSetupType;
+
+ return 0;
+
+ end;
+
+///////////////////////////////////////////////////////////////////////////////
+// //
+// Function: ProcessBeforeDataMove //
+// //
+// Purpose: This function performs any necessary operations prior to the //
+// actual data move operation. //
+// //
+///////////////////////////////////////////////////////////////////////////////
+function ProcessBeforeDataMove()
+ STRING svLogFile;
+ NUMBER nResult;
+ begin
+
+ InstallationInfo( @COMPANY_NAME, @PRODUCT_NAME, @PRODUCT_VERSION, @PRODUCT_KEY );
+
+ svLogFile = UNINST_LOGFILE_NAME;
+
+ nResult = DeinstallStart( svDir, svLogFile, @UNINST_KEY, 0 );
+ if (nResult < 0) then
+ MessageBox( @ERROR_UNINSTSETUP, WARNING );
+ endif;
+
+ szAppPath = TARGETDIR; // TODO : if your application .exe is in a subdir of TARGETDIR then add subdir
+
+ if ((bIs32BitSetup) && (bIsShellExplorer)) then
+ RegDBSetItem( REGDB_APPPATH, szAppPath );
+ RegDBSetItem( REGDB_APPPATH_DEFAULT, szAppPath ^ @PRODUCT_KEY );
+ RegDBSetItem( REGDB_UNINSTALL_NAME, @UNINST_DISPLAY_NAME );
+ endif;
+
+ // TODO : update any items you want to process before moving the data
+ //
+
+ return 0;
+ end;
+
+///////////////////////////////////////////////////////////////////////////////
+// //
+// Function: MoveFileData //
+// //
+// Purpose: This function handles the data movement for //
+// the setup. //
+// //
+///////////////////////////////////////////////////////////////////////////////
+function MoveFileData()
+ NUMBER nResult, nDisk;
+ begin
+
+ nDisk = 1;
+ SetStatusWindow( 0, "" );
+ Disable( DIALOGCACHE );
+ Enable( STATUS );
+ StatusUpdate( ON, 100 );
+ nResult = ComponentMoveData( MEDIA, nDisk, 0 );
+
+ HandleMoveDataError( nResult );
+
+ Disable( STATUS );
+
+ return nResult;
+
+ end;
+
+
+///////////////////////////////////////////////////////////////////////////////
+// //
+// Function: HandleMoveDataError //
+// //
+// Purpose: This function handles the error (if any) during the move data //
+// operation. //
+// //
+///////////////////////////////////////////////////////////////////////////////
+function HandleMoveDataError( nResult )
+ STRING szErrMsg, svComponent , svFileGroup , svFile;
+ begin
+
+ svComponent = "";
+ svFileGroup = "";
+ svFile = "";
+
+ switch (nResult)
+ case 0:
+ return 0;
+ default:
+ ComponentError ( MEDIA , svComponent , svFileGroup , svFile , nResult );
+ szErrMsg = @ERROR_MOVEDATA + "\n\n" +
+ @ERROR_COMPONENT + " " + svComponent + "\n" +
+ @ERROR_FILEGROUP + " " + svFileGroup + "\n" +
+ @ERROR_FILE + " " + svFile;
+ SprintfBox( SEVERE, @TITLE_CAPTIONBAR, szErrMsg, nResult );
+ bInstallAborted = TRUE;
+ return nResult;
+ endswitch;
+
+ end;
+
+///////////////////////////////////////////////////////////////////////////////
+// //
+// Function: ProcessAfterDataMove //
+// //
+// Purpose: This function performs any necessary operations needed after //
+// all data has been moved. //
+// //
+///////////////////////////////////////////////////////////////////////////////
+function ProcessAfterDataMove()
+ begin
+
+ // TODO : update self-registered files and other processes that
+ // should be performed after the data has been moved.
+
+
+ return 0;
+ end;
+
+///////////////////////////////////////////////////////////////////////////////
+// //
+// Function: SetupRegistry //
+// //
+// Purpose: This function makes the registry entries for this setup. //
+// //
+///////////////////////////////////////////////////////////////////////////////
+function SetupRegistry()
+ NUMBER nResult;
+
+ begin
+
+ // TODO : Add all your registry entry keys here
+ //
+ //
+ // RegDBCreateKeyEx, RegDBSetKeyValueEx....
+ //
+
+ nResult = CreateRegistrySet( "" );
+
+ return nResult;
+ end;
+
+///////////////////////////////////////////////////////////////////////////////
+//
+// Function: SetupFolders
+//
+// Purpose: This function creates all the folders and shortcuts for the
+// setup. This includes program groups and items for Windows 3.1.
+//
+///////////////////////////////////////////////////////////////////////////////
+function SetupFolders()
+ NUMBER nResult;
+
+ begin
+
+
+ // TODO : Add all your folder (program group) along with shortcuts (program items)
+ //
+ //
+ // CreateProgramFolder, AddFolderIcon....
+ //
+
+ nResult = CreateShellObjects( "" );
+
+ return nResult;
+ end;
+
+///////////////////////////////////////////////////////////////////////////////
+// //
+// Function: CleanUpInstall //
+// //
+// Purpose: This cleans up the setup. Anything that should //
+// be released or deleted at the end of the setup should //
+// be done here. //
+// //
+///////////////////////////////////////////////////////////////////////////////
+function CleanUpInstall()
+ begin
+
+
+ if (bInstallAborted) then
+ return 0;
+ endif;
+
+ DialogShowSdFinishReboot();
+
+ if (BATCH_INSTALL) then // ensure locked files are properly written
+ CommitSharedFiles(0);
+ endif;
+
+ return 0;
+ end;
+
+///////////////////////////////////////////////////////////////////////////////
+// //
+// Function: SetupInstall //
+// //
+// Purpose: This will setup the installation. Any general initialization //
+// needed for the installation should be performed here. //
+// //
+///////////////////////////////////////////////////////////////////////////////
+function SetupInstall()
+ begin
+
+ Enable( CORECOMPONENTHANDLING );
+
+ bInstallAborted = FALSE;
+
+ if (bIs32BitSetup) then
+ svDir = "C:\\mysql"; //PROGRAMFILES ^ @COMPANY_NAME ^ @PRODUCT_NAME;
+ else
+ svDir = "C:\\mysql"; //PROGRAMFILES ^ @COMPANY_NAME16 ^ @PRODUCT_NAME16; // use shorten names
+ endif;
+
+ TARGETDIR = svDir;
+
+ SdProductName( @PRODUCT_NAME );
+
+ Enable( DIALOGCACHE );
+
+ return 0;
+ end;
+
+///////////////////////////////////////////////////////////////////////////////
+// //
+// Function: SetupScreen //
+// //
+// Purpose: This function establishes the screen look. This includes //
+// colors, fonts, and text to be displayed. //
+// //
+///////////////////////////////////////////////////////////////////////////////
+function SetupScreen()
+ begin
+
+ Enable( FULLWINDOWMODE );
+ Enable( INDVFILESTATUS );
+ SetTitle( @TITLE_MAIN, 24, WHITE );
+
+ SetTitle( @TITLE_CAPTIONBAR, 0, BACKGROUNDCAPTION ); // Caption bar text.
+
+ Enable( BACKGROUND );
+
+ Delay( 1 );
+ end;
+
+///////////////////////////////////////////////////////////////////////////////
+// //
+// Function: CheckRequirements //
+// //
+// Purpose: This function checks all minimum requirements for the //
+// application being installed. If any fail, then the user //
+// is informed and the setup is terminated. //
+// //
+///////////////////////////////////////////////////////////////////////////////
+function CheckRequirements()
+ NUMBER nvDx, nvDy, nvResult;
+ STRING svResult;
+
+ begin
+
+ bWinNT = FALSE;
+ bIsShellExplorer = FALSE;
+
+ // Check screen resolution.
+ GetExtents( nvDx, nvDy );
+
+ if (nvDy < 480) then
+ MessageBox( @ERROR_VGARESOLUTION, WARNING );
+ abort;
+ endif;
+
+ // set 'setup' operation mode
+ bIs32BitSetup = TRUE;
+ GetSystemInfo( ISTYPE, nvResult, svResult );
+ if (nvResult = 16) then
+ bIs32BitSetup = FALSE; // running 16-bit setup
+ return 0; // no additional information required
+ endif;
+
+ // --- 32-bit testing after this point ---
+
+ // Determine the target system's operating system.
+ GetSystemInfo( OS, nvResult, svResult );
+
+ if (nvResult = IS_WINDOWSNT) then
+ // Running Windows NT.
+ bWinNT = TRUE;
+
+ // Check to see if the shell being used is EXPLORER shell.
+ if (GetSystemInfo( OSMAJOR, nvResult, svResult ) = 0) then
+ if (nvResult >= 4) then
+ bIsShellExplorer = TRUE;
+ endif;
+ endif;
+
+ elseif (nvResult = IS_WINDOWS95 ) then
+ bIsShellExplorer = TRUE;
+
+ endif;
+
+end;
+
+
+///////////////////////////////////////////////////////////////////////////////
+// //
+// Function: DialogShowSdWelcome //
+// //
+// Purpose: This function handles the standard welcome dialog. //
+// //
+// //
+///////////////////////////////////////////////////////////////////////////////
+function DialogShowSdWelcome()
+ NUMBER nResult;
+ STRING szTitle, szMsg;
+ begin
+
+ szTitle = "";
+ szMsg = "";
+ nResult = SdWelcome( szTitle, szMsg );
+
+ return nResult;
+ end;
+
+
+///////////////////////////////////////////////////////////////////////////////
+// //
+// Function: DialogShowSdShowInfoList //
+// //
+// Purpose: This function displays the general information list dialog. //
+// //
+// //
+///////////////////////////////////////////////////////////////////////////////
+function DialogShowSdShowInfoList()
+ NUMBER nResult;
+ LIST list;
+ STRING szTitle, szMsg, szFile;
+ begin
+
+ szFile = SUPPORTDIR ^ "infolist.txt";
+
+ list = ListCreate( STRINGLIST );
+ ListReadFromFile( list, szFile );
+ szTitle = "";
+ szMsg = " ";
+ nResult = SdShowInfoList( szTitle, szMsg, list );
+
+ ListDestroy( list );
+
+ return nResult;
+ end;
+
+
+///////////////////////////////////////////////////////////////////////////////
+// //
+// Function: DialogShowSdAskDestPath //
+// //
+// Purpose: This function asks the user for the destination directory. //
+// //
+///////////////////////////////////////////////////////////////////////////////
+function DialogShowSdAskDestPath()
+ NUMBER nResult;
+ STRING szTitle, szMsg;
+ begin
+
+ szTitle = "";
+ szMsg = "";
+ nResult = SdAskDestPath( szTitle, szMsg, svDir, 0 );
+
+ TARGETDIR = svDir;
+
+ return nResult;
+ end;
+
+
+///////////////////////////////////////////////////////////////////////////////
+// //
+// Function: DialogShowSdSetupType //
+// //
+// Purpose: This function displays the standard setup type dialog. //
+// //
+///////////////////////////////////////////////////////////////////////////////
+function DialogShowSdSetupType()
+ NUMBER nResult, nType;
+ STRING szTitle, szMsg;
+ begin
+
+ switch (svSetupType)
+ case "Typical":
+ nType = TYPICAL;
+ case "Custom":
+ nType = CUSTOM;
+ case "Compact":
+ nType = COMPACT;
+ case "":
+ svSetupType = "Typical";
+ nType = TYPICAL;
+ endswitch;
+
+ szTitle = "";
+ szMsg = "";
+ nResult = SetupType( szTitle, szMsg, "", nType, 0 );
+
+ switch (nResult)
+ case COMPACT:
+ svSetupType = "Compact";
+ case TYPICAL:
+ svSetupType = "Typical";
+ case CUSTOM:
+ svSetupType = "Custom";
+ endswitch;
+
+ return nResult;
+ end;
+
+
+///////////////////////////////////////////////////////////////////////////////
+// //
+// Function: DialogShowSdComponentDialog2 //
+// //
+// Purpose: This function displays the custom component dialog. //
+// //
+// //
+///////////////////////////////////////////////////////////////////////////////
+function DialogShowSdComponentDialog2()
+ NUMBER nResult;
+ STRING szTitle, szMsg;
+ begin
+
+ if ((svSetupType != "Custom") && (svSetupType != "")) then
+ return 0;
+ endif;
+
+ szTitle = "";
+ szMsg = "";
+ nResult = SdComponentDialog2( szTitle, szMsg, svDir, "" );
+
+ return nResult;
+ end;
+
+
+///////////////////////////////////////////////////////////////////////////////
+// //
+// Function: DialogShowSdFinishReboot //
+// //
+// Purpose: This function will show the last dialog of the product. //
+// It will allow the user to reboot and/or show some readme text. //
+// //
+///////////////////////////////////////////////////////////////////////////////
+function DialogShowSdFinishReboot()
+ NUMBER nResult, nDefOptions;
+ STRING szTitle, szMsg1, szMsg2, szOption1, szOption2;
+ NUMBER bOpt1, bOpt2;
+ begin
+
+ if (!BATCH_INSTALL) then
+ bOpt1 = FALSE;
+ bOpt2 = FALSE;
+ szMsg1 = "";
+ szMsg2 = "";
+ szOption1 = "";
+ szOption2 = "";
+ nResult = SdFinish( szTitle, szMsg1, szMsg2, szOption1, szOption2, bOpt1, bOpt2 );
+ return 0;
+ endif;
+
+ nDefOptions = SYS_BOOTMACHINE;
+ szTitle = "";
+ szMsg1 = "";
+ szMsg2 = "";
+ nResult = SdFinishReboot( szTitle, szMsg1, nDefOptions, szMsg2, 0 );
+
+ return nResult;
+ end;
+
+ // --- include script file section ---
+
+#include "sddialog.rul"
+
+
diff --git a/VC++Files/InstallShield/4.0.XX-classic/Setup Files/Compressed Files/Language Independent/OS Independent/infolist.txt b/VC++Files/InstallShield/4.0.XX-classic/Setup Files/Compressed Files/Language Independent/OS Independent/infolist.txt
new file mode 100755
index 00000000000..acad9353244
--- /dev/null
+++ b/VC++Files/InstallShield/4.0.XX-classic/Setup Files/Compressed Files/Language Independent/OS Independent/infolist.txt
@@ -0,0 +1,25 @@
+This is a release of MySQL Classic 4.0.11a-gamma for Win32.
+
+NOTE: If you install MySQL in a folder other than
+C:\MYSQL or you intend to start MySQL on NT/Win2000
+as a service, you must create a file named C:\MY.CNF
+or \Windows\my.ini or \winnt\my.ini with the following
+information::
+
+[mysqld]
+basedir=E:/installation-path/
+datadir=E:/data-path/
+
+After your have installed MySQL, the installation
+directory will contain 4 files named 'my-small.cnf,
+my-medium.cnf, my-large.cnf, my-huge.cnf'.
+You can use this as a starting point for your own
+C:\my.cnf file.
+
+If you have any problems, you can mail them to
+win32@lists.mysql.com after you have consulted the
+MySQL manual and the MySQL mailing list archive
+(http://www.mysql.com/documentation/index.html)
+
+On behalf of the MySQL AB gang,
+Michael Widenius \ No newline at end of file
diff --git a/VC++Files/InstallShield/4.0.XX-classic/Setup Files/Uncompressed Files/Language Independent/OS Independent/setup.bmp b/VC++Files/InstallShield/4.0.XX-classic/Setup Files/Uncompressed Files/Language Independent/OS Independent/setup.bmp
new file mode 100755
index 00000000000..3229d50c9bf
--- /dev/null
+++ b/VC++Files/InstallShield/4.0.XX-classic/Setup Files/Uncompressed Files/Language Independent/OS Independent/setup.bmp
Binary files differ
diff --git a/VC++Files/InstallShield/4.0.XX-classic/Shell Objects/Default.shl b/VC++Files/InstallShield/4.0.XX-classic/Shell Objects/Default.shl
new file mode 100755
index 00000000000..187cb651307
--- /dev/null
+++ b/VC++Files/InstallShield/4.0.XX-classic/Shell Objects/Default.shl
@@ -0,0 +1,12 @@
+[Data]
+Folder3=<FOLDER_STARTUP>
+Group0=Main
+Group1=Startup
+Folder0=<FOLDER_DESKTOP>
+Folder1=<FOLDER_STARTMENU>
+Folder2=<FOLDER_PROGRAMS>
+
+[Info]
+Type=ShellObject
+Version=1.00.000
+
diff --git a/VC++Files/InstallShield/4.0.XX-classic/String Tables/0009-English/value.shl b/VC++Files/InstallShield/4.0.XX-classic/String Tables/0009-English/value.shl
new file mode 100755
index 00000000000..9359ce70202
--- /dev/null
+++ b/VC++Files/InstallShield/4.0.XX-classic/String Tables/0009-English/value.shl
@@ -0,0 +1,23 @@
+[Data]
+TITLE_MAIN=MySQL Classic Servers and Clients 4.0.11a-gamma
+COMPANY_NAME=MySQL AB
+ERROR_COMPONENT=Component:
+COMPANY_NAME16=Company
+PRODUCT_VERSION=MySQL Classic Servers and Clients 4.0.11a-gamma
+ERROR_MOVEDATA=An error occurred during the move data process: %d
+ERROR_FILEGROUP=File Group:
+UNINST_KEY=MySQL Classic Servers and Clients 4.0.11a-gamma
+TITLE_CAPTIONBAR=MySQL Classic Servers and Clients 4.0.11a-gamma
+PRODUCT_NAME16=Product
+ERROR_VGARESOLUTION=This program requires VGA or better resolution.
+ERROR_FILE=File:
+UNINST_DISPLAY_NAME=MySQL Classic Servers and Clients 4.0.11a-gamma
+PRODUCT_KEY=yourapp.Exe
+PRODUCT_NAME=MySQL Classic Servers and Clients 4.0.11a-gamma
+ERROR_UNINSTSETUP=unInstaller setup failed to initialize. You may not be able to uninstall this product.
+
+[General]
+Language=0009
+Type=STRINGTABLESPECIFIC
+Version=1.00.000
+
diff --git a/VC++Files/InstallShield/4.0.XX-classic/String Tables/Default.shl b/VC++Files/InstallShield/4.0.XX-classic/String Tables/Default.shl
new file mode 100755
index 00000000000..d4dc4925ab1
--- /dev/null
+++ b/VC++Files/InstallShield/4.0.XX-classic/String Tables/Default.shl
@@ -0,0 +1,74 @@
+[TITLE_MAIN]
+Comment=
+
+[COMPANY_NAME]
+Comment=
+
+[ERROR_COMPONENT]
+Comment=
+
+[COMPANY_NAME16]
+Comment=
+
+[PRODUCT_VERSION]
+Comment=
+
+[ERROR_MOVEDATA]
+Comment=
+
+[ERROR_FILEGROUP]
+Comment=
+
+[Language]
+Lang0=0009
+CurrentLang=0
+
+[UNINST_KEY]
+Comment=
+
+[TITLE_CAPTIONBAR]
+Comment=
+
+[Data]
+Entry0=ERROR_VGARESOLUTION
+Entry1=TITLE_MAIN
+Entry2=TITLE_CAPTIONBAR
+Entry3=UNINST_KEY
+Entry4=UNINST_DISPLAY_NAME
+Entry5=COMPANY_NAME
+Entry6=PRODUCT_NAME
+Entry7=PRODUCT_VERSION
+Entry8=PRODUCT_KEY
+Entry9=ERROR_MOVEDATA
+Entry10=ERROR_UNINSTSETUP
+Entry11=COMPANY_NAME16
+Entry12=PRODUCT_NAME16
+Entry13=ERROR_COMPONENT
+Entry14=ERROR_FILEGROUP
+Entry15=ERROR_FILE
+
+[PRODUCT_NAME16]
+Comment=
+
+[ERROR_VGARESOLUTION]
+Comment=
+
+[ERROR_FILE]
+Comment=
+
+[General]
+Type=STRINGTABLE
+Version=1.00.000
+
+[UNINST_DISPLAY_NAME]
+Comment=
+
+[PRODUCT_KEY]
+Comment=
+
+[PRODUCT_NAME]
+Comment=
+
+[ERROR_UNINSTSETUP]
+Comment=
+
diff --git a/VC++Files/InstallShield/4.0.XX-classic/Text Substitutions/Build.tsb b/VC++Files/InstallShield/4.0.XX-classic/Text Substitutions/Build.tsb
new file mode 100755
index 00000000000..3949bd4c066
--- /dev/null
+++ b/VC++Files/InstallShield/4.0.XX-classic/Text Substitutions/Build.tsb
@@ -0,0 +1,56 @@
+[<HKUS>]
+Value=
+KeyType=4
+
+[<HKCR>]
+Value=
+KeyType=4
+
+[<PROGRAMFILES>]
+Value=
+KeyType=4
+
+[<WINSYSDIR>]
+Value=
+KeyType=4
+
+[<COMMONFILES>]
+Value=
+KeyType=4
+
+[<WINDIR>]
+Value=
+KeyType=4
+
+[Data]
+Key0=<PROGRAMFILES>
+Key1=<COMMONFILES>
+Key2=<WINDIR>
+Key3=<WINSYSDIR>
+Key4=<HKLM>
+Key5=<HKCU>
+Key6=<HKCC>
+Key7=<HKDD>
+Key8=<HKUS>
+Key9=<HKCR>
+
+[General]
+Type=TEXTSUB
+Version=1.00.000
+
+[<HKLM>]
+Value=
+KeyType=4
+
+[<HKCU>]
+Value=
+KeyType=4
+
+[<HKCC>]
+Value=
+KeyType=4
+
+[<HKDD>]
+Value=
+KeyType=4
+
diff --git a/VC++Files/InstallShield/4.0.XX-classic/Text Substitutions/Setup.tsb b/VC++Files/InstallShield/4.0.XX-classic/Text Substitutions/Setup.tsb
new file mode 100755
index 00000000000..b0c5a509f0b
--- /dev/null
+++ b/VC++Files/InstallShield/4.0.XX-classic/Text Substitutions/Setup.tsb
@@ -0,0 +1,76 @@
+[<SRCDIR>]
+Value=
+KeyType=4
+
+[<HKUS>]
+Value=
+KeyType=4
+
+[<HKCR>]
+Value=
+KeyType=4
+
+[<PROGRAMFILES>]
+Value=
+KeyType=4
+
+[<TARGETDIR>]
+Value=
+KeyType=4
+
+[<WINSYSDIR>]
+Value=
+KeyType=4
+
+[<COMMONFILES>]
+Value=
+KeyType=4
+
+[<WINDIR>]
+Value=
+KeyType=4
+
+[Data]
+Key0=<PROGRAMFILES>
+Key1=<COMMONFILES>
+Key2=<WINDIR>
+Key3=<WINSYSDIR>
+Key4=<TARGETDIR>
+Key5=<SUPPORTDIR>
+Key10=<HKDD>
+Key6=<SRCDIR>
+Key11=<HKUS>
+Key7=<HKLM>
+Key12=<HKCR>
+Key8=<HKCU>
+Key13=<SHELL_OBJECT_FOLDER>
+Key9=<HKCC>
+
+[<SUPPORTDIR>]
+Value=
+KeyType=4
+
+[<SHELL_OBJECT_FOLDER>]
+Value=
+KeyType=4
+
+[General]
+Type=TEXTSUB
+Version=1.00.000
+
+[<HKLM>]
+Value=
+KeyType=4
+
+[<HKCU>]
+Value=
+KeyType=4
+
+[<HKCC>]
+Value=
+KeyType=4
+
+[<HKDD>]
+Value=
+KeyType=4
+
diff --git a/VC++Files/InstallShield/4.0.XX-gpl/4.0.XX-gpl.ipr b/VC++Files/InstallShield/4.0.XX-gpl/4.0.XX-gpl.ipr
new file mode 100755
index 00000000000..c415a03a315
--- /dev/null
+++ b/VC++Files/InstallShield/4.0.XX-gpl/4.0.XX-gpl.ipr
@@ -0,0 +1,51 @@
+[Language]
+LanguageSupport0=0009
+
+[OperatingSystem]
+OSSupport=0000000000010010
+
+[Data]
+CurrentMedia=
+CurrentComponentDef=Default.cdf
+ProductName=MySQL Servers and Clients
+set_mifserial=
+DevEnvironment=Microsoft Visual C++ 6
+AppExe=
+set_dlldebug=No
+EmailAddresss=
+Instructions=Instructions.txt
+set_testmode=No
+set_mif=No
+SummaryText=
+Department=
+HomeURL=
+Author=
+Type=Database Application
+InstallRoot=D:\MySQL-Install\mysql-4\MySQL Servers and Clients
+Version=1.00.000
+InstallationGUID=40744a4d-efed-4cff-84a9-9e6389550f5c
+set_level=Level 3
+CurrentFileGroupDef=Default.fdf
+Notes=Notes.txt
+set_maxerr=50
+set_args=
+set_miffile=Status.mif
+set_dllcmdline=
+Copyright=
+set_warnaserr=No
+CurrentPlatform=
+Category=
+set_preproc=
+CurrentLanguage=English
+CompanyName=MySQL
+Description=Description.txt
+set_maxwarn=50
+set_crc=Yes
+set_compileb4build=No
+
+[MediaInfo]
+
+[General]
+Type=INSTALLMAIN
+Version=1.10.000
+
diff --git a/VC++Files/InstallShield/4.0.XX-gpl/Component Definitions/Default.cdf b/VC++Files/InstallShield/4.0.XX-gpl/Component Definitions/Default.cdf
new file mode 100755
index 00000000000..48d37800cd1
--- /dev/null
+++ b/VC++Files/InstallShield/4.0.XX-gpl/Component Definitions/Default.cdf
@@ -0,0 +1,192 @@
+[Development]
+required0=Servers
+SELECTED=Yes
+FILENEED=STANDARD
+required1=Grant Tables
+HTTPLOCATION=
+STATUS=Examples, Libraries, Includes and Script files
+UNINSTALLABLE=Yes
+TARGET=<TARGETDIR>
+FTPLOCATION=
+VISIBLE=Yes
+DESCRIPTION=Examples, Libraries, Includes and Script files
+DISPLAYTEXT=Examples, Libraries, Includes and Script files
+IMAGE=
+DEFSELECTION=Yes
+filegroup0=Development
+COMMENT=
+INCLUDEINBUILD=Yes
+INSTALLATION=ALWAYSOVERWRITE
+COMPRESSIFSEPARATE=No
+MISC=
+ENCRYPT=No
+DISK=ANYDISK
+TARGETDIRCDROM=
+PASSWORD=
+TARGETHIDDEN=General Application Destination
+
+[Grant Tables]
+required0=Servers
+SELECTED=Yes
+FILENEED=CRITICAL
+HTTPLOCATION=
+STATUS=The Grant Tables and Core Files
+UNINSTALLABLE=Yes
+TARGET=<TARGETDIR>
+FTPLOCATION=
+VISIBLE=Yes
+DESCRIPTION=The Grant Tables and Core Files
+DISPLAYTEXT=The Grant Tables and Core Files
+IMAGE=
+DEFSELECTION=Yes
+filegroup0=Grant Tables
+requiredby0=Development
+COMMENT=
+INCLUDEINBUILD=Yes
+requiredby1=Clients and Tools
+INSTALLATION=NEVEROVERWRITE
+requiredby2=Documentation
+COMPRESSIFSEPARATE=No
+MISC=
+ENCRYPT=No
+DISK=ANYDISK
+TARGETDIRCDROM=
+PASSWORD=
+TARGETHIDDEN=General Application Destination
+
+[Components]
+component0=Development
+component1=Grant Tables
+component2=Servers
+component3=Clients and Tools
+component4=Documentation
+
+[TopComponents]
+component0=Servers
+component1=Clients and Tools
+component2=Documentation
+component3=Development
+component4=Grant Tables
+
+[SetupType]
+setuptype0=Compact
+setuptype1=Typical
+setuptype2=Custom
+
+[Clients and Tools]
+required0=Servers
+SELECTED=Yes
+FILENEED=HIGHLYRECOMMENDED
+required1=Grant Tables
+HTTPLOCATION=
+STATUS=The MySQL clients and Maintenance Tools
+UNINSTALLABLE=Yes
+TARGET=<TARGETDIR>
+FTPLOCATION=
+VISIBLE=Yes
+DESCRIPTION=The MySQL clients and Maintenance Tools
+DISPLAYTEXT=The MySQL clients and Maintenance Tools
+IMAGE=
+DEFSELECTION=Yes
+filegroup0=Clients and Tools
+COMMENT=
+INCLUDEINBUILD=Yes
+INSTALLATION=NEWERDATE
+COMPRESSIFSEPARATE=No
+MISC=
+ENCRYPT=No
+DISK=ANYDISK
+TARGETDIRCDROM=
+PASSWORD=
+TARGETHIDDEN=General Application Destination
+
+[Servers]
+SELECTED=Yes
+FILENEED=CRITICAL
+HTTPLOCATION=
+STATUS=The MySQL Servers
+UNINSTALLABLE=Yes
+TARGET=<TARGETDIR>
+FTPLOCATION=
+VISIBLE=Yes
+DESCRIPTION=The MySQL Servers
+DISPLAYTEXT=The MySQL Servers
+IMAGE=
+DEFSELECTION=Yes
+filegroup0=Servers
+requiredby0=Development
+COMMENT=
+INCLUDEINBUILD=Yes
+requiredby1=Grant Tables
+INSTALLATION=ALWAYSOVERWRITE
+requiredby2=Clients and Tools
+requiredby3=Documentation
+COMPRESSIFSEPARATE=No
+MISC=
+ENCRYPT=No
+DISK=ANYDISK
+TARGETDIRCDROM=
+PASSWORD=
+TARGETHIDDEN=General Application Destination
+
+[SetupTypeItem-Compact]
+Comment=
+item0=Grant Tables
+item1=Servers
+item2=Clients and Tools
+item3=Documentation
+Descrip=
+DisplayText=
+
+[SetupTypeItem-Custom]
+Comment=
+item0=Development
+item1=Grant Tables
+item2=Servers
+item3=Clients and Tools
+Descrip=
+item4=Documentation
+DisplayText=
+
+[Info]
+Type=CompDef
+Version=1.00.000
+Name=
+
+[SetupTypeItem-Typical]
+Comment=
+item0=Development
+item1=Grant Tables
+item2=Servers
+item3=Clients and Tools
+Descrip=
+item4=Documentation
+DisplayText=
+
+[Documentation]
+required0=Servers
+SELECTED=Yes
+FILENEED=HIGHLYRECOMMENDED
+required1=Grant Tables
+HTTPLOCATION=
+STATUS=The MySQL Documentation with different formats
+UNINSTALLABLE=Yes
+TARGET=<TARGETDIR>
+FTPLOCATION=
+VISIBLE=Yes
+DESCRIPTION=The MySQL Documentation with different formats
+DISPLAYTEXT=The MySQL Documentation with different formats
+IMAGE=
+DEFSELECTION=Yes
+filegroup0=Documentation
+COMMENT=
+INCLUDEINBUILD=Yes
+INSTALLATION=ALWAYSOVERWRITE
+COMPRESSIFSEPARATE=No
+MISC=
+ENCRYPT=No
+DISK=ANYDISK
+TARGETDIRCDROM=
+PASSWORD=
+TARGETHIDDEN=General Application Destination
+
diff --git a/VC++Files/InstallShield/4.0.XX-gpl/Component Definitions/Default.fgl b/VC++Files/InstallShield/4.0.XX-gpl/Component Definitions/Default.fgl
new file mode 100755
index 00000000000..4e20dcea4ab
--- /dev/null
+++ b/VC++Files/InstallShield/4.0.XX-gpl/Component Definitions/Default.fgl
@@ -0,0 +1,42 @@
+[<PROGRAMFILES>\<COMMONFILES>]
+DISPLAYTEXT=Common Files Folder
+TYPE=TEXTSUBFIXED
+fulldirectory=
+
+[<WINDIR>\<WINSYSDIR>]
+DISPLAYTEXT=Windows System Folder
+TYPE=TEXTSUBFIXED
+fulldirectory=
+
+[USERDEFINED]
+DISPLAYTEXT=Script-defined Folders
+TYPE=USERSTART
+fulldirectory=
+
+[<PROGRAMFILES>]
+DISPLAYTEXT=Program Files Folder
+SubDir0=<PROGRAMFILES>\<COMMONFILES>
+TYPE=TEXTSUBFIXED
+fulldirectory=
+
+[<TARGETDIR>]
+DISPLAYTEXT=General Application Destination
+TYPE=TEXTSUBFIXED
+fulldirectory=
+
+[<WINDIR>]
+DISPLAYTEXT=Windows Operating System
+SubDir0=<WINDIR>\<WINSYSDIR>
+TYPE=TEXTSUBFIXED
+fulldirectory=
+
+[TopDir]
+SubDir0=<WINDIR>
+SubDir1=<PROGRAMFILES>
+SubDir2=<TARGETDIR>
+SubDir3=USERDEFINED
+
+[General]
+Type=FILELIST
+Version=1.00.000
+
diff --git a/VC++Files/InstallShield/4.0.XX-gpl/File Groups/Clients and Tools.fgl b/VC++Files/InstallShield/4.0.XX-gpl/File Groups/Clients and Tools.fgl
new file mode 100755
index 00000000000..7bba3d7474a
--- /dev/null
+++ b/VC++Files/InstallShield/4.0.XX-gpl/File Groups/Clients and Tools.fgl
@@ -0,0 +1,31 @@
+[bin]
+file15=C:\mysql\bin\replace.exe
+file16=C:\mysql\bin\winmysqladmin.cnt
+file0=C:\mysql\bin\isamchk.exe
+file17=C:\mysql\bin\WINMYSQLADMIN.HLP
+file1=C:\mysql\bin\myisamchk.exe
+file18=C:\mysql\bin\comp-err.exe
+file2=C:\mysql\bin\myisamlog.exe
+file19=C:\mysql\bin\my_print_defaults.exe
+file3=C:\mysql\bin\myisampack.exe
+file4=C:\mysql\bin\mysql.exe
+file5=C:\mysql\bin\mysqladmin.exe
+file6=C:\mysql\bin\mysqlbinlog.exe
+file7=C:\mysql\bin\mysqlc.exe
+file8=C:\mysql\bin\mysqlcheck.exe
+file9=C:\mysql\bin\mysqldump.exe
+file20=C:\mysql\bin\winmysqladmin.exe
+file10=C:\mysql\bin\mysqlimport.exe
+fulldirectory=
+file11=C:\mysql\bin\mysqlshow.exe
+file12=C:\mysql\bin\mysqlwatch.exe
+file13=C:\mysql\bin\pack_isam.exe
+file14=C:\mysql\bin\perror.exe
+
+[TopDir]
+SubDir0=bin
+
+[General]
+Type=FILELIST
+Version=1.00.000
+
diff --git a/VC++Files/InstallShield/4.0.XX-gpl/File Groups/Default.fdf b/VC++Files/InstallShield/4.0.XX-gpl/File Groups/Default.fdf
new file mode 100755
index 00000000000..8096a4b74bf
--- /dev/null
+++ b/VC++Files/InstallShield/4.0.XX-gpl/File Groups/Default.fdf
@@ -0,0 +1,82 @@
+[FileGroups]
+group0=Development
+group1=Grant Tables
+group2=Servers
+group3=Clients and Tools
+group4=Documentation
+
+[Development]
+SELFREGISTERING=No
+HTTPLOCATION=
+LANGUAGE=
+OPERATINGSYSTEM=
+FTPLOCATION=
+FILETYPE=No
+INFOTYPE=Standard
+COMMENT=
+COMPRESS=Yes
+COMPRESSDLL=
+POTENTIALLY=No
+MISC=
+
+[Grant Tables]
+SELFREGISTERING=No
+HTTPLOCATION=
+LANGUAGE=
+OPERATINGSYSTEM=
+FTPLOCATION=
+FILETYPE=No
+INFOTYPE=Standard
+COMMENT=
+COMPRESS=Yes
+COMPRESSDLL=
+POTENTIALLY=No
+MISC=
+
+[Clients and Tools]
+SELFREGISTERING=No
+HTTPLOCATION=
+LANGUAGE=
+OPERATINGSYSTEM=0000000000000000
+FTPLOCATION=
+FILETYPE=No
+INFOTYPE=Standard
+COMMENT=
+COMPRESS=Yes
+COMPRESSDLL=
+POTENTIALLY=No
+MISC=
+
+[Servers]
+SELFREGISTERING=No
+HTTPLOCATION=
+LANGUAGE=
+OPERATINGSYSTEM=
+FTPLOCATION=
+FILETYPE=No
+INFOTYPE=Standard
+COMMENT=
+COMPRESS=Yes
+COMPRESSDLL=
+POTENTIALLY=No
+MISC=
+
+[Info]
+Type=FileGrp
+Version=1.00.000
+Name=
+
+[Documentation]
+SELFREGISTERING=No
+HTTPLOCATION=
+LANGUAGE=
+OPERATINGSYSTEM=
+FTPLOCATION=
+FILETYPE=No
+INFOTYPE=Standard
+COMMENT=
+COMPRESS=Yes
+COMPRESSDLL=
+POTENTIALLY=No
+MISC=
+
diff --git a/VC++Files/InstallShield/4.0.XX-gpl/File Groups/Development.fgl b/VC++Files/InstallShield/4.0.XX-gpl/File Groups/Development.fgl
new file mode 100755
index 00000000000..401509e9b7a
--- /dev/null
+++ b/VC++Files/InstallShield/4.0.XX-gpl/File Groups/Development.fgl
@@ -0,0 +1,241 @@
+[bench\Data\Wisconsin]
+file0=C:\mysql\bench\Data\Wisconsin\onek.data
+file1=C:\mysql\bench\Data\Wisconsin\tenk.data
+fulldirectory=
+
+[lib\debug]
+file0=C:\mysql\lib\debug\libmySQL.dll
+file1=C:\mysql\lib\debug\libmySQL.lib
+file2=C:\mysql\lib\debug\mysqlclient.lib
+file3=C:\mysql\lib\debug\zlib.lib
+file4=C:\mysql\lib\debug\regex.lib
+file5=C:\mysql\lib\debug\mysys.lib
+file6=C:\mysql\lib\debug\strings.lib
+fulldirectory=
+
+[bench\output]
+fulldirectory=
+
+[examples\libmysqltest]
+file0=C:\mysql\examples\libmysqltest\myTest.c
+file1=C:\mysql\examples\libmysqltest\myTest.dsp
+file2=C:\mysql\examples\libmysqltest\myTest.dsw
+file3=C:\mysql\examples\libmysqltest\myTest.exe
+file4=C:\mysql\examples\libmysqltest\myTest.mak
+file5=C:\mysql\examples\libmysqltest\myTest.ncb
+file6=C:\mysql\examples\libmysqltest\myTest.opt
+file7=C:\mysql\examples\libmysqltest\readme
+fulldirectory=
+
+[include]
+file15=C:\mysql\include\libmysqld.def
+file16=C:\mysql\include\my_alloc.h
+file0=C:\mysql\include\raid.h
+file17=C:\mysql\include\my_getopt.h
+file1=C:\mysql\include\errmsg.h
+file2=C:\mysql\include\Libmysql.def
+file3=C:\mysql\include\m_ctype.h
+file4=C:\mysql\include\m_string.h
+file5=C:\mysql\include\my_list.h
+file6=C:\mysql\include\my_pthread.h
+file7=C:\mysql\include\my_sys.h
+file8=C:\mysql\include\mysql.h
+file9=C:\mysql\include\mysql_com.h
+file10=C:\mysql\include\mysql_version.h
+fulldirectory=
+file11=C:\mysql\include\mysqld_error.h
+file12=C:\mysql\include\dbug.h
+file13=C:\mysql\include\config-win.h
+file14=C:\mysql\include\my_global.h
+
+[examples]
+SubDir0=examples\libmysqltest
+SubDir1=examples\tests
+fulldirectory=
+
+[lib\opt]
+file0=C:\mysql\lib\opt\libmySQL.dll
+file1=C:\mysql\lib\opt\libmySQL.lib
+file2=C:\mysql\lib\opt\mysqlclient.lib
+file3=C:\mysql\lib\opt\zlib.lib
+file4=C:\mysql\lib\opt\strings.lib
+file5=C:\mysql\lib\opt\mysys-max.lib
+file6=C:\mysql\lib\opt\regex.lib
+file7=C:\mysql\lib\opt\mysys.lib
+fulldirectory=
+
+[bench\Data]
+SubDir0=bench\Data\ATIS
+SubDir1=bench\Data\Wisconsin
+fulldirectory=
+
+[bench\limits]
+file15=C:\mysql\bench\limits\pg.comment
+file16=C:\mysql\bench\limits\solid.cfg
+file0=C:\mysql\bench\limits\access.cfg
+file17=C:\mysql\bench\limits\solid-nt4.cfg
+file1=C:\mysql\bench\limits\access.comment
+file18=C:\mysql\bench\limits\sybase.cfg
+file2=C:\mysql\bench\limits\Adabas.cfg
+file3=C:\mysql\bench\limits\Adabas.comment
+file4=C:\mysql\bench\limits\Db2.cfg
+file5=C:\mysql\bench\limits\empress.cfg
+file6=C:\mysql\bench\limits\empress.comment
+file7=C:\mysql\bench\limits\Informix.cfg
+file8=C:\mysql\bench\limits\Informix.comment
+file9=C:\mysql\bench\limits\msql.cfg
+file10=C:\mysql\bench\limits\ms-sql.cfg
+fulldirectory=
+file11=C:\mysql\bench\limits\Ms-sql65.cfg
+file12=C:\mysql\bench\limits\mysql.cfg
+file13=C:\mysql\bench\limits\oracle.cfg
+file14=C:\mysql\bench\limits\pg.cfg
+
+[TopDir]
+SubDir0=bench
+SubDir1=examples
+SubDir2=include
+SubDir3=lib
+SubDir4=scripts
+
+[bench]
+file15=C:\mysql\bench\test-create
+file16=C:\mysql\bench\test-insert
+file0=C:\mysql\bench\uname.bat
+file17=C:\mysql\bench\test-select
+file1=C:\mysql\bench\compare-results
+file18=C:\mysql\bench\test-wisconsin
+file2=C:\mysql\bench\copy-db
+file19=C:\mysql\bench\bench-init.pl
+file3=C:\mysql\bench\crash-me
+file4=C:\mysql\bench\example.bat
+file5=C:\mysql\bench\print-limit-table
+file6=C:\mysql\bench\pwd.bat
+file7=C:\mysql\bench\Readme
+SubDir0=bench\Data
+file8=C:\mysql\bench\run.bat
+SubDir1=bench\limits
+file9=C:\mysql\bench\run-all-tests
+SubDir2=bench\output
+file10=C:\mysql\bench\server-cfg
+fulldirectory=
+file11=C:\mysql\bench\test-alter-table
+file12=C:\mysql\bench\test-ATIS
+file13=C:\mysql\bench\test-big-tables
+file14=C:\mysql\bench\test-connect
+
+[examples\tests]
+file15=C:\mysql\examples\tests\lock_test.res
+file16=C:\mysql\examples\tests\mail_to_db.pl
+file0=C:\mysql\examples\tests\unique_users.tst
+file17=C:\mysql\examples\tests\table_types.pl
+file1=C:\mysql\examples\tests\auto_increment.tst
+file18=C:\mysql\examples\tests\test_delayed_insert.pl
+file2=C:\mysql\examples\tests\big_record.pl
+file19=C:\mysql\examples\tests\udf_test
+file3=C:\mysql\examples\tests\big_record.res
+file4=C:\mysql\examples\tests\czech-sorting
+file5=C:\mysql\examples\tests\deadlock-script.pl
+file6=C:\mysql\examples\tests\export.pl
+file7=C:\mysql\examples\tests\fork_test.pl
+file8=C:\mysql\examples\tests\fork2_test.pl
+file9=C:\mysql\examples\tests\fork3_test.pl
+file20=C:\mysql\examples\tests\udf_test.res
+file21=C:\mysql\examples\tests\auto_increment.res
+file10=C:\mysql\examples\tests\function.res
+fulldirectory=
+file11=C:\mysql\examples\tests\function.tst
+file12=C:\mysql\examples\tests\grant.pl
+file13=C:\mysql\examples\tests\grant.res
+file14=C:\mysql\examples\tests\lock_test.pl
+
+[bench\Data\ATIS]
+file26=C:\mysql\bench\Data\ATIS\stop1.txt
+file15=C:\mysql\bench\Data\ATIS\flight_class.txt
+file27=C:\mysql\bench\Data\ATIS\time_interval.txt
+file16=C:\mysql\bench\Data\ATIS\flight_day.txt
+file0=C:\mysql\bench\Data\ATIS\transport.txt
+file28=C:\mysql\bench\Data\ATIS\time_zone.txt
+file17=C:\mysql\bench\Data\ATIS\flight_fare.txt
+file1=C:\mysql\bench\Data\ATIS\airline.txt
+file29=C:\mysql\bench\Data\ATIS\aircraft.txt
+file18=C:\mysql\bench\Data\ATIS\food_service.txt
+file2=C:\mysql\bench\Data\ATIS\airport.txt
+file19=C:\mysql\bench\Data\ATIS\ground_service.txt
+file3=C:\mysql\bench\Data\ATIS\airport_service.txt
+file4=C:\mysql\bench\Data\ATIS\city.txt
+file5=C:\mysql\bench\Data\ATIS\class_of_service.txt
+file6=C:\mysql\bench\Data\ATIS\code_description.txt
+file7=C:\mysql\bench\Data\ATIS\compound_class.txt
+file8=C:\mysql\bench\Data\ATIS\connect_leg.txt
+file9=C:\mysql\bench\Data\ATIS\date_day.txt
+file20=C:\mysql\bench\Data\ATIS\month_name.txt
+file21=C:\mysql\bench\Data\ATIS\restrict_carrier.txt
+file10=C:\mysql\bench\Data\ATIS\day_name.txt
+fulldirectory=
+file22=C:\mysql\bench\Data\ATIS\restrict_class.txt
+file11=C:\mysql\bench\Data\ATIS\dual_carrier.txt
+file23=C:\mysql\bench\Data\ATIS\restriction.txt
+file12=C:\mysql\bench\Data\ATIS\fare.txt
+file24=C:\mysql\bench\Data\ATIS\state.txt
+file13=C:\mysql\bench\Data\ATIS\fconnection.txt
+file25=C:\mysql\bench\Data\ATIS\stop.txt
+file14=C:\mysql\bench\Data\ATIS\flight.txt
+
+[General]
+Type=FILELIST
+Version=1.00.000
+
+[scripts]
+file37=C:\mysql\scripts\mysqld_safe-watch.sh
+file26=C:\mysql\scripts\mysql_zap
+file15=C:\mysql\scripts\mysql_fix_privilege_tables
+file38=C:\mysql\scripts\mysqldumpslow
+file27=C:\mysql\scripts\mysql_zap.sh
+file16=C:\mysql\scripts\mysql_fix_privilege_tables.sh
+file0=C:\mysql\scripts\Readme
+file39=C:\mysql\scripts\mysqldumpslow.sh
+file28=C:\mysql\scripts\mysqlaccess
+file17=C:\mysql\scripts\mysql_install_db
+file1=C:\mysql\scripts\make_binary_distribution.sh
+file29=C:\mysql\scripts\mysqlaccess.conf
+file18=C:\mysql\scripts\mysql_install_db.sh
+file2=C:\mysql\scripts\msql2mysql
+file19=C:\mysql\scripts\mysql_secure_installation
+file3=C:\mysql\scripts\msql2mysql.sh
+file4=C:\mysql\scripts\mysql_config
+file5=C:\mysql\scripts\mysql_config.sh
+file6=C:\mysql\scripts\mysql_convert_table_format
+file7=C:\mysql\scripts\mysql_convert_table_format.sh
+file40=C:\mysql\scripts\mysqlhotcopy
+file8=C:\mysql\scripts\mysql_explain_log
+file41=C:\mysql\scripts\mysqlhotcopy.pl
+file30=C:\mysql\scripts\mysqlaccess.sh
+file9=C:\mysql\scripts\mysql_explain_log.sh
+file42=C:\mysql\scripts\mysqlhotcopy.sh
+file31=C:\mysql\scripts\mysqlbug
+file20=C:\mysql\scripts\mysql_secure_installation.sh
+file43=C:\mysql\scripts\make_binary_distribution
+file32=C:\mysql\scripts\mysqlbug.sh
+file21=C:\mysql\scripts\mysql_setpermission
+file10=C:\mysql\scripts\mysql_find_rows
+fulldirectory=
+file33=C:\mysql\scripts\mysqld_multi
+file22=C:\mysql\scripts\mysql_setpermission.pl
+file11=C:\mysql\scripts\mysql_find_rows.pl
+file34=C:\mysql\scripts\mysqld_multi.sh
+file23=C:\mysql\scripts\mysql_setpermission.sh
+file12=C:\mysql\scripts\mysql_find_rows.sh
+file35=C:\mysql\scripts\mysqld_safe
+file24=C:\mysql\scripts\mysql_tableinfo
+file13=C:\mysql\scripts\mysql_fix_extensions
+file36=C:\mysql\scripts\mysqld_safe.sh
+file25=C:\mysql\scripts\mysql_tableinfo.sh
+file14=C:\mysql\scripts\mysql_fix_extensions.sh
+
+[lib]
+file0=C:\mysql\lib\Readme
+SubDir0=lib\debug
+SubDir1=lib\opt
+fulldirectory=
+
diff --git a/VC++Files/InstallShield/4.0.XX-gpl/File Groups/Documentation.fgl b/VC++Files/InstallShield/4.0.XX-gpl/File Groups/Documentation.fgl
new file mode 100755
index 00000000000..107ebd1afb7
--- /dev/null
+++ b/VC++Files/InstallShield/4.0.XX-gpl/File Groups/Documentation.fgl
@@ -0,0 +1,101 @@
+[Docs\Flags]
+file59=C:\mysql\Docs\Flags\romania.gif
+file48=C:\mysql\Docs\Flags\kroatia.eps
+file37=C:\mysql\Docs\Flags\iceland.gif
+file26=C:\mysql\Docs\Flags\france.eps
+file15=C:\mysql\Docs\Flags\china.gif
+file49=C:\mysql\Docs\Flags\kroatia.gif
+file38=C:\mysql\Docs\Flags\ireland.eps
+file27=C:\mysql\Docs\Flags\france.gif
+file16=C:\mysql\Docs\Flags\croatia.eps
+file0=C:\mysql\Docs\Flags\usa.gif
+file39=C:\mysql\Docs\Flags\ireland.gif
+file28=C:\mysql\Docs\Flags\germany.eps
+file17=C:\mysql\Docs\Flags\croatia.gif
+file1=C:\mysql\Docs\Flags\argentina.gif
+file29=C:\mysql\Docs\Flags\germany.gif
+file18=C:\mysql\Docs\Flags\czech-republic.eps
+file2=C:\mysql\Docs\Flags\australia.eps
+file19=C:\mysql\Docs\Flags\czech-republic.gif
+file3=C:\mysql\Docs\Flags\australia.gif
+file80=C:\mysql\Docs\Flags\usa.eps
+file4=C:\mysql\Docs\Flags\austria.eps
+file81=C:\mysql\Docs\Flags\argentina.eps
+file70=C:\mysql\Docs\Flags\spain.eps
+file5=C:\mysql\Docs\Flags\austria.gif
+file71=C:\mysql\Docs\Flags\spain.gif
+file60=C:\mysql\Docs\Flags\russia.eps
+file6=C:\mysql\Docs\Flags\brazil.eps
+file72=C:\mysql\Docs\Flags\sweden.eps
+file61=C:\mysql\Docs\Flags\russia.gif
+file50=C:\mysql\Docs\Flags\latvia.eps
+file7=C:\mysql\Docs\Flags\brazil.gif
+file73=C:\mysql\Docs\Flags\sweden.gif
+file62=C:\mysql\Docs\Flags\singapore.eps
+file51=C:\mysql\Docs\Flags\latvia.gif
+file40=C:\mysql\Docs\Flags\island.eps
+file8=C:\mysql\Docs\Flags\bulgaria.eps
+file74=C:\mysql\Docs\Flags\switzerland.eps
+file63=C:\mysql\Docs\Flags\singapore.gif
+file52=C:\mysql\Docs\Flags\netherlands.eps
+file41=C:\mysql\Docs\Flags\island.gif
+file30=C:\mysql\Docs\Flags\great-britain.eps
+file9=C:\mysql\Docs\Flags\bulgaria.gif
+file75=C:\mysql\Docs\Flags\switzerland.gif
+file64=C:\mysql\Docs\Flags\south-africa.eps
+file53=C:\mysql\Docs\Flags\netherlands.gif
+file42=C:\mysql\Docs\Flags\israel.eps
+file31=C:\mysql\Docs\Flags\great-britain.gif
+file20=C:\mysql\Docs\Flags\denmark.eps
+file76=C:\mysql\Docs\Flags\taiwan.eps
+file65=C:\mysql\Docs\Flags\south-africa.gif
+file54=C:\mysql\Docs\Flags\poland.eps
+file43=C:\mysql\Docs\Flags\israel.gif
+file32=C:\mysql\Docs\Flags\greece.eps
+file21=C:\mysql\Docs\Flags\denmark.gif
+file10=C:\mysql\Docs\Flags\canada.eps
+fulldirectory=
+file77=C:\mysql\Docs\Flags\taiwan.gif
+file66=C:\mysql\Docs\Flags\south-africa1.eps
+file55=C:\mysql\Docs\Flags\poland.gif
+file44=C:\mysql\Docs\Flags\italy.eps
+file33=C:\mysql\Docs\Flags\greece.gif
+file22=C:\mysql\Docs\Flags\estonia.eps
+file11=C:\mysql\Docs\Flags\canada.gif
+file78=C:\mysql\Docs\Flags\ukraine.eps
+file67=C:\mysql\Docs\Flags\south-africa1.gif
+file56=C:\mysql\Docs\Flags\portugal.eps
+file45=C:\mysql\Docs\Flags\italy.gif
+file34=C:\mysql\Docs\Flags\hungary.eps
+file23=C:\mysql\Docs\Flags\estonia.gif
+file12=C:\mysql\Docs\Flags\chile.eps
+file79=C:\mysql\Docs\Flags\ukraine.gif
+file68=C:\mysql\Docs\Flags\south-korea.eps
+file57=C:\mysql\Docs\Flags\portugal.gif
+file46=C:\mysql\Docs\Flags\japan.eps
+file35=C:\mysql\Docs\Flags\hungary.gif
+file24=C:\mysql\Docs\Flags\finland.eps
+file13=C:\mysql\Docs\Flags\chile.gif
+file69=C:\mysql\Docs\Flags\south-korea.gif
+file58=C:\mysql\Docs\Flags\romania.eps
+file47=C:\mysql\Docs\Flags\japan.gif
+file36=C:\mysql\Docs\Flags\iceland.eps
+file25=C:\mysql\Docs\Flags\finland.gif
+file14=C:\mysql\Docs\Flags\china.eps
+
+[Docs]
+file0=C:\mysql\Docs\manual_toc.html
+file1=C:\mysql\Docs\Copying
+file2=C:\mysql\Docs\Copying.lib
+file3=C:\mysql\Docs\manual.html
+file4=C:\mysql\Docs\manual.txt
+SubDir0=Docs\Flags
+fulldirectory=
+
+[TopDir]
+SubDir0=Docs
+
+[General]
+Type=FILELIST
+Version=1.00.000
+
diff --git a/VC++Files/InstallShield/4.0.XX-gpl/File Groups/Grant Tables.fgl b/VC++Files/InstallShield/4.0.XX-gpl/File Groups/Grant Tables.fgl
new file mode 100755
index 00000000000..178065a7003
--- /dev/null
+++ b/VC++Files/InstallShield/4.0.XX-gpl/File Groups/Grant Tables.fgl
@@ -0,0 +1,36 @@
+[data\test]
+fulldirectory=
+
+[data\mysql]
+file15=C:\mysql\data\mysql\func.frm
+file16=C:\mysql\data\mysql\func.MYD
+file0=C:\mysql\data\mysql\columns_priv.frm
+file17=C:\mysql\data\mysql\func.MYI
+file1=C:\mysql\data\mysql\columns_priv.MYD
+file2=C:\mysql\data\mysql\columns_priv.MYI
+file3=C:\mysql\data\mysql\db.frm
+file4=C:\mysql\data\mysql\db.MYD
+file5=C:\mysql\data\mysql\db.MYI
+file6=C:\mysql\data\mysql\host.frm
+file7=C:\mysql\data\mysql\host.MYD
+file8=C:\mysql\data\mysql\host.MYI
+file9=C:\mysql\data\mysql\tables_priv.frm
+file10=C:\mysql\data\mysql\tables_priv.MYD
+fulldirectory=
+file11=C:\mysql\data\mysql\tables_priv.MYI
+file12=C:\mysql\data\mysql\user.frm
+file13=C:\mysql\data\mysql\user.MYD
+file14=C:\mysql\data\mysql\user.MYI
+
+[TopDir]
+SubDir0=data
+
+[data]
+SubDir0=data\mysql
+SubDir1=data\test
+fulldirectory=
+
+[General]
+Type=FILELIST
+Version=1.00.000
+
diff --git a/VC++Files/InstallShield/4.0.XX-gpl/File Groups/Servers.fgl b/VC++Files/InstallShield/4.0.XX-gpl/File Groups/Servers.fgl
new file mode 100755
index 00000000000..64883f7f369
--- /dev/null
+++ b/VC++Files/InstallShield/4.0.XX-gpl/File Groups/Servers.fgl
@@ -0,0 +1,229 @@
+[Embedded\Static\release]
+file0=C:\mysql\embedded\Static\release\test_stc.dsp
+file1=C:\mysql\embedded\Static\release\ReadMe.txt
+file2=C:\mysql\embedded\Static\release\StdAfx.cpp
+file3=C:\mysql\embedded\Static\release\StdAfx.h
+file4=C:\mysql\embedded\Static\release\test_stc.cpp
+file5=C:\mysql\embedded\Static\release\mysqlserver.lib
+fulldirectory=
+
+[share\polish]
+file0=C:\mysql\share\polish\errmsg.sys
+file1=C:\mysql\share\polish\errmsg.txt
+fulldirectory=
+
+[share\dutch]
+file0=C:\mysql\share\dutch\errmsg.sys
+file1=C:\mysql\share\dutch\errmsg.txt
+fulldirectory=
+
+[share\spanish]
+file0=C:\mysql\share\spanish\errmsg.sys
+file1=C:\mysql\share\spanish\errmsg.txt
+fulldirectory=
+
+[share\english]
+file0=C:\mysql\share\english\errmsg.sys
+file1=C:\mysql\share\english\errmsg.txt
+fulldirectory=
+
+[bin]
+file0=C:\mysql\bin\mysqld-opt.exe
+file1=C:\mysql\bin\mysqld-max.exe
+file2=C:\mysql\bin\mysqld-max-nt.exe
+file3=C:\mysql\bin\mysqld-nt.exe
+file4=C:\mysql\bin\mysqld.exe
+file5=C:\mysql\bin\cygwinb19.dll
+file6=C:\mysql\bin\libmySQL.dll
+fulldirectory=
+
+[share\korean]
+file0=C:\mysql\share\korean\errmsg.sys
+file1=C:\mysql\share\korean\errmsg.txt
+fulldirectory=
+
+[share\charsets]
+file15=C:\mysql\share\charsets\latin1.conf
+file16=C:\mysql\share\charsets\latin2.conf
+file0=C:\mysql\share\charsets\win1251ukr.conf
+file17=C:\mysql\share\charsets\latin5.conf
+file1=C:\mysql\share\charsets\cp1257.conf
+file18=C:\mysql\share\charsets\Readme
+file2=C:\mysql\share\charsets\croat.conf
+file19=C:\mysql\share\charsets\swe7.conf
+file3=C:\mysql\share\charsets\danish.conf
+file4=C:\mysql\share\charsets\dec8.conf
+file5=C:\mysql\share\charsets\dos.conf
+file6=C:\mysql\share\charsets\estonia.conf
+file7=C:\mysql\share\charsets\german1.conf
+file8=C:\mysql\share\charsets\greek.conf
+file9=C:\mysql\share\charsets\hebrew.conf
+file20=C:\mysql\share\charsets\usa7.conf
+file21=C:\mysql\share\charsets\win1250.conf
+file10=C:\mysql\share\charsets\hp8.conf
+fulldirectory=
+file22=C:\mysql\share\charsets\win1251.conf
+file11=C:\mysql\share\charsets\hungarian.conf
+file23=C:\mysql\share\charsets\cp1251.conf
+file12=C:\mysql\share\charsets\Index
+file13=C:\mysql\share\charsets\koi8_ru.conf
+file14=C:\mysql\share\charsets\koi8_ukr.conf
+
+[Embedded\DLL\debug]
+file0=C:\mysql\embedded\DLL\debug\libmysqld.dll
+file1=C:\mysql\embedded\DLL\debug\libmysqld.exp
+file2=C:\mysql\embedded\DLL\debug\libmysqld.lib
+fulldirectory=
+
+[Embedded]
+file0=C:\mysql\embedded\embedded.dsw
+SubDir0=Embedded\DLL
+SubDir1=Embedded\Static
+fulldirectory=
+
+[share\ukrainian]
+file0=C:\mysql\share\ukrainian\errmsg.sys
+file1=C:\mysql\share\ukrainian\errmsg.txt
+fulldirectory=
+
+[share\hungarian]
+file0=C:\mysql\share\hungarian\errmsg.sys
+file1=C:\mysql\share\hungarian\errmsg.txt
+fulldirectory=
+
+[share\german]
+file0=C:\mysql\share\german\errmsg.sys
+file1=C:\mysql\share\german\errmsg.txt
+fulldirectory=
+
+[share\portuguese]
+file0=C:\mysql\share\portuguese\errmsg.sys
+file1=C:\mysql\share\portuguese\errmsg.txt
+fulldirectory=
+
+[share\estonian]
+file0=C:\mysql\share\estonian\errmsg.sys
+file1=C:\mysql\share\estonian\errmsg.txt
+fulldirectory=
+
+[share\romanian]
+file0=C:\mysql\share\romanian\errmsg.sys
+file1=C:\mysql\share\romanian\errmsg.txt
+fulldirectory=
+
+[share\french]
+file0=C:\mysql\share\french\errmsg.sys
+file1=C:\mysql\share\french\errmsg.txt
+fulldirectory=
+
+[share\swedish]
+file0=C:\mysql\share\swedish\errmsg.sys
+file1=C:\mysql\share\swedish\errmsg.txt
+fulldirectory=
+
+[share\slovak]
+file0=C:\mysql\share\slovak\errmsg.sys
+file1=C:\mysql\share\slovak\errmsg.txt
+fulldirectory=
+
+[share\greek]
+file0=C:\mysql\share\greek\errmsg.sys
+file1=C:\mysql\share\greek\errmsg.txt
+fulldirectory=
+
+[TopDir]
+file0=C:\mysql\Readme
+file1=C:\mysql\mysqlbug.txt
+file2=C:\mysql\my-huge.cnf
+file3=C:\mysql\my-large.cnf
+file4=C:\mysql\my-medium.cnf
+file5=C:\mysql\my-small.cnf
+SubDir0=bin
+SubDir1=share
+SubDir2=Embedded
+
+[share]
+SubDir8=share\hungarian
+SubDir9=share\charsets
+SubDir20=share\spanish
+SubDir21=share\swedish
+SubDir10=share\italian
+SubDir22=share\ukrainian
+SubDir11=share\japanese
+SubDir12=share\korean
+SubDir13=share\norwegian
+SubDir14=share\norwegian-ny
+SubDir15=share\polish
+SubDir16=share\portuguese
+SubDir0=share\czech
+SubDir17=share\romanian
+SubDir1=share\danish
+SubDir18=share\russian
+SubDir2=share\dutch
+SubDir19=share\slovak
+SubDir3=share\english
+fulldirectory=
+SubDir4=share\estonian
+SubDir5=share\french
+SubDir6=share\german
+SubDir7=share\greek
+
+[share\norwegian-ny]
+file0=C:\mysql\share\norwegian-ny\errmsg.sys
+file1=C:\mysql\share\norwegian-ny\errmsg.txt
+fulldirectory=
+
+[Embedded\DLL]
+file0=C:\mysql\embedded\DLL\test_dll.dsp
+file1=C:\mysql\embedded\DLL\StdAfx.h
+file2=C:\mysql\embedded\DLL\test_dll.cpp
+file3=C:\mysql\embedded\DLL\StdAfx.cpp
+SubDir0=Embedded\DLL\debug
+SubDir1=Embedded\DLL\release
+fulldirectory=
+
+[Embedded\Static]
+SubDir0=Embedded\Static\release
+fulldirectory=
+
+[Embedded\DLL\release]
+file0=C:\mysql\embedded\DLL\release\libmysqld.dll
+file1=C:\mysql\embedded\DLL\release\libmysqld.exp
+file2=C:\mysql\embedded\DLL\release\libmysqld.lib
+file3=C:\mysql\embedded\DLL\release\mysql-server.exe
+fulldirectory=
+
+[share\danish]
+file0=C:\mysql\share\danish\errmsg.sys
+file1=C:\mysql\share\danish\errmsg.txt
+fulldirectory=
+
+[share\czech]
+file0=C:\mysql\share\czech\errmsg.sys
+file1=C:\mysql\share\czech\errmsg.txt
+fulldirectory=
+
+[General]
+Type=FILELIST
+Version=1.00.000
+
+[share\russian]
+file0=C:\mysql\share\russian\errmsg.sys
+file1=C:\mysql\share\russian\errmsg.txt
+fulldirectory=
+
+[share\norwegian]
+file0=C:\mysql\share\norwegian\errmsg.sys
+file1=C:\mysql\share\norwegian\errmsg.txt
+fulldirectory=
+
+[share\japanese]
+file0=C:\mysql\share\japanese\errmsg.sys
+file1=C:\mysql\share\japanese\errmsg.txt
+fulldirectory=
+
+[share\italian]
+file0=C:\mysql\share\italian\errmsg.sys
+file1=C:\mysql\share\italian\errmsg.txt
+fulldirectory=
+
diff --git a/VC++Files/InstallShield/4.0.XX-gpl/Registry Entries/Default.rge b/VC++Files/InstallShield/4.0.XX-gpl/Registry Entries/Default.rge
new file mode 100755
index 00000000000..537dfd82e48
--- /dev/null
+++ b/VC++Files/InstallShield/4.0.XX-gpl/Registry Entries/Default.rge
@@ -0,0 +1,4 @@
+[General]
+Type=REGISTRYDATA
+Version=1.00.000
+
diff --git a/VC++Files/InstallShield/4.0.XX-gpl/Script Files/Setup.dbg b/VC++Files/InstallShield/4.0.XX-gpl/Script Files/Setup.dbg
new file mode 100755
index 00000000000..0c6d4e6b708
--- /dev/null
+++ b/VC++Files/InstallShield/4.0.XX-gpl/Script Files/Setup.dbg
Binary files differ
diff --git a/VC++Files/InstallShield/4.0.XX-gpl/Script Files/Setup.ino b/VC++Files/InstallShield/4.0.XX-gpl/Script Files/Setup.ino
new file mode 100755
index 00000000000..204d8ea0f36
--- /dev/null
+++ b/VC++Files/InstallShield/4.0.XX-gpl/Script Files/Setup.ino
Binary files differ
diff --git a/VC++Files/InstallShield/4.0.XX-gpl/Script Files/Setup.ins b/VC++Files/InstallShield/4.0.XX-gpl/Script Files/Setup.ins
new file mode 100755
index 00000000000..759009b5c84
--- /dev/null
+++ b/VC++Files/InstallShield/4.0.XX-gpl/Script Files/Setup.ins
Binary files differ
diff --git a/VC++Files/InstallShield/4.0.XX-gpl/Script Files/Setup.obs b/VC++Files/InstallShield/4.0.XX-gpl/Script Files/Setup.obs
new file mode 100755
index 00000000000..5fcfcb62c4e
--- /dev/null
+++ b/VC++Files/InstallShield/4.0.XX-gpl/Script Files/Setup.obs
Binary files differ
diff --git a/VC++Files/InstallShield/4.0.XX-gpl/Script Files/Setup.rul b/VC++Files/InstallShield/4.0.XX-gpl/Script Files/Setup.rul
new file mode 100755
index 00000000000..df143b493c4
--- /dev/null
+++ b/VC++Files/InstallShield/4.0.XX-gpl/Script Files/Setup.rul
@@ -0,0 +1,640 @@
+
+////////////////////////////////////////////////////////////////////////////////
+//
+// IIIIIII SSSSSS
+// II SS InstallShield (R)
+// II SSSSSS (c) 1996-1997, InstallShield Software Corporation
+// II SS (c) 1990-1996, InstallShield Corporation
+// IIIIIII SSSSSS All Rights Reserved.
+//
+//
+// This code is generated as a starting setup template. You should
+// modify it to provide all necessary steps for your setup.
+//
+//
+// File Name: Setup.rul
+//
+// Description: InstallShield script
+//
+// Comments: This template script performs a basic setup on a
+// Windows 95 or Windows NT 4.0 platform. With minor
+// modifications, this template can be adapted to create
+// new, customized setups.
+//
+////////////////////////////////////////////////////////////////////////////////
+
+
+ // Include header file
+#include "sdlang.h"
+#include "sddialog.h"
+
+////////////////////// string defines ////////////////////////////
+
+#define UNINST_LOGFILE_NAME "Uninst.isu"
+
+//////////////////// installation declarations ///////////////////
+
+ // ----- DLL prototypes -----
+
+
+ // your DLL prototypes
+
+
+ // ---- script prototypes -----
+
+ // generated
+ prototype ShowDialogs();
+ prototype MoveFileData();
+ prototype HandleMoveDataError( NUMBER );
+ prototype ProcessBeforeDataMove();
+ prototype ProcessAfterDataMove();
+ prototype SetupRegistry();
+ prototype SetupFolders();
+ prototype CleanUpInstall();
+ prototype SetupInstall();
+ prototype SetupScreen();
+ prototype CheckRequirements();
+ prototype DialogShowSdWelcome();
+ prototype DialogShowSdShowInfoList();
+ prototype DialogShowSdAskDestPath();
+ prototype DialogShowSdSetupType();
+ prototype DialogShowSdComponentDialog2();
+ prototype DialogShowSdFinishReboot();
+
+ // your prototypes
+
+
+ // ----- global variables ------
+
+ // generated
+ BOOL bWinNT, bIsShellExplorer, bInstallAborted, bIs32BitSetup;
+ STRING svDir;
+ STRING svName, svCompany, svSerial;
+ STRING szAppPath;
+ STRING svSetupType;
+
+
+ // your global variables
+
+
+///////////////////////////////////////////////////////////////////////////////
+//
+// MAIN PROGRAM
+//
+// The setup begins here by hiding the visible setup
+// window. This is done to allow all the titles, images, etc. to
+// be established before showing the main window. The following
+// logic then performs the setup in a series of steps.
+//
+///////////////////////////////////////////////////////////////////////////////
+program
+ Disable( BACKGROUND );
+
+ CheckRequirements();
+
+ SetupInstall();
+
+ SetupScreen();
+
+ if (ShowDialogs()<0) goto end_install;
+
+ if (ProcessBeforeDataMove()<0) goto end_install;
+
+ if (MoveFileData()<0) goto end_install;
+
+ if (ProcessAfterDataMove()<0) goto end_install;
+
+ if (SetupRegistry()<0) goto end_install;
+
+ if (SetupFolders()<0) goto end_install;
+
+
+ end_install:
+
+ CleanUpInstall();
+
+ // If an unrecoverable error occurred, clean up the partial installation.
+ // Otherwise, exit normally.
+
+ if (bInstallAborted) then
+ abort;
+ endif;
+
+endprogram
+
+///////////////////////////////////////////////////////////////////////////////
+// //
+// Function: ShowDialogs //
+// //
+// Purpose: This function manages the display and navigation //
+// the standard dialogs that exist in a setup. //
+// //
+///////////////////////////////////////////////////////////////////////////////
+function ShowDialogs()
+ NUMBER nResult;
+ begin
+
+ Dlg_Start:
+ // beginning of dialogs label
+
+ Dlg_SdWelcome:
+ nResult = DialogShowSdWelcome();
+ if (nResult = BACK) goto Dlg_Start;
+
+ Dlg_SdShowInfoList:
+ nResult = DialogShowSdShowInfoList();
+ if (nResult = BACK) goto Dlg_SdWelcome;
+
+ Dlg_SdAskDestPath:
+ nResult = DialogShowSdAskDestPath();
+ if (nResult = BACK) goto Dlg_SdShowInfoList;
+
+ Dlg_SdSetupType:
+ nResult = DialogShowSdSetupType();
+ if (nResult = BACK) goto Dlg_SdAskDestPath;
+
+ Dlg_SdComponentDialog2:
+ if ((nResult = BACK) && (svSetupType != "Custom") && (svSetupType != "")) then
+ goto Dlg_SdSetupType;
+ endif;
+ nResult = DialogShowSdComponentDialog2();
+ if (nResult = BACK) goto Dlg_SdSetupType;
+
+ return 0;
+
+ end;
+
+///////////////////////////////////////////////////////////////////////////////
+// //
+// Function: ProcessBeforeDataMove //
+// //
+// Purpose: This function performs any necessary operations prior to the //
+// actual data move operation. //
+// //
+///////////////////////////////////////////////////////////////////////////////
+function ProcessBeforeDataMove()
+ STRING svLogFile;
+ NUMBER nResult;
+ begin
+
+ InstallationInfo( @COMPANY_NAME, @PRODUCT_NAME, @PRODUCT_VERSION, @PRODUCT_KEY );
+
+ svLogFile = UNINST_LOGFILE_NAME;
+
+ nResult = DeinstallStart( svDir, svLogFile, @UNINST_KEY, 0 );
+ if (nResult < 0) then
+ MessageBox( @ERROR_UNINSTSETUP, WARNING );
+ endif;
+
+ szAppPath = TARGETDIR; // TODO : if your application .exe is in a subdir of TARGETDIR then add subdir
+
+ if ((bIs32BitSetup) && (bIsShellExplorer)) then
+ RegDBSetItem( REGDB_APPPATH, szAppPath );
+ RegDBSetItem( REGDB_APPPATH_DEFAULT, szAppPath ^ @PRODUCT_KEY );
+ RegDBSetItem( REGDB_UNINSTALL_NAME, @UNINST_DISPLAY_NAME );
+ endif;
+
+ // TODO : update any items you want to process before moving the data
+ //
+
+ return 0;
+ end;
+
+///////////////////////////////////////////////////////////////////////////////
+// //
+// Function: MoveFileData //
+// //
+// Purpose: This function handles the data movement for //
+// the setup. //
+// //
+///////////////////////////////////////////////////////////////////////////////
+function MoveFileData()
+ NUMBER nResult, nDisk;
+ begin
+
+ nDisk = 1;
+ SetStatusWindow( 0, "" );
+ Disable( DIALOGCACHE );
+ Enable( STATUS );
+ StatusUpdate( ON, 100 );
+ nResult = ComponentMoveData( MEDIA, nDisk, 0 );
+
+ HandleMoveDataError( nResult );
+
+ Disable( STATUS );
+
+ return nResult;
+
+ end;
+
+
+///////////////////////////////////////////////////////////////////////////////
+// //
+// Function: HandleMoveDataError //
+// //
+// Purpose: This function handles the error (if any) during the move data //
+// operation. //
+// //
+///////////////////////////////////////////////////////////////////////////////
+function HandleMoveDataError( nResult )
+ STRING szErrMsg, svComponent , svFileGroup , svFile;
+ begin
+
+ svComponent = "";
+ svFileGroup = "";
+ svFile = "";
+
+ switch (nResult)
+ case 0:
+ return 0;
+ default:
+ ComponentError ( MEDIA , svComponent , svFileGroup , svFile , nResult );
+ szErrMsg = @ERROR_MOVEDATA + "\n\n" +
+ @ERROR_COMPONENT + " " + svComponent + "\n" +
+ @ERROR_FILEGROUP + " " + svFileGroup + "\n" +
+ @ERROR_FILE + " " + svFile;
+ SprintfBox( SEVERE, @TITLE_CAPTIONBAR, szErrMsg, nResult );
+ bInstallAborted = TRUE;
+ return nResult;
+ endswitch;
+
+ end;
+
+///////////////////////////////////////////////////////////////////////////////
+// //
+// Function: ProcessAfterDataMove //
+// //
+// Purpose: This function performs any necessary operations needed after //
+// all data has been moved. //
+// //
+///////////////////////////////////////////////////////////////////////////////
+function ProcessAfterDataMove()
+ begin
+
+ // TODO : update self-registered files and other processes that
+ // should be performed after the data has been moved.
+
+
+ return 0;
+ end;
+
+///////////////////////////////////////////////////////////////////////////////
+// //
+// Function: SetupRegistry //
+// //
+// Purpose: This function makes the registry entries for this setup. //
+// //
+///////////////////////////////////////////////////////////////////////////////
+function SetupRegistry()
+ NUMBER nResult;
+
+ begin
+
+ // TODO : Add all your registry entry keys here
+ //
+ //
+ // RegDBCreateKeyEx, RegDBSetKeyValueEx....
+ //
+
+ nResult = CreateRegistrySet( "" );
+
+ return nResult;
+ end;
+
+///////////////////////////////////////////////////////////////////////////////
+//
+// Function: SetupFolders
+//
+// Purpose: This function creates all the folders and shortcuts for the
+// setup. This includes program groups and items for Windows 3.1.
+//
+///////////////////////////////////////////////////////////////////////////////
+function SetupFolders()
+ NUMBER nResult;
+
+ begin
+
+
+ // TODO : Add all your folder (program group) along with shortcuts (program items)
+ //
+ //
+ // CreateProgramFolder, AddFolderIcon....
+ //
+
+ nResult = CreateShellObjects( "" );
+
+ return nResult;
+ end;
+
+///////////////////////////////////////////////////////////////////////////////
+// //
+// Function: CleanUpInstall //
+// //
+// Purpose: This cleans up the setup. Anything that should //
+// be released or deleted at the end of the setup should //
+// be done here. //
+// //
+///////////////////////////////////////////////////////////////////////////////
+function CleanUpInstall()
+ begin
+
+
+ if (bInstallAborted) then
+ return 0;
+ endif;
+
+ DialogShowSdFinishReboot();
+
+ if (BATCH_INSTALL) then // ensure locked files are properly written
+ CommitSharedFiles(0);
+ endif;
+
+ return 0;
+ end;
+
+///////////////////////////////////////////////////////////////////////////////
+// //
+// Function: SetupInstall //
+// //
+// Purpose: This will setup the installation. Any general initialization //
+// needed for the installation should be performed here. //
+// //
+///////////////////////////////////////////////////////////////////////////////
+function SetupInstall()
+ begin
+
+ Enable( CORECOMPONENTHANDLING );
+
+ bInstallAborted = FALSE;
+
+ if (bIs32BitSetup) then
+ svDir = "C:\\mysql"; //PROGRAMFILES ^ @COMPANY_NAME ^ @PRODUCT_NAME;
+ else
+ svDir = "C:\\mysql"; //PROGRAMFILES ^ @COMPANY_NAME16 ^ @PRODUCT_NAME16; // use shorten names
+ endif;
+
+ TARGETDIR = svDir;
+
+ SdProductName( @PRODUCT_NAME );
+
+ Enable( DIALOGCACHE );
+
+ return 0;
+ end;
+
+///////////////////////////////////////////////////////////////////////////////
+// //
+// Function: SetupScreen //
+// //
+// Purpose: This function establishes the screen look. This includes //
+// colors, fonts, and text to be displayed. //
+// //
+///////////////////////////////////////////////////////////////////////////////
+function SetupScreen()
+ begin
+
+ Enable( FULLWINDOWMODE );
+ Enable( INDVFILESTATUS );
+ SetTitle( @TITLE_MAIN, 24, WHITE );
+
+ SetTitle( @TITLE_CAPTIONBAR, 0, BACKGROUNDCAPTION ); // Caption bar text.
+
+ Enable( BACKGROUND );
+
+ Delay( 1 );
+ end;
+
+///////////////////////////////////////////////////////////////////////////////
+// //
+// Function: CheckRequirements //
+// //
+// Purpose: This function checks all minimum requirements for the //
+// application being installed. If any fail, then the user //
+// is informed and the setup is terminated. //
+// //
+///////////////////////////////////////////////////////////////////////////////
+function CheckRequirements()
+ NUMBER nvDx, nvDy, nvResult;
+ STRING svResult;
+
+ begin
+
+ bWinNT = FALSE;
+ bIsShellExplorer = FALSE;
+
+ // Check screen resolution.
+ GetExtents( nvDx, nvDy );
+
+ if (nvDy < 480) then
+ MessageBox( @ERROR_VGARESOLUTION, WARNING );
+ abort;
+ endif;
+
+ // set 'setup' operation mode
+ bIs32BitSetup = TRUE;
+ GetSystemInfo( ISTYPE, nvResult, svResult );
+ if (nvResult = 16) then
+ bIs32BitSetup = FALSE; // running 16-bit setup
+ return 0; // no additional information required
+ endif;
+
+ // --- 32-bit testing after this point ---
+
+ // Determine the target system's operating system.
+ GetSystemInfo( OS, nvResult, svResult );
+
+ if (nvResult = IS_WINDOWSNT) then
+ // Running Windows NT.
+ bWinNT = TRUE;
+
+ // Check to see if the shell being used is EXPLORER shell.
+ if (GetSystemInfo( OSMAJOR, nvResult, svResult ) = 0) then
+ if (nvResult >= 4) then
+ bIsShellExplorer = TRUE;
+ endif;
+ endif;
+
+ elseif (nvResult = IS_WINDOWS95 ) then
+ bIsShellExplorer = TRUE;
+
+ endif;
+
+end;
+
+
+///////////////////////////////////////////////////////////////////////////////
+// //
+// Function: DialogShowSdWelcome //
+// //
+// Purpose: This function handles the standard welcome dialog. //
+// //
+// //
+///////////////////////////////////////////////////////////////////////////////
+function DialogShowSdWelcome()
+ NUMBER nResult;
+ STRING szTitle, szMsg;
+ begin
+
+ szTitle = "";
+ szMsg = "";
+ nResult = SdWelcome( szTitle, szMsg );
+
+ return nResult;
+ end;
+
+
+///////////////////////////////////////////////////////////////////////////////
+// //
+// Function: DialogShowSdShowInfoList //
+// //
+// Purpose: This function displays the general information list dialog. //
+// //
+// //
+///////////////////////////////////////////////////////////////////////////////
+function DialogShowSdShowInfoList()
+ NUMBER nResult;
+ LIST list;
+ STRING szTitle, szMsg, szFile;
+ begin
+
+ szFile = SUPPORTDIR ^ "infolist.txt";
+
+ list = ListCreate( STRINGLIST );
+ ListReadFromFile( list, szFile );
+ szTitle = "";
+ szMsg = " ";
+ nResult = SdShowInfoList( szTitle, szMsg, list );
+
+ ListDestroy( list );
+
+ return nResult;
+ end;
+
+
+///////////////////////////////////////////////////////////////////////////////
+// //
+// Function: DialogShowSdAskDestPath //
+// //
+// Purpose: This function asks the user for the destination directory. //
+// //
+///////////////////////////////////////////////////////////////////////////////
+function DialogShowSdAskDestPath()
+ NUMBER nResult;
+ STRING szTitle, szMsg;
+ begin
+
+ szTitle = "";
+ szMsg = "";
+ nResult = SdAskDestPath( szTitle, szMsg, svDir, 0 );
+
+ TARGETDIR = svDir;
+
+ return nResult;
+ end;
+
+
+///////////////////////////////////////////////////////////////////////////////
+// //
+// Function: DialogShowSdSetupType //
+// //
+// Purpose: This function displays the standard setup type dialog. //
+// //
+///////////////////////////////////////////////////////////////////////////////
+function DialogShowSdSetupType()
+ NUMBER nResult, nType;
+ STRING szTitle, szMsg;
+ begin
+
+ switch (svSetupType)
+ case "Typical":
+ nType = TYPICAL;
+ case "Custom":
+ nType = CUSTOM;
+ case "Compact":
+ nType = COMPACT;
+ case "":
+ svSetupType = "Typical";
+ nType = TYPICAL;
+ endswitch;
+
+ szTitle = "";
+ szMsg = "";
+ nResult = SetupType( szTitle, szMsg, "", nType, 0 );
+
+ switch (nResult)
+ case COMPACT:
+ svSetupType = "Compact";
+ case TYPICAL:
+ svSetupType = "Typical";
+ case CUSTOM:
+ svSetupType = "Custom";
+ endswitch;
+
+ return nResult;
+ end;
+
+
+///////////////////////////////////////////////////////////////////////////////
+// //
+// Function: DialogShowSdComponentDialog2 //
+// //
+// Purpose: This function displays the custom component dialog. //
+// //
+// //
+///////////////////////////////////////////////////////////////////////////////
+function DialogShowSdComponentDialog2()
+ NUMBER nResult;
+ STRING szTitle, szMsg;
+ begin
+
+ if ((svSetupType != "Custom") && (svSetupType != "")) then
+ return 0;
+ endif;
+
+ szTitle = "";
+ szMsg = "";
+ nResult = SdComponentDialog2( szTitle, szMsg, svDir, "" );
+
+ return nResult;
+ end;
+
+
+///////////////////////////////////////////////////////////////////////////////
+// //
+// Function: DialogShowSdFinishReboot //
+// //
+// Purpose: This function will show the last dialog of the product. //
+// It will allow the user to reboot and/or show some readme text. //
+// //
+///////////////////////////////////////////////////////////////////////////////
+function DialogShowSdFinishReboot()
+ NUMBER nResult, nDefOptions;
+ STRING szTitle, szMsg1, szMsg2, szOption1, szOption2;
+ NUMBER bOpt1, bOpt2;
+ begin
+
+ if (!BATCH_INSTALL) then
+ bOpt1 = FALSE;
+ bOpt2 = FALSE;
+ szMsg1 = "";
+ szMsg2 = "";
+ szOption1 = "";
+ szOption2 = "";
+ nResult = SdFinish( szTitle, szMsg1, szMsg2, szOption1, szOption2, bOpt1, bOpt2 );
+ return 0;
+ endif;
+
+ nDefOptions = SYS_BOOTMACHINE;
+ szTitle = "";
+ szMsg1 = "";
+ szMsg2 = "";
+ nResult = SdFinishReboot( szTitle, szMsg1, nDefOptions, szMsg2, 0 );
+
+ return nResult;
+ end;
+
+ // --- include script file section ---
+
+#include "sddialog.rul"
+
+
diff --git a/VC++Files/InstallShield/4.0.XX-gpl/Setup Files/Compressed Files/Language Independent/OS Independent/infolist.txt b/VC++Files/InstallShield/4.0.XX-gpl/Setup Files/Compressed Files/Language Independent/OS Independent/infolist.txt
new file mode 100755
index 00000000000..c91cb20740d
--- /dev/null
+++ b/VC++Files/InstallShield/4.0.XX-gpl/Setup Files/Compressed Files/Language Independent/OS Independent/infolist.txt
@@ -0,0 +1,25 @@
+This is a release of MySQL 4.0.11a-gamma for Win32.
+
+NOTE: If you install MySQL in a folder other than
+C:\MYSQL or you intend to start MySQL on NT/Win2000
+as a service, you must create a file named C:\MY.CNF
+or \Windows\my.ini or \winnt\my.ini with the following
+information::
+
+[mysqld]
+basedir=E:/installation-path/
+datadir=E:/data-path/
+
+After your have installed MySQL, the installation
+directory will contain 4 files named 'my-small.cnf,
+my-medium.cnf, my-large.cnf, my-huge.cnf'.
+You can use this as a starting point for your own
+C:\my.cnf file.
+
+If you have any problems, you can mail them to
+win32@lists.mysql.com after you have consulted the
+MySQL manual and the MySQL mailing list archive
+(http://www.mysql.com/documentation/index.html)
+
+On behalf of the MySQL AB gang,
+Michael Widenius \ No newline at end of file
diff --git a/VC++Files/InstallShield/4.0.XX-gpl/Setup Files/Uncompressed Files/Language Independent/OS Independent/setup.bmp b/VC++Files/InstallShield/4.0.XX-gpl/Setup Files/Uncompressed Files/Language Independent/OS Independent/setup.bmp
new file mode 100755
index 00000000000..3229d50c9bf
--- /dev/null
+++ b/VC++Files/InstallShield/4.0.XX-gpl/Setup Files/Uncompressed Files/Language Independent/OS Independent/setup.bmp
Binary files differ
diff --git a/VC++Files/InstallShield/4.0.XX-gpl/Shell Objects/Default.shl b/VC++Files/InstallShield/4.0.XX-gpl/Shell Objects/Default.shl
new file mode 100755
index 00000000000..187cb651307
--- /dev/null
+++ b/VC++Files/InstallShield/4.0.XX-gpl/Shell Objects/Default.shl
@@ -0,0 +1,12 @@
+[Data]
+Folder3=<FOLDER_STARTUP>
+Group0=Main
+Group1=Startup
+Folder0=<FOLDER_DESKTOP>
+Folder1=<FOLDER_STARTMENU>
+Folder2=<FOLDER_PROGRAMS>
+
+[Info]
+Type=ShellObject
+Version=1.00.000
+
diff --git a/VC++Files/InstallShield/4.0.XX-gpl/String Tables/0009-English/value.shl b/VC++Files/InstallShield/4.0.XX-gpl/String Tables/0009-English/value.shl
new file mode 100755
index 00000000000..ccd18e688eb
--- /dev/null
+++ b/VC++Files/InstallShield/4.0.XX-gpl/String Tables/0009-English/value.shl
@@ -0,0 +1,23 @@
+[Data]
+TITLE_MAIN=MySQL Servers and Clients 4.0.11a-gamma
+COMPANY_NAME=MySQL AB
+ERROR_COMPONENT=Component:
+COMPANY_NAME16=Company
+PRODUCT_VERSION=MySQL Servers and Clients 4.0.11a-gamma
+ERROR_MOVEDATA=An error occurred during the move data process: %d
+ERROR_FILEGROUP=File Group:
+UNINST_KEY=MySQL Servers and Clients 4.0.11a-gamma
+TITLE_CAPTIONBAR=MySQL Servers and Clients 4.0.11a-gamma
+PRODUCT_NAME16=Product
+ERROR_VGARESOLUTION=This program requires VGA or better resolution.
+ERROR_FILE=File:
+UNINST_DISPLAY_NAME=MySQL Servers and Clients 4.0.11a-gamma
+PRODUCT_KEY=yourapp.Exe
+PRODUCT_NAME=MySQL Servers and Clients 4.0.11a-gamma
+ERROR_UNINSTSETUP=unInstaller setup failed to initialize. You may not be able to uninstall this product.
+
+[General]
+Language=0009
+Type=STRINGTABLESPECIFIC
+Version=1.00.000
+
diff --git a/VC++Files/InstallShield/4.0.XX-gpl/String Tables/Default.shl b/VC++Files/InstallShield/4.0.XX-gpl/String Tables/Default.shl
new file mode 100755
index 00000000000..d4dc4925ab1
--- /dev/null
+++ b/VC++Files/InstallShield/4.0.XX-gpl/String Tables/Default.shl
@@ -0,0 +1,74 @@
+[TITLE_MAIN]
+Comment=
+
+[COMPANY_NAME]
+Comment=
+
+[ERROR_COMPONENT]
+Comment=
+
+[COMPANY_NAME16]
+Comment=
+
+[PRODUCT_VERSION]
+Comment=
+
+[ERROR_MOVEDATA]
+Comment=
+
+[ERROR_FILEGROUP]
+Comment=
+
+[Language]
+Lang0=0009
+CurrentLang=0
+
+[UNINST_KEY]
+Comment=
+
+[TITLE_CAPTIONBAR]
+Comment=
+
+[Data]
+Entry0=ERROR_VGARESOLUTION
+Entry1=TITLE_MAIN
+Entry2=TITLE_CAPTIONBAR
+Entry3=UNINST_KEY
+Entry4=UNINST_DISPLAY_NAME
+Entry5=COMPANY_NAME
+Entry6=PRODUCT_NAME
+Entry7=PRODUCT_VERSION
+Entry8=PRODUCT_KEY
+Entry9=ERROR_MOVEDATA
+Entry10=ERROR_UNINSTSETUP
+Entry11=COMPANY_NAME16
+Entry12=PRODUCT_NAME16
+Entry13=ERROR_COMPONENT
+Entry14=ERROR_FILEGROUP
+Entry15=ERROR_FILE
+
+[PRODUCT_NAME16]
+Comment=
+
+[ERROR_VGARESOLUTION]
+Comment=
+
+[ERROR_FILE]
+Comment=
+
+[General]
+Type=STRINGTABLE
+Version=1.00.000
+
+[UNINST_DISPLAY_NAME]
+Comment=
+
+[PRODUCT_KEY]
+Comment=
+
+[PRODUCT_NAME]
+Comment=
+
+[ERROR_UNINSTSETUP]
+Comment=
+
diff --git a/VC++Files/InstallShield/4.0.XX-gpl/Text Substitutions/Build.tsb b/VC++Files/InstallShield/4.0.XX-gpl/Text Substitutions/Build.tsb
new file mode 100755
index 00000000000..3949bd4c066
--- /dev/null
+++ b/VC++Files/InstallShield/4.0.XX-gpl/Text Substitutions/Build.tsb
@@ -0,0 +1,56 @@
+[<HKUS>]
+Value=
+KeyType=4
+
+[<HKCR>]
+Value=
+KeyType=4
+
+[<PROGRAMFILES>]
+Value=
+KeyType=4
+
+[<WINSYSDIR>]
+Value=
+KeyType=4
+
+[<COMMONFILES>]
+Value=
+KeyType=4
+
+[<WINDIR>]
+Value=
+KeyType=4
+
+[Data]
+Key0=<PROGRAMFILES>
+Key1=<COMMONFILES>
+Key2=<WINDIR>
+Key3=<WINSYSDIR>
+Key4=<HKLM>
+Key5=<HKCU>
+Key6=<HKCC>
+Key7=<HKDD>
+Key8=<HKUS>
+Key9=<HKCR>
+
+[General]
+Type=TEXTSUB
+Version=1.00.000
+
+[<HKLM>]
+Value=
+KeyType=4
+
+[<HKCU>]
+Value=
+KeyType=4
+
+[<HKCC>]
+Value=
+KeyType=4
+
+[<HKDD>]
+Value=
+KeyType=4
+
diff --git a/VC++Files/InstallShield/4.0.XX-gpl/Text Substitutions/Setup.tsb b/VC++Files/InstallShield/4.0.XX-gpl/Text Substitutions/Setup.tsb
new file mode 100755
index 00000000000..b0c5a509f0b
--- /dev/null
+++ b/VC++Files/InstallShield/4.0.XX-gpl/Text Substitutions/Setup.tsb
@@ -0,0 +1,76 @@
+[<SRCDIR>]
+Value=
+KeyType=4
+
+[<HKUS>]
+Value=
+KeyType=4
+
+[<HKCR>]
+Value=
+KeyType=4
+
+[<PROGRAMFILES>]
+Value=
+KeyType=4
+
+[<TARGETDIR>]
+Value=
+KeyType=4
+
+[<WINSYSDIR>]
+Value=
+KeyType=4
+
+[<COMMONFILES>]
+Value=
+KeyType=4
+
+[<WINDIR>]
+Value=
+KeyType=4
+
+[Data]
+Key0=<PROGRAMFILES>
+Key1=<COMMONFILES>
+Key2=<WINDIR>
+Key3=<WINSYSDIR>
+Key4=<TARGETDIR>
+Key5=<SUPPORTDIR>
+Key10=<HKDD>
+Key6=<SRCDIR>
+Key11=<HKUS>
+Key7=<HKLM>
+Key12=<HKCR>
+Key8=<HKCU>
+Key13=<SHELL_OBJECT_FOLDER>
+Key9=<HKCC>
+
+[<SUPPORTDIR>]
+Value=
+KeyType=4
+
+[<SHELL_OBJECT_FOLDER>]
+Value=
+KeyType=4
+
+[General]
+Type=TEXTSUB
+Version=1.00.000
+
+[<HKLM>]
+Value=
+KeyType=4
+
+[<HKCU>]
+Value=
+KeyType=4
+
+[<HKCC>]
+Value=
+KeyType=4
+
+[<HKDD>]
+Value=
+KeyType=4
+
diff --git a/VC++Files/InstallShield/4.0.XX-pro/4.0.XX-pro.ipr b/VC++Files/InstallShield/4.0.XX-pro/4.0.XX-pro.ipr
new file mode 100755
index 00000000000..bfa7a082873
--- /dev/null
+++ b/VC++Files/InstallShield/4.0.XX-pro/4.0.XX-pro.ipr
@@ -0,0 +1,52 @@
+[Language]
+LanguageSupport0=0009
+
+[OperatingSystem]
+OSSupport=0000000000010010
+
+[Data]
+CurrentMedia=New Media
+CurrentComponentDef=Default.cdf
+ProductName=MySQL Servers and Clients
+set_mifserial=
+DevEnvironment=Microsoft Visual C++ 6
+AppExe=
+set_dlldebug=No
+EmailAddresss=
+Instructions=Instructions.txt
+set_testmode=No
+set_mif=No
+SummaryText=
+Department=
+HomeURL=
+Author=
+Type=Database Application
+InstallRoot=D:\MySQL-Install\4.0.xpro
+Version=1.00.000
+InstallationGUID=40744a4d-efed-4cff-84a9-9e6389550f5c
+set_level=Level 3
+CurrentFileGroupDef=Default.fdf
+Notes=Notes.txt
+set_maxerr=50
+set_args=
+set_miffile=Status.mif
+set_dllcmdline=
+Copyright=
+set_warnaserr=No
+CurrentPlatform=
+Category=
+set_preproc=
+CurrentLanguage=English
+CompanyName=MySQL
+Description=Description.txt
+set_maxwarn=50
+set_crc=Yes
+set_compileb4build=No
+
+[MediaInfo]
+mediadata0=New Media/
+
+[General]
+Type=INSTALLMAIN
+Version=1.10.000
+
diff --git a/VC++Files/InstallShield/4.0.XX-pro/Component Definitions/Default.cdf b/VC++Files/InstallShield/4.0.XX-pro/Component Definitions/Default.cdf
new file mode 100755
index 00000000000..48d37800cd1
--- /dev/null
+++ b/VC++Files/InstallShield/4.0.XX-pro/Component Definitions/Default.cdf
@@ -0,0 +1,192 @@
+[Development]
+required0=Servers
+SELECTED=Yes
+FILENEED=STANDARD
+required1=Grant Tables
+HTTPLOCATION=
+STATUS=Examples, Libraries, Includes and Script files
+UNINSTALLABLE=Yes
+TARGET=<TARGETDIR>
+FTPLOCATION=
+VISIBLE=Yes
+DESCRIPTION=Examples, Libraries, Includes and Script files
+DISPLAYTEXT=Examples, Libraries, Includes and Script files
+IMAGE=
+DEFSELECTION=Yes
+filegroup0=Development
+COMMENT=
+INCLUDEINBUILD=Yes
+INSTALLATION=ALWAYSOVERWRITE
+COMPRESSIFSEPARATE=No
+MISC=
+ENCRYPT=No
+DISK=ANYDISK
+TARGETDIRCDROM=
+PASSWORD=
+TARGETHIDDEN=General Application Destination
+
+[Grant Tables]
+required0=Servers
+SELECTED=Yes
+FILENEED=CRITICAL
+HTTPLOCATION=
+STATUS=The Grant Tables and Core Files
+UNINSTALLABLE=Yes
+TARGET=<TARGETDIR>
+FTPLOCATION=
+VISIBLE=Yes
+DESCRIPTION=The Grant Tables and Core Files
+DISPLAYTEXT=The Grant Tables and Core Files
+IMAGE=
+DEFSELECTION=Yes
+filegroup0=Grant Tables
+requiredby0=Development
+COMMENT=
+INCLUDEINBUILD=Yes
+requiredby1=Clients and Tools
+INSTALLATION=NEVEROVERWRITE
+requiredby2=Documentation
+COMPRESSIFSEPARATE=No
+MISC=
+ENCRYPT=No
+DISK=ANYDISK
+TARGETDIRCDROM=
+PASSWORD=
+TARGETHIDDEN=General Application Destination
+
+[Components]
+component0=Development
+component1=Grant Tables
+component2=Servers
+component3=Clients and Tools
+component4=Documentation
+
+[TopComponents]
+component0=Servers
+component1=Clients and Tools
+component2=Documentation
+component3=Development
+component4=Grant Tables
+
+[SetupType]
+setuptype0=Compact
+setuptype1=Typical
+setuptype2=Custom
+
+[Clients and Tools]
+required0=Servers
+SELECTED=Yes
+FILENEED=HIGHLYRECOMMENDED
+required1=Grant Tables
+HTTPLOCATION=
+STATUS=The MySQL clients and Maintenance Tools
+UNINSTALLABLE=Yes
+TARGET=<TARGETDIR>
+FTPLOCATION=
+VISIBLE=Yes
+DESCRIPTION=The MySQL clients and Maintenance Tools
+DISPLAYTEXT=The MySQL clients and Maintenance Tools
+IMAGE=
+DEFSELECTION=Yes
+filegroup0=Clients and Tools
+COMMENT=
+INCLUDEINBUILD=Yes
+INSTALLATION=NEWERDATE
+COMPRESSIFSEPARATE=No
+MISC=
+ENCRYPT=No
+DISK=ANYDISK
+TARGETDIRCDROM=
+PASSWORD=
+TARGETHIDDEN=General Application Destination
+
+[Servers]
+SELECTED=Yes
+FILENEED=CRITICAL
+HTTPLOCATION=
+STATUS=The MySQL Servers
+UNINSTALLABLE=Yes
+TARGET=<TARGETDIR>
+FTPLOCATION=
+VISIBLE=Yes
+DESCRIPTION=The MySQL Servers
+DISPLAYTEXT=The MySQL Servers
+IMAGE=
+DEFSELECTION=Yes
+filegroup0=Servers
+requiredby0=Development
+COMMENT=
+INCLUDEINBUILD=Yes
+requiredby1=Grant Tables
+INSTALLATION=ALWAYSOVERWRITE
+requiredby2=Clients and Tools
+requiredby3=Documentation
+COMPRESSIFSEPARATE=No
+MISC=
+ENCRYPT=No
+DISK=ANYDISK
+TARGETDIRCDROM=
+PASSWORD=
+TARGETHIDDEN=General Application Destination
+
+[SetupTypeItem-Compact]
+Comment=
+item0=Grant Tables
+item1=Servers
+item2=Clients and Tools
+item3=Documentation
+Descrip=
+DisplayText=
+
+[SetupTypeItem-Custom]
+Comment=
+item0=Development
+item1=Grant Tables
+item2=Servers
+item3=Clients and Tools
+Descrip=
+item4=Documentation
+DisplayText=
+
+[Info]
+Type=CompDef
+Version=1.00.000
+Name=
+
+[SetupTypeItem-Typical]
+Comment=
+item0=Development
+item1=Grant Tables
+item2=Servers
+item3=Clients and Tools
+Descrip=
+item4=Documentation
+DisplayText=
+
+[Documentation]
+required0=Servers
+SELECTED=Yes
+FILENEED=HIGHLYRECOMMENDED
+required1=Grant Tables
+HTTPLOCATION=
+STATUS=The MySQL Documentation with different formats
+UNINSTALLABLE=Yes
+TARGET=<TARGETDIR>
+FTPLOCATION=
+VISIBLE=Yes
+DESCRIPTION=The MySQL Documentation with different formats
+DISPLAYTEXT=The MySQL Documentation with different formats
+IMAGE=
+DEFSELECTION=Yes
+filegroup0=Documentation
+COMMENT=
+INCLUDEINBUILD=Yes
+INSTALLATION=ALWAYSOVERWRITE
+COMPRESSIFSEPARATE=No
+MISC=
+ENCRYPT=No
+DISK=ANYDISK
+TARGETDIRCDROM=
+PASSWORD=
+TARGETHIDDEN=General Application Destination
+
diff --git a/VC++Files/InstallShield/4.0.XX-pro/Component Definitions/Default.fgl b/VC++Files/InstallShield/4.0.XX-pro/Component Definitions/Default.fgl
new file mode 100755
index 00000000000..4e20dcea4ab
--- /dev/null
+++ b/VC++Files/InstallShield/4.0.XX-pro/Component Definitions/Default.fgl
@@ -0,0 +1,42 @@
+[<PROGRAMFILES>\<COMMONFILES>]
+DISPLAYTEXT=Common Files Folder
+TYPE=TEXTSUBFIXED
+fulldirectory=
+
+[<WINDIR>\<WINSYSDIR>]
+DISPLAYTEXT=Windows System Folder
+TYPE=TEXTSUBFIXED
+fulldirectory=
+
+[USERDEFINED]
+DISPLAYTEXT=Script-defined Folders
+TYPE=USERSTART
+fulldirectory=
+
+[<PROGRAMFILES>]
+DISPLAYTEXT=Program Files Folder
+SubDir0=<PROGRAMFILES>\<COMMONFILES>
+TYPE=TEXTSUBFIXED
+fulldirectory=
+
+[<TARGETDIR>]
+DISPLAYTEXT=General Application Destination
+TYPE=TEXTSUBFIXED
+fulldirectory=
+
+[<WINDIR>]
+DISPLAYTEXT=Windows Operating System
+SubDir0=<WINDIR>\<WINSYSDIR>
+TYPE=TEXTSUBFIXED
+fulldirectory=
+
+[TopDir]
+SubDir0=<WINDIR>
+SubDir1=<PROGRAMFILES>
+SubDir2=<TARGETDIR>
+SubDir3=USERDEFINED
+
+[General]
+Type=FILELIST
+Version=1.00.000
+
diff --git a/VC++Files/InstallShield/4.0.XX-pro/File Groups/Clients and Tools.fgl b/VC++Files/InstallShield/4.0.XX-pro/File Groups/Clients and Tools.fgl
new file mode 100755
index 00000000000..7bba3d7474a
--- /dev/null
+++ b/VC++Files/InstallShield/4.0.XX-pro/File Groups/Clients and Tools.fgl
@@ -0,0 +1,31 @@
+[bin]
+file15=C:\mysql\bin\replace.exe
+file16=C:\mysql\bin\winmysqladmin.cnt
+file0=C:\mysql\bin\isamchk.exe
+file17=C:\mysql\bin\WINMYSQLADMIN.HLP
+file1=C:\mysql\bin\myisamchk.exe
+file18=C:\mysql\bin\comp-err.exe
+file2=C:\mysql\bin\myisamlog.exe
+file19=C:\mysql\bin\my_print_defaults.exe
+file3=C:\mysql\bin\myisampack.exe
+file4=C:\mysql\bin\mysql.exe
+file5=C:\mysql\bin\mysqladmin.exe
+file6=C:\mysql\bin\mysqlbinlog.exe
+file7=C:\mysql\bin\mysqlc.exe
+file8=C:\mysql\bin\mysqlcheck.exe
+file9=C:\mysql\bin\mysqldump.exe
+file20=C:\mysql\bin\winmysqladmin.exe
+file10=C:\mysql\bin\mysqlimport.exe
+fulldirectory=
+file11=C:\mysql\bin\mysqlshow.exe
+file12=C:\mysql\bin\mysqlwatch.exe
+file13=C:\mysql\bin\pack_isam.exe
+file14=C:\mysql\bin\perror.exe
+
+[TopDir]
+SubDir0=bin
+
+[General]
+Type=FILELIST
+Version=1.00.000
+
diff --git a/VC++Files/InstallShield/4.0.XX-pro/File Groups/Default.fdf b/VC++Files/InstallShield/4.0.XX-pro/File Groups/Default.fdf
new file mode 100755
index 00000000000..8096a4b74bf
--- /dev/null
+++ b/VC++Files/InstallShield/4.0.XX-pro/File Groups/Default.fdf
@@ -0,0 +1,82 @@
+[FileGroups]
+group0=Development
+group1=Grant Tables
+group2=Servers
+group3=Clients and Tools
+group4=Documentation
+
+[Development]
+SELFREGISTERING=No
+HTTPLOCATION=
+LANGUAGE=
+OPERATINGSYSTEM=
+FTPLOCATION=
+FILETYPE=No
+INFOTYPE=Standard
+COMMENT=
+COMPRESS=Yes
+COMPRESSDLL=
+POTENTIALLY=No
+MISC=
+
+[Grant Tables]
+SELFREGISTERING=No
+HTTPLOCATION=
+LANGUAGE=
+OPERATINGSYSTEM=
+FTPLOCATION=
+FILETYPE=No
+INFOTYPE=Standard
+COMMENT=
+COMPRESS=Yes
+COMPRESSDLL=
+POTENTIALLY=No
+MISC=
+
+[Clients and Tools]
+SELFREGISTERING=No
+HTTPLOCATION=
+LANGUAGE=
+OPERATINGSYSTEM=0000000000000000
+FTPLOCATION=
+FILETYPE=No
+INFOTYPE=Standard
+COMMENT=
+COMPRESS=Yes
+COMPRESSDLL=
+POTENTIALLY=No
+MISC=
+
+[Servers]
+SELFREGISTERING=No
+HTTPLOCATION=
+LANGUAGE=
+OPERATINGSYSTEM=
+FTPLOCATION=
+FILETYPE=No
+INFOTYPE=Standard
+COMMENT=
+COMPRESS=Yes
+COMPRESSDLL=
+POTENTIALLY=No
+MISC=
+
+[Info]
+Type=FileGrp
+Version=1.00.000
+Name=
+
+[Documentation]
+SELFREGISTERING=No
+HTTPLOCATION=
+LANGUAGE=
+OPERATINGSYSTEM=
+FTPLOCATION=
+FILETYPE=No
+INFOTYPE=Standard
+COMMENT=
+COMPRESS=Yes
+COMPRESSDLL=
+POTENTIALLY=No
+MISC=
+
diff --git a/VC++Files/InstallShield/4.0.XX-pro/File Groups/Development.fgl b/VC++Files/InstallShield/4.0.XX-pro/File Groups/Development.fgl
new file mode 100755
index 00000000000..df4c058f8ce
--- /dev/null
+++ b/VC++Files/InstallShield/4.0.XX-pro/File Groups/Development.fgl
@@ -0,0 +1,239 @@
+[bench\Data\Wisconsin]
+file0=C:\mysql\bench\Data\Wisconsin\onek.data
+file1=C:\mysql\bench\Data\Wisconsin\tenk.data
+fulldirectory=
+
+[lib\debug]
+file0=C:\mysql\lib\debug\libmySQL.dll
+file1=C:\mysql\lib\debug\libmySQL.lib
+file2=C:\mysql\lib\debug\mysqlclient.lib
+file3=C:\mysql\lib\debug\zlib.lib
+file4=C:\mysql\lib\debug\mysys.lib
+file5=C:\mysql\lib\debug\regex.lib
+file6=C:\mysql\lib\debug\strings.lib
+fulldirectory=
+
+[bench\output]
+fulldirectory=
+
+[examples\libmysqltest]
+file0=C:\mysql\examples\libmysqltest\myTest.c
+file1=C:\mysql\examples\libmysqltest\myTest.dsp
+file2=C:\mysql\examples\libmysqltest\myTest.dsw
+file3=C:\mysql\examples\libmysqltest\myTest.exe
+file4=C:\mysql\examples\libmysqltest\myTest.mak
+file5=C:\mysql\examples\libmysqltest\myTest.ncb
+file6=C:\mysql\examples\libmysqltest\myTest.opt
+file7=C:\mysql\examples\libmysqltest\readme
+fulldirectory=
+
+[include]
+file15=C:\mysql\include\libmysqld.def
+file16=C:\mysql\include\my_alloc.h
+file0=C:\mysql\include\raid.h
+file17=C:\mysql\include\my_getopt.h
+file1=C:\mysql\include\errmsg.h
+file2=C:\mysql\include\Libmysql.def
+file3=C:\mysql\include\m_ctype.h
+file4=C:\mysql\include\m_string.h
+file5=C:\mysql\include\my_list.h
+file6=C:\mysql\include\my_pthread.h
+file7=C:\mysql\include\my_sys.h
+file8=C:\mysql\include\mysql.h
+file9=C:\mysql\include\mysql_com.h
+file10=C:\mysql\include\mysql_version.h
+fulldirectory=
+file11=C:\mysql\include\mysqld_error.h
+file12=C:\mysql\include\dbug.h
+file13=C:\mysql\include\config-win.h
+file14=C:\mysql\include\my_global.h
+
+[examples]
+SubDir0=examples\libmysqltest
+SubDir1=examples\tests
+fulldirectory=
+
+[lib\opt]
+file0=C:\mysql\lib\opt\libmySQL.dll
+file1=C:\mysql\lib\opt\libmySQL.lib
+file2=C:\mysql\lib\opt\mysqlclient.lib
+file3=C:\mysql\lib\opt\zlib.lib
+file4=C:\mysql\lib\opt\strings.lib
+file5=C:\mysql\lib\opt\regex.lib
+file6=C:\mysql\lib\opt\mysys.lib
+fulldirectory=
+
+[bench\Data]
+SubDir0=bench\Data\ATIS
+SubDir1=bench\Data\Wisconsin
+fulldirectory=
+
+[bench\limits]
+file15=C:\mysql\bench\limits\pg.comment
+file16=C:\mysql\bench\limits\solid.cfg
+file0=C:\mysql\bench\limits\access.cfg
+file17=C:\mysql\bench\limits\solid-nt4.cfg
+file1=C:\mysql\bench\limits\access.comment
+file18=C:\mysql\bench\limits\sybase.cfg
+file2=C:\mysql\bench\limits\Adabas.cfg
+file3=C:\mysql\bench\limits\Adabas.comment
+file4=C:\mysql\bench\limits\Db2.cfg
+file5=C:\mysql\bench\limits\empress.cfg
+file6=C:\mysql\bench\limits\empress.comment
+file7=C:\mysql\bench\limits\Informix.cfg
+file8=C:\mysql\bench\limits\Informix.comment
+file9=C:\mysql\bench\limits\msql.cfg
+file10=C:\mysql\bench\limits\ms-sql.cfg
+fulldirectory=
+file11=C:\mysql\bench\limits\Ms-sql65.cfg
+file12=C:\mysql\bench\limits\mysql.cfg
+file13=C:\mysql\bench\limits\oracle.cfg
+file14=C:\mysql\bench\limits\pg.cfg
+
+[TopDir]
+SubDir0=bench
+SubDir1=examples
+SubDir2=include
+SubDir3=lib
+SubDir4=scripts
+
+[bench]
+file15=C:\mysql\bench\test-create
+file16=C:\mysql\bench\test-insert
+file0=C:\mysql\bench\uname.bat
+file17=C:\mysql\bench\test-select
+file1=C:\mysql\bench\compare-results
+file18=C:\mysql\bench\test-wisconsin
+file2=C:\mysql\bench\copy-db
+file19=C:\mysql\bench\bench-init.pl
+file3=C:\mysql\bench\crash-me
+file4=C:\mysql\bench\example.bat
+file5=C:\mysql\bench\print-limit-table
+file6=C:\mysql\bench\pwd.bat
+file7=C:\mysql\bench\Readme
+SubDir0=bench\Data
+file8=C:\mysql\bench\run.bat
+SubDir1=bench\limits
+file9=C:\mysql\bench\run-all-tests
+SubDir2=bench\output
+file10=C:\mysql\bench\server-cfg
+fulldirectory=
+file11=C:\mysql\bench\test-alter-table
+file12=C:\mysql\bench\test-ATIS
+file13=C:\mysql\bench\test-big-tables
+file14=C:\mysql\bench\test-connect
+
+[examples\tests]
+file15=C:\mysql\examples\tests\lock_test.res
+file16=C:\mysql\examples\tests\mail_to_db.pl
+file0=C:\mysql\examples\tests\unique_users.tst
+file17=C:\mysql\examples\tests\table_types.pl
+file1=C:\mysql\examples\tests\auto_increment.tst
+file18=C:\mysql\examples\tests\test_delayed_insert.pl
+file2=C:\mysql\examples\tests\big_record.pl
+file19=C:\mysql\examples\tests\udf_test
+file3=C:\mysql\examples\tests\big_record.res
+file4=C:\mysql\examples\tests\czech-sorting
+file5=C:\mysql\examples\tests\deadlock-script.pl
+file6=C:\mysql\examples\tests\export.pl
+file7=C:\mysql\examples\tests\fork_test.pl
+file8=C:\mysql\examples\tests\fork2_test.pl
+file9=C:\mysql\examples\tests\fork3_test.pl
+file20=C:\mysql\examples\tests\udf_test.res
+file21=C:\mysql\examples\tests\auto_increment.res
+file10=C:\mysql\examples\tests\function.res
+fulldirectory=
+file11=C:\mysql\examples\tests\function.tst
+file12=C:\mysql\examples\tests\grant.pl
+file13=C:\mysql\examples\tests\grant.res
+file14=C:\mysql\examples\tests\lock_test.pl
+
+[bench\Data\ATIS]
+file26=C:\mysql\bench\Data\ATIS\stop1.txt
+file15=C:\mysql\bench\Data\ATIS\flight_class.txt
+file27=C:\mysql\bench\Data\ATIS\time_interval.txt
+file16=C:\mysql\bench\Data\ATIS\flight_day.txt
+file0=C:\mysql\bench\Data\ATIS\transport.txt
+file28=C:\mysql\bench\Data\ATIS\time_zone.txt
+file17=C:\mysql\bench\Data\ATIS\flight_fare.txt
+file1=C:\mysql\bench\Data\ATIS\airline.txt
+file29=C:\mysql\bench\Data\ATIS\aircraft.txt
+file18=C:\mysql\bench\Data\ATIS\food_service.txt
+file2=C:\mysql\bench\Data\ATIS\airport.txt
+file19=C:\mysql\bench\Data\ATIS\ground_service.txt
+file3=C:\mysql\bench\Data\ATIS\airport_service.txt
+file4=C:\mysql\bench\Data\ATIS\city.txt
+file5=C:\mysql\bench\Data\ATIS\class_of_service.txt
+file6=C:\mysql\bench\Data\ATIS\code_description.txt
+file7=C:\mysql\bench\Data\ATIS\compound_class.txt
+file8=C:\mysql\bench\Data\ATIS\connect_leg.txt
+file9=C:\mysql\bench\Data\ATIS\date_day.txt
+file20=C:\mysql\bench\Data\ATIS\month_name.txt
+file21=C:\mysql\bench\Data\ATIS\restrict_carrier.txt
+file10=C:\mysql\bench\Data\ATIS\day_name.txt
+fulldirectory=
+file22=C:\mysql\bench\Data\ATIS\restrict_class.txt
+file11=C:\mysql\bench\Data\ATIS\dual_carrier.txt
+file23=C:\mysql\bench\Data\ATIS\restriction.txt
+file12=C:\mysql\bench\Data\ATIS\fare.txt
+file24=C:\mysql\bench\Data\ATIS\state.txt
+file13=C:\mysql\bench\Data\ATIS\fconnection.txt
+file25=C:\mysql\bench\Data\ATIS\stop.txt
+file14=C:\mysql\bench\Data\ATIS\flight.txt
+
+[General]
+Type=FILELIST
+Version=1.00.000
+
+[scripts]
+file37=C:\mysql\scripts\mysqld_safe-watch.sh
+file26=C:\mysql\scripts\mysql_zap
+file15=C:\mysql\scripts\mysql_fix_privilege_tables
+file38=C:\mysql\scripts\mysqldumpslow
+file27=C:\mysql\scripts\mysql_zap.sh
+file16=C:\mysql\scripts\mysql_fix_privilege_tables.sh
+file0=C:\mysql\scripts\Readme
+file39=C:\mysql\scripts\mysqldumpslow.sh
+file28=C:\mysql\scripts\mysqlaccess
+file17=C:\mysql\scripts\mysql_install_db
+file1=C:\mysql\scripts\make_binary_distribution.sh
+file29=C:\mysql\scripts\mysqlaccess.conf
+file18=C:\mysql\scripts\mysql_install_db.sh
+file2=C:\mysql\scripts\msql2mysql
+file19=C:\mysql\scripts\mysql_secure_installation
+file3=C:\mysql\scripts\msql2mysql.sh
+file4=C:\mysql\scripts\mysql_config
+file5=C:\mysql\scripts\mysql_config.sh
+file6=C:\mysql\scripts\mysql_convert_table_format
+file7=C:\mysql\scripts\mysql_convert_table_format.sh
+file40=C:\mysql\scripts\mysqlhotcopy
+file8=C:\mysql\scripts\mysql_explain_log
+file41=C:\mysql\scripts\mysqlhotcopy.pl
+file30=C:\mysql\scripts\mysqlaccess.sh
+file9=C:\mysql\scripts\mysql_explain_log.sh
+file42=C:\mysql\scripts\mysqlhotcopy.sh
+file31=C:\mysql\scripts\mysqlbug
+file20=C:\mysql\scripts\mysql_secure_installation.sh
+file43=C:\mysql\scripts\make_binary_distribution
+file32=C:\mysql\scripts\mysqlbug.sh
+file21=C:\mysql\scripts\mysql_setpermission
+file10=C:\mysql\scripts\mysql_find_rows
+fulldirectory=
+file33=C:\mysql\scripts\mysqld_multi
+file22=C:\mysql\scripts\mysql_setpermission.pl
+file11=C:\mysql\scripts\mysql_find_rows.pl
+file34=C:\mysql\scripts\mysqld_multi.sh
+file23=C:\mysql\scripts\mysql_setpermission.sh
+file12=C:\mysql\scripts\mysql_find_rows.sh
+file35=C:\mysql\scripts\mysqld_safe
+file24=C:\mysql\scripts\mysql_tableinfo
+file13=C:\mysql\scripts\mysql_fix_extensions
+file36=C:\mysql\scripts\mysqld_safe.sh
+file25=C:\mysql\scripts\mysql_tableinfo.sh
+file14=C:\mysql\scripts\mysql_fix_extensions.sh
+
+[lib]
+SubDir0=lib\debug
+SubDir1=lib\opt
+fulldirectory=
+
diff --git a/VC++Files/InstallShield/4.0.XX-pro/File Groups/Documentation.fgl b/VC++Files/InstallShield/4.0.XX-pro/File Groups/Documentation.fgl
new file mode 100755
index 00000000000..80fe777cf0f
--- /dev/null
+++ b/VC++Files/InstallShield/4.0.XX-pro/File Groups/Documentation.fgl
@@ -0,0 +1,99 @@
+[Docs\Flags]
+file59=C:\mysql\Docs\Flags\romania.gif
+file48=C:\mysql\Docs\Flags\kroatia.eps
+file37=C:\mysql\Docs\Flags\iceland.gif
+file26=C:\mysql\Docs\Flags\france.eps
+file15=C:\mysql\Docs\Flags\china.gif
+file49=C:\mysql\Docs\Flags\kroatia.gif
+file38=C:\mysql\Docs\Flags\ireland.eps
+file27=C:\mysql\Docs\Flags\france.gif
+file16=C:\mysql\Docs\Flags\croatia.eps
+file0=C:\mysql\Docs\Flags\usa.gif
+file39=C:\mysql\Docs\Flags\ireland.gif
+file28=C:\mysql\Docs\Flags\germany.eps
+file17=C:\mysql\Docs\Flags\croatia.gif
+file1=C:\mysql\Docs\Flags\argentina.gif
+file29=C:\mysql\Docs\Flags\germany.gif
+file18=C:\mysql\Docs\Flags\czech-republic.eps
+file2=C:\mysql\Docs\Flags\australia.eps
+file19=C:\mysql\Docs\Flags\czech-republic.gif
+file3=C:\mysql\Docs\Flags\australia.gif
+file80=C:\mysql\Docs\Flags\usa.eps
+file4=C:\mysql\Docs\Flags\austria.eps
+file81=C:\mysql\Docs\Flags\argentina.eps
+file70=C:\mysql\Docs\Flags\spain.eps
+file5=C:\mysql\Docs\Flags\austria.gif
+file71=C:\mysql\Docs\Flags\spain.gif
+file60=C:\mysql\Docs\Flags\russia.eps
+file6=C:\mysql\Docs\Flags\brazil.eps
+file72=C:\mysql\Docs\Flags\sweden.eps
+file61=C:\mysql\Docs\Flags\russia.gif
+file50=C:\mysql\Docs\Flags\latvia.eps
+file7=C:\mysql\Docs\Flags\brazil.gif
+file73=C:\mysql\Docs\Flags\sweden.gif
+file62=C:\mysql\Docs\Flags\singapore.eps
+file51=C:\mysql\Docs\Flags\latvia.gif
+file40=C:\mysql\Docs\Flags\island.eps
+file8=C:\mysql\Docs\Flags\bulgaria.eps
+file74=C:\mysql\Docs\Flags\switzerland.eps
+file63=C:\mysql\Docs\Flags\singapore.gif
+file52=C:\mysql\Docs\Flags\netherlands.eps
+file41=C:\mysql\Docs\Flags\island.gif
+file30=C:\mysql\Docs\Flags\great-britain.eps
+file9=C:\mysql\Docs\Flags\bulgaria.gif
+file75=C:\mysql\Docs\Flags\switzerland.gif
+file64=C:\mysql\Docs\Flags\south-africa.eps
+file53=C:\mysql\Docs\Flags\netherlands.gif
+file42=C:\mysql\Docs\Flags\israel.eps
+file31=C:\mysql\Docs\Flags\great-britain.gif
+file20=C:\mysql\Docs\Flags\denmark.eps
+file76=C:\mysql\Docs\Flags\taiwan.eps
+file65=C:\mysql\Docs\Flags\south-africa.gif
+file54=C:\mysql\Docs\Flags\poland.eps
+file43=C:\mysql\Docs\Flags\israel.gif
+file32=C:\mysql\Docs\Flags\greece.eps
+file21=C:\mysql\Docs\Flags\denmark.gif
+file10=C:\mysql\Docs\Flags\canada.eps
+fulldirectory=
+file77=C:\mysql\Docs\Flags\taiwan.gif
+file66=C:\mysql\Docs\Flags\south-africa1.eps
+file55=C:\mysql\Docs\Flags\poland.gif
+file44=C:\mysql\Docs\Flags\italy.eps
+file33=C:\mysql\Docs\Flags\greece.gif
+file22=C:\mysql\Docs\Flags\estonia.eps
+file11=C:\mysql\Docs\Flags\canada.gif
+file78=C:\mysql\Docs\Flags\ukraine.eps
+file67=C:\mysql\Docs\Flags\south-africa1.gif
+file56=C:\mysql\Docs\Flags\portugal.eps
+file45=C:\mysql\Docs\Flags\italy.gif
+file34=C:\mysql\Docs\Flags\hungary.eps
+file23=C:\mysql\Docs\Flags\estonia.gif
+file12=C:\mysql\Docs\Flags\chile.eps
+file79=C:\mysql\Docs\Flags\ukraine.gif
+file68=C:\mysql\Docs\Flags\south-korea.eps
+file57=C:\mysql\Docs\Flags\portugal.gif
+file46=C:\mysql\Docs\Flags\japan.eps
+file35=C:\mysql\Docs\Flags\hungary.gif
+file24=C:\mysql\Docs\Flags\finland.eps
+file13=C:\mysql\Docs\Flags\chile.gif
+file69=C:\mysql\Docs\Flags\south-korea.gif
+file58=C:\mysql\Docs\Flags\romania.eps
+file47=C:\mysql\Docs\Flags\japan.gif
+file36=C:\mysql\Docs\Flags\iceland.eps
+file25=C:\mysql\Docs\Flags\finland.gif
+file14=C:\mysql\Docs\Flags\china.eps
+
+[Docs]
+file0=C:\mysql\Docs\manual_toc.html
+file1=C:\mysql\Docs\manual.html
+file2=C:\mysql\Docs\manual.txt
+SubDir0=Docs\Flags
+fulldirectory=
+
+[TopDir]
+SubDir0=Docs
+
+[General]
+Type=FILELIST
+Version=1.00.000
+
diff --git a/VC++Files/InstallShield/4.0.XX-pro/File Groups/Grant Tables.fgl b/VC++Files/InstallShield/4.0.XX-pro/File Groups/Grant Tables.fgl
new file mode 100755
index 00000000000..178065a7003
--- /dev/null
+++ b/VC++Files/InstallShield/4.0.XX-pro/File Groups/Grant Tables.fgl
@@ -0,0 +1,36 @@
+[data\test]
+fulldirectory=
+
+[data\mysql]
+file15=C:\mysql\data\mysql\func.frm
+file16=C:\mysql\data\mysql\func.MYD
+file0=C:\mysql\data\mysql\columns_priv.frm
+file17=C:\mysql\data\mysql\func.MYI
+file1=C:\mysql\data\mysql\columns_priv.MYD
+file2=C:\mysql\data\mysql\columns_priv.MYI
+file3=C:\mysql\data\mysql\db.frm
+file4=C:\mysql\data\mysql\db.MYD
+file5=C:\mysql\data\mysql\db.MYI
+file6=C:\mysql\data\mysql\host.frm
+file7=C:\mysql\data\mysql\host.MYD
+file8=C:\mysql\data\mysql\host.MYI
+file9=C:\mysql\data\mysql\tables_priv.frm
+file10=C:\mysql\data\mysql\tables_priv.MYD
+fulldirectory=
+file11=C:\mysql\data\mysql\tables_priv.MYI
+file12=C:\mysql\data\mysql\user.frm
+file13=C:\mysql\data\mysql\user.MYD
+file14=C:\mysql\data\mysql\user.MYI
+
+[TopDir]
+SubDir0=data
+
+[data]
+SubDir0=data\mysql
+SubDir1=data\test
+fulldirectory=
+
+[General]
+Type=FILELIST
+Version=1.00.000
+
diff --git a/VC++Files/InstallShield/4.0.XX-pro/File Groups/Servers.fgl b/VC++Files/InstallShield/4.0.XX-pro/File Groups/Servers.fgl
new file mode 100755
index 00000000000..3f875b574f6
--- /dev/null
+++ b/VC++Files/InstallShield/4.0.XX-pro/File Groups/Servers.fgl
@@ -0,0 +1,226 @@
+[Embedded\Static\release]
+file0=C:\mysql\embedded\Static\release\test_stc.dsp
+file1=C:\mysql\embedded\Static\release\ReadMe.txt
+file2=C:\mysql\embedded\Static\release\StdAfx.cpp
+file3=C:\mysql\embedded\Static\release\StdAfx.h
+file4=C:\mysql\embedded\Static\release\test_stc.cpp
+file5=C:\mysql\embedded\Static\release\mysqlserver.lib
+fulldirectory=
+
+[share\polish]
+file0=C:\mysql\share\polish\errmsg.sys
+file1=C:\mysql\share\polish\errmsg.txt
+fulldirectory=
+
+[share\dutch]
+file0=C:\mysql\share\dutch\errmsg.sys
+file1=C:\mysql\share\dutch\errmsg.txt
+fulldirectory=
+
+[share\spanish]
+file0=C:\mysql\share\spanish\errmsg.sys
+file1=C:\mysql\share\spanish\errmsg.txt
+fulldirectory=
+
+[share\english]
+file0=C:\mysql\share\english\errmsg.sys
+file1=C:\mysql\share\english\errmsg.txt
+fulldirectory=
+
+[bin]
+file0=C:\mysql\bin\mysqld-opt.exe
+file1=C:\mysql\bin\mysqld-nt.exe
+file2=C:\mysql\bin\mysqld.exe
+file3=C:\mysql\bin\cygwinb19.dll
+file4=C:\mysql\bin\libmySQL.dll
+fulldirectory=
+
+[share\korean]
+file0=C:\mysql\share\korean\errmsg.sys
+file1=C:\mysql\share\korean\errmsg.txt
+fulldirectory=
+
+[share\charsets]
+file15=C:\mysql\share\charsets\latin1.conf
+file16=C:\mysql\share\charsets\latin2.conf
+file0=C:\mysql\share\charsets\win1251ukr.conf
+file17=C:\mysql\share\charsets\latin5.conf
+file1=C:\mysql\share\charsets\cp1257.conf
+file18=C:\mysql\share\charsets\Readme
+file2=C:\mysql\share\charsets\croat.conf
+file19=C:\mysql\share\charsets\swe7.conf
+file3=C:\mysql\share\charsets\danish.conf
+file4=C:\mysql\share\charsets\dec8.conf
+file5=C:\mysql\share\charsets\dos.conf
+file6=C:\mysql\share\charsets\estonia.conf
+file7=C:\mysql\share\charsets\german1.conf
+file8=C:\mysql\share\charsets\greek.conf
+file9=C:\mysql\share\charsets\hebrew.conf
+file20=C:\mysql\share\charsets\usa7.conf
+file21=C:\mysql\share\charsets\win1250.conf
+file10=C:\mysql\share\charsets\hp8.conf
+fulldirectory=
+file22=C:\mysql\share\charsets\win1251.conf
+file11=C:\mysql\share\charsets\hungarian.conf
+file23=C:\mysql\share\charsets\cp1251.conf
+file12=C:\mysql\share\charsets\Index
+file13=C:\mysql\share\charsets\koi8_ru.conf
+file14=C:\mysql\share\charsets\koi8_ukr.conf
+
+[Embedded\DLL\debug]
+file0=C:\mysql\embedded\DLL\debug\libmysqld.dll
+file1=C:\mysql\embedded\DLL\debug\libmysqld.exp
+file2=C:\mysql\embedded\DLL\debug\libmysqld.lib
+fulldirectory=
+
+[Embedded]
+file0=C:\mysql\embedded\embedded.dsw
+SubDir0=Embedded\DLL
+SubDir1=Embedded\Static
+fulldirectory=
+
+[share\ukrainian]
+file0=C:\mysql\share\ukrainian\errmsg.sys
+file1=C:\mysql\share\ukrainian\errmsg.txt
+fulldirectory=
+
+[share\hungarian]
+file0=C:\mysql\share\hungarian\errmsg.sys
+file1=C:\mysql\share\hungarian\errmsg.txt
+fulldirectory=
+
+[share\german]
+file0=C:\mysql\share\german\errmsg.sys
+file1=C:\mysql\share\german\errmsg.txt
+fulldirectory=
+
+[share\portuguese]
+file0=C:\mysql\share\portuguese\errmsg.sys
+file1=C:\mysql\share\portuguese\errmsg.txt
+fulldirectory=
+
+[share\estonian]
+file0=C:\mysql\share\estonian\errmsg.sys
+file1=C:\mysql\share\estonian\errmsg.txt
+fulldirectory=
+
+[share\romanian]
+file0=C:\mysql\share\romanian\errmsg.sys
+file1=C:\mysql\share\romanian\errmsg.txt
+fulldirectory=
+
+[share\french]
+file0=C:\mysql\share\french\errmsg.sys
+file1=C:\mysql\share\french\errmsg.txt
+fulldirectory=
+
+[share\swedish]
+file0=C:\mysql\share\swedish\errmsg.sys
+file1=C:\mysql\share\swedish\errmsg.txt
+fulldirectory=
+
+[share\slovak]
+file0=C:\mysql\share\slovak\errmsg.sys
+file1=C:\mysql\share\slovak\errmsg.txt
+fulldirectory=
+
+[share\greek]
+file0=C:\mysql\share\greek\errmsg.sys
+file1=C:\mysql\share\greek\errmsg.txt
+fulldirectory=
+
+[TopDir]
+file0=C:\mysql\my-huge.cnf
+file1=C:\mysql\my-large.cnf
+file2=C:\mysql\my-medium.cnf
+file3=C:\mysql\my-small.cnf
+file4=C:\mysql\MySQLEULA.txt
+SubDir0=bin
+SubDir1=share
+SubDir2=Embedded
+
+[share]
+SubDir8=share\hungarian
+SubDir9=share\charsets
+SubDir20=share\spanish
+SubDir21=share\swedish
+SubDir10=share\italian
+SubDir22=share\ukrainian
+SubDir11=share\japanese
+SubDir12=share\korean
+SubDir13=share\norwegian
+SubDir14=share\norwegian-ny
+SubDir15=share\polish
+SubDir16=share\portuguese
+SubDir0=share\czech
+SubDir17=share\romanian
+SubDir1=share\danish
+SubDir18=share\russian
+SubDir2=share\dutch
+SubDir19=share\slovak
+SubDir3=share\english
+fulldirectory=
+SubDir4=share\estonian
+SubDir5=share\french
+SubDir6=share\german
+SubDir7=share\greek
+
+[share\norwegian-ny]
+file0=C:\mysql\share\norwegian-ny\errmsg.sys
+file1=C:\mysql\share\norwegian-ny\errmsg.txt
+fulldirectory=
+
+[Embedded\DLL]
+file0=C:\mysql\embedded\DLL\test_dll.dsp
+file1=C:\mysql\embedded\DLL\StdAfx.h
+file2=C:\mysql\embedded\DLL\test_dll.cpp
+file3=C:\mysql\embedded\DLL\StdAfx.cpp
+SubDir0=Embedded\DLL\debug
+SubDir1=Embedded\DLL\release
+fulldirectory=
+
+[Embedded\Static]
+SubDir0=Embedded\Static\release
+fulldirectory=
+
+[Embedded\DLL\release]
+file0=C:\mysql\embedded\DLL\release\libmysqld.dll
+file1=C:\mysql\embedded\DLL\release\libmysqld.exp
+file2=C:\mysql\embedded\DLL\release\libmysqld.lib
+file3=C:\mysql\embedded\DLL\release\mysql-server.exe
+fulldirectory=
+
+[share\danish]
+file0=C:\mysql\share\danish\errmsg.sys
+file1=C:\mysql\share\danish\errmsg.txt
+fulldirectory=
+
+[share\czech]
+file0=C:\mysql\share\czech\errmsg.sys
+file1=C:\mysql\share\czech\errmsg.txt
+fulldirectory=
+
+[General]
+Type=FILELIST
+Version=1.00.000
+
+[share\russian]
+file0=C:\mysql\share\russian\errmsg.sys
+file1=C:\mysql\share\russian\errmsg.txt
+fulldirectory=
+
+[share\norwegian]
+file0=C:\mysql\share\norwegian\errmsg.sys
+file1=C:\mysql\share\norwegian\errmsg.txt
+fulldirectory=
+
+[share\japanese]
+file0=C:\mysql\share\japanese\errmsg.sys
+file1=C:\mysql\share\japanese\errmsg.txt
+fulldirectory=
+
+[share\italian]
+file0=C:\mysql\share\italian\errmsg.sys
+file1=C:\mysql\share\italian\errmsg.txt
+fulldirectory=
+
diff --git a/VC++Files/InstallShield/4.0.XX-pro/Registry Entries/Default.rge b/VC++Files/InstallShield/4.0.XX-pro/Registry Entries/Default.rge
new file mode 100755
index 00000000000..537dfd82e48
--- /dev/null
+++ b/VC++Files/InstallShield/4.0.XX-pro/Registry Entries/Default.rge
@@ -0,0 +1,4 @@
+[General]
+Type=REGISTRYDATA
+Version=1.00.000
+
diff --git a/VC++Files/InstallShield/4.0.XX-pro/Script Files/Setup.dbg b/VC++Files/InstallShield/4.0.XX-pro/Script Files/Setup.dbg
new file mode 100755
index 00000000000..0c6d4e6b708
--- /dev/null
+++ b/VC++Files/InstallShield/4.0.XX-pro/Script Files/Setup.dbg
Binary files differ
diff --git a/VC++Files/InstallShield/4.0.XX-pro/Script Files/Setup.ino b/VC++Files/InstallShield/4.0.XX-pro/Script Files/Setup.ino
new file mode 100755
index 00000000000..204d8ea0f36
--- /dev/null
+++ b/VC++Files/InstallShield/4.0.XX-pro/Script Files/Setup.ino
Binary files differ
diff --git a/VC++Files/InstallShield/4.0.XX-pro/Script Files/Setup.ins b/VC++Files/InstallShield/4.0.XX-pro/Script Files/Setup.ins
new file mode 100755
index 00000000000..759009b5c84
--- /dev/null
+++ b/VC++Files/InstallShield/4.0.XX-pro/Script Files/Setup.ins
Binary files differ
diff --git a/VC++Files/InstallShield/4.0.XX-pro/Script Files/Setup.obs b/VC++Files/InstallShield/4.0.XX-pro/Script Files/Setup.obs
new file mode 100755
index 00000000000..5fcfcb62c4e
--- /dev/null
+++ b/VC++Files/InstallShield/4.0.XX-pro/Script Files/Setup.obs
Binary files differ
diff --git a/VC++Files/InstallShield/4.0.XX-pro/Script Files/Setup.rul b/VC++Files/InstallShield/4.0.XX-pro/Script Files/Setup.rul
new file mode 100755
index 00000000000..df143b493c4
--- /dev/null
+++ b/VC++Files/InstallShield/4.0.XX-pro/Script Files/Setup.rul
@@ -0,0 +1,640 @@
+
+////////////////////////////////////////////////////////////////////////////////
+//
+// IIIIIII SSSSSS
+// II SS InstallShield (R)
+// II SSSSSS (c) 1996-1997, InstallShield Software Corporation
+// II SS (c) 1990-1996, InstallShield Corporation
+// IIIIIII SSSSSS All Rights Reserved.
+//
+//
+// This code is generated as a starting setup template. You should
+// modify it to provide all necessary steps for your setup.
+//
+//
+// File Name: Setup.rul
+//
+// Description: InstallShield script
+//
+// Comments: This template script performs a basic setup on a
+// Windows 95 or Windows NT 4.0 platform. With minor
+// modifications, this template can be adapted to create
+// new, customized setups.
+//
+////////////////////////////////////////////////////////////////////////////////
+
+
+ // Include header file
+#include "sdlang.h"
+#include "sddialog.h"
+
+////////////////////// string defines ////////////////////////////
+
+#define UNINST_LOGFILE_NAME "Uninst.isu"
+
+//////////////////// installation declarations ///////////////////
+
+ // ----- DLL prototypes -----
+
+
+ // your DLL prototypes
+
+
+ // ---- script prototypes -----
+
+ // generated
+ prototype ShowDialogs();
+ prototype MoveFileData();
+ prototype HandleMoveDataError( NUMBER );
+ prototype ProcessBeforeDataMove();
+ prototype ProcessAfterDataMove();
+ prototype SetupRegistry();
+ prototype SetupFolders();
+ prototype CleanUpInstall();
+ prototype SetupInstall();
+ prototype SetupScreen();
+ prototype CheckRequirements();
+ prototype DialogShowSdWelcome();
+ prototype DialogShowSdShowInfoList();
+ prototype DialogShowSdAskDestPath();
+ prototype DialogShowSdSetupType();
+ prototype DialogShowSdComponentDialog2();
+ prototype DialogShowSdFinishReboot();
+
+ // your prototypes
+
+
+ // ----- global variables ------
+
+ // generated
+ BOOL bWinNT, bIsShellExplorer, bInstallAborted, bIs32BitSetup;
+ STRING svDir;
+ STRING svName, svCompany, svSerial;
+ STRING szAppPath;
+ STRING svSetupType;
+
+
+ // your global variables
+
+
+///////////////////////////////////////////////////////////////////////////////
+//
+// MAIN PROGRAM
+//
+// The setup begins here by hiding the visible setup
+// window. This is done to allow all the titles, images, etc. to
+// be established before showing the main window. The following
+// logic then performs the setup in a series of steps.
+//
+///////////////////////////////////////////////////////////////////////////////
+program
+ Disable( BACKGROUND );
+
+ CheckRequirements();
+
+ SetupInstall();
+
+ SetupScreen();
+
+ if (ShowDialogs()<0) goto end_install;
+
+ if (ProcessBeforeDataMove()<0) goto end_install;
+
+ if (MoveFileData()<0) goto end_install;
+
+ if (ProcessAfterDataMove()<0) goto end_install;
+
+ if (SetupRegistry()<0) goto end_install;
+
+ if (SetupFolders()<0) goto end_install;
+
+
+ end_install:
+
+ CleanUpInstall();
+
+ // If an unrecoverable error occurred, clean up the partial installation.
+ // Otherwise, exit normally.
+
+ if (bInstallAborted) then
+ abort;
+ endif;
+
+endprogram
+
+///////////////////////////////////////////////////////////////////////////////
+// //
+// Function: ShowDialogs //
+// //
+// Purpose: This function manages the display and navigation //
+// the standard dialogs that exist in a setup. //
+// //
+///////////////////////////////////////////////////////////////////////////////
+function ShowDialogs()
+ NUMBER nResult;
+ begin
+
+ Dlg_Start:
+ // beginning of dialogs label
+
+ Dlg_SdWelcome:
+ nResult = DialogShowSdWelcome();
+ if (nResult = BACK) goto Dlg_Start;
+
+ Dlg_SdShowInfoList:
+ nResult = DialogShowSdShowInfoList();
+ if (nResult = BACK) goto Dlg_SdWelcome;
+
+ Dlg_SdAskDestPath:
+ nResult = DialogShowSdAskDestPath();
+ if (nResult = BACK) goto Dlg_SdShowInfoList;
+
+ Dlg_SdSetupType:
+ nResult = DialogShowSdSetupType();
+ if (nResult = BACK) goto Dlg_SdAskDestPath;
+
+ Dlg_SdComponentDialog2:
+ if ((nResult = BACK) && (svSetupType != "Custom") && (svSetupType != "")) then
+ goto Dlg_SdSetupType;
+ endif;
+ nResult = DialogShowSdComponentDialog2();
+ if (nResult = BACK) goto Dlg_SdSetupType;
+
+ return 0;
+
+ end;
+
+///////////////////////////////////////////////////////////////////////////////
+// //
+// Function: ProcessBeforeDataMove //
+// //
+// Purpose: This function performs any necessary operations prior to the //
+// actual data move operation. //
+// //
+///////////////////////////////////////////////////////////////////////////////
+function ProcessBeforeDataMove()
+ STRING svLogFile;
+ NUMBER nResult;
+ begin
+
+ InstallationInfo( @COMPANY_NAME, @PRODUCT_NAME, @PRODUCT_VERSION, @PRODUCT_KEY );
+
+ svLogFile = UNINST_LOGFILE_NAME;
+
+ nResult = DeinstallStart( svDir, svLogFile, @UNINST_KEY, 0 );
+ if (nResult < 0) then
+ MessageBox( @ERROR_UNINSTSETUP, WARNING );
+ endif;
+
+ szAppPath = TARGETDIR; // TODO : if your application .exe is in a subdir of TARGETDIR then add subdir
+
+ if ((bIs32BitSetup) && (bIsShellExplorer)) then
+ RegDBSetItem( REGDB_APPPATH, szAppPath );
+ RegDBSetItem( REGDB_APPPATH_DEFAULT, szAppPath ^ @PRODUCT_KEY );
+ RegDBSetItem( REGDB_UNINSTALL_NAME, @UNINST_DISPLAY_NAME );
+ endif;
+
+ // TODO : update any items you want to process before moving the data
+ //
+
+ return 0;
+ end;
+
+///////////////////////////////////////////////////////////////////////////////
+// //
+// Function: MoveFileData //
+// //
+// Purpose: This function handles the data movement for //
+// the setup. //
+// //
+///////////////////////////////////////////////////////////////////////////////
+function MoveFileData()
+ NUMBER nResult, nDisk;
+ begin
+
+ nDisk = 1;
+ SetStatusWindow( 0, "" );
+ Disable( DIALOGCACHE );
+ Enable( STATUS );
+ StatusUpdate( ON, 100 );
+ nResult = ComponentMoveData( MEDIA, nDisk, 0 );
+
+ HandleMoveDataError( nResult );
+
+ Disable( STATUS );
+
+ return nResult;
+
+ end;
+
+
+///////////////////////////////////////////////////////////////////////////////
+// //
+// Function: HandleMoveDataError //
+// //
+// Purpose: This function handles the error (if any) during the move data //
+// operation. //
+// //
+///////////////////////////////////////////////////////////////////////////////
+function HandleMoveDataError( nResult )
+ STRING szErrMsg, svComponent , svFileGroup , svFile;
+ begin
+
+ svComponent = "";
+ svFileGroup = "";
+ svFile = "";
+
+ switch (nResult)
+ case 0:
+ return 0;
+ default:
+ ComponentError ( MEDIA , svComponent , svFileGroup , svFile , nResult );
+ szErrMsg = @ERROR_MOVEDATA + "\n\n" +
+ @ERROR_COMPONENT + " " + svComponent + "\n" +
+ @ERROR_FILEGROUP + " " + svFileGroup + "\n" +
+ @ERROR_FILE + " " + svFile;
+ SprintfBox( SEVERE, @TITLE_CAPTIONBAR, szErrMsg, nResult );
+ bInstallAborted = TRUE;
+ return nResult;
+ endswitch;
+
+ end;
+
+///////////////////////////////////////////////////////////////////////////////
+// //
+// Function: ProcessAfterDataMove //
+// //
+// Purpose: This function performs any necessary operations needed after //
+// all data has been moved. //
+// //
+///////////////////////////////////////////////////////////////////////////////
+function ProcessAfterDataMove()
+ begin
+
+ // TODO : update self-registered files and other processes that
+ // should be performed after the data has been moved.
+
+
+ return 0;
+ end;
+
+///////////////////////////////////////////////////////////////////////////////
+// //
+// Function: SetupRegistry //
+// //
+// Purpose: This function makes the registry entries for this setup. //
+// //
+///////////////////////////////////////////////////////////////////////////////
+function SetupRegistry()
+ NUMBER nResult;
+
+ begin
+
+ // TODO : Add all your registry entry keys here
+ //
+ //
+ // RegDBCreateKeyEx, RegDBSetKeyValueEx....
+ //
+
+ nResult = CreateRegistrySet( "" );
+
+ return nResult;
+ end;
+
+///////////////////////////////////////////////////////////////////////////////
+//
+// Function: SetupFolders
+//
+// Purpose: This function creates all the folders and shortcuts for the
+// setup. This includes program groups and items for Windows 3.1.
+//
+///////////////////////////////////////////////////////////////////////////////
+function SetupFolders()
+ NUMBER nResult;
+
+ begin
+
+
+ // TODO : Add all your folder (program group) along with shortcuts (program items)
+ //
+ //
+ // CreateProgramFolder, AddFolderIcon....
+ //
+
+ nResult = CreateShellObjects( "" );
+
+ return nResult;
+ end;
+
+///////////////////////////////////////////////////////////////////////////////
+// //
+// Function: CleanUpInstall //
+// //
+// Purpose: This cleans up the setup. Anything that should //
+// be released or deleted at the end of the setup should //
+// be done here. //
+// //
+///////////////////////////////////////////////////////////////////////////////
+function CleanUpInstall()
+ begin
+
+
+ if (bInstallAborted) then
+ return 0;
+ endif;
+
+ DialogShowSdFinishReboot();
+
+ if (BATCH_INSTALL) then // ensure locked files are properly written
+ CommitSharedFiles(0);
+ endif;
+
+ return 0;
+ end;
+
+///////////////////////////////////////////////////////////////////////////////
+// //
+// Function: SetupInstall //
+// //
+// Purpose: This will setup the installation. Any general initialization //
+// needed for the installation should be performed here. //
+// //
+///////////////////////////////////////////////////////////////////////////////
+function SetupInstall()
+ begin
+
+ Enable( CORECOMPONENTHANDLING );
+
+ bInstallAborted = FALSE;
+
+ if (bIs32BitSetup) then
+ svDir = "C:\\mysql"; //PROGRAMFILES ^ @COMPANY_NAME ^ @PRODUCT_NAME;
+ else
+ svDir = "C:\\mysql"; //PROGRAMFILES ^ @COMPANY_NAME16 ^ @PRODUCT_NAME16; // use shorten names
+ endif;
+
+ TARGETDIR = svDir;
+
+ SdProductName( @PRODUCT_NAME );
+
+ Enable( DIALOGCACHE );
+
+ return 0;
+ end;
+
+///////////////////////////////////////////////////////////////////////////////
+// //
+// Function: SetupScreen //
+// //
+// Purpose: This function establishes the screen look. This includes //
+// colors, fonts, and text to be displayed. //
+// //
+///////////////////////////////////////////////////////////////////////////////
+function SetupScreen()
+ begin
+
+ Enable( FULLWINDOWMODE );
+ Enable( INDVFILESTATUS );
+ SetTitle( @TITLE_MAIN, 24, WHITE );
+
+ SetTitle( @TITLE_CAPTIONBAR, 0, BACKGROUNDCAPTION ); // Caption bar text.
+
+ Enable( BACKGROUND );
+
+ Delay( 1 );
+ end;
+
+///////////////////////////////////////////////////////////////////////////////
+// //
+// Function: CheckRequirements //
+// //
+// Purpose: This function checks all minimum requirements for the //
+// application being installed. If any fail, then the user //
+// is informed and the setup is terminated. //
+// //
+///////////////////////////////////////////////////////////////////////////////
+function CheckRequirements()
+ NUMBER nvDx, nvDy, nvResult;
+ STRING svResult;
+
+ begin
+
+ bWinNT = FALSE;
+ bIsShellExplorer = FALSE;
+
+ // Check screen resolution.
+ GetExtents( nvDx, nvDy );
+
+ if (nvDy < 480) then
+ MessageBox( @ERROR_VGARESOLUTION, WARNING );
+ abort;
+ endif;
+
+ // set 'setup' operation mode
+ bIs32BitSetup = TRUE;
+ GetSystemInfo( ISTYPE, nvResult, svResult );
+ if (nvResult = 16) then
+ bIs32BitSetup = FALSE; // running 16-bit setup
+ return 0; // no additional information required
+ endif;
+
+ // --- 32-bit testing after this point ---
+
+ // Determine the target system's operating system.
+ GetSystemInfo( OS, nvResult, svResult );
+
+ if (nvResult = IS_WINDOWSNT) then
+ // Running Windows NT.
+ bWinNT = TRUE;
+
+ // Check to see if the shell being used is EXPLORER shell.
+ if (GetSystemInfo( OSMAJOR, nvResult, svResult ) = 0) then
+ if (nvResult >= 4) then
+ bIsShellExplorer = TRUE;
+ endif;
+ endif;
+
+ elseif (nvResult = IS_WINDOWS95 ) then
+ bIsShellExplorer = TRUE;
+
+ endif;
+
+end;
+
+
+///////////////////////////////////////////////////////////////////////////////
+// //
+// Function: DialogShowSdWelcome //
+// //
+// Purpose: This function handles the standard welcome dialog. //
+// //
+// //
+///////////////////////////////////////////////////////////////////////////////
+function DialogShowSdWelcome()
+ NUMBER nResult;
+ STRING szTitle, szMsg;
+ begin
+
+ szTitle = "";
+ szMsg = "";
+ nResult = SdWelcome( szTitle, szMsg );
+
+ return nResult;
+ end;
+
+
+///////////////////////////////////////////////////////////////////////////////
+// //
+// Function: DialogShowSdShowInfoList //
+// //
+// Purpose: This function displays the general information list dialog. //
+// //
+// //
+///////////////////////////////////////////////////////////////////////////////
+function DialogShowSdShowInfoList()
+ NUMBER nResult;
+ LIST list;
+ STRING szTitle, szMsg, szFile;
+ begin
+
+ szFile = SUPPORTDIR ^ "infolist.txt";
+
+ list = ListCreate( STRINGLIST );
+ ListReadFromFile( list, szFile );
+ szTitle = "";
+ szMsg = " ";
+ nResult = SdShowInfoList( szTitle, szMsg, list );
+
+ ListDestroy( list );
+
+ return nResult;
+ end;
+
+
+///////////////////////////////////////////////////////////////////////////////
+// //
+// Function: DialogShowSdAskDestPath //
+// //
+// Purpose: This function asks the user for the destination directory. //
+// //
+///////////////////////////////////////////////////////////////////////////////
+function DialogShowSdAskDestPath()
+ NUMBER nResult;
+ STRING szTitle, szMsg;
+ begin
+
+ szTitle = "";
+ szMsg = "";
+ nResult = SdAskDestPath( szTitle, szMsg, svDir, 0 );
+
+ TARGETDIR = svDir;
+
+ return nResult;
+ end;
+
+
+///////////////////////////////////////////////////////////////////////////////
+// //
+// Function: DialogShowSdSetupType //
+// //
+// Purpose: This function displays the standard setup type dialog. //
+// //
+///////////////////////////////////////////////////////////////////////////////
+function DialogShowSdSetupType()
+ NUMBER nResult, nType;
+ STRING szTitle, szMsg;
+ begin
+
+ switch (svSetupType)
+ case "Typical":
+ nType = TYPICAL;
+ case "Custom":
+ nType = CUSTOM;
+ case "Compact":
+ nType = COMPACT;
+ case "":
+ svSetupType = "Typical";
+ nType = TYPICAL;
+ endswitch;
+
+ szTitle = "";
+ szMsg = "";
+ nResult = SetupType( szTitle, szMsg, "", nType, 0 );
+
+ switch (nResult)
+ case COMPACT:
+ svSetupType = "Compact";
+ case TYPICAL:
+ svSetupType = "Typical";
+ case CUSTOM:
+ svSetupType = "Custom";
+ endswitch;
+
+ return nResult;
+ end;
+
+
+///////////////////////////////////////////////////////////////////////////////
+// //
+// Function: DialogShowSdComponentDialog2 //
+// //
+// Purpose: This function displays the custom component dialog. //
+// //
+// //
+///////////////////////////////////////////////////////////////////////////////
+function DialogShowSdComponentDialog2()
+ NUMBER nResult;
+ STRING szTitle, szMsg;
+ begin
+
+ if ((svSetupType != "Custom") && (svSetupType != "")) then
+ return 0;
+ endif;
+
+ szTitle = "";
+ szMsg = "";
+ nResult = SdComponentDialog2( szTitle, szMsg, svDir, "" );
+
+ return nResult;
+ end;
+
+
+///////////////////////////////////////////////////////////////////////////////
+// //
+// Function: DialogShowSdFinishReboot //
+// //
+// Purpose: This function will show the last dialog of the product. //
+// It will allow the user to reboot and/or show some readme text. //
+// //
+///////////////////////////////////////////////////////////////////////////////
+function DialogShowSdFinishReboot()
+ NUMBER nResult, nDefOptions;
+ STRING szTitle, szMsg1, szMsg2, szOption1, szOption2;
+ NUMBER bOpt1, bOpt2;
+ begin
+
+ if (!BATCH_INSTALL) then
+ bOpt1 = FALSE;
+ bOpt2 = FALSE;
+ szMsg1 = "";
+ szMsg2 = "";
+ szOption1 = "";
+ szOption2 = "";
+ nResult = SdFinish( szTitle, szMsg1, szMsg2, szOption1, szOption2, bOpt1, bOpt2 );
+ return 0;
+ endif;
+
+ nDefOptions = SYS_BOOTMACHINE;
+ szTitle = "";
+ szMsg1 = "";
+ szMsg2 = "";
+ nResult = SdFinishReboot( szTitle, szMsg1, nDefOptions, szMsg2, 0 );
+
+ return nResult;
+ end;
+
+ // --- include script file section ---
+
+#include "sddialog.rul"
+
+
diff --git a/VC++Files/InstallShield/4.0.XX-pro/Setup Files/Compressed Files/Language Independent/OS Independent/infolist.txt b/VC++Files/InstallShield/4.0.XX-pro/Setup Files/Compressed Files/Language Independent/OS Independent/infolist.txt
new file mode 100755
index 00000000000..18d7995fd50
--- /dev/null
+++ b/VC++Files/InstallShield/4.0.XX-pro/Setup Files/Compressed Files/Language Independent/OS Independent/infolist.txt
@@ -0,0 +1,25 @@
+This is a release of MySQL Pro 4.0.11a-gamma for Win32.
+
+NOTE: If you install MySQL in a folder other than
+C:\MYSQL or you intend to start MySQL on NT/Win2000
+as a service, you must create a file named C:\MY.CNF
+or \Windows\my.ini or \winnt\my.ini with the following
+information::
+
+[mysqld]
+basedir=E:/installation-path/
+datadir=E:/data-path/
+
+After your have installed MySQL, the installation
+directory will contain 4 files named 'my-small.cnf,
+my-medium.cnf, my-large.cnf, my-huge.cnf'.
+You can use this as a starting point for your own
+C:\my.cnf file.
+
+If you have any problems, you can mail them to
+win32@lists.mysql.com after you have consulted the
+MySQL manual and the MySQL mailing list archive
+(http://www.mysql.com/documentation/index.html)
+
+On behalf of the MySQL AB gang,
+Michael Widenius \ No newline at end of file
diff --git a/VC++Files/InstallShield/4.0.XX-pro/Setup Files/Uncompressed Files/Language Independent/OS Independent/setup.bmp b/VC++Files/InstallShield/4.0.XX-pro/Setup Files/Uncompressed Files/Language Independent/OS Independent/setup.bmp
new file mode 100755
index 00000000000..3229d50c9bf
--- /dev/null
+++ b/VC++Files/InstallShield/4.0.XX-pro/Setup Files/Uncompressed Files/Language Independent/OS Independent/setup.bmp
Binary files differ
diff --git a/VC++Files/InstallShield/4.0.XX-pro/Shell Objects/Default.shl b/VC++Files/InstallShield/4.0.XX-pro/Shell Objects/Default.shl
new file mode 100755
index 00000000000..187cb651307
--- /dev/null
+++ b/VC++Files/InstallShield/4.0.XX-pro/Shell Objects/Default.shl
@@ -0,0 +1,12 @@
+[Data]
+Folder3=<FOLDER_STARTUP>
+Group0=Main
+Group1=Startup
+Folder0=<FOLDER_DESKTOP>
+Folder1=<FOLDER_STARTMENU>
+Folder2=<FOLDER_PROGRAMS>
+
+[Info]
+Type=ShellObject
+Version=1.00.000
+
diff --git a/VC++Files/InstallShield/4.0.XX-pro/String Tables/0009-English/value.shl b/VC++Files/InstallShield/4.0.XX-pro/String Tables/0009-English/value.shl
new file mode 100755
index 00000000000..c1dd3707afb
--- /dev/null
+++ b/VC++Files/InstallShield/4.0.XX-pro/String Tables/0009-English/value.shl
@@ -0,0 +1,23 @@
+[Data]
+TITLE_MAIN=MySQL Pro Servers and Clients 4.0.11a-gamma
+COMPANY_NAME=MySQL AB
+ERROR_COMPONENT=Component:
+COMPANY_NAME16=Company
+PRODUCT_VERSION=MySQL Pro Servers and Clients 4.0.11a-gamma
+ERROR_MOVEDATA=An error occurred during the move data process: %d
+ERROR_FILEGROUP=File Group:
+UNINST_KEY=MySQL Pro Servers and Clients 4.0.11a-gamma
+TITLE_CAPTIONBAR=MySQL Pro Servers and Clients 4.0.11a-gamma
+PRODUCT_NAME16=Product
+ERROR_VGARESOLUTION=This program requires VGA or better resolution.
+ERROR_FILE=File:
+UNINST_DISPLAY_NAME=MySQL Pro Servers and Clients 4.0.11a-gamma
+PRODUCT_KEY=yourapp.Exe
+PRODUCT_NAME=MySQL Pro Servers and Clients 4.0.11a-gamma
+ERROR_UNINSTSETUP=unInstaller setup failed to initialize. You may not be able to uninstall this product.
+
+[General]
+Language=0009
+Type=STRINGTABLESPECIFIC
+Version=1.00.000
+
diff --git a/VC++Files/InstallShield/4.0.XX-pro/String Tables/Default.shl b/VC++Files/InstallShield/4.0.XX-pro/String Tables/Default.shl
new file mode 100755
index 00000000000..d4dc4925ab1
--- /dev/null
+++ b/VC++Files/InstallShield/4.0.XX-pro/String Tables/Default.shl
@@ -0,0 +1,74 @@
+[TITLE_MAIN]
+Comment=
+
+[COMPANY_NAME]
+Comment=
+
+[ERROR_COMPONENT]
+Comment=
+
+[COMPANY_NAME16]
+Comment=
+
+[PRODUCT_VERSION]
+Comment=
+
+[ERROR_MOVEDATA]
+Comment=
+
+[ERROR_FILEGROUP]
+Comment=
+
+[Language]
+Lang0=0009
+CurrentLang=0
+
+[UNINST_KEY]
+Comment=
+
+[TITLE_CAPTIONBAR]
+Comment=
+
+[Data]
+Entry0=ERROR_VGARESOLUTION
+Entry1=TITLE_MAIN
+Entry2=TITLE_CAPTIONBAR
+Entry3=UNINST_KEY
+Entry4=UNINST_DISPLAY_NAME
+Entry5=COMPANY_NAME
+Entry6=PRODUCT_NAME
+Entry7=PRODUCT_VERSION
+Entry8=PRODUCT_KEY
+Entry9=ERROR_MOVEDATA
+Entry10=ERROR_UNINSTSETUP
+Entry11=COMPANY_NAME16
+Entry12=PRODUCT_NAME16
+Entry13=ERROR_COMPONENT
+Entry14=ERROR_FILEGROUP
+Entry15=ERROR_FILE
+
+[PRODUCT_NAME16]
+Comment=
+
+[ERROR_VGARESOLUTION]
+Comment=
+
+[ERROR_FILE]
+Comment=
+
+[General]
+Type=STRINGTABLE
+Version=1.00.000
+
+[UNINST_DISPLAY_NAME]
+Comment=
+
+[PRODUCT_KEY]
+Comment=
+
+[PRODUCT_NAME]
+Comment=
+
+[ERROR_UNINSTSETUP]
+Comment=
+
diff --git a/VC++Files/InstallShield/4.0.XX-pro/Text Substitutions/Build.tsb b/VC++Files/InstallShield/4.0.XX-pro/Text Substitutions/Build.tsb
new file mode 100755
index 00000000000..3949bd4c066
--- /dev/null
+++ b/VC++Files/InstallShield/4.0.XX-pro/Text Substitutions/Build.tsb
@@ -0,0 +1,56 @@
+[<HKUS>]
+Value=
+KeyType=4
+
+[<HKCR>]
+Value=
+KeyType=4
+
+[<PROGRAMFILES>]
+Value=
+KeyType=4
+
+[<WINSYSDIR>]
+Value=
+KeyType=4
+
+[<COMMONFILES>]
+Value=
+KeyType=4
+
+[<WINDIR>]
+Value=
+KeyType=4
+
+[Data]
+Key0=<PROGRAMFILES>
+Key1=<COMMONFILES>
+Key2=<WINDIR>
+Key3=<WINSYSDIR>
+Key4=<HKLM>
+Key5=<HKCU>
+Key6=<HKCC>
+Key7=<HKDD>
+Key8=<HKUS>
+Key9=<HKCR>
+
+[General]
+Type=TEXTSUB
+Version=1.00.000
+
+[<HKLM>]
+Value=
+KeyType=4
+
+[<HKCU>]
+Value=
+KeyType=4
+
+[<HKCC>]
+Value=
+KeyType=4
+
+[<HKDD>]
+Value=
+KeyType=4
+
diff --git a/VC++Files/InstallShield/4.0.XX-pro/Text Substitutions/Setup.tsb b/VC++Files/InstallShield/4.0.XX-pro/Text Substitutions/Setup.tsb
new file mode 100755
index 00000000000..b0c5a509f0b
--- /dev/null
+++ b/VC++Files/InstallShield/4.0.XX-pro/Text Substitutions/Setup.tsb
@@ -0,0 +1,76 @@
+[<SRCDIR>]
+Value=
+KeyType=4
+
+[<HKUS>]
+Value=
+KeyType=4
+
+[<HKCR>]
+Value=
+KeyType=4
+
+[<PROGRAMFILES>]
+Value=
+KeyType=4
+
+[<TARGETDIR>]
+Value=
+KeyType=4
+
+[<WINSYSDIR>]
+Value=
+KeyType=4
+
+[<COMMONFILES>]
+Value=
+KeyType=4
+
+[<WINDIR>]
+Value=
+KeyType=4
+
+[Data]
+Key0=<PROGRAMFILES>
+Key1=<COMMONFILES>
+Key2=<WINDIR>
+Key3=<WINSYSDIR>
+Key4=<TARGETDIR>
+Key5=<SUPPORTDIR>
+Key10=<HKDD>
+Key6=<SRCDIR>
+Key11=<HKUS>
+Key7=<HKLM>
+Key12=<HKCR>
+Key8=<HKCU>
+Key13=<SHELL_OBJECT_FOLDER>
+Key9=<HKCC>
+
+[<SUPPORTDIR>]
+Value=
+KeyType=4
+
+[<SHELL_OBJECT_FOLDER>]
+Value=
+KeyType=4
+
+[General]
+Type=TEXTSUB
+Version=1.00.000
+
+[<HKLM>]
+Value=
+KeyType=4
+
+[<HKCU>]
+Value=
+KeyType=4
+
+[<HKCC>]
+Value=
+KeyType=4
+
+[<HKDD>]
+Value=
+KeyType=4
+
diff --git a/VC++Files/bdb/bdb.dsp b/VC++Files/bdb/bdb.dsp
index 2809e65b793..6c4ee47daa2 100644
--- a/VC++Files/bdb/bdb.dsp
+++ b/VC++Files/bdb/bdb.dsp
@@ -7,19 +7,19 @@
CFG=bdb - Win32 Max
!MESSAGE This is not a valid makefile. To build this project using NMAKE,
!MESSAGE use the Export Makefile command and run
-!MESSAGE
+!MESSAGE
!MESSAGE NMAKE /f "bdb.mak".
-!MESSAGE
+!MESSAGE
!MESSAGE You can specify a configuration when running NMAKE
!MESSAGE by defining the macro CFG on the command line. For example:
-!MESSAGE
+!MESSAGE
!MESSAGE NMAKE /f "bdb.mak" CFG="bdb - Win32 Max"
-!MESSAGE
+!MESSAGE
!MESSAGE Possible choices for configuration are:
-!MESSAGE
+!MESSAGE
!MESSAGE "bdb - Win32 Debug" (based on "Win32 (x86) Static Library")
!MESSAGE "bdb - Win32 Max" (based on "Win32 (x86) Static Library")
-!MESSAGE
+!MESSAGE
# Begin Project
# PROP AllowPerConfigDependencies 0
@@ -75,7 +75,7 @@ LIB32=xilink6.exe -lib
# ADD BASE LIB32 /nologo /out:"..\lib_debug\bdb.lib"
# ADD LIB32 /nologo /out:"..\lib_release\bdb.lib"
-!ENDIF
+!ENDIF
# Begin Target
diff --git a/VC++Files/client/mysqlclient.dsp b/VC++Files/client/mysqlclient.dsp
index 113a7e0d1f9..bf5cd3bcab0 100644
--- a/VC++Files/client/mysqlclient.dsp
+++ b/VC++Files/client/mysqlclient.dsp
@@ -7,19 +7,19 @@
CFG=mysqlclient - Win32 Debug
!MESSAGE This is not a valid makefile. To build this project using NMAKE,
!MESSAGE use the Export Makefile command and run
-!MESSAGE
+!MESSAGE
!MESSAGE NMAKE /f "mysqlclient.mak".
-!MESSAGE
+!MESSAGE
!MESSAGE You can specify a configuration when running NMAKE
!MESSAGE by defining the macro CFG on the command line. For example:
-!MESSAGE
+!MESSAGE
!MESSAGE NMAKE /f "mysqlclient.mak" CFG="mysqlclient - Win32 Debug"
-!MESSAGE
+!MESSAGE
!MESSAGE Possible choices for configuration are:
-!MESSAGE
+!MESSAGE
!MESSAGE "mysqlclient - Win32 Release" (based on "Win32 (x86) Static Library")
!MESSAGE "mysqlclient - Win32 Debug" (based on "Win32 (x86) Static Library")
-!MESSAGE
+!MESSAGE
# Begin Project
# PROP AllowPerConfigDependencies 0
@@ -76,7 +76,7 @@ LIB32=xilink6.exe -lib
# ADD BASE LIB32 /nologo
# ADD LIB32 /nologo /out:"..\lib_debug\mysqlclient.lib"
-!ENDIF
+!ENDIF
# Begin Target
@@ -244,7 +244,7 @@ SOURCE=..\mysys\mf_iocache2.c
# ADD CPP /Od
-!ENDIF
+!ENDIF
# End Source File
# Begin Source File
diff --git a/VC++Files/innobase/innobase.dsp b/VC++Files/innobase/innobase.dsp
index 1c17168628d..7e6f3037400 100644
--- a/VC++Files/innobase/innobase.dsp
+++ b/VC++Files/innobase/innobase.dsp
@@ -7,21 +7,21 @@
CFG=INNOBASE - WIN32 RELEASE
!MESSAGE This is not a valid makefile. To build this project using NMAKE,
!MESSAGE use the Export Makefile command and run
-!MESSAGE
+!MESSAGE
!MESSAGE NMAKE /f "innobase.mak".
-!MESSAGE
+!MESSAGE
!MESSAGE You can specify a configuration when running NMAKE
!MESSAGE by defining the macro CFG on the command line. For example:
-!MESSAGE
+!MESSAGE
!MESSAGE NMAKE /f "innobase.mak" CFG="INNOBASE - WIN32 RELEASE"
-!MESSAGE
+!MESSAGE
!MESSAGE Possible choices for configuration are:
-!MESSAGE
+!MESSAGE
!MESSAGE "innobase - Win32 Debug" (based on "Win32 (x86) Static Library")
!MESSAGE "innobase - Win32 Release" (based on "Win32 (x86) Static Library")
!MESSAGE "innobase - Win32 nt" (based on "Win32 (x86) Static Library")
!MESSAGE "innobase - Win32 Max nt" (based on "Win32 (x86) Static Library")
-!MESSAGE
+!MESSAGE
# Begin Project
# PROP AllowPerConfigDependencies 0
@@ -126,7 +126,7 @@ LIB32=xilink6.exe -lib
# ADD BASE LIB32 /nologo /out:"..\lib_release\innodb.lib"
# ADD LIB32 /nologo /out:"..\lib_release\innodb.lib"
-!ENDIF
+!ENDIF
# Begin Target
diff --git a/VC++Files/libmysql/libmysql.dsp b/VC++Files/libmysql/libmysql.dsp
index 9811d07f474..873c64a7bba 100644
--- a/VC++Files/libmysql/libmysql.dsp
+++ b/VC++Files/libmysql/libmysql.dsp
@@ -1,25 +1,25 @@
-# Microsoft Developer Studio Project File - Name="libmySQL" - Package Owner=<4>
+# Microsoft Developer Studio Project File - Name="libmysql" - Package Owner=<4>
# Microsoft Developer Studio Generated Build File, Format Version 6.00
# ** DO NOT EDIT **
# TARGTYPE "Win32 (x86) Dynamic-Link Library" 0x0102
-CFG=libmySQL - Win32 Debug
+CFG=libmysql - Win32 Debug
!MESSAGE This is not a valid makefile. To build this project using NMAKE,
!MESSAGE use the Export Makefile command and run
-!MESSAGE
-!MESSAGE NMAKE /f "libmySQL.mak".
-!MESSAGE
+!MESSAGE
+!MESSAGE NMAKE /f "libmysql.mak".
+!MESSAGE
!MESSAGE You can specify a configuration when running NMAKE
!MESSAGE by defining the macro CFG on the command line. For example:
-!MESSAGE
-!MESSAGE NMAKE /f "libmySQL.mak" CFG="libmySQL - Win32 Debug"
-!MESSAGE
+!MESSAGE
+!MESSAGE NMAKE /f "libmysql.mak" CFG="libmysql - Win32 Debug"
+!MESSAGE
!MESSAGE Possible choices for configuration are:
-!MESSAGE
-!MESSAGE "libmySQL - Win32 Release" (based on "Win32 (x86) Dynamic-Link Library")
-!MESSAGE "libmySQL - Win32 Debug" (based on "Win32 (x86) Dynamic-Link Library")
-!MESSAGE
+!MESSAGE
+!MESSAGE "libmysql - Win32 Release" (based on "Win32 (x86) Dynamic-Link Library")
+!MESSAGE "libmysql - Win32 Debug" (based on "Win32 (x86) Dynamic-Link Library")
+!MESSAGE
# Begin Project
# PROP AllowPerConfigDependencies 0
@@ -29,7 +29,7 @@ CPP=cl.exe
MTL=midl.exe
RSC=rc.exe
-!IF "$(CFG)" == "libmySQL - Win32 Release"
+!IF "$(CFG)" == "libmysql - Win32 Release"
# PROP BASE Use_MFC 0
# PROP BASE Use_Debug_Libraries 0
@@ -54,15 +54,15 @@ BSC32=bscmake.exe
# ADD BSC32 /nologo
LINK32=link.exe
# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:windows /dll /machine:I386
-# ADD LINK32 wsock32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:windows /dll /machine:I386 /def:"libmysql.def" /out:"../lib_release/libmySQL.dll" /libpath:"." /libpath:"..\lib_release"
+# ADD LINK32 wsock32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:windows /dll /machine:I386 /def:"libmysql.def" /out:"..\lib_release\libmysql.dll" /libpath:"." /libpath:"..\lib_release"
# SUBTRACT LINK32 /pdb:none
# Begin Special Build Tool
SOURCE="$(InputPath)"
-PostBuild_Desc=Move DLL export lib
-PostBuild_Cmds=xcopy release\libmysql.lib ..\lib_release /y
+PostBuild_Desc=Copy .lib file
+PostBuild_Cmds=xcopy release\libmysql.lib ..\lib_release\
# End Special Build Tool
-!ELSEIF "$(CFG)" == "libmySQL - Win32 Debug"
+!ELSEIF "$(CFG)" == "libmysql - Win32 Debug"
# PROP BASE Use_MFC 0
# PROP BASE Use_Debug_Libraries 1
@@ -87,20 +87,20 @@ BSC32=bscmake.exe
# ADD BSC32 /nologo
LINK32=link.exe
# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:windows /dll /debug /machine:I386 /pdbtype:sept
-# ADD LINK32 zlib.lib wsock32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:windows /dll /incremental:no /map /debug /machine:I386 /def:"libmysql.def" /out:"../lib_debug/libmySQL.dll" /pdbtype:sept /libpath:"." /libpath:"..\lib_debug"
+# ADD LINK32 zlib.lib wsock32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:windows /dll /incremental:no /map /debug /machine:I386 /def:"libmysql.def" /out:"..\lib_debug\libmysql.dll" /pdbtype:sept /libpath:"." /libpath:"..\lib_debug"
# SUBTRACT LINK32 /pdb:none
# Begin Special Build Tool
SOURCE="$(InputPath)"
-PostBuild_Desc=Move DLL export lib
-PostBuild_Cmds=xcopy ..\lib_debug\libmysql.dll C:\winnt\system32\ /y xcopy debug\libmysql.lib ..\lib_debug\ /y
+PostBuild_Desc=Copy .lib file
+PostBuild_Cmds=xcopy ..\lib_debug\libmysql.dll C:\winnt\system32\ xcopy debug\libmysql.lib ..\lib_debug\
# End Special Build Tool
-!ENDIF
+!ENDIF
# Begin Target
-# Name "libmySQL - Win32 Release"
-# Name "libmySQL - Win32 Debug"
+# Name "libmysql - Win32 Release"
+# Name "libmysql - Win32 Debug"
# Begin Source File
SOURCE=..\mysys\array.c
@@ -303,6 +303,10 @@ SOURCE=..\mysys\my_gethostbyname.c
# End Source File
# Begin Source File
+SOURCE=..\mysys\my_getopt.c
+# End Source File
+# Begin Source File
+
SOURCE=..\mysys\my_getwd.c
# End Source File
# Begin Source File
@@ -463,6 +467,10 @@ SOURCE=..\strings\strnmov.c
# End Source File
# Begin Source File
+SOURCE=..\strings\strtoll.c
+# End Source File
+# Begin Source File
+
SOURCE=..\strings\strxmov.c
# End Source File
# Begin Source File
diff --git a/VC++Files/libmysql/libmysql.dsw b/VC++Files/libmysql/libmysql.dsw
index 331802dc16d..36d5b9b330b 100644
--- a/VC++Files/libmysql/libmysql.dsw
+++ b/VC++Files/libmysql/libmysql.dsw
@@ -3,7 +3,7 @@ Microsoft Developer Studio Workspace File, Format Version 5.00
###############################################################################
-Project: "libmySQL"=".\libmySQL.dsp" - Package Owner=<4>
+Project: "libmysql"=".\libmysql.dsp" - Package Owner=<4>
Package=<5>
{{{
diff --git a/VC++Files/mysql.dsw b/VC++Files/mysql.dsw
index f72cd0f0163..eef82588fa8 100644
--- a/VC++Files/mysql.dsw
+++ b/VC++Files/mysql.dsw
@@ -114,7 +114,7 @@ Package=<4>
###############################################################################
-Project: "libmySQL"=".\libmysql\libmySQL.dsp" - Package Owner=<4>
+Project: "libmysql"=".\libmysql\libmysql.dsp" - Package Owner=<4>
Package=<5>
{{{
@@ -192,7 +192,7 @@ Package=<5>
Package=<4>
{{{
Begin Project Dependency
- Project_Dep_Name libmySQL
+ Project_Dep_Name libmysql
End Project Dependency
}}}
@@ -708,7 +708,7 @@ Package=<5>
Package=<4>
{{{
Begin Project Dependency
- Project_Dep_Name libmySQL
+ Project_Dep_Name libmysql
End Project Dependency
}}}
diff --git a/VC++Files/mysqldemb/mysqldemb.dsp b/VC++Files/mysqldemb/mysqldemb.dsp
index 21d1eb7eac0..0b6c2bb285d 100644
--- a/VC++Files/mysqldemb/mysqldemb.dsp
+++ b/VC++Files/mysqldemb/mysqldemb.dsp
@@ -7,19 +7,19 @@
CFG=mysqldemb - Win32 Debug
!MESSAGE This is not a valid makefile. To build this project using NMAKE,
!MESSAGE use the Export Makefile command and run
-!MESSAGE
+!MESSAGE
!MESSAGE NMAKE /f "mysqldemb.mak".
-!MESSAGE
+!MESSAGE
!MESSAGE You can specify a configuration when running NMAKE
!MESSAGE by defining the macro CFG on the command line. For example:
-!MESSAGE
+!MESSAGE
!MESSAGE NMAKE /f "mysqldemb.mak" CFG="mysqldemb - Win32 Debug"
-!MESSAGE
+!MESSAGE
!MESSAGE Possible choices for configuration are:
-!MESSAGE
+!MESSAGE
!MESSAGE "mysqldemb - Win32 Release" (based on "Win32 (x86) Static Library")
!MESSAGE "mysqldemb - Win32 Debug" (based on "Win32 (x86) Static Library")
-!MESSAGE
+!MESSAGE
# Begin Project
# PROP AllowPerConfigDependencies 0
@@ -76,7 +76,7 @@ LIB32=xilink6.exe -lib
# ADD BASE LIB32 /nologo
# ADD LIB32 /nologo
-!ENDIF
+!ENDIF
# Begin Target
diff --git a/VC++Files/mysqlmanager/MySqlManager.dsp b/VC++Files/mysqlmanager/MySqlManager.dsp
index ae8e3ec5f0b..a5338b8f5ce 100644
--- a/VC++Files/mysqlmanager/MySqlManager.dsp
+++ b/VC++Files/mysqlmanager/MySqlManager.dsp
@@ -71,7 +71,7 @@ LINK32=link.exe
# PROP Ignore_Export_Lib 0
# PROP Target_Dir ""
# ADD BASE CPP /nologo /MDd /W3 /Gm /GX /Zi /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_AFXDLL" /Yu"stdafx.h" /FD /c
-# ADD CPP /nologo /G6 /MTd /W3 /Gm /GX /ZI /Od /I "../include" /D "_DEBUG" /D "_WINDOWS" /FD /c
+# ADD CPP /nologo /G6 /MTd /W3 /Gm /GR /GX /Zi /Od /I "../include" /D "_DEBUG" /D "_WINDOWS" /FD /c
# SUBTRACT CPP /Fr /YX /Yc /Yu
# ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /o "NUL" /win32
# ADD MTL /nologo /D "_DEBUG" /o "NUL" /win32
diff --git a/VC++Files/mysys/mysys.dsp b/VC++Files/mysys/mysys.dsp
index 5f13c80f8ec..8d1928f4c6d 100644
--- a/VC++Files/mysys/mysys.dsp
+++ b/VC++Files/mysys/mysys.dsp
@@ -7,20 +7,20 @@
CFG=mysys - Win32 Debug
!MESSAGE This is not a valid makefile. To build this project using NMAKE,
!MESSAGE use the Export Makefile command and run
-!MESSAGE
+!MESSAGE
!MESSAGE NMAKE /f "mysys.mak".
-!MESSAGE
+!MESSAGE
!MESSAGE You can specify a configuration when running NMAKE
!MESSAGE by defining the macro CFG on the command line. For example:
-!MESSAGE
+!MESSAGE
!MESSAGE NMAKE /f "mysys.mak" CFG="mysys - Win32 Debug"
-!MESSAGE
+!MESSAGE
!MESSAGE Possible choices for configuration are:
-!MESSAGE
+!MESSAGE
!MESSAGE "mysys - Win32 Release" (based on "Win32 (x86) Static Library")
!MESSAGE "mysys - Win32 Debug" (based on "Win32 (x86) Static Library")
!MESSAGE "mysys - Win32 Max" (based on "Win32 (x86) Static Library")
-!MESSAGE
+!MESSAGE
# Begin Project
# PROP AllowPerConfigDependencies 0
@@ -102,7 +102,7 @@ LIB32=xilink6.exe -lib
# ADD BASE LIB32 /nologo /out:"..\lib_release\mysys.lib"
# ADD LIB32 /nologo /out:"..\lib_release\mysys-max.lib"
-!ENDIF
+!ENDIF
# Begin Target
@@ -121,7 +121,7 @@ SOURCE=.\array.c
!ELSEIF "$(CFG)" == "mysys - Win32 Max"
-!ENDIF
+!ENDIF
# End Source File
# Begin Source File
@@ -500,7 +500,7 @@ SOURCE=.\thr_lock.c
!ELSEIF "$(CFG)" == "mysys - Win32 Max"
-!ENDIF
+!ENDIF
# End Source File
# Begin Source File
diff --git a/VC++Files/sql/mysqld.dsp b/VC++Files/sql/mysqld.dsp
index e068ba8f164..e15d443a3b7 100644
--- a/VC++Files/sql/mysqld.dsp
+++ b/VC++Files/sql/mysqld.dsp
@@ -7,22 +7,22 @@
CFG=mysqld - Win32 Release
!MESSAGE This is not a valid makefile. To build this project using NMAKE,
!MESSAGE use the Export Makefile command and run
-!MESSAGE
+!MESSAGE
!MESSAGE NMAKE /f "mysqld.mak".
-!MESSAGE
+!MESSAGE
!MESSAGE You can specify a configuration when running NMAKE
!MESSAGE by defining the macro CFG on the command line. For example:
-!MESSAGE
+!MESSAGE
!MESSAGE NMAKE /f "mysqld.mak" CFG="mysqld - Win32 Release"
-!MESSAGE
+!MESSAGE
!MESSAGE Possible choices for configuration are:
-!MESSAGE
+!MESSAGE
!MESSAGE "mysqld - Win32 Release" (based on "Win32 (x86) Console Application")
!MESSAGE "mysqld - Win32 Debug" (based on "Win32 (x86) Console Application")
!MESSAGE "mysqld - Win32 nt" (based on "Win32 (x86) Console Application")
!MESSAGE "mysqld - Win32 Max nt" (based on "Win32 (x86) Console Application")
!MESSAGE "mysqld - Win32 Max" (based on "Win32 (x86) Console Application")
-!MESSAGE
+!MESSAGE
# Begin Project
# PROP AllowPerConfigDependencies 0
@@ -167,7 +167,7 @@ LINK32=xilink6.exe
# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib Wsock32.lib ..\lib_release\vio.lib ..\lib_release\isam.lib ..\lib_release\merge.lib ..\lib_release\myisam.lib ..\lib_release\myisammrg.lib ..\lib_release\mysys-max.lib ..\lib_release\strings.lib ..\lib_release\regex.lib ..\lib_release\heap.lib ..\lib_release\innodb.lib ..\lib_release\bdb.lib ..\lib_release\zlib.lib /nologo /subsystem:console /pdb:none /machine:I386 /out:"../client_release/mysqld-max.exe"
# SUBTRACT LINK32 /debug
-!ENDIF
+!ENDIF
# Begin Target
@@ -193,7 +193,7 @@ SOURCE=.\convert.cpp
!ELSEIF "$(CFG)" == "mysqld - Win32 Max"
-!ENDIF
+!ENDIF
# End Source File
# Begin Source File
@@ -213,7 +213,7 @@ SOURCE=.\derror.cpp
!ELSEIF "$(CFG)" == "mysqld - Win32 Max"
-!ENDIF
+!ENDIF
# End Source File
# Begin Source File
@@ -237,7 +237,7 @@ SOURCE=.\field.cpp
!ELSEIF "$(CFG)" == "mysqld - Win32 Max"
-!ENDIF
+!ENDIF
# End Source File
# Begin Source File
@@ -257,7 +257,7 @@ SOURCE=.\field_conv.cpp
!ELSEIF "$(CFG)" == "mysqld - Win32 Max"
-!ENDIF
+!ENDIF
# End Source File
# Begin Source File
@@ -277,7 +277,7 @@ SOURCE=.\filesort.cpp
!ELSEIF "$(CFG)" == "mysqld - Win32 Max"
-!ENDIF
+!ENDIF
# End Source File
# Begin Source File
@@ -329,7 +329,7 @@ SOURCE=.\handler.cpp
!ELSEIF "$(CFG)" == "mysqld - Win32 Max"
-!ENDIF
+!ENDIF
# End Source File
# Begin Source File
@@ -348,7 +348,7 @@ SOURCE=.\hash_filo.cpp
!ELSEIF "$(CFG)" == "mysqld - Win32 Max"
-!ENDIF
+!ENDIF
# End Source File
# Begin Source File
@@ -371,7 +371,7 @@ SOURCE=.\hostname.cpp
!ELSEIF "$(CFG)" == "mysqld - Win32 Max"
-!ENDIF
+!ENDIF
# End Source File
# Begin Source File
@@ -391,7 +391,7 @@ SOURCE=.\init.cpp
!ELSEIF "$(CFG)" == "mysqld - Win32 Max"
-!ENDIF
+!ENDIF
# End Source File
# Begin Source File
@@ -411,7 +411,7 @@ SOURCE=.\item.cpp
!ELSEIF "$(CFG)" == "mysqld - Win32 Max"
-!ENDIF
+!ENDIF
# End Source File
# Begin Source File
@@ -431,7 +431,7 @@ SOURCE=.\item_buff.cpp
!ELSEIF "$(CFG)" == "mysqld - Win32 Max"
-!ENDIF
+!ENDIF
# End Source File
# Begin Source File
@@ -451,7 +451,7 @@ SOURCE=.\item_cmpfunc.cpp
!ELSEIF "$(CFG)" == "mysqld - Win32 Max"
-!ENDIF
+!ENDIF
# End Source File
# Begin Source File
@@ -481,7 +481,7 @@ SOURCE=.\item_func.cpp
# ADD CPP /I "../zlib"
-!ENDIF
+!ENDIF
# End Source File
# Begin Source File
@@ -505,7 +505,7 @@ SOURCE=.\item_strfunc.cpp
!ELSEIF "$(CFG)" == "mysqld - Win32 Max"
-!ENDIF
+!ENDIF
# End Source File
# Begin Source File
@@ -529,7 +529,7 @@ SOURCE=.\item_sum.cpp
!ELSEIF "$(CFG)" == "mysqld - Win32 Max"
-!ENDIF
+!ENDIF
# End Source File
# Begin Source File
@@ -548,7 +548,7 @@ SOURCE=.\item_timefunc.cpp
!ELSEIF "$(CFG)" == "mysqld - Win32 Max"
-!ENDIF
+!ENDIF
# End Source File
# Begin Source File
@@ -568,7 +568,7 @@ SOURCE=.\item_uniq.cpp
!ELSEIF "$(CFG)" == "mysqld - Win32 Max"
-!ENDIF
+!ENDIF
# End Source File
# Begin Source File
@@ -588,7 +588,7 @@ SOURCE=.\key.cpp
!ELSEIF "$(CFG)" == "mysqld - Win32 Max"
-!ENDIF
+!ENDIF
# End Source File
# Begin Source File
@@ -608,7 +608,7 @@ SOURCE=.\lock.cpp
!ELSEIF "$(CFG)" == "mysqld - Win32 Max"
-!ENDIF
+!ENDIF
# End Source File
# Begin Source File
@@ -628,7 +628,7 @@ SOURCE=.\log.cpp
!ELSEIF "$(CFG)" == "mysqld - Win32 Max"
-!ENDIF
+!ENDIF
# End Source File
# Begin Source File
@@ -651,7 +651,7 @@ SOURCE=.\mf_iocache.cpp
!ELSEIF "$(CFG)" == "mysqld - Win32 Max"
-!ENDIF
+!ENDIF
# End Source File
# Begin Source File
@@ -679,7 +679,7 @@ SOURCE=.\mysqld.cpp
!ELSEIF "$(CFG)" == "mysqld - Win32 Max"
-!ENDIF
+!ENDIF
# End Source File
# Begin Source File
@@ -702,7 +702,7 @@ SOURCE=.\nt_servc.cpp
!ELSEIF "$(CFG)" == "mysqld - Win32 Max"
-!ENDIF
+!ENDIF
# End Source File
# Begin Source File
@@ -729,7 +729,7 @@ SOURCE=.\opt_range.cpp
!ELSEIF "$(CFG)" == "mysqld - Win32 Max"
-!ENDIF
+!ENDIF
# End Source File
# Begin Source File
@@ -756,7 +756,7 @@ SOURCE=.\password.c
!ELSEIF "$(CFG)" == "mysqld - Win32 Max"
-!ENDIF
+!ENDIF
# End Source File
# Begin Source File
@@ -776,7 +776,7 @@ SOURCE=.\procedure.cpp
!ELSEIF "$(CFG)" == "mysqld - Win32 Max"
-!ENDIF
+!ENDIF
# End Source File
# Begin Source File
@@ -800,7 +800,7 @@ SOURCE=.\records.cpp
!ELSEIF "$(CFG)" == "mysqld - Win32 Max"
-!ENDIF
+!ENDIF
# End Source File
# Begin Source File
@@ -836,7 +836,7 @@ SOURCE=.\sql_acl.cpp
!ELSEIF "$(CFG)" == "mysqld - Win32 Max"
-!ENDIF
+!ENDIF
# End Source File
# Begin Source File
@@ -860,7 +860,7 @@ SOURCE=.\sql_base.cpp
!ELSEIF "$(CFG)" == "mysqld - Win32 Max"
-!ENDIF
+!ENDIF
# End Source File
# Begin Source File
@@ -884,7 +884,7 @@ SOURCE=.\sql_class.cpp
!ELSEIF "$(CFG)" == "mysqld - Win32 Max"
-!ENDIF
+!ENDIF
# End Source File
# Begin Source File
@@ -912,7 +912,7 @@ SOURCE=.\sql_db.cpp
!ELSEIF "$(CFG)" == "mysqld - Win32 Max"
-!ENDIF
+!ENDIF
# End Source File
# Begin Source File
@@ -932,7 +932,7 @@ SOURCE=.\sql_delete.cpp
!ELSEIF "$(CFG)" == "mysqld - Win32 Max"
-!ENDIF
+!ENDIF
# End Source File
# Begin Source File
@@ -972,7 +972,7 @@ SOURCE=.\sql_insert.cpp
!ELSEIF "$(CFG)" == "mysqld - Win32 Max"
-!ENDIF
+!ENDIF
# End Source File
# Begin Source File
@@ -992,7 +992,7 @@ SOURCE=.\sql_lex.cpp
!ELSEIF "$(CFG)" == "mysqld - Win32 Max"
-!ENDIF
+!ENDIF
# End Source File
# Begin Source File
@@ -1012,7 +1012,7 @@ SOURCE=.\sql_list.cpp
!ELSEIF "$(CFG)" == "mysqld - Win32 Max"
-!ENDIF
+!ENDIF
# End Source File
# Begin Source File
@@ -1032,7 +1032,7 @@ SOURCE=.\sql_load.cpp
!ELSEIF "$(CFG)" == "mysqld - Win32 Max"
-!ENDIF
+!ENDIF
# End Source File
# Begin Source File
@@ -1056,7 +1056,7 @@ SOURCE=.\sql_map.cpp
!ELSEIF "$(CFG)" == "mysqld - Win32 Max"
-!ENDIF
+!ENDIF
# End Source File
# Begin Source File
@@ -1076,7 +1076,7 @@ SOURCE=.\sql_parse.cpp
!ELSEIF "$(CFG)" == "mysqld - Win32 Max"
-!ENDIF
+!ENDIF
# End Source File
# Begin Source File
@@ -1108,7 +1108,7 @@ SOURCE=.\sql_select.cpp
!ELSEIF "$(CFG)" == "mysqld - Win32 Max"
-!ENDIF
+!ENDIF
# End Source File
# Begin Source File
@@ -1128,7 +1128,7 @@ SOURCE=.\sql_show.cpp
!ELSEIF "$(CFG)" == "mysqld - Win32 Max"
-!ENDIF
+!ENDIF
# End Source File
# Begin Source File
@@ -1148,7 +1148,7 @@ SOURCE=.\sql_string.cpp
!ELSEIF "$(CFG)" == "mysqld - Win32 Max"
-!ENDIF
+!ENDIF
# End Source File
# Begin Source File
@@ -1168,7 +1168,7 @@ SOURCE=.\sql_table.cpp
!ELSEIF "$(CFG)" == "mysqld - Win32 Max"
-!ENDIF
+!ENDIF
# End Source File
# Begin Source File
@@ -1188,7 +1188,7 @@ SOURCE=.\sql_test.cpp
!ELSEIF "$(CFG)" == "mysqld - Win32 Max"
-!ENDIF
+!ENDIF
# End Source File
# Begin Source File
@@ -1216,7 +1216,7 @@ SOURCE=.\sql_update.cpp
!ELSEIF "$(CFG)" == "mysqld - Win32 Max"
-!ENDIF
+!ENDIF
# End Source File
# Begin Source File
@@ -1236,7 +1236,7 @@ SOURCE=.\sql_yacc.cpp
!ELSEIF "$(CFG)" == "mysqld - Win32 Max"
-!ENDIF
+!ENDIF
# End Source File
# Begin Source File
@@ -1260,7 +1260,7 @@ SOURCE=.\thr_malloc.cpp
!ELSEIF "$(CFG)" == "mysqld - Win32 Max"
-!ENDIF
+!ENDIF
# End Source File
# Begin Source File
@@ -1280,7 +1280,7 @@ SOURCE=.\time.cpp
!ELSEIF "$(CFG)" == "mysqld - Win32 Max"
-!ENDIF
+!ENDIF
# End Source File
# Begin Source File
@@ -1304,7 +1304,7 @@ SOURCE=.\unireg.cpp
!ELSEIF "$(CFG)" == "mysqld - Win32 Max"
-!ENDIF
+!ENDIF
# End Source File
# End Target
diff --git a/VC++Files/strings/strings.dsp b/VC++Files/strings/strings.dsp
index a60034d3ec6..f18f27f2086 100644
--- a/VC++Files/strings/strings.dsp
+++ b/VC++Files/strings/strings.dsp
@@ -7,19 +7,19 @@
CFG=strings - Win32 Debug
!MESSAGE This is not a valid makefile. To build this project using NMAKE,
!MESSAGE use the Export Makefile command and run
-!MESSAGE
+!MESSAGE
!MESSAGE NMAKE /f "strings.mak".
-!MESSAGE
+!MESSAGE
!MESSAGE You can specify a configuration when running NMAKE
!MESSAGE by defining the macro CFG on the command line. For example:
-!MESSAGE
+!MESSAGE
!MESSAGE NMAKE /f "strings.mak" CFG="strings - Win32 Debug"
-!MESSAGE
+!MESSAGE
!MESSAGE Possible choices for configuration are:
-!MESSAGE
+!MESSAGE
!MESSAGE "strings - Win32 Release" (based on "Win32 (x86) Static Library")
!MESSAGE "strings - Win32 Debug" (based on "Win32 (x86) Static Library")
-!MESSAGE
+!MESSAGE
# Begin Project
# PROP AllowPerConfigDependencies 0
@@ -76,7 +76,7 @@ LIB32=xilink6.exe -lib
# ADD BASE LIB32 /nologo
# ADD LIB32 /nologo /out:"..\lib_debug\strings.lib"
-!ENDIF
+!ENDIF
# Begin Target
diff --git a/client/mysqlbinlog.cc b/client/mysqlbinlog.cc
index 83c93ee3fca..3f85f0be008 100644
--- a/client/mysqlbinlog.cc
+++ b/client/mysqlbinlog.cc
@@ -28,7 +28,7 @@
#define CLIENT_CAPABILITIES (CLIENT_LONG_PASSWORD | CLIENT_LONG_FLAG | CLIENT_LOCAL_FILES)
char server_version[SERVER_VERSION_LENGTH];
-uint32 server_id = 0;
+ulong server_id = 0;
// needed by net_serv.c
ulong bytes_sent = 0L, bytes_received = 0L;
diff --git a/client/mysqltest.c b/client/mysqltest.c
index 0c9e763bdfa..fb2104f43f4 100644
--- a/client/mysqltest.c
+++ b/client/mysqltest.c
@@ -91,7 +91,9 @@
enum {OPT_MANAGER_USER=256,OPT_MANAGER_HOST,OPT_MANAGER_PASSWD,
- OPT_MANAGER_PORT,OPT_MANAGER_WAIT_TIMEOUT, OPT_SKIP_SAFEMALLOC};
+ OPT_MANAGER_PORT,OPT_MANAGER_WAIT_TIMEOUT, OPT_SKIP_SAFEMALLOC,
+ OPT_SSL_SSL, OPT_SSL_KEY, OPT_SSL_CERT, OPT_SSL_CA, OPT_SSL_CAPATH,
+ OPT_SSL_CIPHER};
static int record = 0, opt_sleep=0;
static char *db = 0, *pass=0;
@@ -126,6 +128,8 @@ static uint global_expected_errno[MAX_EXPECTED_ERRORS], global_expected_errors;
static CHARSET_INFO *charset_info= &my_charset_latin1;
DYNAMIC_ARRAY q_lines;
+#include "sslopt-vars.h"
+
typedef struct
{
char file[FN_REFLEN];
@@ -1003,13 +1007,6 @@ int do_sync_with_master2(const char* p)
if (rpl_parse)
mysql_enable_rpl_parse(mysql);
-#ifndef TO_BE_REMOVED
- /*
- We need this because wait_for_pos() only waits for the relay log,
- which doesn't guarantee that the slave has executed the statement.
- */
- my_sleep(2*1000000L);
-#endif
return 0;
}
@@ -1456,6 +1453,11 @@ int do_connect(struct st_query* q)
mysql_options(&next_con->mysql,MYSQL_OPT_COMPRESS,NullS);
mysql_options(&next_con->mysql, MYSQL_OPT_LOCAL_INFILE, 0);
+#ifdef HAVE_OPENSSL
+ if (opt_use_ssl)
+ mysql_ssl_set(&next_con->mysql, opt_ssl_key, opt_ssl_cert, opt_ssl_ca,
+ opt_ssl_capath, opt_ssl_cipher);
+#endif
if (con_sock && !free_con_sock && *con_sock && *con_sock != FN_LIBCHAR)
con_sock=fn_format(buff, con_sock, TMPDIR, "",0);
if (!con_db[0])
@@ -1857,6 +1859,7 @@ static struct my_option my_long_options[] =
{"socket", 'S', "Socket file to use for connection.",
(gptr*) &unix_sock, (gptr*) &unix_sock, 0, GET_STR, REQUIRED_ARG, 0, 0, 0,
0, 0, 0},
+#include "sslopt-longopts.h"
{"test-file", 'x', "Read test from/in this file (default stdin).",
0, 0, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
{"tmpdir", 't', "Temporary directory where sockets are put",
@@ -1931,6 +1934,7 @@ get_one_option(int optid, const struct my_option *opt __attribute__((unused)),
else
tty_password= 1;
break;
+#include <sslopt-case.h>
case 't':
strnmov(TMPDIR, argument, sizeof(TMPDIR));
break;
@@ -2411,6 +2415,11 @@ int main(int argc, char** argv)
if (opt_compress)
mysql_options(&cur_con->mysql,MYSQL_OPT_COMPRESS,NullS);
mysql_options(&cur_con->mysql, MYSQL_OPT_LOCAL_INFILE, 0);
+#ifdef HAVE_OPENSSL
+ if (opt_use_ssl)
+ mysql_ssl_set(&cur_con->mysql, opt_ssl_key, opt_ssl_cert, opt_ssl_ca,
+ opt_ssl_capath, opt_ssl_cipher);
+#endif
cur_con->name = my_strdup("default", MYF(MY_WME));
if (!cur_con->name)
@@ -2538,6 +2547,7 @@ int main(int argc, char** argv)
}
case Q_COMMENT: /* Ignore row */
case Q_COMMENT_WITH_COMMAND:
+ break;
case Q_PING:
(void) mysql_ping(&cur_con->mysql);
break;
diff --git a/configure.in b/configure.in
index 0fdd962956d..d870bfa4c48 100644
--- a/configure.in
+++ b/configure.in
@@ -2586,7 +2586,7 @@ EOF
echo ""
echo "Configuring MIT Pthreads"
# We will never install so installation paths are not needed.
- (cd mit-pthreads; sh ./configure)
+ (cd mit-pthreads && sh ./configure) || exit 1
echo "End of MIT Pthreads configuration"
echo ""
LIBS="$MT_LD_ADD $LIBS"
diff --git a/dbug/dbug.c b/dbug/dbug.c
index 3f6c9b2f980..a4f9d5ecd4b 100644
--- a/dbug/dbug.c
+++ b/dbug/dbug.c
@@ -919,7 +919,6 @@ void _db_doprnt_ (const char *format,...)
}
(void) fprintf (_db_fp_, "%s: ", state->u_keyword);
(void) vfprintf (_db_fp_, format, args);
- va_end(args);
(void) fputc('\n',_db_fp_);
dbug_flush(state);
errno=save_errno;
diff --git a/include/Makefile.am b/include/Makefile.am
index 8220424354d..70049a061ff 100644
--- a/include/Makefile.am
+++ b/include/Makefile.am
@@ -20,12 +20,12 @@ pkginclude_HEADERS = dbug.h m_string.h my_sys.h my_list.h my_xml.h \
mysql.h mysql_com.h mysqld_error.h mysql_embed.h \
my_semaphore.h my_pthread.h my_no_pthread.h raid.h \
errmsg.h my_global.h my_net.h my_alloc.h \
- my_getopt.h sslopt-longopts.h typelib.h \
+ my_getopt.h sslopt-longopts.h my_dir.h typelib.h \
sslopt-vars.h sslopt-case.h $(BUILT_SOURCES)
noinst_HEADERS = config-win.h config-os2.h config-netware.h \
nisam.h heap.h merge.h my_bitmap.h\
myisam.h myisampack.h myisammrg.h ft_global.h\
- my_dir.h mysys_err.h my_base.h \
+ mysys_err.h my_base.h \
my_nosys.h my_alarm.h queues.h rijndael.h sha1.h \
my_aes.h my_tree.h hash.h thr_alarm.h \
thr_lock.h t_ctype.h violite.h md5.h \
diff --git a/include/my_global.h b/include/my_global.h
index dd1e8986ae2..64bfefa16f3 100644
--- a/include/my_global.h
+++ b/include/my_global.h
@@ -286,6 +286,7 @@ C_MODE_END
#define CONFIG_SMP
#include <asm/atomic.h>
#endif
+#include <errno.h> /* Recommended by debian */
/* Go around some bugs in different OS and compilers */
#if defined(_HPUX_SOURCE) && defined(HAVE_SYS_STREAM_H)
diff --git a/include/my_sys.h b/include/my_sys.h
index 7d754912823..18d6115c75a 100644
--- a/include/my_sys.h
+++ b/include/my_sys.h
@@ -74,6 +74,7 @@ extern int NEAR my_errno; /* Last error in mysys */
#define MY_FREE_ON_ERROR 128 /* my_realloc() ; Free old ptr on error */
#define MY_HOLD_ON_ERROR 256 /* my_realloc() ; Return old ptr on error */
#define MY_THREADSAFE 128 /* pread/pwrite: Don't allow interrupts */
+#define MY_DONT_OVERWRITE_FILE 1024 /* my_copy; Don't overwrite file */
#define MY_CHECK_ERROR 1 /* Params to my_end; Check open-close */
#define MY_GIVE_INFO 2 /* Give time info about process*/
diff --git a/include/myisam.h b/include/myisam.h
index e06f9fc37ca..eb260537628 100644
--- a/include/myisam.h
+++ b/include/myisam.h
@@ -101,6 +101,7 @@ typedef struct st_mi_create_info
ulong raid_chunksize;
uint old_options;
uint8 language;
+ my_bool with_auto_increment;
} MI_CREATE_INFO;
struct st_myisam_info; /* For referense */
diff --git a/include/thr_lock.h b/include/thr_lock.h
index cf59f4aaeb2..947b17bf2b6 100644
--- a/include/thr_lock.h
+++ b/include/thr_lock.h
@@ -111,6 +111,7 @@ void thr_unlock(THR_LOCK_DATA *data);
int thr_multi_lock(THR_LOCK_DATA **data,uint count);
void thr_multi_unlock(THR_LOCK_DATA **data,uint count);
void thr_abort_locks(THR_LOCK *lock);
+void thr_abort_locks_for_thread(THR_LOCK *lock, pthread_t thread);
void thr_print_locks(void); /* For debugging */
my_bool thr_upgrade_write_delay_lock(THR_LOCK_DATA *data);
my_bool thr_reschedule_write_lock(THR_LOCK_DATA *data);
diff --git a/include/violite.h b/include/violite.h
index 4963fbb21e4..a5c063700b4 100644
--- a/include/violite.h
+++ b/include/violite.h
@@ -101,7 +101,7 @@ my_socket vio_fd(Vio*vio);
/*
* Remote peer's address and name in text form.
*/
-my_bool vio_peer_addr(Vio* vio, char *buf);
+my_bool vio_peer_addr(Vio* vio, char *buf, uint16 *port);
/* Remotes in_addr */
@@ -136,7 +136,7 @@ int vio_close_pipe(Vio * vio);
#define vio_keepalive(vio, set_keep_alive) (vio)->viokeepalive(vio, set_keep_alive)
#define vio_should_retry(vio) (vio)->should_retry(vio)
#define vio_close(vio) ((vio)->vioclose)(vio)
-#define vio_peer_addr(vio, buf) (vio)->peer_addr(vio, buf)
+#define vio_peer_addr(vio, buf, prt) (vio)->peer_addr(vio, buf, prt)
#define vio_in_addr(vio, in) (vio)->in_addr(vio, in)
#endif /* defined(HAVE_VIO) && !defined(DONT_MAP_VIO) */
@@ -242,7 +242,7 @@ struct st_vio
my_bool (*is_blocking)(Vio*);
int (*viokeepalive)(Vio*, my_bool);
int (*fastsend)(Vio*);
- my_bool (*peer_addr)(Vio*, gptr);
+ my_bool (*peer_addr)(Vio*, gptr, uint16*);
void (*in_addr)(Vio*, struct in_addr*);
my_bool (*should_retry)(Vio*);
int (*vioclose)(Vio*);
diff --git a/innobase/buf/buf0buf.c b/innobase/buf/buf0buf.c
index 3c6ec424434..14d538a14bc 100644
--- a/innobase/buf/buf0buf.c
+++ b/innobase/buf/buf0buf.c
@@ -346,13 +346,21 @@ buf_page_print(
ut_dulint_get_high(btr_page_get_index_id(read_buf)),
ut_dulint_get_low(btr_page_get_index_id(read_buf)));
- index = dict_index_find_on_id_low(
+ /* If the code is in ibbackup, dict_sys may be uninitialized,
+ i.e., NULL */
+
+ if (dict_sys != NULL) {
+
+ index = dict_index_find_on_id_low(
btr_page_get_index_id(read_buf));
- if (index) {
- fprintf(stderr, "InnoDB: and table %s index %s\n",
+ if (index) {
+ fprintf(stderr,
+ "InnoDB: and table %s index %s\n",
index->table_name,
index->name);
+ }
}
+
} else if (fil_page_get_type(read_buf) == FIL_PAGE_INODE) {
fprintf(stderr, "InnoDB: Page may be an 'inode' page\n");
} else if (fil_page_get_type(read_buf) == FIL_PAGE_IBUF_FREE_LIST) {
diff --git a/innobase/include/srv0start.h b/innobase/include/srv0start.h
index 24cdecb7341..aec3ebfeea9 100644
--- a/innobase/include/srv0start.h
+++ b/innobase/include/srv0start.h
@@ -81,6 +81,7 @@ innobase_shutdown_for_mysql(void);
extern ulint srv_sizeof_trx_t_in_ha_innodb_cc;
+extern ibool srv_is_being_started;
extern ibool srv_startup_is_before_trx_rollback_phase;
extern ibool srv_is_being_shut_down;
diff --git a/innobase/os/os0file.c b/innobase/os/os0file.c
index 82ed957b5fb..5ffcabf6fe6 100644
--- a/innobase/os/os0file.c
+++ b/innobase/os/os0file.c
@@ -196,7 +196,7 @@ os_file_get_last_error(void)
err = (ulint) GetLastError();
- if (err != ERROR_FILE_EXISTS && err != ERROR_DISK_FULL) {
+ if (err != ERROR_DISK_FULL && err != ERROR_FILE_EXISTS) {
ut_print_timestamp(stderr);
fprintf(stderr,
" InnoDB: Operating system error number %li in a file operation.\n"
@@ -220,6 +220,8 @@ os_file_get_last_error(void)
}
}
+ fflush(stderr);
+
if (err == ERROR_FILE_NOT_FOUND) {
return(OS_FILE_NOT_FOUND);
} else if (err == ERROR_DISK_FULL) {
@@ -232,7 +234,7 @@ os_file_get_last_error(void)
#else
err = (ulint) errno;
- if (err != EEXIST && err != ENOSPC ) {
+ if (err != ENOSPC && err != EEXIST) {
ut_print_timestamp(stderr);
fprintf(stderr,
@@ -256,6 +258,8 @@ os_file_get_last_error(void)
}
}
+ fflush(stderr);
+
if (err == ENOSPC ) {
return(OS_FILE_DISK_FULL);
#ifdef POSIX_ASYNC_IO
@@ -278,7 +282,8 @@ static
ibool
os_file_handle_error(
/*=================*/
- /* out: TRUE if we should retry the operation */
+ /* out: TRUE if we should retry the
+ operation */
os_file_t file, /* in: file pointer */
char* name) /* in: name of a file or NULL */
{
@@ -308,12 +313,15 @@ os_file_handle_error(
os_has_said_disk_full = TRUE;
+ fflush(stderr);
+
return(FALSE);
} else if (err == OS_FILE_AIO_RESOURCES_RESERVED) {
return(TRUE);
} else if (err == OS_FILE_ALREADY_EXISTS) {
+
return(FALSE);
} else {
if (name) {
@@ -322,6 +330,8 @@ os_file_handle_error(
fprintf(stderr, "InnoDB: Cannot continue operation.\n");
+ fflush(stderr);
+
exit(1);
}
@@ -1063,7 +1073,17 @@ error_handling:
if (retry) {
goto try_again;
}
-
+
+ fprintf(stderr,
+"InnoDB: Fatal error: cannot read from file. OS error number %lu.\n",
+#ifdef __WIN__
+ (ulint)GetLastError()
+#else
+ (ulint)errno
+#endif
+ );
+ fflush(stderr);
+
ut_error;
return(FALSE);
diff --git a/innobase/row/row0sel.c b/innobase/row/row0sel.c
index 1fc329fe2ca..fb508e7b1da 100644
--- a/innobase/row/row0sel.c
+++ b/innobase/row/row0sel.c
@@ -2145,19 +2145,14 @@ row_sel_store_mysql_rec(
extern_field_heap = NULL;
}
} else {
- /* MySQL sometimes seems to copy the 'data'
- pointed to by a BLOB field even if the field
- has been marked to contain the SQL NULL value.
- This caused seg faults reported by two users.
- Set the BLOB length to 0 and the data pointer
- to NULL to avoid a seg fault. */
-
- if (templ->type == DATA_BLOB) {
- row_sel_field_store_in_mysql_format(
- mysql_rec + templ->mysql_col_offset,
- templ->mysql_col_len, NULL,
- 0, templ->type, templ->is_unsigned);
- }
+ /* MySQL seems to assume the field for an SQL NULL
+ value is set to zero. Not taking this into account
+ caused seg faults with NULL BLOB fields, and
+ bug number 154 in the MySQL bug database: GROUP BY
+ and DISTINCT could treat NULL values inequal. */
+
+ memset(mysql_rec + templ->mysql_col_offset, '\0',
+ templ->mysql_col_len);
if (!templ->mysql_null_bit_mask) {
fprintf(stderr,
diff --git a/innobase/srv/srv0start.c b/innobase/srv/srv0start.c
index 671ef4e5b22..33d4a30e227 100644
--- a/innobase/srv/srv0start.c
+++ b/innobase/srv/srv0start.c
@@ -577,8 +577,11 @@ open_or_create_log_file(
|| size_high != srv_calc_high32(srv_log_file_size)) {
fprintf(stderr,
- "InnoDB: Error: log file %s is of different size\n"
- "InnoDB: than specified in the .cnf file!\n", name);
+"InnoDB: Error: log file %s is of different size %lu %lu bytes\n"
+"InnoDB: than specified in the .cnf file %lu %lu bytes!\n",
+ name, size_high, size,
+ srv_calc_high32(srv_log_file_size),
+ srv_calc_low32(srv_log_file_size));
return(DB_ERROR);
}
@@ -770,8 +773,13 @@ open_or_create_data_files(
rounded_size_pages)) {
fprintf(stderr,
- "InnoDB: Error: data file %s is of a different size\n"
- "InnoDB: than specified in the .cnf file!\n", name);
+"InnoDB: Error: auto-extending data file %s is of a different size\n"
+"InnoDB: %lu pages (rounded down to MB) than specified in the .cnf file:\n"
+"InnoDB: initial %lu pages, max %lu (relevant if non-zero) pages!\n",
+ name, rounded_size_pages,
+ srv_data_file_sizes[i], srv_last_file_size_max);
+
+ return(DB_ERROR);
}
srv_data_file_sizes[i] =
@@ -782,8 +790,11 @@ open_or_create_data_files(
!= srv_data_file_sizes[i]) {
fprintf(stderr,
- "InnoDB: Error: data file %s is of a different size\n"
- "InnoDB: than specified in the .cnf file!\n", name);
+"InnoDB: Error: data file %s is of a different size\n"
+"InnoDB: %lu pages (rounded down to MB)\n"
+"InnoDB: than specified in the .cnf file %lu pages!\n", name,
+ rounded_size_pages,
+ srv_data_file_sizes[i]);
return(DB_ERROR);
}
diff --git a/innobase/trx/trx0roll.c b/innobase/trx/trx0roll.c
index 1f0e0c58ac7..a9f8c5ad22c 100644
--- a/innobase/trx/trx0roll.c
+++ b/innobase/trx/trx0roll.c
@@ -21,6 +21,7 @@ Created 3/26/1996 Heikki Tuuri
#include "que0que.h"
#include "usr0sess.h"
#include "srv0que.h"
+#include "srv0start.h"
#include "row0undo.h"
#include "row0mysql.h"
#include "lock0lock.h"
@@ -29,6 +30,12 @@ Created 3/26/1996 Heikki Tuuri
/* This many pages must be undone before a truncate is tried within rollback */
#define TRX_ROLL_TRUNC_THRESHOLD 1
+/* In crash recovery we set this to the undo n:o of the current trx to be
+rolled back. Then we can print how many % the rollback has progressed. */
+ib_longlong trx_roll_max_undo_no;
+/* Auxiliary variable which tells the previous progress % we printed */
+ulint trx_roll_progress_printed_pct;
+
/***********************************************************************
Rollback a transaction used in MySQL. */
@@ -174,6 +181,8 @@ trx_rollback_or_clean_all_without_sess(void)
roll_node_t* roll_node;
trx_t* trx;
dict_table_t* table;
+ ib_longlong rows_to_undo;
+ char* unit = (char*)"";
int err;
mutex_enter(&kernel_mutex);
@@ -219,8 +228,7 @@ loop:
trx->sess = trx_dummy_sess;
- if (trx->conc_state == TRX_COMMITTED_IN_MEMORY) {
-
+ if (trx->conc_state == TRX_COMMITTED_IN_MEMORY) {
fprintf(stderr, "InnoDB: Cleaning up trx with id %lu %lu\n",
ut_dulint_get_high(trx->id),
ut_dulint_get_low(trx->id));
@@ -248,9 +256,19 @@ loop:
ut_a(thr == que_fork_start_command(fork, SESS_COMM_EXECUTE, 0));
- fprintf(stderr, "InnoDB: Rolling back trx with id %lu %lu\n",
+ trx_roll_max_undo_no = ut_conv_dulint_to_longlong(trx->undo_no);
+ trx_roll_progress_printed_pct = 0;
+ rows_to_undo = trx_roll_max_undo_no;
+ if (rows_to_undo > 1000000000) {
+ rows_to_undo = rows_to_undo / 1000000;
+ unit = (char*)"M";
+ }
+
+ fprintf(stderr,
+"InnoDB: Rolling back trx with id %lu %lu, %lu%s rows to undo",
ut_dulint_get_high(trx->id),
- ut_dulint_get_low(trx->id));
+ ut_dulint_get_low(trx->id),
+ (ulint)rows_to_undo, unit);
mutex_exit(&kernel_mutex);
if (trx->dict_operation) {
@@ -300,7 +318,7 @@ loop:
row_mysql_unlock_data_dictionary(trx);
}
- fprintf(stderr, "InnoDB: Rolling back of trx id %lu %lu completed\n",
+ fprintf(stderr, "\nInnoDB: Rolling back of trx id %lu %lu completed\n",
ut_dulint_get_high(trx->id),
ut_dulint_get_low(trx->id));
mem_heap_free(heap);
@@ -614,6 +632,7 @@ trx_roll_pop_top_rec_of_trx(
dulint undo_no;
ibool is_insert;
trx_rseg_t* rseg;
+ ulint progress_pct;
mtr_t mtr;
rseg = trx->rseg;
@@ -676,6 +695,26 @@ try_again:
ut_ad(ut_dulint_cmp(ut_dulint_add(undo_no, 1), trx->undo_no) == 0);
+ /* We print rollback progress info if we are in a crash recovery
+ and the transaction has at least 1000 row operations to undo */
+
+ if (srv_is_being_started && trx_roll_max_undo_no > 1000) {
+ progress_pct = 100 - (ulint)
+ ((ut_conv_dulint_to_longlong(undo_no) * 100)
+ / trx_roll_max_undo_no);
+ if (progress_pct != trx_roll_progress_printed_pct) {
+ if (trx_roll_progress_printed_pct == 0) {
+ fprintf(stderr,
+ "\nInnoDB: Progress in percents: %lu", progress_pct);
+ } else {
+ fprintf(stderr,
+ " %lu", progress_pct);
+ }
+ fflush(stderr);
+ trx_roll_progress_printed_pct = progress_pct;
+ }
+ }
+
trx->undo_no = undo_no;
if (!trx_undo_arr_store_info(trx, undo_no)) {
diff --git a/innobase/trx/trx0sys.c b/innobase/trx/trx0sys.c
index 33c962772e8..1ae9f00ae1f 100644
--- a/innobase/trx/trx0sys.c
+++ b/innobase/trx/trx0sys.c
@@ -699,6 +699,9 @@ trx_sys_init_at_db_start(void)
/*==========================*/
{
trx_sysf_t* sys_header;
+ ib_longlong rows_to_undo = 0;
+ char* unit = (char*)"";
+ trx_t* trx;
mtr_t mtr;
mtr_start(&mtr);
@@ -734,9 +737,28 @@ trx_sys_init_at_db_start(void)
trx_lists_init_at_db_start();
if (UT_LIST_GET_LEN(trx_sys->trx_list) > 0) {
+ trx = UT_LIST_GET_FIRST(trx_sys->trx_list);
+
+ for (;;) {
+ rows_to_undo +=
+ ut_conv_dulint_to_longlong(trx->undo_no);
+ trx = UT_LIST_GET_NEXT(trx_list, trx);
+
+ if (!trx) {
+ break;
+ }
+ }
+
+ if (rows_to_undo > 1000000000) {
+ unit = (char*)"M";
+ rows_to_undo = rows_to_undo / 1000000;
+ }
+
fprintf(stderr,
- "InnoDB: %lu transaction(s) which must be rolled back or cleaned up\n",
- UT_LIST_GET_LEN(trx_sys->trx_list));
+"InnoDB: %lu transaction(s) which must be rolled back or cleaned up\n"
+"InnoDB: in total %lu%s row operations to undo\n",
+ UT_LIST_GET_LEN(trx_sys->trx_list),
+ (ulint)rows_to_undo, unit);
fprintf(stderr, "InnoDB: Trx id counter is %lu %lu\n",
ut_dulint_get_high(trx_sys->max_trx_id),
diff --git a/libmysql/libmysql.c b/libmysql/libmysql.c
index 564db0fe111..cc268101d38 100644
--- a/libmysql/libmysql.c
+++ b/libmysql/libmysql.c
@@ -192,9 +192,10 @@ my_bool my_connect(my_socket s, const struct sockaddr *name,
struct timeval tv;
time_t start_time, now_time;
- /* If they passed us a timeout of zero, we should behave
- * exactly like the normal connect() call does.
- */
+ /*
+ If they passed us a timeout of zero, we should behave
+ exactly like the normal connect() call does.
+ */
if (timeout == 0)
return connect(s, (struct sockaddr*) name, namelen) != 0;
@@ -247,12 +248,14 @@ my_bool my_connect(my_socket s, const struct sockaddr *name,
tv.tv_sec = (long) timeout;
tv.tv_usec = 0;
#if defined(HPUX10) && defined(THREAD)
- if ((res = select(s+1, NULL, (int*) &sfds, NULL, &tv)) >= 0)
+ if ((res = select(s+1, NULL, (int*) &sfds, NULL, &tv)) > 0)
break;
#else
- if ((res = select(s+1, NULL, &sfds, NULL, &tv)) >= 0)
+ if ((res = select(s+1, NULL, &sfds, NULL, &tv)) > 0)
break;
#endif
+ if (res == 0) /* timeout */
+ return -1;
now_time=time(NULL);
timeout-= (uint) (now_time - start_time);
if (errno != EINTR || (int) timeout <= 0)
@@ -274,7 +277,8 @@ my_bool my_connect(my_socket s, const struct sockaddr *name,
errno = s_err;
return(1); /* but return an error... */
}
- return(0); /* It's all good! */
+ return (0); /* ok */
+
#endif
}
diff --git a/libmysqld/lib_vio.c b/libmysqld/lib_vio.c
index 6d4a09c6844..3f89c544ce9 100644
--- a/libmysqld/lib_vio.c
+++ b/libmysqld/lib_vio.c
@@ -199,7 +199,7 @@ my_socket vio_fd(Vio* vio)
}
-my_bool vio_peer_addr(Vio * vio, char *buf)
+my_bool vio_peer_addr(Vio * vio, char *buf, uint16 *port)
{
return(0);
}
diff --git a/man/perror.1 b/man/perror.1
index 38a51593ba1..2c5dd9a295f 100644
--- a/man/perror.1
+++ b/man/perror.1
@@ -1,17 +1,12 @@
.TH perror 1 "19 December 2000" "MySQL 3.23" "MySQL database"
.SH NAME
-.BR perror
-can be used to display a description for a system error code, or an MyISAM/ISAM table handler error code. The error messages are mostly system dependent.
-.SH USAGE
-perror [OPTIONS] [ERRORCODE [ERRORCODE...]]
+perror \- describes a system or MySQL error code.
.SH SYNOPSIS
-.B perror
-.RB [ \-? | \-\-help ]
-.RB [ \-I | \-\-info ]
-.RB [ \-s | \-\-silent ]
-.RB [ \-v | \-\-verbose ]
-.RB [ \-V | \-\-version ]
+perror [OPTIONS] [ERRORCODE [ERRORCODE...]]
.SH DESCRIPTION
+Can be used to display a description for a system error code, or an MyISAM/ISAM table handler error code.
+The error messages are mostly system dependent.
+.SH OPTIONS
.TP
.BR \-? | \-\-help
Displays this help and exits.
diff --git a/myisam/mi_check.c b/myisam/mi_check.c
index d0e9d17a43b..a55096dd061 100644
--- a/myisam/mi_check.c
+++ b/myisam/mi_check.c
@@ -3824,7 +3824,7 @@ void mi_disable_non_unique_index(MI_INFO *info, ha_rows rows)
MI_KEYDEF *key=share->keyinfo;
for (i=0 ; i < share->base.keys ; i++,key++)
{
- if (!(key->flag & (HA_NOSAME | HA_SPATIAL)) &&
+ if (!(key->flag & (HA_NOSAME | HA_SPATIAL | HA_AUTO_KEY)) &&
! mi_too_big_key_for_sort(key,rows) && info->s->base.auto_key != i+1)
{
share->state.key_map&= ~ ((ulonglong) 1 << i);
diff --git a/myisam/mi_create.c b/myisam/mi_create.c
index 843a92d9d10..964845cc051 100644
--- a/myisam/mi_create.c
+++ b/myisam/mi_create.c
@@ -321,7 +321,7 @@ int mi_create(const char *name,uint keys,MI_KEYDEF *keydefs,
if (keydef->flag & HA_BINARY_PACK_KEY)
options|=HA_OPTION_PACK_KEYS; /* Using packed keys */
- if (keydef->flag & HA_AUTO_KEY)
+ if (keydef->flag & HA_AUTO_KEY && ci->with_auto_increment)
share.base.auto_key=i+1;
for (j=0, keyseg=keydef->seg ; j < keydef->keysegs ; j++, keyseg++)
{
diff --git a/myisam/mi_open.c b/myisam/mi_open.c
index 1ed3ee78ffb..26c8e503c28 100644
--- a/myisam/mi_open.c
+++ b/myisam/mi_open.c
@@ -37,6 +37,14 @@ static void setup_key_functions(MI_KEYDEF *keyinfo);
pos+=size;}
+#define disk_pos_assert(pos, end_pos) \
+if (pos > end_pos) \
+{ \
+ my_errno=HA_ERR_CRASHED; \
+ goto err; \
+}
+
+
/******************************************************************************
** Return the shared struct if the table is already open.
** In MySQL the server will handle version issues.
@@ -72,7 +80,7 @@ MI_INFO *mi_open(const char *name, int mode, uint open_flags)
key_parts,unique_key_parts,fulltext_keys,uniques;
char name_buff[FN_REFLEN], org_name [FN_REFLEN], index_name[FN_REFLEN],
data_name[FN_REFLEN];
- char *disk_cache,*disk_pos;
+ char *disk_cache, *disk_pos, *end_pos;
MI_INFO info,*m_info,*old_info;
MYISAM_SHARE share_buff,*share;
ulong rec_per_key_part[MI_MAX_POSSIBLE_KEY*MI_MAX_KEY_SEG];
@@ -139,11 +147,12 @@ MI_INFO *mi_open(const char *name, int mode, uint open_flags)
info_length=mi_uint2korr(share->state.header.header_length);
base_pos=mi_uint2korr(share->state.header.base_pos);
- if (!(disk_cache=(char*) my_alloca(info_length)))
+ if (!(disk_cache=(char*) my_alloca(info_length+128)))
{
my_errno=ENOMEM;
goto err;
}
+ end_pos=disk_cache+info_length;
errpos=2;
VOID(my_seek(kfile,0L,MY_SEEK_SET,MYF(0)));
@@ -288,6 +297,8 @@ MI_INFO *mi_open(const char *name, int mode, uint open_flags)
for (i=0 ; i < keys ; i++)
{
disk_pos=mi_keydef_read(disk_pos, &share->keyinfo[i]);
+ disk_pos_assert(disk_pos + share->keyinfo[i].keysegs * MI_KEYSEG_SIZE,
+ end_pos);
if (share->keyinfo[i].key_alg == HA_KEY_ALG_RTREE)
have_rtree=1;
set_if_smaller(share->blocksize,share->keyinfo[i].block_length);
@@ -361,6 +372,8 @@ MI_INFO *mi_open(const char *name, int mode, uint open_flags)
for (i=0 ; i < uniques ; i++)
{
disk_pos=mi_uniquedef_read(disk_pos, &share->uniqueinfo[i]);
+ disk_pos_assert(disk_pos + share->uniqueinfo[i].keysegs *
+ MI_KEYSEG_SIZE, end_pos);
share->uniqueinfo[i].seg=pos;
for (j=0 ; j < share->uniqueinfo[i].keysegs; j++,pos++)
{
@@ -384,6 +397,7 @@ MI_INFO *mi_open(const char *name, int mode, uint open_flags)
}
}
+ disk_pos_assert(disk_pos + share->base.fields *MI_COLUMNDEF_SIZE, end_pos);
for (i=j=offset=0 ; i < share->base.fields ; i++)
{
disk_pos=mi_recinfo_read(disk_pos,&share->rec[i]);
diff --git a/mysql-test/include/have_openssl_1.inc b/mysql-test/include/have_openssl_1.inc
index 4d3646abdc2..887309c7e23 100644
--- a/mysql-test/include/have_openssl_1.inc
+++ b/mysql-test/include/have_openssl_1.inc
@@ -1,4 +1,4 @@
-- require r/have_openssl_1.require
disable_query_log;
-show variables like "have_openssl";
+SHOW STATUS LIKE 'Ssl_cipher';
enable_query_log;
diff --git a/mysql-test/mysql-test-run.sh b/mysql-test/mysql-test-run.sh
index db1fab7a50d..8e0490f441e 100644
--- a/mysql-test/mysql-test-run.sh
+++ b/mysql-test/mysql-test-run.sh
@@ -208,6 +208,7 @@ DBUSER=""
START_WAIT_TIMEOUT=10
STOP_WAIT_TIMEOUT=10
TEST_REPLICATION=0
+MYSQL_TEST_SSL_OPTS=""
while test $# -gt 0; do
case "$1" in
@@ -238,7 +239,10 @@ while test $# -gt 0; do
EXTRA_SLAVE_MYSQLD_OPT="$EXTRA_SLAVE_MYSQLD_OPT \
--ssl-ca=$BASEDIR/SSL/cacert.pem \
--ssl-cert=$BASEDIR/SSL/server-cert.pem \
- --ssl-key=$BASEDIR/SSL/server-key.pem" ;;
+ --ssl-key=$BASEDIR/SSL/server-key.pem"
+ MYSQL_TEST_SSL_OPTS="--ssl-ca=$BASEDIR/SSL/cacert.pem \
+ --ssl-cert=$BASEDIR/SSL/client-cert.pem \
+ --ssl-key=$BASEDIR/SSL/client-key.pem" ;;
--no-manager | --skip-manager) USE_MANAGER=0 ;;
--manager)
USE_MANAGER=1
@@ -330,7 +334,7 @@ while test $# -gt 0; do
USE_RUNNING_SERVER=""
;;
--valgrind)
- VALGRIND="valgrind --alignment=8 --leak-check=yes"
+ VALGRIND="valgrind --alignment=8 --leak-check=yes --num-callers=16"
EXTRA_MASTER_MYSQLD_OPT="$EXTRA_MASTER_MYSQLD_OPT --skip-safemalloc"
EXTRA_SLAVE_MYSQLD_OPT="$EXTRA_SLAVE_MYSQLD_OPT --skip-safemalloc"
SLEEP_TIME_AFTER_RESTART=10
@@ -353,7 +357,8 @@ while test $# -gt 0; do
--debug=d:t:i:A,$MYSQL_TEST_DIR/var/log/master.trace"
EXTRA_SLAVE_MYSQLD_OPT="$EXTRA_SLAVE_MYSQLD_OPT \
--debug=d:t:i:A,$MYSQL_TEST_DIR/var/log/slave.trace"
- EXTRA_MYSQL_TEST_OPT="$EXTRA_MYSQL_TEST_OPT --debug"
+ EXTRA_MYSQL_TEST_OPT="$EXTRA_MYSQL_TEST_OPT \
+ --debug=d:t:A,$MYSQL_TEST_DIR/var/log/mysqltest.trace"
;;
--fast)
FAST_START=1
@@ -493,7 +498,7 @@ fi
MYSQL_TEST_ARGS="--no-defaults --socket=$MASTER_MYSOCK --database=$DB \
--user=$DBUSER --password=$DBPASSWD --silent -v --skip-safemalloc \
- --tmpdir=$MYSQL_TMP_DIR --port=$MASTER_MYPORT"
+ --tmpdir=$MYSQL_TMP_DIR --port=$MASTER_MYPORT $MYSQL_TEST_SSL_OPTS"
MYSQL_TEST_BIN=$MYSQL_TEST
MYSQL_TEST="$MYSQL_TEST $MYSQL_TEST_ARGS"
GDB_CLIENT_INIT=$MYSQL_TMP_DIR/gdbinit.client
@@ -812,8 +817,8 @@ start_master()
fi
# Remove stale binary logs
$RM -f $MYSQL_TEST_DIR/var/log/master-bin.*
- # Remove old master.info files
- $RM -f $MYSQL_TEST_DIR/var/master-data/master.info
+ # Remove old master.info and relay-log.info files
+ $RM -f $MYSQL_TEST_DIR/var/master-data/master.info $MYSQL_TEST_DIR/var/master-data/relay-log.info
#run master initialization shell script if one exists
@@ -917,7 +922,7 @@ start_slave()
slave_port=`expr $SLAVE_MYPORT + $1`
slave_log="$SLAVE_MYLOG.$1"
slave_err="$SLAVE_MYERR.$1"
- slave_datadir="var/$slave_ident-data/"
+ slave_datadir="$SLAVE_MYDDIR/../$slave_ident-data/"
slave_pid="$MYRUN_DIR/mysqld-$slave_ident.pid"
slave_sock="$SLAVE_MYSOCK-$1"
else
@@ -932,7 +937,7 @@ start_slave()
fi
# Remove stale binary logs and old master.info files
$RM -f $MYSQL_TEST_DIR/var/log/$slave_ident-*bin.*
- $RM -f $MYSQL_TEST_DIR/$slave_datadir/master.info
+ $RM -f $slave_datadir/master.info $slave_datadir/relay-log.info
#run slave initialization shell script if one exists
if [ -f "$slave_init_script" ] ;
@@ -1161,7 +1166,7 @@ run_testcase ()
echo "CURRENT_TEST: $tname" >> $MASTER_MYERR
start_master
else
- if [ ! -z "$EXTRA_MASTER_OPT" ] || [ x$MASTER_RUNNING != x1 ] ;
+ if [ ! -z "$EXTRA_MASTER_OPT" ] || [ x$MASTER_RUNNING != x1 ] || [ -f $master_init_script ]
then
EXTRA_MASTER_OPT=""
stop_master
diff --git a/mysql-test/r/auto_increment.result b/mysql-test/r/auto_increment.result
index 66efd2ba567..e79e6aab56b 100644
--- a/mysql-test/r/auto_increment.result
+++ b/mysql-test/r/auto_increment.result
@@ -84,6 +84,16 @@ ordid ord
3 sdj
1 zzz
drop table t1;
+create table t1 (sid char(5), id int(2) NOT NULL auto_increment, key(sid, id));
+create table t2 (sid char(20), id int(2));
+insert into t2 values ('skr',NULL),('skr',NULL),('test',NULL);
+insert into t1 select * from t2;
+select * from t1;
+sid id
+skr 1
+skr 2
+test 1
+drop table t1,t2;
create table t1 (a int not null primary key auto_increment);
insert into t1 values (0);
update t1 set a=0;
diff --git a/mysql-test/r/create.result b/mysql-test/r/create.result
index 5228ae50a83..2ec2759ad7a 100644
--- a/mysql-test/r/create.result
+++ b/mysql-test/r/create.result
@@ -62,6 +62,13 @@ a$1 $b c$
create table test_$1.test2$ (a int);
drop table test_$1.test2$;
drop database test_$1;
+create table `` (a int);
+Incorrect table name ''
+drop table if exists ``;
+Incorrect table name ''
+create table t1 (`` int);
+Incorrect column name ''
+drop table if exists t1;
create table t1 (a int auto_increment not null primary key, B CHAR(20));
insert into t1 (b) values ("hello"),("my"),("world");
create table t2 (key (b)) select * from t1;
diff --git a/mysql-test/r/ctype_latin1_de.result b/mysql-test/r/ctype_latin1_de.result
index e5ae6f249ee..b79bc67138c 100644
--- a/mysql-test/r/ctype_latin1_de.result
+++ b/mysql-test/r/ctype_latin1_de.result
@@ -1,93 +1,95 @@
drop table if exists t1;
-create table t1 (a char (20) not null, b int not null auto_increment, index (a,b),index(b));
+create table t1 (a char (20) not null, b int not null auto_increment, index (a,b));
insert into t1 (a) values ('ä'),('ac'),('ae'),('ad'),('Äc'),('aeb');
insert into t1 (a) values ('üc'),('uc'),('ue'),('ud'),('Ü'),('ueb'),('uf');
insert into t1 (a) values ('ö'),('oc'),('Öa'),('oe'),('od'),('Öc'),('oeb');
insert into t1 (a) values ('s'),('ss'),('ß'),('ßb'),('ssa'),('ssc'),('ßa');
insert into t1 (a) values ('eä'),('uü'),('öo'),('ää'),('ääa'),('aeae');
-insert into t1 (a) values ('q'),('a'),('u'),('o'),('é'),('É');
+insert into t1 (a) values ('q'),('a'),('u'),('o'),('é'),('É'),('a');
select a,b from t1 order by a,b;
a b
-a 35
-ac 2
-ad 4
+a 1
+a 2
+ac 1
+ad 1
ä 1
-ae 3
-ää 31
-aeae 33
-ääa 32
-aeb 6
-Äc 5
-é 38
-É 39
-eä 28
-o 37
-oc 15
-od 18
-ö 14
-oe 17
-Öa 16
-oeb 20
-Öc 19
-öo 30
-q 34
-s 21
-ss 22
-ß 23
-ssa 25
-ßa 27
-ßb 24
-ssc 26
-u 36
-uc 8
-ud 10
-ue 9
-Ü 11
-ueb 12
-üc 7
-uf 13
-uü 29
+ae 2
+ää 1
+aeae 2
+ääa 1
+aeb 1
+Äc 1
+é 1
+É 2
+eä 1
+o 1
+oc 1
+od 1
+ö 1
+oe 2
+Öa 1
+oeb 1
+Öc 1
+öo 1
+q 1
+s 1
+ss 1
+ß 2
+ssa 1
+ßa 2
+ßb 1
+ssc 1
+u 1
+uc 1
+ud 1
+ue 1
+Ü 2
+ueb 1
+üc 1
+uf 1
+uü 1
select a,b from t1 order by upper(a),b;
a b
-a 35
-ac 2
-ad 4
+a 1
+a 2
+ac 1
+ad 1
ä 1
-ae 3
-ää 31
-aeae 33
-ääa 32
-aeb 6
-Äc 5
-é 38
-É 39
-eä 28
-o 37
-oc 15
-od 18
-ö 14
-oe 17
-Öa 16
-oeb 20
-Öc 19
-öo 30
-q 34
-s 21
-ss 22
-ß 23
-ssa 25
-ßa 27
-ßb 24
-ssc 26
-u 36
-uc 8
-ud 10
-ue 9
-Ü 11
-ueb 12
-üc 7
-uf 13
-uü 29
+ae 2
+ää 1
+aeae 2
+ääa 1
+aeb 1
+Äc 1
+é 1
+É 2
+eä 1
+o 1
+oc 1
+od 1
+ö 1
+oe 2
+Öa 1
+oeb 1
+Öc 1
+öo 1
+q 1
+s 1
+ss 1
+ß 2
+ssa 1
+ßa 2
+ßb 1
+ssc 1
+u 1
+uc 1
+ud 1
+ue 1
+Ü 2
+ueb 1
+üc 1
+uf 1
+uü 1
select a from t1 order by a desc;
a
@@ -129,44 +131,46 @@ ae
ad
ac
a
+a
check table t1;
Table Op Msg_type Msg_text
test.t1 check status OK
select * from t1 where a like "ö%";
a b
-ö 14
-Öa 16
-Öc 19
-öo 30
+ö 1
+Öa 1
+Öc 1
+öo 1
select * from t1 where a like binary "%É%";
a b
-É 39
+É 2
select * from t1 where a like "%Á%";
a b
-a 35
-ac 2
-ad 4
-ae 3
-aeae 33
-ääa 32
-aeb 6
-Öa 16
-ssa 25
-ßa 27
+a 1
+a 2
+ac 1
+ad 1
+ae 2
+aeae 2
+ääa 1
+aeb 1
+Öa 1
+ssa 1
+ßa 2
select * from t1 where a like "%U%";
a b
-u 36
-uc 8
-ud 10
-ue 9
-ueb 12
-uf 13
-uü 29
+u 1
+uc 1
+ud 1
+ue 1
+ueb 1
+uf 1
+uü 1
select * from t1 where a like "%ss%";
a b
-ss 22
-ssa 25
-ssc 26
+ss 1
+ssa 1
+ssc 1
drop table t1;
select strcmp('ä','ae'),strcmp('ae','ä'),strcmp('aeq','äq'),strcmp('äq','aeq');
strcmp('ä','ae') strcmp('ae','ä') strcmp('aeq','äq') strcmp('äq','aeq')
diff --git a/mysql-test/r/delete.result b/mysql-test/r/delete.result
index 4fa85ea9cbc..ee0c3ce1219 100644
--- a/mysql-test/r/delete.result
+++ b/mysql-test/r/delete.result
@@ -32,3 +32,18 @@ PRIMARY KEY (`i`)
DELETE FROM t USING t WHERE post='1';
Unknown column 'post' in 'where clause'
drop table if exists t;
+CREATE TABLE t1 (
+bool char(0) default NULL,
+not_null varchar(20) binary NOT NULL default '',
+misc integer not null,
+PRIMARY KEY (not_null)
+) TYPE=MyISAM;
+INSERT INTO t1 VALUES (NULL,'a',4), (NULL,'b',5), (NULL,'c',6), (NULL,'d',7);
+select * from t1 where misc > 5 and bool is null;
+bool not_null misc
+NULL c 6
+NULL d 7
+delete from t1 where misc > 5 and bool is null;
+select * from t1 where misc > 5 and bool is null;
+bool not_null misc
+drop table t1;
diff --git a/mysql-test/r/func_like.result b/mysql-test/r/func_like.result
index c2085ba12da..f923c16b2ac 100644
--- a/mysql-test/r/func_like.result
+++ b/mysql-test/r/func_like.result
@@ -1,10 +1,20 @@
drop table if exists t1;
create table t1 (a varchar(10), key(a));
insert into t1 values ("a"),("abc"),("abcd"),("hello"),("test");
+explain select * from t1 where a like 'abc%';
+table type possible_keys key key_len ref rows Extra
+t1 range a a 11 NULL 1 Using where; Using index
+explain select * from t1 where a like concat('abc','%');
+table type possible_keys key key_len ref rows Extra
+t1 range a a 11 NULL 1 Using where; Using index
select * from t1 where a like "abc%";
a
abc
abcd
+select * from t1 where a like concat("abc","%");
+a
+abc
+abcd
select * from t1 where a like "ABC%";
a
abc
diff --git a/mysql-test/r/group_by.result b/mysql-test/r/group_by.result
index e6f3256d779..d13f31d6bef 100644
--- a/mysql-test/r/group_by.result
+++ b/mysql-test/r/group_by.result
@@ -305,6 +305,11 @@ score count(*)
2 1
1 2
drop table t1;
+create table t1 (a date default null, b date default null);
+insert t1 values ('1999-10-01','2000-01-10'), ('1997-01-01','1998-10-01');
+select a,min(b) c,count(distinct rand()) from t1 group by a having c<a + interval 1 day;
+a c count(distinct rand())
+drop table t1;
CREATE TABLE t1 (a char(1));
INSERT INTO t1 VALUES ('A'),('B'),('A'),('B'),('A'),('B'),(NULL),('a'),('b'),(NULL),('A'),('B'),(NULL);
SELECT a FROM t1 GROUP BY a;
diff --git a/mysql-test/r/have_openssl_1.require b/mysql-test/r/have_openssl_1.require
index dae48a472b5..032b60d544a 100644
--- a/mysql-test/r/have_openssl_1.require
+++ b/mysql-test/r/have_openssl_1.require
@@ -1,2 +1,2 @@
Variable_name Value
-have_openssl YES
+Ssl_cipher EDH-RSA-DES-CBC3-SHA
diff --git a/mysql-test/r/innodb.result b/mysql-test/r/innodb.result
index 5bc21501eca..0021be10d85 100644
--- a/mysql-test/r/innodb.result
+++ b/mysql-test/r/innodb.result
@@ -1073,3 +1073,20 @@ id
select * from t2;
id t1_id
drop table t1,t2;
+DROP TABLE IF EXISTS t1,t2;
+CREATE TABLE t1(id INT NOT NULL, PRIMARY KEY (id)) TYPE=INNODB;
+CREATE TABLE t2(id INT PRIMARY KEY, t1_id INT, INDEX par_ind (t1_id) ) TYPE=INNODB;
+INSERT INTO t1 VALUES(1);
+INSERT INTO t2 VALUES(1, 1);
+SELECT * from t1;
+id
+1
+UPDATE t1,t2 SET t1.id=t1.id+1, t2.t1_id=t1.id+1;
+SELECT * from t1;
+id
+2
+UPDATE t1,t2 SET t1.id=t1.id+1 where t1.id!=t2.id;
+SELECT * from t1;
+id
+3
+DROP TABLE t1,t2;
diff --git a/mysql-test/r/join.result b/mysql-test/r/join.result
index 274a4dec85d..09b819888eb 100644
--- a/mysql-test/r/join.result
+++ b/mysql-test/r/join.result
@@ -251,3 +251,26 @@ t1_id t2_id type cost_unit min_value max_value t3_id item_id id name
22 1 Percent Cost 100 -1 6 291 1 s1
23 1 Percent Cost 100 -1 21 291 1 s1
drop table t1,t2;
+CREATE TABLE t1 (
+siteid varchar(25) NOT NULL default '',
+emp_id varchar(30) NOT NULL default '',
+rate_code varchar(10) default NULL,
+UNIQUE KEY site_emp (siteid,emp_id),
+KEY siteid (siteid)
+) TYPE=MyISAM;
+INSERT INTO t1 VALUES ('rivercats','psmith','cust'), ('rivercats','KWalker','cust');
+CREATE TABLE t2 (
+siteid varchar(25) NOT NULL default '',
+rate_code varchar(10) NOT NULL default '',
+base_rate float NOT NULL default '0',
+PRIMARY KEY (siteid,rate_code),
+FULLTEXT KEY rate_code (rate_code)
+) TYPE=MyISAM;
+INSERT INTO t2 VALUES ('rivercats','cust',20);
+SELECT emp.rate_code, lr.base_rate FROM t1 AS emp LEFT JOIN t2 AS lr USING (siteid, rate_code) WHERE emp.emp_id = 'psmith' AND lr.siteid = 'rivercats';
+rate_code base_rate
+cust 20
+SELECT emp.rate_code, lr.base_rate FROM t1 AS emp LEFT JOIN t2 AS lr USING (siteid, rate_code) WHERE lr.siteid = 'rivercats' AND emp.emp_id = 'psmith';
+rate_code base_rate
+cust 20
+drop table t1,t2;
diff --git a/mysql-test/r/lock_multi.result b/mysql-test/r/lock_multi.result
index 20bc9b9572f..b808fca0acf 100644
--- a/mysql-test/r/lock_multi.result
+++ b/mysql-test/r/lock_multi.result
@@ -1,4 +1,4 @@
-drop table if exists t1;
+drop table if exists t1,t2;
create table t1(n int);
insert into t1 values (1);
lock tables t1 write;
@@ -17,3 +17,10 @@ unlock tables;
n
1
drop table t1;
+create table t1 (a int);
+create table t2 (a int);
+lock table t1 write, t2 write;
+ insert t1 select * from t2;
+drop table t2;
+Table 'test.t2' doesn't exist
+drop table t1;
diff --git a/mysql-test/r/openssl_1.result b/mysql-test/r/openssl_1.result
index b5c67dfbcb0..65b882c0a9b 100644
--- a/mysql-test/r/openssl_1.result
+++ b/mysql-test/r/openssl_1.result
@@ -1,2 +1,32 @@
-SHOW STATUS LIKE 'SSL%';
-Variable_name Value
+drop table if exists t1;
+create table t1(f1 int);
+insert into t1 values (5);
+grant select on test.* to ssl_user1@localhost require SSL;
+grant select on test.* to ssl_user2@localhost require cipher "EDH-RSA-DES-CBC3-SHA";
+grant select on test.* to ssl_user3@localhost require cipher "EDH-RSA-DES-CBC3-SHA" AND SUBJECT "/C=RU/L=orenburg/O=MySQL AB/OU=client/CN=walrus/Email=walrus@mysql.com";
+grant select on test.* to ssl_user4@localhost require cipher "EDH-RSA-DES-CBC3-SHA" AND SUBJECT "/C=RU/L=orenburg/O=MySQL AB/OU=client/CN=walrus/Email=walrus@mysql.com" ISSUER "/C=RU/ST=Some-State/L=Orenburg/O=MySQL AB/CN=Walrus/Email=walrus@mysql.com";
+flush privileges;
+select * from t1;
+f1
+5
+delete from t1;
+Access denied for user: 'ssl_user1@localhost' to database 'test'
+select * from t1;
+f1
+5
+delete from t1;
+Access denied for user: 'ssl_user2@localhost' to database 'test'
+select * from t1;
+f1
+5
+delete from t1;
+Access denied for user: 'ssl_user3@localhost' to database 'test'
+select * from t1;
+f1
+5
+delete from t1;
+Access denied for user: 'ssl_user4@localhost' to database 'test'
+delete from mysql.user where user='ssl_user%';
+delete from mysql.db where user='ssl_user%';
+flush privileges;
+drop table t1;
diff --git a/mysql-test/r/rpl000001.result b/mysql-test/r/rpl000001.result
index cc3df4730f2..8aa667df063 100644
--- a/mysql-test/r/rpl000001.result
+++ b/mysql-test/r/rpl000001.result
@@ -31,7 +31,7 @@ n
2
select sum(length(word)) from t1;
sum(length(word))
-1021
+1022
drop table t1,t3;
reset master;
stop slave;
diff --git a/mysql-test/r/rpl_loaddatalocal.result b/mysql-test/r/rpl_loaddatalocal.result
new file mode 100644
index 00000000000..dc98b1b5bfb
--- /dev/null
+++ b/mysql-test/r/rpl_loaddatalocal.result
@@ -0,0 +1,14 @@
+slave stop;
+drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9;
+reset master;
+reset slave;
+drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9;
+slave start;
+create table t1(a int);
+select * into outfile '../../var/master-data/rpl_loaddatalocal.select_outfile' from t1;
+truncate table t1;
+load data local infile './var/master-data/rpl_loaddatalocal.select_outfile' into table t1;
+select a,count(*) from t1 group by a;
+a count(*)
+1 10000
+drop table t1;
diff --git a/mysql-test/r/select.result b/mysql-test/r/select.result
index 9ed54f7c253..a2bf24cad54 100644
--- a/mysql-test/r/select.result
+++ b/mysql-test/r/select.result
@@ -3242,6 +3242,17 @@ t2 1 fld3 1 fld3 A NULL NULL NULL BTREE
drop table t4, t3, t2, t1;
DO 1;
DO benchmark(100,1+1),1,1;
+CREATE TABLE t1 (
+id mediumint(8) unsigned NOT NULL auto_increment,
+pseudo varchar(35) NOT NULL default '',
+PRIMARY KEY (id),
+UNIQUE KEY pseudo (pseudo)
+);
+INSERT INTO t1 (pseudo) VALUES ('test');
+INSERT INTO t1 (pseudo) VALUES ('test1');
+SELECT 1 as rnd1 from t1 where rand() > 2;
+rnd1
+DROP TABLE t1;
CREATE TABLE t1 (gvid int(10) unsigned default NULL, hmid int(10) unsigned default NULL, volid int(10) unsigned default NULL, mmid int(10) unsigned default NULL, hdid int(10) unsigned default NULL, fsid int(10) unsigned default NULL, ctid int(10) unsigned default NULL, dtid int(10) unsigned default NULL, cost int(10) unsigned default NULL, performance int(10) unsigned default NULL, serialnumber bigint(20) unsigned default NULL, monitored tinyint(3) unsigned default '1', removed tinyint(3) unsigned default '0', target tinyint(3) unsigned default '0', dt_modified timestamp(14) NOT NULL, name varchar(255) binary default NULL, description varchar(255) default NULL, UNIQUE KEY hmid (hmid,volid)) TYPE=MyISAM;
INSERT INTO t1 VALUES (200001,2,1,1,100,1,1,1,0,0,0,1,0,1,20020425060057,'\\\\ARKIVIO-TESTPDC\\E$',''),(200002,2,2,1,101,1,1,1,0,0,0,1,0,1,20020425060057,'\\\\ARKIVIO-TESTPDC\\C$',''),(200003,1,3,2,NULL,NULL,NULL,NULL,NULL,NULL,NULL,1,0,1,20020425060427,'c:',NULL);
CREATE TABLE t2 ( hmid int(10) unsigned default NULL, volid int(10) unsigned default NULL, sampletid smallint(5) unsigned default NULL, sampletime datetime default NULL, samplevalue bigint(20) unsigned default NULL, KEY idx1 (hmid,volid,sampletid,sampletime)) TYPE=MyISAM;
diff --git a/mysql-test/r/type_datetime.result b/mysql-test/r/type_datetime.result
index cac8cd3d71e..5a9a8699d06 100644
--- a/mysql-test/r/type_datetime.result
+++ b/mysql-test/r/type_datetime.result
@@ -78,3 +78,9 @@ EXPLAIN SELECT * FROM t1 WHERE expedition='0001-00-00 00:00:00';
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t1 ref expedition expedition 8 const 1 Using where
drop table t1;
+create table t1 (a datetime not null, b datetime not null);
+insert into t1 values (now(), now());
+insert into t1 values (now(), now());
+select * from t1 where a is null or b is null;
+a b
+drop table t1;
diff --git a/mysql-test/r/type_timestamp.result b/mysql-test/r/type_timestamp.result
index 26dedf544c4..959c69ff6e7 100644
--- a/mysql-test/r/type_timestamp.result
+++ b/mysql-test/r/type_timestamp.result
@@ -84,3 +84,23 @@ date date_time time_stamp
2005-01-01 2005-01-01 00:00:00 2005-01-01 00:00:00
2030-01-01 2030-01-01 00:00:00 2030-01-01 00:00:00
drop table t1;
+show variables like 'new';
+Variable_name Value
+new OFF
+create table t1 (t2 timestamp(2), t4 timestamp(4), t6 timestamp(6),
+t8 timestamp(8), t10 timestamp(10), t12 timestamp(12),
+t14 timestamp(14));
+insert t1 values (0,0,0,0,0,0,0),
+("1997-12-31 23:47:59", "1997-12-31 23:47:59", "1997-12-31 23:47:59",
+"1997-12-31 23:47:59", "1997-12-31 23:47:59", "1997-12-31 23:47:59",
+"1997-12-31 23:47:59");
+select * from t1;
+t2 t4 t6 t8 t10 t12 t14
+00 0000 000000 00000000 0000000000 000000000000 00000000000000
+97 9712 971231 19971231 9712312347 971231234759 19971231234759
+set new=1;
+select * from t1;
+t2 t4 t6 t8 t10 t12 t14
+0000-00-00 00:00:00 0000-00-00 00:00:00 0000-00-00 00:00:00 0000-00-00 00:00:00 0000-00-00 00:00:00 0000-00-00 00:00:00 0000-00-00 00:00:00
+1997-12-31 23:47:59 1997-12-31 23:47:59 1997-12-31 23:47:59 1997-12-31 23:47:59 1997-12-31 23:47:59 1997-12-31 23:47:59 1997-12-31 23:47:59
+drop table t1;
diff --git a/mysql-test/t/analyse.test b/mysql-test/t/analyse.test
index 117ca40ce54..6aca345b282 100644
--- a/mysql-test/t/analyse.test
+++ b/mysql-test/t/analyse.test
@@ -5,10 +5,11 @@
--disable_warnings
drop table if exists t1,t2;
--enable_warnings
-create table t1 (i int, j int);
-insert into t1 values (1,2), (3,4), (5,6), (7,8);
+create table t1 (i int, j int, empty_string char(10), bool char(1), d date);
+insert into t1 values (1,2,"","Y","2002-03-03"), (3,4,"","N","2002-03-04"), (5,6,"","Y","2002-03-04"), (7,8,"","N","2002-03-05");
select count(*) from t1 procedure analyse();
select * from t1 procedure analyse();
+select * from t1 procedure analyse(2);
create table t2 select * from t1 procedure analyse();
select * from t2;
drop table t1,t2;
diff --git a/mysql-test/t/auto_increment.test b/mysql-test/t/auto_increment.test
index 30979202bd7..d7f67fe80d4 100644
--- a/mysql-test/t/auto_increment.test
+++ b/mysql-test/t/auto_increment.test
@@ -54,6 +54,13 @@ insert into t1 values (NULL,'sdj'),(NULL,'sdj'),(NULL,"abc"),(NULL,'abc'),(NULL,
select * from t1;
drop table t1;
+create table t1 (sid char(5), id int(2) NOT NULL auto_increment, key(sid, id));
+create table t2 (sid char(20), id int(2));
+insert into t2 values ('skr',NULL),('skr',NULL),('test',NULL);
+insert into t1 select * from t2;
+select * from t1;
+drop table t1,t2;
+
#
# Test of auto_increment columns when they are set to 0
#
@@ -64,3 +71,4 @@ update t1 set a=0;
select * from t1;
check table t1;
drop table t1;
+
diff --git a/mysql-test/t/backup-master.sh b/mysql-test/t/backup-master.sh
new file mode 100755
index 00000000000..99da5857afe
--- /dev/null
+++ b/mysql-test/t/backup-master.sh
@@ -0,0 +1,5 @@
+#!/bin/sh
+if [ "$MYSQL_TEST_DIR" ]
+then
+ rm -f $MYSQL_TEST_DIR/var/tmp/*.frm $MYSQL_TEST_DIR/var/tmp/*.MY?
+fi
diff --git a/mysql-test/t/backup.test b/mysql-test/t/backup.test
index 02ef72ef66d..a66c07fd27f 100644
--- a/mysql-test/t/backup.test
+++ b/mysql-test/t/backup.test
@@ -1,3 +1,7 @@
+#
+# This test is a bit tricky as we can't use backup table to overwrite an old
+# table
+#
connect (con1,localhost,root,,);
connect (con2,localhost,root,,);
connection con1;
@@ -5,13 +9,17 @@ set SQL_LOG_BIN=0;
--disable_warnings
drop table if exists t1, t2, t3;
--enable_warnings
+create table t4(n int);
+--replace_result "errno: 2" "errno: X" "errno: 22" "errno: X" "errno: 23" "errno: X"
+backup table t4 to '../bogus';
+backup table t4 to '../tmp';
+--replace_result "errno: 17" "errno: X"
+backup table t4 to '../tmp';
+drop table t4;
+restore table t4 from '../tmp';
+select count(*) from t4;
+
create table t1(n int);
---replace_result "errno = 1" "errno = X" "errno = 2" "errno = X" "errno = 22" "errno = X" "errno = 23" "errno = X"
-backup table t1 to '../bogus';
-backup table t1 to '../tmp';
-drop table t1;
-restore table t1 from '../tmp';
-select count(*) from t1;
insert into t1 values (23),(45),(67);
backup table t1 to '../tmp';
drop table t1;
@@ -22,23 +30,24 @@ create table t2(m int not null primary key);
create table t3(k int not null primary key);
insert into t2 values (123),(145),(167);
insert into t3 values (223),(245),(267);
-backup table t1,t2,t3 to '../tmp';
+backup table t2,t3 to '../tmp';
drop table t1,t2,t3;
restore table t1,t2,t3 from '../tmp';
select n from t1;
select m from t2;
select k from t3;
-drop table t1,t2,t3;
+drop table t1,t2,t3,t4;
restore table t1 from '../tmp';
connection con2;
+rename table t1 to t5;
--send
-lock tables t1 write;
+lock tables t5 write;
connection con1;
--send
-backup table t1 to '../tmp';
+backup table t5 to '../tmp';
connection con2;
reap;
unlock tables;
connection con1;
reap;
-drop table t1;
+drop table t5;
diff --git a/mysql-test/t/create.test b/mysql-test/t/create.test
index 70a589c4be6..98d76bf2883 100644
--- a/mysql-test/t/create.test
+++ b/mysql-test/t/create.test
@@ -58,6 +58,14 @@ create table test_$1.test2$ (a int);
drop table test_$1.test2$;
drop database test_$1;
+--error 1103
+create table `` (a int);
+--error 1103
+drop table if exists ``;
+--error 1166
+create table t1 (`` int);
+drop table if exists t1;
+
#
# Test of CREATE ... SELECT with indexes
#
diff --git a/mysql-test/t/ctype_latin1_de.test b/mysql-test/t/ctype_latin1_de.test
index a4b4b816ec4..e0591913f68 100644
--- a/mysql-test/t/ctype_latin1_de.test
+++ b/mysql-test/t/ctype_latin1_de.test
@@ -4,13 +4,13 @@
--disable_warnings
drop table if exists t1;
--enable_warnings
-create table t1 (a char (20) not null, b int not null auto_increment, index (a,b),index(b));
+create table t1 (a char (20) not null, b int not null auto_increment, index (a,b));
insert into t1 (a) values ('ä'),('ac'),('ae'),('ad'),('Äc'),('aeb');
insert into t1 (a) values ('üc'),('uc'),('ue'),('ud'),('Ü'),('ueb'),('uf');
insert into t1 (a) values ('ö'),('oc'),('Öa'),('oe'),('od'),('Öc'),('oeb');
insert into t1 (a) values ('s'),('ss'),('ß'),('ßb'),('ssa'),('ssc'),('ßa');
insert into t1 (a) values ('eä'),('uü'),('öo'),('ää'),('ääa'),('aeae');
-insert into t1 (a) values ('q'),('a'),('u'),('o'),('é'),('É');
+insert into t1 (a) values ('q'),('a'),('u'),('o'),('é'),('É'),('a');
select a,b from t1 order by a,b;
select a,b from t1 order by upper(a),b;
select a from t1 order by a desc;
diff --git a/mysql-test/t/delete.test b/mysql-test/t/delete.test
index 57321739bfb..af047db04bd 100644
--- a/mysql-test/t/delete.test
+++ b/mysql-test/t/delete.test
@@ -46,3 +46,22 @@ CREATE TABLE `t` (
-- error 1054
DELETE FROM t USING t WHERE post='1';
drop table if exists t;
+
+#
+# CHAR(0) bug - not actually DELETE bug, but anyway...
+#
+
+CREATE TABLE t1 (
+ bool char(0) default NULL,
+ not_null varchar(20) binary NOT NULL default '',
+ misc integer not null,
+ PRIMARY KEY (not_null)
+) TYPE=MyISAM;
+
+INSERT INTO t1 VALUES (NULL,'a',4), (NULL,'b',5), (NULL,'c',6), (NULL,'d',7);
+
+select * from t1 where misc > 5 and bool is null;
+delete from t1 where misc > 5 and bool is null;
+select * from t1 where misc > 5 and bool is null;
+
+drop table t1;
diff --git a/mysql-test/t/func_like.test b/mysql-test/t/func_like.test
index 47590ae7559..90b376e34df 100644
--- a/mysql-test/t/func_like.test
+++ b/mysql-test/t/func_like.test
@@ -8,10 +8,13 @@ drop table if exists t1;
create table t1 (a varchar(10), key(a));
insert into t1 values ("a"),("abc"),("abcd"),("hello"),("test");
-select * from t1 where a like "abc%";
-select * from t1 where a like "ABC%";
-select * from t1 where a like "test%";
-select * from t1 where a like "te_t";
+explain select * from t1 where a like 'abc%';
+explain select * from t1 where a like concat('abc','%');
+select * from t1 where a like "abc%";
+select * from t1 where a like concat("abc","%");
+select * from t1 where a like "ABC%";
+select * from t1 where a like "test%";
+select * from t1 where a like "te_t";
#
# The following will test the Turbo Boyer-Moore code
diff --git a/mysql-test/t/group_by.test b/mysql-test/t/group_by.test
index dfcf72eb2c3..85ec680b3a2 100644
--- a/mysql-test/t/group_by.test
+++ b/mysql-test/t/group_by.test
@@ -78,7 +78,8 @@ CREATE TABLE t1 (
INSERT INTO t1 VALUES (1,'1970-01-01','1997-10-17 00:00:00',2529,1,21000,11886,'check',0,'F',16200,6);
-!$1056 SELECT COUNT(P.URID),SUM(P.amount),P.method, MIN(PP.recdate+0) > 19980501000000 AS IsNew FROM t1 AS P JOIN t1 as PP WHERE P.URID = PP.URID GROUP BY method,IsNew;
+--error 1056
+SELECT COUNT(P.URID),SUM(P.amount),P.method, MIN(PP.recdate+0) > 19980501000000 AS IsNew FROM t1 AS P JOIN t1 as PP WHERE P.URID = PP.URID GROUP BY method,IsNew;
drop table t1;
@@ -265,6 +266,14 @@ select sql_big_result score,count(*) from t1 group by score desc;
drop table t1;
#
+
+# not purely group_by bug, but group_by is involved...
+
+create table t1 (a date default null, b date default null);
+insert t1 values ('1999-10-01','2000-01-10'), ('1997-01-01','1998-10-01');
+select a,min(b) c,count(distinct rand()) from t1 group by a having c<a + interval 1 day;
+drop table t1;
+
# Compare with hash keys
#
diff --git a/mysql-test/t/innodb.test b/mysql-test/t/innodb.test
index b8ba55d9230..95a690e56b7 100644
--- a/mysql-test/t/innodb.test
+++ b/mysql-test/t/innodb.test
@@ -717,3 +717,14 @@ delete t1,t2 from t1,t2 where t1.id=t2.t1_id;
select * from t1;
select * from t2;
drop table t1,t2;
+DROP TABLE IF EXISTS t1,t2;
+CREATE TABLE t1(id INT NOT NULL, PRIMARY KEY (id)) TYPE=INNODB;
+CREATE TABLE t2(id INT PRIMARY KEY, t1_id INT, INDEX par_ind (t1_id) ) TYPE=INNODB;
+INSERT INTO t1 VALUES(1);
+INSERT INTO t2 VALUES(1, 1);
+SELECT * from t1;
+UPDATE t1,t2 SET t1.id=t1.id+1, t2.t1_id=t1.id+1;
+SELECT * from t1;
+UPDATE t1,t2 SET t1.id=t1.id+1 where t1.id!=t2.id;
+SELECT * from t1;
+DROP TABLE t1,t2;
diff --git a/mysql-test/t/join.test b/mysql-test/t/join.test
index 59c0c37e40d..7840e128ac7 100644
--- a/mysql-test/t/join.test
+++ b/mysql-test/t/join.test
@@ -248,3 +248,27 @@ CREATE TABLE t2 (
INSERT INTO t2 VALUES (1,'s1'),(2,'s2'),(3,'s3'),(4,'s4'),(5,'s5');
select t1.*, t2.* from t1, t2 where t2.id=t1.t2_id limit 2;
drop table t1,t2;
+
+#
+# Bug in range optimiser with MAYBE_KEY
+#
+
+CREATE TABLE t1 (
+ siteid varchar(25) NOT NULL default '',
+ emp_id varchar(30) NOT NULL default '',
+ rate_code varchar(10) default NULL,
+ UNIQUE KEY site_emp (siteid,emp_id),
+ KEY siteid (siteid)
+) TYPE=MyISAM;
+INSERT INTO t1 VALUES ('rivercats','psmith','cust'), ('rivercats','KWalker','cust');
+CREATE TABLE t2 (
+ siteid varchar(25) NOT NULL default '',
+ rate_code varchar(10) NOT NULL default '',
+ base_rate float NOT NULL default '0',
+ PRIMARY KEY (siteid,rate_code),
+ FULLTEXT KEY rate_code (rate_code)
+) TYPE=MyISAM;
+INSERT INTO t2 VALUES ('rivercats','cust',20);
+SELECT emp.rate_code, lr.base_rate FROM t1 AS emp LEFT JOIN t2 AS lr USING (siteid, rate_code) WHERE emp.emp_id = 'psmith' AND lr.siteid = 'rivercats';
+SELECT emp.rate_code, lr.base_rate FROM t1 AS emp LEFT JOIN t2 AS lr USING (siteid, rate_code) WHERE lr.siteid = 'rivercats' AND emp.emp_id = 'psmith';
+drop table t1,t2;
diff --git a/mysql-test/t/lock_multi.test b/mysql-test/t/lock_multi.test
index 0c6c59d0444..fa095275182 100644
--- a/mysql-test/t/lock_multi.test
+++ b/mysql-test/t/lock_multi.test
@@ -7,7 +7,7 @@
-- source include/not_embedded.inc
--disable_warnings
-drop table if exists t1;
+drop table if exists t1,t2;
--enable_warnings
# Test to see if select will get the lock ahead of low priority update
@@ -51,3 +51,22 @@ reap;
connection reader;
reap;
drop table t1;
+
+#
+# Test problem when using locks on many tables and droping a table that
+# is to-be-locked by another thread
+#
+
+connection locker;
+create table t1 (a int);
+create table t2 (a int);
+lock table t1 write, t2 write;
+connection reader;
+send insert t1 select * from t2;
+connection locker;
+drop table t2;
+connection reader;
+--error 1146
+reap;
+connection locker;
+drop table t1;
diff --git a/mysql-test/t/openssl_1.test b/mysql-test/t/openssl_1.test
index 8dfd0d8c2f9..3af7406cef3 100644
--- a/mysql-test/t/openssl_1.test
+++ b/mysql-test/t/openssl_1.test
@@ -1,6 +1,43 @@
-# We test openssl. Result set is optimized to be compiled with --with-openssl but
-# SSL is swithced off in some reason
--- source include/have_openssl_2.inc
+# We test openssl. Result set is optimized to be compiled with --with-openssl.
+# Use mysql-test-run with --with-openssl option.
+-- source include/have_openssl_1.inc
-SHOW STATUS LIKE 'SSL%';
+drop table if exists t1;
+create table t1(f1 int);
+insert into t1 values (5);
+grant select on test.* to ssl_user1@localhost require SSL;
+grant select on test.* to ssl_user2@localhost require cipher "EDH-RSA-DES-CBC3-SHA";
+grant select on test.* to ssl_user3@localhost require cipher "EDH-RSA-DES-CBC3-SHA" AND SUBJECT "/C=RU/L=orenburg/O=MySQL AB/OU=client/CN=walrus/Email=walrus@mysql.com";
+grant select on test.* to ssl_user4@localhost require cipher "EDH-RSA-DES-CBC3-SHA" AND SUBJECT "/C=RU/L=orenburg/O=MySQL AB/OU=client/CN=walrus/Email=walrus@mysql.com" ISSUER "/C=RU/ST=Some-State/L=Orenburg/O=MySQL AB/CN=Walrus/Email=walrus@mysql.com";
+flush privileges;
+connect (con1,localhost,ssl_user1,,);
+connect (con2,localhost,ssl_user2,,);
+connect (con3,localhost,ssl_user3,,);
+connect (con4,localhost,ssl_user4,,);
+
+connection con1;
+select * from t1;
+--error 1044;
+delete from t1;
+
+connection con2;
+select * from t1;
+--error 1044;
+delete from t1;
+
+connection con3;
+select * from t1;
+--error 1044;
+delete from t1;
+
+connection con4;
+select * from t1;
+--error 1044;
+delete from t1;
+
+connection default;
+delete from mysql.user where user='ssl_user%';
+delete from mysql.db where user='ssl_user%';
+flush privileges;
+drop table t1;
diff --git a/mysql-test/t/rpl_loaddatalocal.test b/mysql-test/t/rpl_loaddatalocal.test
new file mode 100644
index 00000000000..70f4ab96b6a
--- /dev/null
+++ b/mysql-test/t/rpl_loaddatalocal.test
@@ -0,0 +1,36 @@
+# See if "LOAD DATA LOCAL INFILE" is well replicated
+# (LOAD DATA LOCAL INFILE is not written to the binlog
+# the same way as LOAD DATA INFILE : Append_blocks are smaller).
+# In MySQL 4.0 <4.0.12 there were 2 bugs with LOAD DATA LOCAL INFILE :
+# - the loaded file was not written entirely to the master's binlog,
+# only the first 4KB, 8KB or 16KB usually.
+# - the loaded file's first line was not written entirely to the
+# master's binlog (1st char was absent)
+source include/master-slave.inc;
+
+create table t1(a int);
+let $1=10000;
+disable_query_log;
+set SQL_LOG_BIN=0;
+while ($1)
+{
+#eval means expand $ expressions
+ eval insert into t1 values(1);
+ dec $1;
+}
+set SQL_LOG_BIN=1;
+enable_query_log;
+select * into outfile '../../var/master-data/rpl_loaddatalocal.select_outfile' from t1;
+#This will generate a 20KB file, now test LOAD DATA LOCAL
+truncate table t1;
+load data local infile './var/master-data/rpl_loaddatalocal.select_outfile' into table t1;
+system rm ./var/master-data/rpl_loaddatalocal.select_outfile ;
+save_master_pos;
+connection slave;
+sync_with_master;
+select a,count(*) from t1 group by a;
+connection master;
+drop table t1;
+save_master_pos;
+connection slave;
+sync_with_master;
diff --git a/mysql-test/t/select.test b/mysql-test/t/select.test
index d4effd2026c..3c26cf1903b 100644
--- a/mysql-test/t/select.test
+++ b/mysql-test/t/select.test
@@ -1722,11 +1722,27 @@ drop table t4, t3, t2, t1;
#
# Test of DO
+#
DO 1;
DO benchmark(100,1+1),1,1;
#
+# random in WHERE clause
+#
+
+CREATE TABLE t1 (
+ id mediumint(8) unsigned NOT NULL auto_increment,
+ pseudo varchar(35) NOT NULL default '',
+ PRIMARY KEY (id),
+ UNIQUE KEY pseudo (pseudo)
+);
+INSERT INTO t1 (pseudo) VALUES ('test');
+INSERT INTO t1 (pseudo) VALUES ('test1');
+SELECT 1 as rnd1 from t1 where rand() > 2;
+DROP TABLE t1;
+
+#
# Test of bug with SUM(CASE...)
#
diff --git a/mysql-test/t/type_datetime.test b/mysql-test/t/type_datetime.test
index f791cd76d34..e9c45b2908f 100644
--- a/mysql-test/t/type_datetime.test
+++ b/mysql-test/t/type_datetime.test
@@ -62,3 +62,8 @@ INSERT INTO t1 (numfacture,expedition) VALUES ('1212','0001-00-00 00:00:00');
SELECT * FROM t1 WHERE expedition='0001-00-00 00:00:00';
EXPLAIN SELECT * FROM t1 WHERE expedition='0001-00-00 00:00:00';
drop table t1;
+create table t1 (a datetime not null, b datetime not null);
+insert into t1 values (now(), now());
+insert into t1 values (now(), now());
+select * from t1 where a is null or b is null;
+drop table t1;
diff --git a/mysql-test/t/type_timestamp.test b/mysql-test/t/type_timestamp.test
index 1c9275ecd0a..cd76dbe6ab0 100644
--- a/mysql-test/t/type_timestamp.test
+++ b/mysql-test/t/type_timestamp.test
@@ -58,3 +58,17 @@ INSERT INTO t1 VALUES ("2030-01-01","2030-01-01 00:00:00",20300101000000);
#INSERT INTO t1 VALUES ("2050-01-01","2050-01-01 00:00:00",20500101000000);
SELECT * FROM t1;
drop table t1;
+
+show variables like 'new';
+create table t1 (t2 timestamp(2), t4 timestamp(4), t6 timestamp(6),
+ t8 timestamp(8), t10 timestamp(10), t12 timestamp(12),
+ t14 timestamp(14));
+insert t1 values (0,0,0,0,0,0,0),
+("1997-12-31 23:47:59", "1997-12-31 23:47:59", "1997-12-31 23:47:59",
+"1997-12-31 23:47:59", "1997-12-31 23:47:59", "1997-12-31 23:47:59",
+"1997-12-31 23:47:59");
+select * from t1;
+set new=1;
+select * from t1;
+drop table t1;
+
diff --git a/mysys/default.c b/mysys/default.c
index 0ae409f1015..83dd177f6b4 100644
--- a/mysys/default.c
+++ b/mysys/default.c
@@ -38,6 +38,7 @@
#include "mysys_priv.h"
#include "m_string.h"
#include "m_ctype.h"
+#include <my_dir.h>
char *defaults_extra_file=0;
@@ -61,13 +62,13 @@ DATADIR,
NullS,
};
-#define default_ext ".cnf" /* extension for config file */
+#define default_ext ".cnf" /* extension for config file */
#ifdef __WIN__
#include <winbase.h>
#define windows_ext ".ini"
#endif
-static my_bool search_default_file(DYNAMIC_ARRAY *args, MEM_ROOT *alloc,
+static my_bool search_default_file(DYNAMIC_ARRAY *args,MEM_ROOT *alloc,
const char *dir, const char *config_file,
const char *ext, TYPELIB *group);
@@ -242,6 +243,20 @@ static my_bool search_default_file(DYNAMIC_ARRAY *args, MEM_ROOT *alloc,
{
strmov(name,config_file);
}
+ fn_format(name,name,"","",4);
+#if !defined(__WIN__) && !defined(OS2)
+ {
+ MY_STAT stat_info;
+ if (!my_stat(name,&stat_info,MYF(0)))
+ return 0;
+ if (stat_info.st_mode & S_IWOTH) /* ignore world-writeable files */
+ {
+ fprintf(stderr, "warning: World-writeable config file %s is ignored\n",
+ name);
+ return 0;
+ }
+ }
+#endif
if (!(fp = my_fopen(fn_format(name,name,"","",4),O_RDONLY,MYF(0))))
return 0; /* Ignore wrong files */
diff --git a/mysys/my_copy.c b/mysys/my_copy.c
index 012eaec4ea8..84eda781a09 100644
--- a/mysys/my_copy.c
+++ b/mysys/my_copy.c
@@ -31,17 +31,29 @@ struct utimbuf {
#endif
- /*
- Ordinary ownership and accesstimes are copied from 'from-file'
- if MyFlags & MY_HOLD_ORIGINAL_MODES is set and to-file exists then
- the modes of to-file isn't changed
- Dont set MY_FNABP or MY_NABP bits on when calling this function !
- */
+/*
+ int my_copy(const char *from, const char *to, myf MyFlags)
+
+ NOTES
+ Ordinary ownership and accesstimes are copied from 'from-file'
+ If MyFlags & MY_HOLD_ORIGINAL_MODES is set and to-file exists then
+ the modes of to-file isn't changed
+ If MyFlags & MY_DONT_OVERWRITE_FILE is set, we will give an error
+ if the file existed.
+
+ WARNING
+ Don't set MY_FNABP or MY_NABP bits on when calling this function !
+
+ RETURN
+ 0 ok
+ # Error
+
+*/
int my_copy(const char *from, const char *to, myf MyFlags)
{
uint Count;
- int new_file_stat;
+ int new_file_stat, create_flag;
File from_file,to_file;
char buff[IO_SIZE];
struct stat stat_buff,new_stat_buff;
@@ -62,8 +74,10 @@ int my_copy(const char *from, const char *to, myf MyFlags)
}
if (MyFlags & MY_HOLD_ORIGINAL_MODES && !new_file_stat)
stat_buff=new_stat_buff;
+ create_flag= (MyFlags & MY_DONT_OVERWRITE_FILE) ? O_EXCL : O_TRUNC;
+
if ((to_file= my_create(to,(int) stat_buff.st_mode,
- O_WRONLY | O_TRUNC | O_BINARY | O_SHARE,
+ O_WRONLY | create_flag | O_BINARY | O_SHARE,
MyFlags)) < 0)
goto err;
diff --git a/mysys/my_getopt.c b/mysys/my_getopt.c
index c6fe606eaaf..759c96462f6 100644
--- a/mysys/my_getopt.c
+++ b/mysys/my_getopt.c
@@ -431,8 +431,8 @@ int handle_options(int *argc, char ***argv,
Will set the option value to given value
*/
-static int setval (const struct my_option *opts, char *argument,
- my_bool set_maximum_value)
+static int setval(const struct my_option *opts, char *argument,
+ my_bool set_maximum_value)
{
int err= 0;
diff --git a/mysys/my_lib.c b/mysys/my_lib.c
index a06120894c5..035bafd07b9 100644
--- a/mysys/my_lib.c
+++ b/mysys/my_lib.c
@@ -103,7 +103,7 @@ MY_DIR *my_dir(const char *path, myf MyFlags)
char dirent_tmp[sizeof(struct dirent)+_POSIX_PATH_MAX+1];
#endif
DBUG_ENTER("my_dir");
- DBUG_PRINT("my",("path: '%s' stat: %d MyFlags: %d",path,MyFlags));
+ DBUG_PRINT("my",("path: '%s' MyFlags: %d",path,MyFlags));
#if defined(THREAD) && !defined(HAVE_READDIR_R)
pthread_mutex_lock(&THR_LOCK_open);
diff --git a/mysys/my_tempnam.c b/mysys/my_tempnam.c
index a652fae3574..d079b9f66a5 100644
--- a/mysys/my_tempnam.c
+++ b/mysys/my_tempnam.c
@@ -115,13 +115,19 @@ my_string my_tempnam(const char *dir, const char *pfx,
old_env=(char**)environ;
if (dir)
{ /* Don't use TMPDIR if dir is given */
- ((char**) environ)=(char**) temp_env;
+ /*
+ The following strange cast is required because the IBM compiler on AIX
+ doesn't allow us to cast the value of environ.
+ The cast of environ is needed as some systems doesn't allow us to
+ update environ with a char ** pointer. (const mismatch)
+ */
+ (*(char***) &environ)=(char**) temp_env;
temp_env[0]=0;
}
#endif
res=tempnam((char*) dir,(my_string) pfx); /* Use stand. dir with prefix */
#if !defined(OS2) && !defined(__NETWARE__)
- ((char**) environ)=(char**) old_env;
+ (*(char***) &environ)=(char**) old_env;
#endif
if (!res)
DBUG_PRINT("error",("Got error: %d from tempnam",errno));
diff --git a/mysys/thr_lock.c b/mysys/thr_lock.c
index c796bd1956a..b6e7cb47234 100644
--- a/mysys/thr_lock.c
+++ b/mysys/thr_lock.c
@@ -945,6 +945,54 @@ void thr_abort_locks(THR_LOCK *lock)
}
+/*
+ Abort all locks for specific table/thread combination
+
+ This is used to abort all locks for a specific thread
+*/
+
+void thr_abort_locks_for_thread(THR_LOCK *lock, pthread_t thread)
+{
+ THR_LOCK_DATA *data;
+ DBUG_ENTER("thr_abort_locks_for_thread");
+
+ pthread_mutex_lock(&lock->mutex);
+ for (data= lock->read_wait.data; data ; data= data->next)
+ {
+ if (pthread_equal(thread, data->thread))
+ {
+ DBUG_PRINT("info",("Aborting read-wait lock"));
+ data->type= TL_UNLOCK; /* Mark killed */
+ pthread_cond_signal(data->cond);
+ data->cond= 0; /* Removed from list */
+
+ if (((*data->prev)= data->next))
+ data->next->prev= data->prev;
+ else
+ lock->read_wait.last= data->prev;
+ }
+ }
+ for (data= lock->write_wait.data; data ; data= data->next)
+ {
+ if (pthread_equal(thread, data->thread))
+ {
+ DBUG_PRINT("info",("Aborting write-wait lock"));
+ data->type= TL_UNLOCK;
+ pthread_cond_signal(data->cond);
+ data->cond= 0;
+
+ if (((*data->prev)= data->next))
+ data->next->prev= data->prev;
+ else
+ lock->write_wait.last= data->prev;
+ }
+ }
+ pthread_mutex_unlock(&lock->mutex);
+ DBUG_VOID_RETURN;
+}
+
+
+
/* Upgrade a WRITE_DELAY lock to a WRITE_LOCK */
my_bool thr_upgrade_write_delay_lock(THR_LOCK_DATA *data)
diff --git a/netware/BUILD/compile-netware-START b/netware/BUILD/compile-netware-START
index ceac111b36c..2941d8868e4 100755
--- a/netware/BUILD/compile-netware-START
+++ b/netware/BUILD/compile-netware-START
@@ -17,7 +17,7 @@ set -e
base_configs=" \
--host=i686-pc-netware \
--enable-local-infile \
- --with-extra-charsets=latin1_de \
+ --with-extra-charsets=all \
--prefix=N:/mysql \
"
diff --git a/netware/BUILD/mwenv b/netware/BUILD/mwenv
index d37a3ed5472..d2b64409c88 100755
--- a/netware/BUILD/mwenv
+++ b/netware/BUILD/mwenv
@@ -1,18 +1,18 @@
#! /bin/sh
-# WINE_BUILD_DIR, BUILD_DIR, and VERSION must be correct before compiling
+# WINE_BUILD_DIR, BUILD_DIR, and VERSION must be changed before compiling
# This values are normally changed by the nwbootstrap script
-# the default is "F:/mydev"
+# the default for WINE_BUILD_DIR is "F:/mydev"
export MYDEV="WINE_BUILD_DIR"
-export MWCNWx86Includes="$MYDEV/libc/include;$MYDEV/zlib-1.1.4"
-export MWNWx86Libraries="$MYDEV/libc/imports;$MYDEV/mw/lib;$MYDEV/zlib-1.1.4"
-export MWNWx86LibraryFiles="libcpre.o;libc.imp;netware.imp;mwcrtl.lib;mwcpp.lib;libz.a"
+export MWCNWx86Includes="$MYDEV/libc/include"
+export MWNWx86Libraries="$MYDEV/libc/imports;$MYDEV/mw/lib"
+export MWNWx86LibraryFiles="libcpre.o;libc.imp;netware.imp;mwcrtl.lib;mwcpp.lib"
export WINEPATH="$MYDEV/mw/bin"
-# the default added path is "$HOME/mydev/mysql-x.x-x/netware/BUILD"
+# the default for BUILD_DIR is "$HOME/mydev"
export PATH="$PATH:BUILD_DIR/mysql-VERSION/netware/BUILD"
export AR='mwldnlm'
diff --git a/netware/mysql_fix_privilege_tables.pl b/netware/mysql_fix_privilege_tables.pl
new file mode 100644
index 00000000000..fd5bc11dde1
--- /dev/null
+++ b/netware/mysql_fix_privilege_tables.pl
@@ -0,0 +1,125 @@
+#-----------------------------------------------------------------------------
+# Copyright (C) 2002 MySQL AB
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+#-----------------------------------------------------------------------------
+
+#-----------------------------------------------------------------------------
+# This notice applies to changes, created by or for Novell, Inc.,
+# to preexisting works for which notices appear elsewhere in this file.
+
+# Copyright (c) 2003 Novell, Inc. All Rights Reserved.
+
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+#-----------------------------------------------------------------------------
+
+use strict;
+use Mysql;
+
+print "MySQL Fix Privilege Tables Script\n\n";
+
+print "NOTE: This script updates your privilege tables to the lastest\n";
+print " specifications!\n\n";
+
+#-----------------------------------------------------------------------------
+# get the current root password
+#-----------------------------------------------------------------------------
+
+print "In order to log into MySQL to update it, we'll need the current\n";
+print "password for the root user. If you've just installed MySQL, and\n";
+print "you haven't set the root password yet, the password will be blank,\n";
+print "so you should just press enter here.\n\n";
+
+print "Enter the current password for root: ";
+my $password = <STDIN>;
+chomp $password;
+print "\n";
+
+my $conn = Mysql->connect("localhost", "mysql", "root", $password)
+ || die "Unable to connect to MySQL.";
+
+print "OK, successfully used the password, moving on...\n\n";
+
+
+#-----------------------------------------------------------------------------
+# MySQL 4.0.2
+#-----------------------------------------------------------------------------
+
+print "Adding new fields used by MySQL 4.0.2 to the privilege tables...\n";
+print "NOTE: You can ignore any Duplicate column errors.\n";
+$conn->query(" \
+ALTER TABLE user \
+ADD Show_db_priv enum('N','Y') DEFAULT 'N' NOT NULL AFTER alter_priv, \
+ADD Super_priv enum('N','Y') DEFAULT 'N' NOT NULL AFTER Show_db_priv, \
+ADD Create_tmp_table_priv enum('N','Y') DEFAULT 'N' NOT NULL AFTER Super_priv, \
+ADD Lock_tables_priv enum('N','Y') DEFAULT 'N' NOT NULL AFTER Create_tmp_table_priv, \
+ADD Execute_priv enum('N','Y') DEFAULT 'N' NOT NULL AFTER Lock_tables_priv, \
+ADD Repl_slave_priv enum('N','Y') DEFAULT 'N' NOT NULL AFTER Execute_priv, \
+ADD Repl_client_priv enum('N','Y') DEFAULT 'N' NOT NULL AFTER Repl_slave_priv; \
+") && $conn->query(" \
+UPDATE user SET show_db_priv=select_priv, super_priv=process_priv, execute_priv=process_priv, create_tmp_table_priv='Y', Lock_tables_priv='Y', Repl_slave_priv=file_priv, Repl_client_priv=file_priv where user<>''; \
+");
+
+#-----------------------------------------------------------------------------
+# MySQL 4.0 Limitations
+#-----------------------------------------------------------------------------
+
+print "Adding new fields used by MySQL 4.0 security limitations...\n";
+
+$conn->query(" \
+ALTER TABLE user \
+ADD max_questions int(11) NOT NULL AFTER x509_subject, \
+ADD max_updates int(11) unsigned NOT NULL AFTER max_questions, \
+ADD max_connections int(11) unsigned NOT NULL AFTER max_updates; \
+");
+
+#-----------------------------------------------------------------------------
+# MySQL 4.0 DB and Host privs
+#-----------------------------------------------------------------------------
+
+print "Adding new fields used by MySQL 4.0 locking and temporary table security...\n";
+
+$conn->query(" \
+ALTER TABLE db \
+ADD Create_tmp_table_priv enum('N','Y') DEFAULT 'N' NOT NULL, \
+ADD Lock_tables_priv enum('N','Y') DEFAULT 'N' NOT NULL; \
+");
+
+$conn->query(" \
+ALTER TABLE host \
+ADD Create_tmp_table_priv enum('N','Y') DEFAULT 'N' NOT NULL, \
+ADD Lock_tables_priv enum('N','Y') DEFAULT 'N' NOT NULL; \
+");
+
+#-----------------------------------------------------------------------------
+# done
+#-----------------------------------------------------------------------------
+
+print "\n\nAll done!\n\n";
+
+print "Thanks for using MySQL!\n\n";
+
diff --git a/netware/mysqld_safe.c b/netware/mysqld_safe.c
index 59c40eb61e6..1ab90775e02 100644
--- a/netware/mysqld_safe.c
+++ b/netware/mysqld_safe.c
@@ -36,6 +36,7 @@
******************************************************************************/
char autoclose;
char basedir[PATH_MAX];
+char checktables;
char datadir[PATH_MAX];
char pid_file[PATH_MAX];
char address[PATH_MAX];
@@ -54,6 +55,7 @@ FILE *log_fd = NULL;
******************************************************************************/
+void usage(void);
void vlog(char *, va_list);
void log(char *, ...);
void start_defaults(int, char*[]);
@@ -74,6 +76,42 @@ void mysql_start(int, char*[]);
/******************************************************************************
+ usage()
+
+ Show usage.
+
+******************************************************************************/
+void usage(void)
+{
+ // keep the screen up
+ setscreenmode(SCR_NO_MODE);
+
+ puts("\
+\n\
+usage: mysqld_safe [options]\n\
+\n\
+Program to start the MySQL daemon and restart it if it dies unexpectedly.\n\
+All options, besides those listed below, are passed on to the MySQL daemon.\n\
+\n\
+options:\n\
+\n\
+--autoclose Automatically close the mysqld_safe screen.\n\
+\n\
+--check-tables Check the tables before starting the MySQL daemon.\n\
+\n\
+--err-log=<file> Send the MySQL daemon error output to <file>.\n\
+\n\
+--help Show this help information.\n\
+\n\
+--mysqld=<file> Use the <file> MySQL daemon.\n\
+\n\
+ ");
+
+ exit(-1);
+}
+
+/******************************************************************************
+
vlog()
Log the message.
@@ -136,6 +174,9 @@ void start_defaults(int argc, char *argv[])
// basedir
get_basedir(argv[0], basedir);
+ // check-tables
+ checktables = FALSE;
+
// hostname
if (gethostname(hostname,PATH_MAX) < 0)
{
@@ -279,13 +320,15 @@ void parse_args(int argc, char *argv[])
OPT_PORT,
OPT_ERR_LOG,
OPT_SAFE_LOG,
- OPT_MYSQLD
+ OPT_MYSQLD,
+ OPT_HELP
};
static struct option options[] =
{
{"autoclose", no_argument, &autoclose, TRUE},
{"basedir", required_argument, 0, OPT_BASEDIR},
+ {"check-tables", no_argument, &checktables, TRUE},
{"datadir", required_argument, 0, OPT_DATADIR},
{"pid-file", required_argument, 0, OPT_PID_FILE},
{"bind-address", required_argument, 0, OPT_BIND_ADDRESS},
@@ -293,6 +336,7 @@ void parse_args(int argc, char *argv[])
{"err-log", required_argument, 0, OPT_ERR_LOG},
{"safe-log", required_argument, 0, OPT_SAFE_LOG},
{"mysqld", required_argument, 0, OPT_MYSQLD},
+ {"help", no_argument, 0, OPT_HELP},
{0, 0, 0, 0}
};
@@ -341,6 +385,10 @@ void parse_args(int argc, char *argv[])
strcpy(mysqld, optarg);
break;
+ case OPT_HELP:
+ usage();
+ break;
+
default:
// ignore
break;
@@ -563,6 +611,8 @@ void mysql_start(int argc, char *argv[])
static char *private_options[] =
{
"--autoclose",
+ "--check-tables",
+ "--help",
"--err-log=",
"--mysqld=",
NULL
@@ -594,7 +644,7 @@ void mysql_start(int argc, char *argv[])
do
{
// check the database tables
- check_tables();
+ if (checktables) check_tables();
// status
time(&cal);
diff --git a/scripts/mysql_tableinfo.sh b/scripts/mysql_tableinfo.sh
index bfe9be377c7..f5083a776c6 100644
--- a/scripts/mysql_tableinfo.sh
+++ b/scripts/mysql_tableinfo.sh
@@ -10,7 +10,7 @@ mysql_tableinfo - creates and populates information tables with
the output of SHOW DATABASES, SHOW TABLES (or SHOW TABLE STATUS),
SHOW COLUMNS and SHOW INDEX.
-This is version 1.0.
+This is version 1.1.
=head1 SYNOPSIS
@@ -62,7 +62,7 @@ GetOptions( \%opt,
"quiet|q",
) or usage("Invalid option");
-if ($opt{help}) {usage();}
+if ($opt{'help'}) {usage();}
my ($db_to_write,$db_like_wild,$tbl_like_wild);
if (@ARGV==0)
@@ -74,6 +74,8 @@ $db_like_wild=($ARGV[0])?$ARGV[0]:"%"; shift @ARGV;
$tbl_like_wild=($ARGV[0])?$ARGV[0]:"%"; shift @ARGV;
if (@ARGV>0) { usage("Too many arguments"); }
+$0 = $1 if $0 =~ m:/([^/]+)$:;
+
my $info_db="`".$opt{'prefix'}."db`";
my $info_tbl="`".$opt{'prefix'}."tbl".
(($opt{'tbl-status'})?"_status":"")."`";
@@ -84,11 +86,11 @@ my $info_idx="`".$opt{'prefix'}."idx`";
# --- connect to the database ---
my $dsn = ";host=$opt{'host'}";
-$dsn .= ";port=$opt{port}" if $opt{port};
-$dsn .= ";mysql_socket=$opt{socket}" if $opt{socket};
+$dsn .= ";port=$opt{'port'}" if $opt{'port'};
+$dsn .= ";mysql_socket=$opt{'socket'}" if $opt{'socket'};
my $dbh = DBI->connect("dbi:mysql:$dsn;mysql_read_default_group=perl",
- $opt{user}, $opt{password},
+ $opt{'user'}, $opt{'password'},
{
RaiseError => 1,
PrintError => 0,
@@ -104,20 +106,19 @@ if (!$opt{'quiet'})
{
print "\n!! This program is doing to do:\n\n";
print "**DROP** TABLE ...\n" if ($opt{'clear'} or $opt{'clear-only'});
- print "**DELETE** FROM ... WHERE `Database LIKE $db_like_wild AND `Table` LIKE $tbl_like_wild
+ print "**DELETE** FROM ... WHERE `Database` LIKE $db_like_wild AND `Table` LIKE $tbl_like_wild
**INSERT** INTO ...
on the following tables :\n";
- my $i;
- foreach $i (($info_db, $info_tbl),
- (($opt{'col'})?$info_col:()),
- (($opt{'idx'})?$info_idx:()))
+
+ foreach (($info_db, $info_tbl),
+ (($opt{'col'})?$info_col:()),
+ (($opt{'idx'})?$info_idx:()))
{
- print(" $db_to_write.$i\n");
+ print(" $db_to_write.$_\n");
}
print "\nContinue (you can skip this confirmation step with --quiet) ? (y|n) [n]";
- my $answer=<STDIN>;
- unless ($answer =~ /^\s*y\s*$/i)
+ if (<STDIN> !~ /^\s*y\s*$/i)
{
print "Nothing done!\n";exit;
}
@@ -126,17 +127,16 @@ on the following tables :\n";
if ($opt{'clear'} or $opt{'clear-only'})
{
#do not drop the $db_to_write database !
- my $i;
- foreach $i (($info_db, $info_tbl),
- (($opt{'col'})?$info_col:()),
- (($opt{'idx'})?$info_idx:()))
+ foreach (($info_db, $info_tbl),
+ (($opt{'col'})?$info_col:()),
+ (($opt{'idx'})?$info_idx:()))
{
- $dbh->do("DROP TABLE IF EXISTS $db_to_write.$i");
+ $dbh->do("DROP TABLE IF EXISTS $db_to_write.$_");
}
if ($opt{'clear-only'})
{
print "Wrote to database $db_to_write .\n" unless ($opt{'quiet'});
- exit();
+ exit;
}
}
@@ -151,14 +151,14 @@ $dbh->do("CREATE DATABASE IF NOT EXISTS $db_to_write");
$dbh->do("USE $db_to_write");
#get databases
-$sth{db}=$dbh->prepare("SHOW DATABASES LIKE $db_like_wild");
-$sth{db}->execute;
+$sth{'db'}=$dbh->prepare("SHOW DATABASES LIKE $db_like_wild");
+$sth{'db'}->execute;
#create $info_db which will receive info about databases.
#Ensure that the first column to be called "Database" (as SHOW DATABASES LIKE
#returns a varying
#column name (of the form "Database (%...)") which is not suitable)
-$extra_col_desc{db}=do_create_table("db",$info_db,undef,"`Database`");
+$extra_col_desc{'db'}=do_create_table("db",$info_db,undef,"`Database`");
#we'll remember the type of the `Database` column (as returned by
#SHOW DATABASES), which we will need when creating the next tables.
@@ -166,55 +166,56 @@ $extra_col_desc{db}=do_create_table("db",$info_db,undef,"`Database`");
$dbh->do("DELETE FROM $info_db WHERE `Database` LIKE $db_like_wild");
-while (@{$row{db}}=$sth{db}->fetchrow_array) #go through all databases
+while ($row{'db'}=$sth{'db'}->fetchrow_arrayref) #go through all databases
{
#insert the database name
$dbh->do("INSERT INTO $info_db VALUES("
- .join_quote(@{$row{db}}).")");
+ .join(',' , ( map $dbh->quote($_), @{$row{'db'}} ) ).")" );
#for each database, get tables
- $sth{tbl}=$dbh->prepare("SHOW TABLE"
+ $sth{'tbl'}=$dbh->prepare("SHOW TABLE"
.( ($opt{'tbl-status'}) ?
" STATUS"
: "S" )
- ." from `${$row{db}}[0]` LIKE $tbl_like_wild");
- $sth{tbl}->execute;
+ ." from `$row{'db'}->[0]` LIKE $tbl_like_wild");
+ $sth{'tbl'}->execute;
unless ($done_create_table{$info_tbl})
#tables must be created only once, and out-of-date info must be
#cleared once
{
$done_create_table{$info_tbl}=1;
- $extra_col_desc{table}=
+ $extra_col_desc{'tbl'}=
do_create_table("tbl",$info_tbl,
#add an extra column (database name) at the left
#and ensure that the table name will be called "Table"
#(this is unncessesary with
#SHOW TABLE STATUS, but necessary with SHOW TABLES (which returns a column
#named "Tables_in_..."))
- "`Database` ".$extra_col_desc{db},"`Table`");
+ "`Database` ".$extra_col_desc{'db'},"`Table`");
$dbh->do("DELETE FROM $info_tbl WHERE `Database` LIKE $db_like_wild AND `Table` LIKE $tbl_like_wild");
}
- while (@{$row{tbl}}=$sth{tbl}->fetchrow_array)
+ while ($row{'tbl'}=$sth{'tbl'}->fetchrow_arrayref)
{
$dbh->do("INSERT INTO $info_tbl VALUES("
- .$dbh->quote(${$row{db}}[0]).",".join_quote(@{$row{tbl}}).")");
+ .$dbh->quote($row{'db'}->[0]).","
+ .join(',' , ( map $dbh->quote($_), @{$row{'tbl'}} ) ).")");
#for each table, get columns...
if ($opt{'col'})
{
- $sth{col}=$dbh->prepare("SHOW COLUMNS FROM `${$row{tbl}}[0]` FROM `${$row{db}}[0]`");
- $sth{col}->execute;
+ $sth{'col'}=$dbh->prepare("SHOW COLUMNS FROM `$row{'tbl'}->[0]` FROM `$row{'db'}->[0]`");
+ $sth{'col'}->execute;
unless ($done_create_table{$info_col})
{
$done_create_table{$info_col}=1;
do_create_table("col",$info_col,
- "`Database` ".$extra_col_desc{db}.","
- ."`Table` ".$extra_col_desc{table}.","
+ "`Database` ".$extra_col_desc{'db'}.","
+ ."`Table` ".$extra_col_desc{'tbl'}.","
."`Seq_in_table` BIGINT(3)");
#We need to add a sequence number (1 for the first column of the table,
#2 for the second etc) so that users are able to retrieve columns in order
@@ -225,13 +226,13 @@ while (@{$row{db}}=$sth{db}->fetchrow_array) #go through all databases
AND `Table` LIKE $tbl_like_wild");
}
my $col_number=0;
- while (@{$row{col}}=$sth{col}->fetchrow_array)
+ while ($row{'col'}=$sth{'col'}->fetchrow_arrayref)
{
$dbh->do("INSERT INTO $info_col VALUES("
- .$dbh->quote(${$row{db}}[0]).","
- .$dbh->quote(${$row{tbl}}[0]).","
+ .$dbh->quote($row{'db'}->[0]).","
+ .$dbh->quote($row{'tbl'}->[0]).","
.++$col_number.","
- .join_quote(@{$row{col}}).")");
+ .join(',' , ( map $dbh->quote($_), @{$row{'col'}} ) ).")");
}
}
@@ -239,22 +240,22 @@ while (@{$row{db}}=$sth{db}->fetchrow_array) #go through all databases
if ($opt{'idx'})
{
- $sth{idx}=$dbh->prepare("SHOW INDEX FROM `${$row{tbl}}[0]` FROM `${$row{db}}[0]`");
- $sth{idx}->execute;
+ $sth{'idx'}=$dbh->prepare("SHOW INDEX FROM `$row{'tbl'}->[0]` FROM `$row{'db'}->[0]`");
+ $sth{'idx'}->execute;
unless ($done_create_table{$info_idx})
{
$done_create_table{$info_idx}=1;
do_create_table("idx",$info_idx,
- "`Database` ".$extra_col_desc{db});
+ "`Database` ".$extra_col_desc{'db'});
$dbh->do("DELETE FROM $info_idx WHERE `Database`
LIKE $db_like_wild
AND `Table` LIKE $tbl_like_wild");
}
- while (@{$row{idx}}=$sth{idx}->fetchrow_array)
+ while ($row{'idx'}=$sth{'idx'}->fetchrow_arrayref)
{
$dbh->do("INSERT INTO $info_idx VALUES("
- .$dbh->quote(${$row{db}}[0]).","
- .join_quote(@{$row{idx}}).")");
+ .$dbh->quote($row{'db'}->[0]).","
+ .join(',' , ( map $dbh->quote($_), @{$row{'idx'}} ) ).")");
}
}
}
@@ -263,37 +264,30 @@ while (@{$row{db}}=$sth{db}->fetchrow_array) #go through all databases
print "Wrote to database $db_to_write .\n" unless ($opt{'quiet'});
exit;
-sub join_quote
-{
- my (@list)=@_; my $i;
- foreach $i (@list) { $i=$dbh->quote($i); }
- return (join ',',@list);
-}
sub do_create_table
{
my ($sth_key,$target_tbl,$extra_col_desc,$first_col_name)=@_;
my $create_table_query=$extra_col_desc;
- my ($i,$type,$first_col_desc,$col_desc);
+ my ($i,$first_col_desc,$col_desc);
for ($i=0;$i<$sth{$sth_key}->{NUM_OF_FIELDS};$i++)
{
if ($create_table_query) { $create_table_query.=", "; }
- $type=$sth{$sth_key}->{mysql_type_name}->[$i];
- $col_desc=$type;
- if ($type =~ /char|int/i)
+ $col_desc=$sth{$sth_key}->{mysql_type_name}->[$i];
+ if ($col_desc =~ /char|int/i)
{
$col_desc.="($sth{$sth_key}->{PRECISION}->[$i])";
}
- elsif ($type =~ /decimal|numeric/i) #(never seen that)
+ elsif ($col_desc =~ /decimal|numeric/i) #(never seen that)
{
$col_desc.=
"($sth{$sth_key}->{PRECISION}->[$i],$sth{$sth_key}->{SCALE}->[$i])";
}
- elsif ($type !~ /date/i) #date and datetime are OK,
+ elsif ($col_desc !~ /date/i) #date and datetime are OK,
#no precision or scale for them
{
- warn "unexpected column type '$type'
+ warn "unexpected column type '$col_desc'
(neither 'char','int','decimal|numeric')
when creating $target_tbl, hope table creation will go OK\n";
}
@@ -393,6 +387,10 @@ Caution: info tables contain certain columns (e.g.
Database, Table, Null...) whose names, as they are MySQL reserved words,
need to be backquoted (`...`) when used in SQL statements.
+Caution: as information fetching and info tables filling happen at the
+same time, info tables may contain inaccurate information about
+themselves.
+
=head1 OPTIONS
=over 4
diff --git a/scripts/mysqld_safe.sh b/scripts/mysqld_safe.sh
index 3ccf5301503..094b1fbfcd3 100644
--- a/scripts/mysqld_safe.sh
+++ b/scripts/mysqld_safe.sh
@@ -38,7 +38,12 @@ parse_arguments() {
--basedir=*) MY_BASEDIR_VERSION=`echo "$arg" | sed -e "s;--basedir=;;"` ;;
--datadir=*) DATADIR=`echo "$arg" | sed -e "s;--datadir=;;"` ;;
--pid-file=*) pid_file=`echo "$arg" | sed -e "s;--pid-file=;;"` ;;
- --user=*) user=`echo "$arg" | sed -e "s;--[^=]*=;;"` ; SET_USER=1 ;;
+ --user=*)
+ if test $SET_USER -eq 0
+ then
+ user=`echo "$arg" | sed -e "s;--[^=]*=;;"` ; SET_USER=1
+ fi
+ ;;
# these two might have been set in a [mysqld_safe] section of my.cnf
# they get passed via environment variables to mysqld_safe
diff --git a/sql-bench/crash-me.sh b/sql-bench/crash-me.sh
index 1ae2550d69d..82c8a3a90e4 100644
--- a/sql-bench/crash-me.sh
+++ b/sql-bench/crash-me.sh
@@ -39,7 +39,7 @@
# as such, and clarify ones such as "mediumint" with comments such as
# "3-byte int" or "same as xxx".
-$version="1.60";
+$version="1.61";
use DBI;
use Getopt::Long;
@@ -74,7 +74,7 @@ usage() if ($opt_help || $opt_Information);
version() && exit(0) if ($opt_version);
$opt_suffix = '-'.$opt_suffix if (length($opt_suffix) != 0);
-$opt_config_file = "$pwd/$opt_dir/$opt_server$opt_suffix.cfg"
+$opt_config_file = "$pwd/$opt_dir/$opt_server$opt_suffix.cfg"
if (length($opt_config_file) == 0);
$log_prefix=' ###'; # prefix for log lines in result file
$safe_query_log='';
@@ -540,7 +540,7 @@ else
" Please start it and try again\n";
exit 1;
}
- $dbh=safe_connect();
+ $dbh=retry_connect();
}
@@ -2880,9 +2880,10 @@ As all used queries are legal according to some SQL standard. any
reasonable SQL server should be able to run this test without any
problems.
-All questions is cached in $opt_dir/'server_name'.cfg that future runs will use
-limits found in previous runs. Remove this file if you want to find the
-current limits for your version of the database server.
+All questions is cached in $opt_dir/'server_name'[-suffix].cfg that
+future runs will use limits found in previous runs. Remove this file
+if you want to find the current limits for your version of the
+database server.
This program uses some table names while testing things. If you have any
tables with the name of 'crash_me' or 'crash_qxxxx' where 'x' is a number,
@@ -3152,7 +3153,29 @@ sub safe_connect
}
#
-# Check if the server is upp and running. If not, ask the user to restart it
+# Test connecting a couple of times before giving an error
+# This is needed to get the server time to free old connections
+# after the connect test
+#
+
+sub retry_connect
+{
+ my ($dbh, $i);
+ for ($i=0 ; $i < 10 ; $i++)
+ {
+ if (($dbh=DBI->connect($server->{'data_source'},$opt_user,$opt_password,
+ { PrintError => 0, AutoCommit => 1})))
+ {
+ $dbh->{LongReadLen}= 16000000; # Set max retrieval buffer
+ return $dbh;
+ }
+ sleep(1);
+ }
+ return safe_connect();
+}
+
+#
+# Check if the server is up and running. If not, ask the user to restart it
#
sub check_connect
diff --git a/sql/field.h b/sql/field.h
index 37d194ac372..3877068aa0e 100644
--- a/sql/field.h
+++ b/sql/field.h
@@ -71,7 +71,7 @@ public:
virtual String *val_str(String*,String *)=0;
virtual Item_result result_type () const=0;
virtual Item_result cmp_type () const { return result_type(); }
- bool eq(Field *field) { return ptr == field->ptr; }
+ bool eq(Field *field) { return ptr == field->ptr && null_ptr == field->null_ptr; }
virtual bool eq_def(Field *field);
virtual uint32 pack_length() const { return (uint32) field_length; }
virtual void reset(void) { bzero(ptr,pack_length()); }
diff --git a/sql/filesort.cc b/sql/filesort.cc
index cc7b15f1f4a..0f6e4d7abba 100644
--- a/sql/filesort.cc
+++ b/sql/filesort.cc
@@ -68,7 +68,7 @@ ha_rows filesort(THD *thd, TABLE *table, SORT_FIELD *sortorder, uint s_length,
SQL_SELECT *select, ha_rows max_rows, ha_rows *examined_rows)
{
int error;
- ulong memavl;
+ ulong memavl, min_sort_memory;
uint maxbuffer;
BUFFPEK *buffpek;
ha_rows records;
@@ -123,7 +123,8 @@ ha_rows filesort(THD *thd, TABLE *table, SORT_FIELD *sortorder, uint s_length,
goto err;
memavl= thd->variables.sortbuff_size;
- while (memavl >= MIN_SORT_MEMORY)
+ min_sort_memory= max(MIN_SORT_MEMORY, param.sort_length*MERGEBUFF2);
+ while (memavl >= min_sort_memory)
{
ulong old_memavl;
ulong keys= memavl/(param.sort_length+sizeof(char*));
@@ -132,10 +133,10 @@ ha_rows filesort(THD *thd, TABLE *table, SORT_FIELD *sortorder, uint s_length,
MYF(0))))
break;
old_memavl=memavl;
- if ((memavl=memavl/4*3) < MIN_SORT_MEMORY && old_memavl > MIN_SORT_MEMORY)
- memavl=MIN_SORT_MEMORY;
+ if ((memavl=memavl/4*3) < min_sort_memory && old_memavl > min_sort_memory)
+ memavl= min_sort_memory;
}
- if (memavl < MIN_SORT_MEMORY)
+ if (memavl < min_sort_memory)
{
my_error(ER_OUTOFMEMORY,MYF(ME_ERROR+ME_WAITTANG),
thd->variables.sortbuff_size);
diff --git a/sql/ha_innodb.cc b/sql/ha_innodb.cc
index 31f9ba483a3..eaa088647c3 100644
--- a/sql/ha_innodb.cc
+++ b/sql/ha_innodb.cc
@@ -151,6 +151,19 @@ innobase_release_stat_resources(
}
/************************************************************************
+Call this function when mysqld passes control to the client. That is to
+avoid deadlocks on the adaptive hash S-latch possibly held by thd. For more
+documentation, see handler.cc. */
+
+void
+innobase_release_temporary_latches(
+/*===============================*/
+ void* innobase_tid)
+{
+ innobase_release_stat_resources((trx_t*)innobase_tid);
+}
+
+/************************************************************************
Increments innobase_active_counter and every INNOBASE_WAKE_INTERVALth
time calls srv_active_wake_master_thread. This function should be used
when a single database operation may introduce a small need for
@@ -895,12 +908,13 @@ innobase_commit_low(
trx_t* trx) /* in: transaction handle */
{
#ifdef HAVE_REPLICATION
+ /* TODO: Guilhem should check if master_log_name, pending
+ etc. are right if the master log gets rotated! Possible bug here.
+ Comment by Heikki March 4, 2003. */
+
if (current_thd->slave_thread) {
/* Update the replication position info inside InnoDB */
-#ifdef NEED_TO_BE_FIXED
- trx->mysql_relay_log_file_name = active_mi->rli.log_file_name;
- trx->mysql_relay_log_pos = active_mi->rli.relay_log_pos;
-#endif
+
trx->mysql_master_log_file_name
= active_mi->rli.master_log_name;
trx->mysql_master_log_pos = ((ib_longlong)
@@ -3512,6 +3526,16 @@ ha_innobase::records_in_range(
prebuilt->trx->op_info = (char*)"";
+ /* The MySQL optimizer seems to believe an estimate of 0 rows is
+ always accurate and may return the result 'Empty set' based on that.
+ The accuracy is not guaranteed, and even if it were, for a locking
+ read we should anyway perform the search to set the next-key lock.
+ Add 1 to the value to make sure MySQL does not make the assumption! */
+
+ if (n_rows == 0) {
+ n_rows = 1;
+ }
+
DBUG_RETURN((ha_rows) n_rows);
}
diff --git a/sql/ha_innodb.h b/sql/ha_innodb.h
index 86fb5d1947b..55832c0a079 100644
--- a/sql/ha_innodb.h
+++ b/sql/ha_innodb.h
@@ -82,7 +82,8 @@ class ha_innobase: public handler
HA_PRIMARY_KEY_IN_READ_INDEX |
HA_DROP_BEFORE_CREATE |
HA_NO_PREFIX_CHAR_KEYS |
- HA_TABLE_SCAN_ON_INDEX),
+ HA_TABLE_SCAN_ON_INDEX |
+ HA_NOT_MULTI_UPDATE),
last_dup_key((uint) -1),
start_of_scan(0)
{
@@ -209,3 +210,4 @@ int innodb_show_status(THD* thd);
my_bool innobase_query_caching_of_table_permitted(THD* thd, char* full_name,
uint full_name_len);
+void innobase_release_temporary_latches(void* innobase_tid);
diff --git a/sql/ha_myisam.cc b/sql/ha_myisam.cc
index 7cd5927bd24..4f61ee48748 100644
--- a/sql/ha_myisam.cc
+++ b/sql/ha_myisam.cc
@@ -420,7 +420,7 @@ int ha_myisam::restore(THD* thd, HA_CHECK_OPT *check_opt)
param.db_name = table->table_cache_key;
param.table_name = table->table_name;
param.testflag = 0;
- mi_check_print_error(&param,errmsg, my_errno);
+ mi_check_print_error(&param, errmsg, my_errno);
DBUG_RETURN(error);
}
}
@@ -438,17 +438,17 @@ int ha_myisam::backup(THD* thd, HA_CHECK_OPT *check_opt)
if (fn_format_relative_to_data_home(dst_path, table_name, backup_dir,
reg_ext))
{
- errmsg = "Failed in fn_format() for .frm file: errno = %d";
+ errmsg = "Failed in fn_format() for .frm file (errno: %d)";
error = HA_ADMIN_INVALID;
goto err;
}
if (my_copy(fn_format(src_path, table->path,"", reg_ext, MY_UNPACK_FILENAME),
dst_path,
- MYF(MY_WME | MY_HOLD_ORIGINAL_MODES)))
+ MYF(MY_WME | MY_HOLD_ORIGINAL_MODES | MY_DONT_OVERWRITE_FILE)))
{
error = HA_ADMIN_FAILED;
- errmsg = "Failed copying .frm file: errno = %d";
+ errmsg = "Failed copying .frm file (errno: %d)";
goto err;
}
@@ -456,7 +456,7 @@ int ha_myisam::backup(THD* thd, HA_CHECK_OPT *check_opt)
if (!fn_format(dst_path, dst_path, "", MI_NAME_DEXT,
MY_REPLACE_EXT | MY_UNPACK_FILENAME | MY_SAFE_PATH))
{
- errmsg = "Failed in fn_format() for .MYD file: errno = %d";
+ errmsg = "Failed in fn_format() for .MYD file (errno: %d)";
error = HA_ADMIN_INVALID;
goto err;
}
@@ -464,9 +464,9 @@ int ha_myisam::backup(THD* thd, HA_CHECK_OPT *check_opt)
if (my_copy(fn_format(src_path, table->path,"", MI_NAME_DEXT,
MY_UNPACK_FILENAME),
dst_path,
- MYF(MY_WME | MY_HOLD_ORIGINAL_MODES)))
+ MYF(MY_WME | MY_HOLD_ORIGINAL_MODES | MY_DONT_OVERWRITE_FILE)))
{
- errmsg = "Failed copying .MYD file: errno = %d";
+ errmsg = "Failed copying .MYD file (errno: %d)";
error= HA_ADMIN_FAILED;
goto err;
}
@@ -1034,7 +1034,7 @@ int ha_myisam::create(const char *name, register TABLE *table_arg,
{
int error;
uint i,j,recpos,minpos,fieldpos,temp_length,length;
- bool found_auto_increment=0;
+ bool found_real_auto_increment=0;
enum ha_base_keytype type;
char buff[FN_REFLEN];
KEY *pos;
@@ -1107,12 +1107,6 @@ int ha_myisam::create(const char *name, register TABLE *table_arg,
keydef[i].seg[j].null_bit=0;
keydef[i].seg[j].null_pos=0;
}
- if (j == 0 && field->flags & AUTO_INCREMENT_FLAG &&
- !found_auto_increment)
- {
- keydef[i].flag|=HA_AUTO_KEY;
- found_auto_increment=1;
- }
if ((field->type() == FIELD_TYPE_BLOB) || (field->type() == FIELD_TYPE_GEOMETRY))
{
keydef[i].seg[j].flag|=HA_BLOB_PART;
@@ -1124,6 +1118,12 @@ int ha_myisam::create(const char *name, register TABLE *table_arg,
keyseg+=pos->key_parts;
}
+ if (table_arg->found_next_number_field)
+ {
+ keydef[table_arg->next_number_index].flag|= HA_AUTO_KEY;
+ found_real_auto_increment= table_arg->next_number_key_offset == 0;
+ }
+
recpos=0; recinfo_pos=recinfo;
while (recpos < (uint) table_arg->reclength)
{
@@ -1193,6 +1193,7 @@ int ha_myisam::create(const char *name, register TABLE *table_arg,
bzero((char*) &create_info,sizeof(create_info));
create_info.max_rows=table_arg->max_rows;
create_info.reloc_rows=table_arg->min_rows;
+ create_info.with_auto_increment=found_real_auto_increment;
create_info.auto_increment=(info->auto_increment_value ?
info->auto_increment_value -1 :
(ulonglong) 0);
diff --git a/sql/handler.cc b/sql/handler.cc
index af9b2fd4a35..d7ae960382c 100644
--- a/sql/handler.cc
+++ b/sql/handler.cc
@@ -238,8 +238,10 @@ int ha_autocommit_or_rollback(THD *thd, int error)
handler must be the same as in the binlog.
arguments:
+ thd: the thread handle of the current connection
log_file_name: latest binlog file name
end_offset: the offset in the binlog file up to which we wrote
+ return value: 0 if success, 1 if error
*/
int ha_report_binlog_offset_and_commit(THD *thd,
@@ -266,6 +268,34 @@ int ha_report_binlog_offset_and_commit(THD *thd,
return error;
}
+/*
+ This function should be called when MySQL sends rows of a SELECT result set
+ or the EOF mark to the client. It releases a possible adaptive hash index
+ S-latch held by thd in InnoDB and also releases a possible InnoDB query
+ FIFO ticket to enter InnoDB. To save CPU time, InnoDB allows a thd to
+ keep them over several calls of the InnoDB handler interface when a join
+ is executed. But when we let the control to pass to the client they have
+ to be released because if the application program uses mysql_use_result(),
+ it may deadlock on the S-latch if the application on another connection
+ performs another SQL query. In MySQL-4.1 this is even more important because
+ there a connection can have several SELECT queries open at the same time.
+
+ arguments:
+ thd: the thread handle of the current connection
+ return value: always 0
+*/
+
+int ha_release_temporary_latches(THD *thd)
+{
+#ifdef HAVE_INNOBASE_DB
+ THD_TRANS *trans;
+ trans = &thd->transaction.all;
+ if (trans->innobase_tid)
+ innobase_release_temporary_latches(trans->innobase_tid);
+#endif
+ return 0;
+}
+
int ha_commit_trans(THD *thd, THD_TRANS* trans)
{
int error=0;
@@ -473,7 +503,8 @@ int handler::ha_open(const char *name, int mode, int test_if_locked)
int error;
DBUG_ENTER("handler::open");
DBUG_PRINT("enter",("name: %s db_type: %d db_stat: %d mode: %d lock_test: %d",
- name, table->db_type, table->db_stat, mode, test_if_locked));
+ name, table->db_type, table->db_stat, mode,
+ test_if_locked));
if ((error=open(name,mode,test_if_locked)))
{
diff --git a/sql/handler.h b/sql/handler.h
index 6cbd83af282..824f02b5a3d 100644
--- a/sql/handler.h
+++ b/sql/handler.h
@@ -67,6 +67,7 @@
#define HA_CAN_FULLTEXT (HA_NO_PREFIX_CHAR_KEYS*2)
#define HA_CAN_SQL_HANDLER (HA_CAN_FULLTEXT*2)
#define HA_NO_AUTO_INCREMENT (HA_CAN_SQL_HANDLER*2)
+#define HA_NOT_MULTI_UPDATE (HA_NO_AUTO_INCREMENT*2)
/*
Next record gives next record according last record read (even
@@ -373,6 +374,7 @@ void ha_resize_key_cache(void);
int ha_start_stmt(THD *thd);
int ha_report_binlog_offset_and_commit(THD *thd, char *log_file_name,
my_off_t end_offset);
+int ha_release_temporary_latches(THD *thd);
int ha_commit_trans(THD *thd, THD_TRANS *trans);
int ha_rollback_trans(THD *thd, THD_TRANS *trans);
int ha_autocommit_or_rollback(THD *thd, int error);
diff --git a/sql/item.cc b/sql/item.cc
index 3c6b85e933b..ea0d21ad300 100644
--- a/sql/item.cc
+++ b/sql/item.cc
@@ -257,6 +257,17 @@ bool Item_field::get_date(TIME *ltime,bool fuzzydate)
return 0;
}
+bool Item_field::get_date_result(TIME *ltime,bool fuzzydate)
+{
+ if ((null_value=result_field->is_null()) ||
+ result_field->get_date(ltime,fuzzydate))
+ {
+ bzero((char*) ltime,sizeof(*ltime));
+ return 1;
+ }
+ return 0;
+}
+
bool Item_field::get_time(TIME *ltime)
{
if ((null_value=field->is_null()) || field->get_time(ltime))
diff --git a/sql/item.h b/sql/item.h
index 7b31f03f6ac..8e1f4a38237 100644
--- a/sql/item.h
+++ b/sql/item.h
@@ -98,6 +98,8 @@ public:
virtual void split_sum_func(Item **ref_pointer_array, List<Item> &fields) {}
virtual bool get_date(TIME *ltime,bool fuzzydate);
virtual bool get_time(TIME *ltime);
+ virtual bool get_date_result(TIME *ltime,bool fuzzydate)
+ { return get_date(ltime,fuzzydate); }
virtual bool is_null() { return 0; };
virtual void top_level_item() {}
virtual void set_result_field(Field *field) {}
@@ -186,8 +188,9 @@ public:
}
Field *tmp_table_field() { return result_field; }
Field *tmp_table_field(TABLE *t_arg) { return result_field; }
- bool get_date(TIME *ltime,bool fuzzydate);
- bool get_time(TIME *ltime);
+ bool get_date(TIME *ltime,bool fuzzydate);
+ bool get_date_result(TIME *ltime,bool fuzzydate);
+ bool get_time(TIME *ltime);
bool is_null() { return field->is_null(); }
Item *get_tmp_table_item(THD *thd);
friend class Item_default_value;
@@ -512,8 +515,8 @@ public:
return (*ref)->null_value;
}
bool get_date(TIME *ltime,bool fuzzydate)
- {
- return (null_value=(*ref)->get_date(ltime,fuzzydate));
+ {
+ return (null_value=(*ref)->get_date_result(ltime,fuzzydate));
}
bool send(Protocol *prot, String *tmp){ return (*ref)->send(prot, tmp); }
void make_field(Send_field *field) { (*ref)->make_field(field); }
diff --git a/sql/item_cmpfunc.cc b/sql/item_cmpfunc.cc
index 301e5b4454f..a88b269eedd 100644
--- a/sql/item_cmpfunc.cc
+++ b/sql/item_cmpfunc.cc
@@ -1759,12 +1759,16 @@ longlong Item_func_like::val_int()
Item_func::optimize_type Item_func_like::select_optimize() const
{
- if (args[1]->type() == STRING_ITEM)
+ if (args[1]->const_item())
{
- if (((Item_string *) args[1])->str_value[0] != wild_many)
+ String* res2= args[1]->val_str((String *)&tmp_value2);
+
+ if (!res2)
+ return OPTIMIZE_NONE;
+
+ if (*res2->ptr() != wild_many)
{
- if ((args[0]->result_type() != STRING_RESULT) ||
- ((Item_string *) args[1])->str_value[0] != wild_one)
+ if (args[0]->result_type() != STRING_RESULT || *res2->ptr() != wild_one)
return OPTIMIZE_OP;
}
}
diff --git a/sql/item_func.cc b/sql/item_func.cc
index 8fb97dc2873..6b932edf00e 100644
--- a/sql/item_func.cc
+++ b/sql/item_func.cc
@@ -791,20 +791,28 @@ double Item_func_round::val()
double value=args[0]->val();
int dec=(int) args[1]->val_int();
uint abs_dec=abs(dec);
+ double tmp;
+ /*
+ tmp2 is here to avoid return the value with 80 bit precision
+ This will fix that the test round(0.1,1) = round(0.1,1) is true
+ */
+ volatile double tmp2;
if ((null_value=args[0]->null_value || args[1]->null_value))
return 0.0;
- double tmp=(abs_dec < array_elements(log_10) ?
- log_10[abs_dec] : pow(10.0,(double) abs_dec));
+ tmp=(abs_dec < array_elements(log_10) ?
+ log_10[abs_dec] : pow(10.0,(double) abs_dec));
if (truncate)
{
if (value >= 0)
- return dec < 0 ? floor(value/tmp)*tmp : floor(value*tmp)/tmp;
+ tmp2= dec < 0 ? floor(value/tmp)*tmp : floor(value*tmp)/tmp;
else
- return dec < 0 ? ceil(value/tmp)*tmp : ceil(value*tmp)/tmp;
+ tmp2= dec < 0 ? ceil(value/tmp)*tmp : ceil(value*tmp)/tmp;
}
- return dec < 0 ? rint(value/tmp)*tmp : rint(value*tmp)/tmp;
+ else
+ tmp2=dec < 0 ? rint(value/tmp)*tmp : rint(value*tmp)/tmp;
+ return tmp2;
}
diff --git a/sql/lock.cc b/sql/lock.cc
index 8f342b28d67..82004298453 100644
--- a/sql/lock.cc
+++ b/sql/lock.cc
@@ -319,6 +319,25 @@ void mysql_lock_abort(THD *thd, TABLE *table)
}
+/* Abort one thread / table combination */
+
+void mysql_lock_abort_for_thread(THD *thd, TABLE *table)
+{
+ MYSQL_LOCK *locked;
+ TABLE *write_lock_used;
+ DBUG_ENTER("mysql_lock_abort_for_thread");
+
+ if ((locked = get_lock_data(thd,&table,1,1,&write_lock_used)))
+ {
+ for (uint i=0; i < locked->lock_count; i++)
+ thr_abort_locks_for_thread(locked->locks[i]->lock,
+ table->in_use->real_id);
+ my_free((gptr) locked,MYF(0));
+ }
+ DBUG_VOID_RETURN;
+}
+
+
MYSQL_LOCK *mysql_lock_merge(MYSQL_LOCK *a,MYSQL_LOCK *b)
{
MYSQL_LOCK *sql_lock;
@@ -478,11 +497,12 @@ int lock_table_name(THD *thd, TABLE_LIST *table_list)
{
TABLE *table;
char key[MAX_DBKEY_LENGTH];
+ char *db= table_list->db ? table_list->db : (thd->db ? thd->db : (char*) "");
uint key_length;
DBUG_ENTER("lock_table_name");
safe_mutex_assert_owner(&LOCK_open);
- key_length=(uint) (strmov(strmov(key,table_list->db)+1,table_list->real_name)
+ key_length=(uint) (strmov(strmov(key,db)+1,table_list->real_name)
-key)+ 1;
/* Only insert the table if we haven't insert it already */
@@ -511,7 +531,7 @@ int lock_table_name(THD *thd, TABLE_LIST *table_list)
my_free((gptr) table,MYF(0));
DBUG_RETURN(-1);
}
- if (remove_table_from_cache(thd, table_list->db, table_list->real_name))
+ if (remove_table_from_cache(thd, db, table_list->real_name))
DBUG_RETURN(1); // Table is in use
DBUG_RETURN(0);
}
@@ -555,6 +575,77 @@ bool wait_for_locked_table_names(THD *thd, TABLE_LIST *table_list)
DBUG_RETURN(result);
}
+
+/*
+ Lock all tables in list with a name lock
+
+ SYNOPSIS
+ lock_table_names()
+ thd Thread handle
+ table_list Names of tables to lock
+
+ NOTES
+ One must have a lock on LOCK_open when calling this
+
+ RETURN
+ 0 ok
+ 1 Fatal error (end of memory ?)
+*/
+
+bool lock_table_names(THD *thd, TABLE_LIST *table_list)
+{
+ bool got_all_locks=1;
+ TABLE_LIST *lock_table;
+
+ for (lock_table=table_list ; lock_table ; lock_table=lock_table->next)
+ {
+ int got_lock;
+ if ((got_lock=lock_table_name(thd,lock_table)) < 0)
+ goto end; // Fatal error
+ if (got_lock)
+ got_all_locks=0; // Someone is using table
+ }
+
+ /* If some table was in use, wait until we got the lock */
+ if (!got_all_locks && wait_for_locked_table_names(thd, table_list))
+ goto end;
+ return 0;
+
+end:
+ unlock_table_names(thd, table_list, lock_table);
+ return 1;
+}
+
+
+/*
+ Unlock all tables in list with a name lock
+
+ SYNOPSIS
+ unlock_table_names()
+ thd Thread handle
+ table_list Names of tables to unlock
+ last_table Don't unlock any tables after this one.
+ (default 0, which will unlock all tables)
+
+ NOTES
+ One must have a lock on LOCK_open when calling this
+ This function will send a COND_refresh signal to inform other threads
+ that the name locks are removed
+
+ RETURN
+ 0 ok
+ 1 Fatal error (end of memory ?)
+*/
+
+void unlock_table_names(THD *thd, TABLE_LIST *table_list,
+ TABLE_LIST *last_table)
+{
+ for (TABLE_LIST *table=table_list ; table != last_table ; table=table->next)
+ unlock_table_name(thd,table);
+ pthread_cond_broadcast(&COND_refresh);
+}
+
+
static void print_lock_error(int error)
{
int textno;
diff --git a/sql/log.cc b/sql/log.cc
index 170e976e643..02e34b773ef 100644
--- a/sql/log.cc
+++ b/sql/log.cc
@@ -1321,6 +1321,14 @@ bool MYSQL_LOG::write(THD *thd, IO_CACHE *cache)
*/
{
Query_log_event qinfo(thd, "BEGIN", 5, TRUE);
+ /*
+ Now this Query_log_event has artificial log_pos 0. It must be adjusted
+ to reflect the real position in the log. Not doing it would confuse the
+ slave: it would prevent this one from knowing where he is in the master's
+ binlog, which would result in wrong positions being shown to the user,
+ MASTER_POS_WAIT undue waiting etc.
+ */
+ qinfo.set_log_pos(this);
if (qinfo.write(&log_file))
goto err;
}
@@ -1343,6 +1351,7 @@ bool MYSQL_LOG::write(THD *thd, IO_CACHE *cache)
{
Query_log_event qinfo(thd, "COMMIT", 6, TRUE);
+ qinfo.set_log_pos(this);
if (qinfo.write(&log_file) || flush_io_cache(&log_file))
goto err;
}
diff --git a/sql/log_event.cc b/sql/log_event.cc
index 12921eb0c01..fabc02a3293 100644
--- a/sql/log_event.cc
+++ b/sql/log_event.cc
@@ -550,6 +550,15 @@ err:
sql_print_error("Error in Log_event::read_log_event(): '%s', \
data_len=%d,event_type=%d",error,data_len,head[EVENT_TYPE_OFFSET]);
my_free(buf, MYF(MY_ALLOW_ZERO_PTR));
+ /*
+ The SQL slave thread will check if file->error<0 to know
+ if there was an I/O error. Even if there is no "low-level" I/O errors
+ with 'file', any of the high-level above errors is worrying
+ enough to stop the SQL thread now ; as we are skipping the current event,
+ going on with reading and successfully executing other events can
+ only corrupt the slave's databases. So stop.
+ */
+ file->error= -1;
}
return res;
}
@@ -1545,6 +1554,7 @@ int Load_log_event::exec_event(NET* net, struct st_relay_log_info* rli,
tables.db = thd->db;
tables.alias = tables.real_name = (char*)table_name;
tables.lock_type = TL_WRITE;
+ tables.updating= 1;
// the table will be opened in mysql_load
if (table_rules_on && !tables_ok(thd, &tables))
{
diff --git a/sql/mf_iocache.cc b/sql/mf_iocache.cc
index 4b0575c8579..b7e2a803e42 100644
--- a/sql/mf_iocache.cc
+++ b/sql/mf_iocache.cc
@@ -70,13 +70,17 @@ int _my_b_net_read(register IO_CACHE *info, byte *Buffer,
/* to set up stuff for my_b_get (no _) */
info->read_end = (info->read_pos = (byte*) net->read_pos) + read_length;
Buffer[0] = info->read_pos[0]; /* length is always 1 */
- info->read_pos++;
/*
info->request_pos is used by log_loaded_block() to know the size
- of the current block
+ of the current block.
+ info->pos_in_file is used by log_loaded_block() too.
*/
+ info->pos_in_file+= read_length;
info->request_pos=info->read_pos;
+
+ info->read_pos++;
+
DBUG_RETURN(0);
}
diff --git a/sql/mysql_priv.h b/sql/mysql_priv.h
index df9fbd5da53..61c5d308b4e 100644
--- a/sql/mysql_priv.h
+++ b/sql/mysql_priv.h
@@ -780,6 +780,7 @@ void mysql_unlock_read_tables(THD *thd, MYSQL_LOCK *sql_lock);
void mysql_unlock_some_tables(THD *thd, TABLE **table,uint count);
void mysql_lock_remove(THD *thd, MYSQL_LOCK *locked,TABLE *table);
void mysql_lock_abort(THD *thd, TABLE *table);
+void mysql_lock_abort_for_thread(THD *thd, TABLE *table);
MYSQL_LOCK *mysql_lock_merge(MYSQL_LOCK *a,MYSQL_LOCK *b);
bool lock_global_read_lock(THD *thd);
void unlock_global_read_lock(THD *thd);
@@ -791,6 +792,9 @@ int lock_and_wait_for_table_name(THD *thd, TABLE_LIST *table_list);
int lock_table_name(THD *thd, TABLE_LIST *table_list);
void unlock_table_name(THD *thd, TABLE_LIST *table_list);
bool wait_for_locked_table_names(THD *thd, TABLE_LIST *table_list);
+bool lock_table_names(THD *thd, TABLE_LIST *table_list);
+void unlock_table_names(THD *thd, TABLE_LIST *table_list,
+ TABLE_LIST *last_table= 0);
/* old unireg functions */
diff --git a/sql/mysqld.cc b/sql/mysqld.cc
index e01af4de543..c0a3527bc75 100644
--- a/sql/mysqld.cc
+++ b/sql/mysqld.cc
@@ -3755,8 +3755,10 @@ struct my_option my_long_options[] =
{"safemalloc-mem-limit", OPT_SAFEMALLOC_MEM_LIMIT,
"Simulate memory shortage when compiled with the --with-debug=full option",
0, 0, 0, GET_ULL, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
- {"new", 'n', "Use very new possible 'unsafe' functions", 0, 0, 0, GET_NO_ARG,
- NO_ARG, 0, 0, 0, 0, 0, 0},
+ {"new", 'n', "Use very new possible 'unsafe' functions",
+ (gptr*) &global_system_variables.new_mode,
+ (gptr*) &max_system_variables.new_mode,
+ 0, GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0},
#ifdef NOT_YET
{"no-mix-table-types", OPT_NO_MIX_TYPE, "Don't allow commands with uses two different table types",
(gptr*) &opt_no_mix_types, (gptr*) &opt_no_mix_types, 0, GET_BOOL, NO_ARG,
@@ -3944,8 +3946,8 @@ struct my_option my_long_options[] =
(gptr*) &my_use_symdir, (gptr*) &my_use_symdir, 0, GET_BOOL, NO_ARG,
IF_PURIFY(0,1), 0, 0, 0, 0, 0},
#endif
- {"user", 'u', "Run mysqld daemon as user", (gptr*) &mysqld_user,
- (gptr*) &mysqld_user, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
+ {"user", 'u', "Run mysqld daemon as user", 0, 0, 0, GET_STR, REQUIRED_ARG,
+ 0, 0, 0, 0, 0, 0},
{"version", 'V', "Output version information and exit", 0, 0, 0, GET_NO_ARG,
NO_ARG, 0, 0, 0, 0, 0, 0},
{"version", 'v', "Synonym for option -v", 0, 0, 0, GET_NO_ARG, NO_ARG, 0, 0,
@@ -4121,9 +4123,9 @@ struct my_option my_long_options[] =
(gptr*) &max_connect_errors, (gptr*) &max_connect_errors, 0, GET_ULONG,
REQUIRED_ARG, MAX_CONNECT_ERRORS, 1, ~0L, 0, 1, 0},
{"max_delayed_threads", OPT_MAX_DELAYED_THREADS,
- "Don't start more than this number of threads to handle INSERT DELAYED statements.",
+ "Don't start more than this number of threads to handle INSERT DELAYED statements. This option does not yet have effect (on TODO), unless it is set to zero, which means INSERT DELAYED is not used.",
(gptr*) &max_insert_delayed_threads, (gptr*) &max_insert_delayed_threads,
- 0, GET_ULONG, REQUIRED_ARG, 20, 1, 16384, 0, 1, 0},
+ 0, GET_ULONG, REQUIRED_ARG, 20, 0, 16384, 0, 1, 0},
{"max_error_count", OPT_MAX_ERROR_COUNT,
"Max number of errors/warnings to store for a statement",
(gptr*) &global_system_variables.max_error_count,
@@ -4607,12 +4609,15 @@ get_one_option(int optid, const struct my_option *opt __attribute__((unused)),
/* Correct pointer set by my_getopt (for embedded library) */
mysql_data_home= mysql_real_data_home;
break;
+ case 'u':
+ if (!mysqld_user)
+ mysqld_user= argument;
+ else
+ fprintf(stderr, "Warning: Ignoring user change to '%s' because the user was set to '%s' earlier on the command line\n", argument, mysqld_user);
+ break;
case 'L':
strmake(language, argument, sizeof(language)-1);
break;
- case 'n':
- opt_specialflag|= SPECIAL_NEW_FUNC;
- break;
case 'o':
protocol_version=PROTOCOL_VERSION-1;
break;
@@ -4808,8 +4813,8 @@ get_one_option(int optid, const struct my_option *opt __attribute__((unused)),
case (int) OPT_SAFE:
opt_specialflag|= SPECIAL_SAFE_MODE;
delay_key_write_options= (uint) DELAY_KEY_WRITE_NONE;
- myisam_recover_options= HA_RECOVER_NONE; // To be changed
- ha_open_options&= ~(HA_OPEN_ABORT_IF_CRASHED | HA_OPEN_DELAY_KEY_WRITE);
+ myisam_recover_options= HA_RECOVER_DEFAULT;
+ ha_open_options&= ~(HA_OPEN_DELAY_KEY_WRITE);
break;
case (int) OPT_SKIP_PRIOR:
opt_specialflag|= SPECIAL_NO_PRIOR;
diff --git a/sql/opt_range.cc b/sql/opt_range.cc
index c4c5cd28b39..92bab76bedd 100644
--- a/sql/opt_range.cc
+++ b/sql/opt_range.cc
@@ -1301,7 +1301,8 @@ key_and(SEL_ARG *key1,SEL_ARG *key2,uint clone_flag)
}
if (((clone_flag & CLONE_KEY2_MAYBE) &&
- !(clone_flag & CLONE_KEY1_MAYBE)) ||
+ !(clone_flag & CLONE_KEY1_MAYBE) &&
+ key2->type != SEL_ARG::MAYBE_KEY) ||
key1->type == SEL_ARG::MAYBE_KEY)
{ // Put simple key in key2
swap(SEL_ARG *,key1,key2);
@@ -1329,7 +1330,10 @@ key_and(SEL_ARG *key1,SEL_ARG *key2,uint clone_flag)
{
key1->maybe_smaller();
if (key2->next_key_part)
+ {
+ key1->use_count--; // Incremented in and_all_keys
return and_all_keys(key1,key2,clone_flag);
+ }
key2->use_count--; // Key2 doesn't have a tree
}
return key1;
@@ -2028,7 +2032,7 @@ void SEL_ARG::test_use_count(SEL_ARG *root)
{
if (this == root && use_count != 1)
{
- sql_print_error("Use_count: Wrong count %lu for root",use_count);
+ sql_print_error("Note: Use_count: Wrong count %lu for root",use_count);
return;
}
if (this->type != SEL_ARG::KEY_RANGE)
@@ -2042,7 +2046,7 @@ void SEL_ARG::test_use_count(SEL_ARG *root)
ulong count=count_key_part_usage(root,pos->next_key_part);
if (count > pos->next_key_part->use_count)
{
- sql_print_error("Use_count: Wrong count for key at %lx, %lu should be %lu",
+ sql_print_error("Note: Use_count: Wrong count for key at %lx, %lu should be %lu",
pos,pos->next_key_part->use_count,count);
return;
}
@@ -2050,7 +2054,7 @@ void SEL_ARG::test_use_count(SEL_ARG *root)
}
}
if (e_count != elements)
- sql_print_error("Wrong use count: %u for tree at %lx", e_count,
+ sql_print_error("Warning: Wrong use count: %u for tree at %lx", e_count,
(gptr) this);
}
diff --git a/sql/repl_failsafe.cc b/sql/repl_failsafe.cc
index 3991d9f21f1..1be84723c1e 100644
--- a/sql/repl_failsafe.cc
+++ b/sql/repl_failsafe.cc
@@ -449,8 +449,33 @@ int show_new_master(THD* thd)
}
}
+/*
+ Asks the master for the list of its other connected slaves.
+ This is for failsafe replication :
+ in order for failsafe replication to work, the servers involved in replication
+ must know of each other. We accomplish this by having each slave report to the
+ master how to reach it, and on connection, each slave receives information
+ about where the other slaves are.
+
+ SYNOPSIS
+ update_slave_list()
+ mysql pre-existing connection to the master
+ mi master info
+
+ NOTES
+ mi is used only to give detailed error messages which include the
+ hostname/port of the master, the username used by the slave to connect to
+ the master.
+ If the user used by the slave to connect to the master does not have the
+ REPLICATION SLAVE privilege, it will pop in this function because SHOW SLAVE
+ HOSTS will fail on the master.
+
+ RETURN VALUES
+ 1 error
+ 0 success
+ */
-int update_slave_list(MYSQL* mysql)
+int update_slave_list(MYSQL* mysql, MASTER_INFO* mi)
{
MYSQL_RES* res=0;
MYSQL_ROW row;
@@ -462,7 +487,7 @@ int update_slave_list(MYSQL* mysql)
if (mc_mysql_query(mysql,"SHOW SLAVE HOSTS",16) ||
!(res = mc_mysql_store_result(mysql)))
{
- error = "Query error";
+ error= mc_mysql_error(mysql);
goto err;
}
@@ -476,7 +501,8 @@ int update_slave_list(MYSQL* mysql)
port_ind=4;
break;
default:
- error = "Invalid number of fields in SHOW SLAVE HOSTS";
+ error= "the master returned an invalid number of fields for SHOW SLAVE \
+HOSTS";
goto err;
}
@@ -494,7 +520,7 @@ int update_slave_list(MYSQL* mysql)
{
if (!(si = (SLAVE_INFO*)my_malloc(sizeof(SLAVE_INFO), MYF(MY_WME))))
{
- error = "Out of memory";
+ error= "the slave is out of memory";
pthread_mutex_unlock(&LOCK_slave_list);
goto err;
}
@@ -518,7 +544,9 @@ err:
mc_mysql_free_result(res);
if (error)
{
- sql_print_error("Error updating slave list: %s",error);
+ sql_print_error("While trying to obtain the list of slaves from the master \
+'%s:%d', user '%s' got the following error: '%s'",
+ mi->host, mi->port, mi->user, error);
DBUG_RETURN(1);
}
DBUG_RETURN(0);
diff --git a/sql/repl_failsafe.h b/sql/repl_failsafe.h
index 72ea0cf2a56..a9c504330ab 100644
--- a/sql/repl_failsafe.h
+++ b/sql/repl_failsafe.h
@@ -20,7 +20,7 @@ extern const char* rpl_role_type[], *rpl_status_type[];
pthread_handler_decl(handle_failsafe_rpl,arg);
void change_rpl_status(RPL_STATUS from_status, RPL_STATUS to_status);
int find_recovery_captain(THD* thd, MYSQL* mysql);
-int update_slave_list(MYSQL* mysql);
+int update_slave_list(MYSQL* mysql, MASTER_INFO* mi);
extern HASH slave_list;
diff --git a/sql/set_var.cc b/sql/set_var.cc
index 0b85f50e0ef..b6e10cbc5b1 100644
--- a/sql/set_var.cc
+++ b/sql/set_var.cc
@@ -194,6 +194,7 @@ sys_var_thd_ulong sys_net_write_timeout("net_write_timeout",
sys_var_thd_ulong sys_net_retry_count("net_retry_count",
&SV::net_retry_count,
fix_net_retry_count);
+sys_var_thd_bool sys_new_mode("new", &SV::new_mode);
sys_var_thd_ulong sys_read_buff_size("read_buffer_size",
&SV::read_buff_size);
sys_var_thd_ulong sys_read_rnd_buff_size("read_rnd_buffer_size",
@@ -383,6 +384,7 @@ sys_var *sys_variables[]=
&sys_net_retry_count,
&sys_net_wait_timeout,
&sys_net_write_timeout,
+ &sys_new_mode,
&sys_pseudo_thread_id,
&sys_query_cache_size,
#ifdef HAVE_QUERY_CACHE
@@ -539,6 +541,7 @@ struct show_var_st init_vars[]= {
{sys_net_read_timeout.name, (char*) &sys_net_read_timeout, SHOW_SYS},
{sys_net_retry_count.name, (char*) &sys_net_retry_count, SHOW_SYS},
{sys_net_write_timeout.name,(char*) &sys_net_write_timeout, SHOW_SYS},
+ {sys_new_mode.name, (char*) &sys_new_mode, SHOW_SYS},
{"open_files_limit", (char*) &open_files_limit, SHOW_LONG},
{"pid_file", (char*) pidfile_name, SHOW_CHAR},
{"log_error", (char*) log_error_file, SHOW_CHAR},
diff --git a/sql/share/polish/errmsg.txt b/sql/share/polish/errmsg.txt
index 7ffec4b6519..2d07b362257 100644
--- a/sql/share/polish/errmsg.txt
+++ b/sql/share/polish/errmsg.txt
@@ -7,8 +7,8 @@
"hashchk",
"isamchk",
-"TAK",
"NIE",
+"TAK",
"Nie mo¿na stworzyæ pliku '%-.64s' (Kod b³êdu: %d)",
"Nie mo¿na stworzyæ tabeli '%-.64s' (Kod b³êdu: %d)",
"Nie mo¿na stworzyæ bazy danych '%-.64s'. B³?d %d",
diff --git a/sql/share/russian/errmsg.txt b/sql/share/russian/errmsg.txt
index 666f8e01232..b5d1a0a7e07 100644
--- a/sql/share/russian/errmsg.txt
+++ b/sql/share/russian/errmsg.txt
@@ -1,246 +1,245 @@
-/* Copyright Abandoned 1998.
+/* Copyright 2003 MySQL AB
+ Translation done in 2003 by Egor Egorov; Ensita.NET, http://www.ensita.net/
This file is public domain and comes with NO WARRANTY of any kind */
-/* Primary translation was done by "Timur I. Bakeyev" <translate@bat.ru> */
-/* Additional translation by "Alexander I. Barkov" <bar@izhcom.ru> */
/* charset: KOI8-R */
"hashchk",
"isamchk",
"îåô",
"äá",
-"îÅ ÍÏÇÕ ÓÏÚÄÁÔØ ÆÁÊÌ '%-.64s' (ïÛÉÂËÁ: %d)",
-"îÅ ÍÏÇÕ ÓÏÚÄÁÔØ ÔÁÂÌÉÃÕ '%-.64s' (ïÛÉÂËÁ: %d)",
-"îÅ ÍÏÇÕ ÓÏÚÄÁÔØ ÂÁÚÕ '%-.64s'. ïÛÉÂËÁ: %d",
-"îÅ ÍÏÇÕ ÓÏÚÄÁÔØ ÂÁÚÕ '%-.64s'. âÁÚÁ ÕÖÅ ÓÕÝÅÓÔ×ÕÅÔ",
-"îÅ ÍÏÇÕ ÕÄÁÌÉÔØ ÂÁÚÕ '%-.64s'. âÁÚÁ ÎÅ ÓÕÝÅÓÔ×ÕÅÔ",
-"ïÛÉÂËÁ ÐÒÉ ÕÄÁÌÅÎÉÉ ÂÁÚÙ (îÅ ÍÏÇÕ ÕÄÁÌÉÔØ '%-.64s', ÏÛÉÂËÁ %d)",
-"ïÛÉÂËÁ ÐÒÉ ÕÄÁÌÅÎÉÉ ÂÁÚÙ (îÅ ÍÏÇÕ ÕÄÁÌÉÔØ ËÁÔÁÌÏÇ '%-.64s', ÏÛÉÂËÁ %d)",
-"ïÛÉÂËÁ ÐÒÉ ÕÄÁÌÅÎÉÉ '%-.64s' (ïÛÉÂËÁ: %d)",
-"îÅ ÍÏÇÕ ÐÒÏÞÅÓÔØ ÚÁÐÉÓØ × ÓÉÓÔÅÍÎÏÊ ÔÁÂÌÉÃÅ",
-"îÅ ÍÏÇÕ ÐÏÌÕÞÉÔØ ÓÔÁÔÕÓ '%-.64s' (ïÛÉÂËÁ: %d)",
-"îÅ ÍÏÇÕ ÏÐÒÅÄÅÌÉÔØ ÒÁÂÏÞÉÊ ËÁÔÁÌÏÇ (ïÛÉÂËÁ: %d)",
-"îÅ ÍÏÇÕ ÂÌÏËÉÒÏ×ÁÔØ ÆÁÊÌ (ïÛÉÂËÁ: %d)",
-"îÅ ÍÏÇÕ ÏÔËÒÙÔØ ÆÁÊÌ: '%-.64s'. (ïÛÉÂËÁ: %d)",
-"îÅ ÍÏÇÕ ÎÁÊÔÉ ÆÁÊÌ: '%-.64s' (ïÛÉÂËÁ: %d)",
-"îÅ ÍÏÇÕ ÐÒÏÞÅÓÔØ ËÁÔÁÌÏÇ '%-.64s' (ïÛÉÂËÁ: %d)",
-"îÅ ÍÏÇÕ ÐÅÒÅÊÔÉ × ËÁÔÁÌÏÇ '%-.64s' (ïÛÉÂËÁ: %d)",
-"úÁÐÉÓØ ÂÙÌÁ ÉÚÍÅÎÅÎÁ ÓÏ ×ÒÅÍÅÎÉ ÐÏÓÌÅÄÎÅÇÏ ÞÔÅÎÉÑ ÔÁÂÌÉÃÙ '%-.64s'",
-"ðÅÒÅÐÏÌÎÅÎ ÄÉÓË (%-.64s). íÏÖÅÔ, ËÔÏ-ÎÉÂÕÄØ ÕÂÅÒÅÔ ÚÁ ÓÏÂÏÊ ÍÕÓÏÒ....",
-"îÅ ÍÏÇÕ ÐÒÏÉÚ×ÅÓÔÉ ÚÁÐÉÓØ, ËÌÀÞ ÄÕÂÌÉÒÕÅÔÓÑ × ÔÁÂÌÉÃÅ '%-.64s'",
-"ïÛÉÂËÁ ÐÒÉ ÚÁËÒÙÔÉÉ '%-.64s' (ïÛÉÂËÁ: %d)",
-"ïÛÉÂËÁ ÞÔÅÎÉÑ ÆÁÊÌÁ '%-.64s' (ïÛÉÂËÁ: %d)",
-"ïÛÉÂËÁ ÐÒÉ ÐÅÒÅÉÍÅÎÏ×ÁÎÉÉ '%-.64s' × '%-.64s' (ïÛÉÂËÁ: %d)",
-"ïÛÉÂËÁ ÚÁÐÉÓÉ × ÆÁÊÌ '%-.64s' (ïÛÉÂËÁ: %d)",
+"îÅ×ÏÚÍÏÖÎÏ ÓÏÚÄÁÔØ ÆÁÊÌ '%-.64s' (ÏÛÉÂËÁ: %d)",
+"îÅ×ÏÚÍÏÖÎÏ ÓÏÚÄÁÔØ ÔÁÂÌÉÃÕ '%-.64s' (ÏÛÉÂËÁ: %d)",
+"îÅ×ÏÚÍÏÖÎÏ ÓÏÚÄÁÔØ ÂÁÚÕ ÄÁÎÎÙÈ '%-.64s'. (ÏÛÉÂËÁ: %d)",
+"îÅ×ÏÚÍÏÖÎÏ ÓÏÚÄÁÔØ ÂÁÚÕ ÄÁÎÎÙÈ '%-.64s'. âÁÚÁ ÄÁÎÎÙÈ ÕÖÅ ÓÕÝÅÓÔ×ÕÅÔ",
+"îÅ×ÏÚÍÏÖÎÏ ÕÄÁÌÉÔØ ÂÁÚÕ ÄÁÎÎÙÈ '%-.64s'. ôÁËÏÊ ÂÁÚÙ ÄÁÎÎÙÈ ÎÅÔ",
+"ïÛÉÂËÁ ÐÒÉ ÕÄÁÌÅÎÉÉ ÂÁÚÙ ÄÁÎÎÙÈ (ÎÅ×ÏÚÍÏÖÎÏ ÕÄÁÌÉÔØ '%-.64s', ÏÛÉÂËÁ: %d)",
+"îÅ×ÏÚÍÏÖÎÏ ÕÄÁÌÉÔØ ÂÁÚÕ ÄÁÎÎÙÈ (ÎÅ×ÏÚÍÏÖÎÏ ÕÄÁÌÉÔØ ËÁÔÁÌÏÇ '%-.64s', ÏÛÉÂËÁ: %d)",
+"ïÛÉÂËÁ ÐÒÉ ÕÄÁÌÅÎÉÉ '%-.64s' (ÏÛÉÂËÁ: %d)",
+"îÅ×ÏÚÍÏÖÎÏ ÐÒÏÞÉÔÁÔØ ÚÁÐÉÓØ × ÓÉÓÔÅÍÎÏÊ ÔÁÂÌÉÃÅ",
+"îÅ×ÏÚÍÏÖÎÏ ÐÏÌÕÞÉÔØ ÓÔÁÔÕÓÎÕÀ ÉÎÆÏÒÍÁÃÉÀ Ï '%-.64s' (ÏÛÉÂËÁ: %d)",
+"îÅ×ÏÚÍÏÖÎÏ ÏÐÒÅÄÅÌÉÔØ ÒÁÂÏÞÉÊ ËÁÔÁÌÏÇ (ÏÛÉÂËÁ: %d)",
+"îÅ×ÏÚÍÏÖÎÏ ÐÏÓÔÁ×ÉÔØ ÂÌÏËÉÒÏ×ËÕ ÎÁ ÆÁÊÌÅ (ÏÛÉÂËÁ: %d)",
+"îÅ×ÏÚÍÏÖÎÏ ÏÔËÒÙÔØ ÆÁÊÌ: '%-.64s'. (ÏÛÉÂËÁ: %d)",
+"îÅ×ÏÚÍÏÖÎÏ ÎÁÊÔÉ ÆÁÊÌ: '%-.64s' (ÏÛÉÂËÁ: %d)",
+"îÅ×ÏÚÍÏÖÎÏ ÐÒÏÞÉÔÁÔØ ËÁÔÁÌÏÇ '%-.64s' (ÏÛÉÂËÁ: %d)",
+"îÅ×ÏÚÍÏÖÎÏ ÐÅÒÅÊÔÉ × ËÁÔÁÌÏÇ '%-.64s' (ÏÛÉÂËÁ: %d)",
+"úÁÐÉÓØ ÉÚÍÅÎÉÌÁÓØ Ó ÍÏÍÅÎÔÁ ÐÏÓÌÅÄÎÅÊ ×ÙÂÏÒËÉ × ÔÁÂÌÉÃÅ '%-.64s'",
+"äÉÓË ÚÁÐÏÌÎÅÎ. (%s). ïÖÉÄÁÅÍ, ÐÏËÁ ËÔÏ-ÔÏ ÎÅ ÕÂÅÒÅÔ ÐÏÓÌÅ ÓÅÂÑ ÍÕÓÏÒ....",
+"îÅ×ÏÚÍÏÖÎÏ ÐÒÏÉÚ×ÅÓÔÉ ÚÁÐÉÓØ, ÄÕÂÌÉÒÕÀÝÉÊÓÑ ËÌÀÞ × ÔÁÂÌÉÃÅ '%-.64s'",
+"ïÛÉÂËÁ ÐÒÉ ÚÁËÒÙÔÉÉ '%-.64s' (ÏÛÉÂËÁ: %d)",
+"ïÛÉÂËÁ ÞÔÅÎÉÑ ÆÁÊÌÁ '%-.64s' (ÏÛÉÂËÁ: %d)",
+"ïÛÉÂËÁ ÐÒÉ ÐÅÒÅÉÍÅÎÏ×ÁÎÉÉ '%-.64s' × '%-.64s' (ÏÛÉÂËÁ: %d)",
+"ïÛÉÂËÁ ÚÁÐÉÓÉ × ÆÁÊÌ '%-.64s' (ÏÛÉÂËÁ: %d)",
"'%-.64s' ÚÁÂÌÏËÉÒÏ×ÁÎ ÄÌÑ ÉÚÍÅÎÅÎÉÊ",
"óÏÒÔÉÒÏ×ËÁ ÐÒÅÒ×ÁÎÁ",
-"View '%-.64s' ÎÅ ÓÕÝÅÓÔ×ÕÅÔ ÄÌÑ '%-.64s'",
-"ðÏÌÕÞÅÎÁ ÏÛÉÂËÁ %d ÏÔ ÄÅÓËÒÉÐÔÏÒÁ ÔÁÂÌÉÃÙ",
-"äÅÓËÒÉÐÔÏÒ ÔÁÂÌÉÃÙ '%-.64s' ÎÅ ÉÍÅÅÔ ÔÁËÏÇÏ Ó×ÏÊÓÔ×Á",
-"îÅ ÍÏÇÕ ÎÁÊÔÉ ÚÁÐÉÓØ × '%-.64s'",
-"îÅ×ÅÒÎÁÑ ÉÎÆÏÒÍÁÃÉÑ × ÆÁÊÌÅ: '%-.64s'",
-"îÅ×ÅÒÎÙÊ ÉÎÄÅËÓÎÙÊ ÆÁÊÌ ÄÌÑ ÔÁÂÌÉÃÙ: '%-.64s'. ðÏÐÒÏÂÕÊÔÅ ÅÇÏ ×ÏÓÓÏÚÄÁÔØ",
-"óÔÁÒÙÊ ÉÎÄÅËÓÎÙÊ ÆÁÊÌ ÄÌÑ ÔÁÂÌÉÃÙ '%-.64s'; òÅÉÎÄÅËÓÉÒÕÊÔÅ ÅÅ!",
-"'%-.64s' ÔÏÌØËÏ ÄÌÑ ÞÔÅÎÉÑ",
-"îÅ È×ÁÔÁÅÔ ÐÁÍÑÔÉ. ðÅÒÅÇÒÕÚÉÔÅ ÓÅÒ×ÅÒ É ÐÏÐÒÏÂÕÊÔÅ ÓÎÏ×Á (ÎÕÖÎÏ %d ÂÁÊÔ)",
-"îÅ È×ÁÔÁÅÔ ÐÁÍÑÔÉ ÄÌÑ ÓÏÒÔÉÒÏ×ËÉ. õ×ÅÌÉÞØÔÅ ÒÁÚÍÅÒ ÂÕÆÅÒÁ ÓÏÒÔÉÒÏ×ËÉ Õ ÓÅÒ×ÅÒÁ",
-"îÅÏÖÉÄÁÎÎÙÊ ËÏÎÅà ÆÁÊÌÁ '%-.64s' (ïÛÉÂËÁ: %d)",
+"ðÒÅÄÓÔÁ×ÌÅÎÉÅ '%-.64s' ÎÅ ÓÕÝÅÓÔ×ÕÅÔ ÄÌÑ '%-.64s'",
+"ðÏÌÕÞÅÎÁ ÏÛÉÂËÁ %d ÏÔ ÏÂÒÁÂÏÔÞÉËÁ ÔÁÂÌÉÃ",
+"ïÂÒÁÂÏÔÞÉË ÔÁÂÌÉÃÙ '%-.64s' ÎÅ ÐÏÄÄÅÒÖÉ×ÁÅÔ ÜÔÕ ×ÏÚÍÏÖÎÏÓÔØ",
+"îÅ×ÏÚÍÏÖÎÏ ÎÁÊÔÉ ÚÁÐÉÓØ × '%-.64s'",
+"îÅËÏÒÒÅËÔÎÁÑ ÉÎÆÏÒÍÁÃÉÑ × ÆÁÊÌÅ '%-.64s'",
+"îÅËÏÒÒÅËÔÎÙÊ ÉÎÄÅËÓÎÙÊ ÆÁÊÌ ÄÌÑ ÔÁÂÌÉÃÙ: '%-.64s'. ðÏÐÒÏÂÕÊÔÅ ×ÏÓÓÔÁÎÏ×ÉÔØ ÅÇÏ",
+"óÔÁÒÙÊ ÉÎÄÅËÓÎÙÊ ÆÁÊÌ ÄÌÑ ÔÁÂÌÉÃÙ '%-.64s'; ÏÔÒÅÍÏÎÔÉÒÕÊÔÅ ÅÇÏ!",
+"ôÁÂÌÉÃÁ '%-.64s' ÐÒÅÄÎÁÚÎÁÞÅÎÁ ÔÏÌØËÏ ÄÌÑ ÞÔÅÎÉÑ",
+"îÅÄÏÓÔÁÔÏÞÎÏ ÐÁÍÑÔÉ. ðÅÒÅÚÁÐÕÓÔÉÔÅ ÓÅÒ×ÅÒ É ÐÏÐÒÏÂÕÊÔÅ ÅÝÅ ÒÁÚ (ÎÕÖÎÏ %d ÂÁÊÔ)",
+"îÅÄÏÓÔÁÔÏÞÎÏ ÐÁÍÑÔÉ ÄÌÑ ÓÏÒÔÉÒÏ×ËÉ. õ×ÅÌÉÞØÔÅ ÒÁÚÍÅÒ ÂÕÆÅÒÁ ÓÏÒÔÉÒÏ×ËÉ ÎÁ ÓÅÒ×ÅÒÅ",
+"îÅÏÖÉÄÁÎÎÙÊ ËÏÎÅà ÆÁÊÌÁ '%-.64s' (ÏÛÉÂËÁ: %d)",
"óÌÉÛËÏÍ ÍÎÏÇÏ ÓÏÅÄÉÎÅÎÉÊ",
-"îÅÄÏÓÔÁÔÏË ÍÅÓÔÁ/ÐÁÍÑÔÉ ÄÌÑ ÎÉÔÉ",
-"îÅ ÍÏÇÕ ÏÐÒÅÄÅÌÉÔØ ÉÍÑ ÈÏÓÔÁ ÐÏ ÷ÁÛÅÍÕ ÁÄÒÅÓÕ",
-"îÅËÏÒÒÅËÔÎÁÑ ÉÎÉÃÉÁÌÉÚÁÃÉÑ Ó×ÑÚÉ",
-"äÏÓÔÕÐ ÚÁËÒÙÔ ÄÌÑ ÐÏÌØÚÏ×ÁÔÅÌÑ: '%-.32s@%-.64s' Ë ÂÁÚÅ '%-.64s'",
-"äÏÓÔÕÐ ÚÁËÒÙÔ ÄÌÑ ÐÏÌØÚÏ×ÁÔÅÌÑ: '%-.32s@%-.64s' (âÙÌ ÉÓÐÏÌØÚÏ×ÁÎ ÐÁÒÏÌØ: %-.64s)",
-"îÅ ×ÙÂÒÁÎÁ ÂÁÚÁ",
-"îÅÉÚ×ÅÓÔÎÁÑ ËÏÍÁÎÄÁ",
-"óÔÏÌÂÅà '%-.64s' ÎÅ ÍÏÖÅÔ ÂÙÔØ ÐÕÓÔÙÍ/ÎÕÌÅ×ÙÍ",
-"îÅÉÚ×ÅÓÔÎÁÑ ÂÁÚÁ '%-.64s'",
-"ôÁÂÌÉÃÁ '%-.64s' ÕÖÅ ÅÓÔØ",
+"îÅÄÏÓÔÁÔÏÞÎÏ ÐÁÍÑÔÉ; ÕÄÏÓÔÏ×ÅÒØÔÅÓØ, ÞÔÏ mysqld ÉÌÉ ËÁËÏÊ-ÌÉÂÏ ÄÒÕÇÏÊ ÐÒÏÃÅÓÓ ÎÅ ÚÁÎÉÍÁÅÔ ×ÓÀ ÄÏÓÔÕÐÎÕÀ ÐÁÍÑÔØ. åÓÌÉ ÎÅÔ, ÔÏ ×Ù ÍÏÖÅÔÅ ÉÓÐÏÌØÚÏ×ÁÔØ ulimit, ÞÔÏÂÙ ×ÙÄÅÌÉÔØ ÄÌÑ mysqld ÂÏÌØÛÅ ÐÁÍÑÔÉ, ÉÌÉ Õ×ÅÌÉÞÉÔØ ÏÂßÅÍ ÆÁÊÌÁ ÐÏÄËÁÞËÉ",
+"îÅ×ÏÚÍÏÖÎÏ ÐÏÌÕÞÉÔØ ÉÍÑ ÈÏÓÔÁ ÄÌÑ ×ÁÛÅÇÏ ÁÄÒÅÓÁ",
+"îÅËÏÒÒÅËÔÎÏÅ ÐÒÉ×ÅÔÓÔ×ÉÅ",
+"äÌÑ ÐÏÌØÚÏ×ÁÔÅÌÑ '%-.32s@%-.64s' ÄÏÓÔÕÐ Ë ÂÁÚÅ ÄÁÎÎÙÈ '%-.64s' ÚÁËÒÙÔ",
+"äÏÓÔÕÐ ÚÁËÒÙÔ ÄÌÑ ÐÏÌØÚÏ×ÁÔÅÌÑ '%-.32s@%-.64s' (ÂÙÌ ÉÓÐÏÌØÚÏ×ÁÎ ÐÁÒÏÌØ: %s)",
+"âÁÚÁ ÄÁÎÎÙÈ ÎÅ ×ÙÂÒÁÎÁ",
+"îÅÉÚ×ÅÓÔÎÁÑ ËÏÍÁÎÄÁ ËÏÍÍÕÎÉËÁÃÉÏÎÎÏÇÏ ÐÒÏÔÏËÏÌÁ",
+"óÔÏÌÂÅà '%-.64s' ÎÅ ÍÏÖÅÔ ÐÒÉÎÉÍÁÔØ ×ÅÌÉÞÉÎÕ NULL",
+"îÅÉÚ×ÅÓÔÎÁÑ ÂÁÚÁ ÄÁÎÎÙÈ '%-.64s'",
+"ôÁÂÌÉÃÁ '%-.64s' ÕÖÅ ÓÕÝÅÓÔ×ÕÅÔ",
"îÅÉÚ×ÅÓÔÎÁÑ ÔÁÂÌÉÃÁ '%-.64s'",
-"ðÏÌÅ '%-.64s' × %-.64s ÎÅ ÏÄÎÏÚÎÁÞÎÏ",
-"ðÒÏÉÓÈÏÄÉÔ ×ÙËÌÀÞÅÎÉÅ ÓÅÒ×ÅÒÁ",
-"îÅÉÚ×ÅÓÔÎÏÅ ÐÏÌÅ '%-.64s' × %-.64s",
-" '%-.64s' ÉÓÐÏÌØÚÏ×ÁÎÏ ×ÎÅ ×ÙÒÁÖÅÎÉÑ GROUP BY",
-"îÅ ÍÏÇÕ ÐÒÏÉÚ×ÅÓÔÉ ÇÒÕÐÐÉÒÏ×ËÕ ÐÏ '%-.64s'",
-"÷ ÏÄÎÏÍ ×ÙÒÁÖÅÎÉÉ ÓÏÄÅÒÖÁÔØÓÑ É ÉÍÅÎÁ ÐÏÌÅÊ, É ÓÕÍÍÉÒÕÀÝÉÅ ÆÕÎËÃÉÉ",
-"þÉÓÌÏ ÓÔÏÌÂÃÏ× ÎÅ ÓÏÏÔ×ÅÔÓÔ×ÕÅÔ ÞÉÓÌÕ ÚÎÁÞÅÎÉÊ",
-"óÌÉÛËÏÍ ÄÌÉÎÎÙÊ ÉÄÅÎÔÉÆÉËÁÔÏÒ: '%-.64s'",
-"äÕÂÌÉÒÏ×ÁÎÎÏÅ ÉÍÑ ÐÏÌÑ '%-.64s'",
-"äÕÂÌÉÒÏ×ÁÎÎÏÅ ÉÍÑ ËÌÀÞÁ '%-.64s'",
-"ðÏ×ÔÏÒÑÀÝÅÅÓÑ ÚÎÁÞÅÎÉÅ '%-.64s' ÄÌÑ ËÌÀÞÁ %d",
-"îÅ×ÅÒÎÙÊ ÓÐÅÃÉÆÉËÁÔÏÒ ÐÏÌÑ: '%-.64s'",
-"%-.64s ÏËÏÌÏ '%-.64s', × ÓÔÒÏËÅ %d",
-"ðÕÓÔÏÊ ÚÁÐÒÏÓ",
-"îÅ ÕÎÉËÁÌØÎÁÑ ÔÁÂÌÉÃÁ/ÐÓÅ×ÄÏÎÉÍ: '%-.64s'",
-"îÅ×ÅÒÎÏÅ ÚÎÁÞÅÎÉÅ ÐÏ ÕÍÏÌÞÁÎÉÀ '%-.64s'",
-"ðÅÒ×ÉÞÎÙÊ ËÌÀÞ ÏÐÒÅÄÅÌÅÎ ÎÅÓËÏÌØËÏ ÒÁÚ",
-"ïÐÒÅÄÅÌÅÎÎÏ ÓÌÉÛËÏÍ ÍÎÏÇÏ ËÌÀÞÅÊ. ÷ÏÚÍÏÖÎÏ ÍÁËÓÉÍÁÌØÎÏ %d ËÌÀÞÅÊ",
-"ïÐÒÅÄÅÌÅÎÎÏ ÓÌÉÛËÏÍ ÍÎÏÇÏ ÓÏÓÔÁ×ÌÑÀÝÉÈ ËÌÀÞÁ. ÷ÏÚÍÏÖÎÏ ÍÁËÓÉÍÁÌØÎÏ %d ÓÏÓÔÁ×ÌÑÀÝÉÈ",
-"ëÌÀÞ ÓÌÉÛËÏÍ ÂÏÌØÛÏÊ. íÁËÓÉÍÁÌØÎÁÑ ÄÌÉÎÁ %d",
-"ëÌÀÞÅ×ÏÅ ÐÏÌÅ '%-.64s' ÎÅ ÓÏÄÅÒÖÉÔÓÑ × ÔÁÂÌÉÃÅ",
-"ïÂßÅËÔ BLOB '%-.64s' ÎÅ ÍÏÖÅÔ ÐÒÉÓÕÔÓÔ×Ï×ÁÔØ × ÏÐÒÅÄÅÌÅÎÉÉ ËÌÀÞÁ",
-"óÌÉÛËÏÍ ×ÅÌÉË ÒÁÚÍÅÒ ÐÏÌÑ '%-.64s' (max = %d). ÷ÏÓÐÏÌØÚÕÊÔÅÓØ ÏÂßÅËÔÏÍ BLOB",
-"á×ÔÏÍÁÔÉÞÅÓËÏÅ ÐÏÌÅ ÍÏÖÅÔ ÂÙÔØ ÔÏÌØËÏ ÏÄÎÏ É ÄÏÌÖÎÏ ÂÙÔØ ËÌÀÞÏÍ",
-"%-.64s: îÁ Ó×ÑÚÉ!\n",
-"%-.64s: îÏÒÍÁÌØÎÏÅ ÚÁ×ÅÒÛÅÎÉÅ\n",
-"%-.64s: ðÏÌÕÞÅÎ ÓÉÇÎÁÌ %d. õÍÙ×ÁÀ ÒÕËÉ!\n",
-"%-.64s: ïÔËÌÀÞÅÎÉÅ ×ÙÐÏÌÎÅÎÏ\n",
-"%-.64s: ðÒÉÎÕÄÉÔÅÌØÎÏÅ ÐÒÅËÒÁÝÅÎÉÅ ÎÉÔÉ %ld ÐÏÌØÚÏ×ÁÔÅÌÑ: '%-.64s'\n",
-"îÅ ÍÏÇÕ ÓÏÚÄÁÔØ IP socket",
-"ôÁÂÌÉÃÁ '%-.64s' ÉÍÅÅÔ ÉÎÄÅËÓ, ÎÅ ÓÏ×ÐÁÄÁÀÝÉÊ Ó ÕËÁÚÁÎÎÙÍ × CREATE INDEX. óÏÚÄÁÊÔÅ ÔÁÂÌÉÃÕ ÅÝÅ ÒÁÚ",
-"òÁÚÄÅÌÉÔÅÌÉ ÐÏÌÅÊ ÎÅ ÓÏ×ÐÁÄÁÀÔ Ó ÏÖÉÄÁÅÍÙÍÉ. ðÒÏÞÔÉÔÅ ÎÁËÏÎÅà ÉÎÓÔÒÕËÃÉÀ!",
-"îÅÌØÚÑ ÓÓÙÌÁÔØÓÑ ÎÁ ÆÉËÓÉÒÏ×ÁÎÎÕÀ ÄÌÉÎÕ ÓÔÒÏËÉ × BLOB. éÓÐÏÌØÚÕÊÔÅ 'fields terminated by'.",
-"æÁÊÌ '%-.64s' ÄÏÌÖÅÎ ÂÙÔØ × ËÁÔÁÌÏÇÅ ÂÁÚ ÌÉÂÏ ÄÏÓÔÕÐÅÎ ×ÓÅÍ ÄÌÑ ÞÔÅÎÉÑ",
-"æÁÊÌ '%-.64s' ÕÖÅ ÅÓÔØ",
+"óÔÏÌÂÅÃ '%-.64s' × %-.64s ÚÁÄÁÎ ÎÅÏÄÎÏÚÎÁÞÎÏ",
+"óÅÒ×ÅÒ ÎÁÈÏÄÉÔÓÑ × ÐÒÏÃÅÓÓÅ ÏÓÔÁÎÏ×ËÉ",
+"îÅÉÚ×ÅÓÔÎÙÊ ÓÔÏÌÂÅà '%-.64s' × '%-.64s'",
+"'%-.64s' ÎÅ ÐÒÉÓÕÔÓÔ×ÕÅÔ × GROUP BY",
+"îÅ×ÏÚÍÏÖÎÏ ÐÒÏÉÚ×ÅÓÔÉ ÇÒÕÐÐÉÒÏ×ËÕ ÐÏ '%-.64s'",
+"÷ÙÒÁÖÅÎÉÅ ÓÏÄÅÒÖÉÔ ÇÒÕÐÐÏ×ÙÅ ÆÕÎËÃÉÉ É ÓÔÏÌÂÃÙ, ÎÏ ÎÅ ×ËÌÀÞÁÅÔ GROUP BY. á ËÁË ×Ù ÕÍÕÄÒÉÌÉÓØ ÐÏÌÕÞÉÔØ ÜÔÏ ÓÏÏÂÝÅÎÉÅ Ï ÏÛÉÂËÅ?",
+"ëÏÌÉÞÅÓÔ×Ï ÓÔÏÌÂÃÏ× ÎÅ ÓÏ×ÐÁÄÁÅÔ Ó ËÏÌÉÞÅÓÔ×ÏÍ ÚÎÁÞÅÎÉÊ",
+"óÌÉÛËÏÍ ÄÌÉÎÎÙÊ ÉÄÅÎÔÉÆÉËÁÔÏÒ '%-.100s'",
+"äÕÂÌÉÒÕÀÝÅÅÓÑ ÉÍÑ ÓÔÏÌÂÃÁ '%-.64s'",
+"äÕÂÌÉÒÕÀÝÅÅÓÑ ÉÍÑ ËÌÀÞÁ '%-.64s'",
+"äÕÂÌÉÒÕÀÝÁÑÓÑ ÚÁÐÉÓØ '%-.64s' ÐÏ ËÌÀÞÕ %d",
+"îÅËÏÒÒÅËÔÎÙÊ ÏÐÒÅÄÅÌÉÔÅÌØ ÓÔÏÌÂÃÁ ÄÌÑ ÓÔÏÌÂÃÁ '%-.64s'",
+"%s ÏËÏÌÏ '%-.80s' ÎÁ ÓÔÒÏËÅ %d",
+"úÁÐÒÏÓ ÏËÁÚÁÌÓÑ ÐÕÓÔÙÍ",
+"ðÏ×ÔÏÒÑÀÝÁÑÓÑ ÔÁÂÌÉÃÁ/ÐÓÅ×ÄÏÎÉÍ '%-.64s'",
+"îÅËÏÒÒÅËÔÎÏÅ ÚÎÁÞÅÎÉÅ ÐÏ ÕÍÏÌÞÁÎÉÀ ÄÌÑ '%-.64s'",
+"õËÁÚÁÎÏ ÎÅÓËÏÌØËÏ ÐÅÒ×ÉÞÎÙÈ ËÌÀÞÅÊ",
+"õËÁÚÁÎÏ ÓÌÉÛËÏÍ ÍÎÏÇÏ ËÌÀÞÅÊ. òÁÚÒÅÛÁÅÔÓÑ ÕËÁÚÙ×ÁÔØ ÎÅ ÂÏÌÅÅ %d ËÌÀÞÅÊ",
+"õËÁÚÁÎÏ ÓÌÉÛËÏÍ ÍÎÏÇÏ ÞÁÓÔÅÊ ÓÏÓÔÁ×ÎÏÇÏ ËÌÀÞÁ. òÁÚÒÅÛÁÅÔÓÑ ÕËÁÚÙ×ÁÔØ ÎÅ ÂÏÌÅÅ %d ÞÁÓÔÅÊ",
+"õËÁÚÁÎ ÓÌÉÛËÏÍ ÄÌÉÎÎÙÊ ËÌÀÞ. íÁËÓÉÍÁÌØÎÁÑ ÄÌÉÎÁ ËÌÀÞÁ ÓÏÓÔÁ×ÌÑÅÔ %d",
+"ëÌÀÞÅ×ÏÊ ÓÔÏÌÂÅà '%-.64s' × ÔÁÂÌÉÃÅ ÎÅ ÓÕÝÅÓÔ×ÕÅÔ",
+"óÔÏÌÂÅà ÔÉÐÁ BLOB '%-.64s' ÎÅ ÍÏÖÅÔ ÂÙÔØ ÉÓÐÏÌØÚÏ×ÁÎ ËÁË ÚÎÁÞÅÎÉÅ ËÌÀÞÁ × ÔÁÂÌÉÃÅ ÔÁËÏÇÏ ÔÉÐÁ",
+"óÌÉÛËÏÍ ÂÏÌØÛÁÑ ÄÌÉÎÁ ÓÔÏÌÂÃÁ '%-.64s' (ÍÁËÓÉÍÕÍ = %d). éÓÐÏÌØÚÕÊÔÅ ÔÉÐ BLOB ×ÍÅÓÔÏ ÔÅËÕÝÅÇÏ",
+"îÅËÏÒÒÅËÔÎÏÅ ÏÐÒÅÄÅÌÅÎÉÅ ÔÁÂÌÉÃÙ: ÍÏÖÅÔ ÓÕÝÅÓÔ×Ï×ÁÔØ ÔÏÌØËÏ ÏÄÉÎ Á×ÔÏÉÎËÒÅÍÅÎÔÎÙÊ ÓÔÏÌÂÅÃ, É ÏÎ ÄÏÌÖÅÎ ÂÙÔØ ÏÐÒÅÄÅÌÅÎ ËÁË ËÌÀÞ",
+"%s: çÏÔÏ× ÐÒÉÎÉÍÁÔØ ÓÏÅÄÉÎÅÎÉÑ.\n÷ÅÒÓÉÑ: '%s' ÓÏËÅÔ: '%s' ÐÏÒÔ: %d\n",
+"%s: ëÏÒÒÅËÔÎÁÑ ÏÓÔÁÎÏ×ËÁ\n",
+"%s: ðÏÌÕÞÅÎ ÓÉÇÎÁÌ %d. ðÒÅËÒÁÝÁÅÍ!\n",
+"%s: ïÓÔÁÎÏ×ËÁ ÚÁ×ÅÒÛÅÎÁ\n",
+"%s: ðÒÉÎÕÄÉÔÅÌØÎÏ ÚÁËÒÙ×ÁÅÍ ÐÏÔÏË %ld ÐÏÌØÚÏ×ÁÔÅÌÑ: '%-.32s'\n",
+"îÅ×ÏÚÍÏÖÎÏ ÓÏÚÄÁÔØ IP-ÓÏËÅÔ",
+"÷ ÔÁÂÌÉÃÅ '%-.64s' ÎÅÔ ÔÁËÏÇÏ ÉÎÄÅËÓÁ, ËÁË × CREATE INDEX. óÏÚÄÁÊÔÅ ÔÁÂÌÉÃÕ ÚÁÎÏ×Ï",
+"áÒÇÕÍÅÎÔ ÒÁÚÄÅÌÉÔÅÌÑ ÐÏÌÅÊ - ÎÅ ÔÏÔ, ËÏÔÏÒÙÊ ÏÖÉÄÁÌÓÑ. ïÂÒÁÝÁÊÔÅÓØ Ë ÄÏËÕÍÅÎÔÁÃÉÉ",
+"æÉËÓÉÒÏ×ÁÎÎÙÊ ÒÁÚÍÅÒ ÚÁÐÉÓÉ Ó ÐÏÌÑÍÉ ÔÉÐÁ BLOB ÉÓÐÏÌØÚÏ×ÁÔØ ÎÅÌØÚÑ. ðÒÉÍÅÎÑÊÔÅ 'fields terminated by'.",
+"æÁÊÌ '%-.64s' ÄÏÌÖÅÎ ÎÁÈÏÄÉÔØÓÑ × ÔÏÍ ÖÅ ËÁÔÁÌÏÇÅ, ÞÔÏ É ÂÁÚÁ ÄÁÎÎÙÈ, ÉÌÉ ÂÙÔØ ÏÂÝÅÄÏÓÔÕÐÎÙÍ ÄÌÑ ÞÔÅÎÉÑ",
+"æÁÊÌ '%-.80s' ÕÖÅ ÓÕÝÅÓÔ×ÕÅÔ",
"úÁÐÉÓÅÊ: %ld õÄÁÌÅÎÏ: %ld ðÒÏÐÕÝÅÎÏ: %ld ðÒÅÄÕÐÒÅÖÄÅÎÉÊ: %ld",
-"úÁÐÉÓÅÊ: %ld äÕÂÌÅÊ: %ld",
-"îÅ×ÅÒÎÁÑ ÓÏÓÔÁ×ÌÑÀÝÁÑ ËÌÀÞÁ. äÁÎÎÁÑ ÓÏÓÔÁ×ÌÑÀÝÁÑ ÌÉÂÏ ÎÅ ÓÔÒÏËÏ×ÁÑ, ÌÉÂÏ ÂÏÌØÛÅ, ÞÅÍ ÍÏÖÅÔ ÂÙÔØ",
-"îÅÌØÚÑ ÕÄÁÌÉÔØ ×ÓÅ ÐÏÌÑ ÞÅÒÅÚ ALTER TABLE. ÷ÏÓÐÏÌØÚÕÊÔÅÓØ DROP TABLE",
-"îÅ ÍÏÇÕ ÓÂÒÏÓÉÔØ '%-.64s'. ðÒÏ×ÅÒØÔÅ, ÞÔÏ ÜÔÏ ÐÏÌÅ/ËÌÀÞ ÓÕÝÅÓÔ×ÕÀÔ",
-"úÁÐÉÓÅÊ: %ld äÕÂÌÅÊ: %ld ðÒÅÄÕÐÒÅÖÄÅÎÉÊ: %ld",
-"÷Ù ÎÅ ÍÏÖÅÔÅ ÕËÁÚÁÔØ ÉÚÍÅÎÅÑÍÕÀ ÔÁÂÌÉÃÕ '%-.64s' × ÓÐÉÓËÅ ÔÁÂÌÉÃ FROM",
-"îÅÉÚ×ÅÓÔÎÁÑ ÎÉÔØ: %lu",
-"÷Ù ÎÅ ×ÌÁÄÅÌÅà ÎÉÔÉ %lu",
-"ôÁÂÌÉÃÙ ÎÅ ÉÓÐÏÌØÚÏ×ÁÎÙ",
-"ïÞÅÎØ ÍÎÏÇÏ ÓÔÒÏË ÄÌÑ ÐÏÌÑ %-.64s É SET",
-"îÅ ÍÏÇÕ ÓÏÚÄÁÔØ ÕÎÉËÁÌØÎÙÊ ÌÏÇ-ÆÁÊÌ %-.64s.(1-999)\n",
-"ôÁÂÌÉÃÁ '%-.64s' ÚÁÂÌÏËÉÒÏ×ÁÎÁ READ É ÎÅ ÍÏÖÅÔ ÂÙÔØ ÏÂÎÏ×ÌÅÎÁ",
-"ôÁÂÌÉÃÁ '%-.64s' ÎÅ ÂÙÌÁ ÂÌÏËÉÒÏ×ÁÎÁ LOCK TABLES",
-"ïÂßÅËÔ BLOB '%-.64s' ÎÅ ÍÏÖÅÔ ÉÍÅÅÔ ÚÎÁÞÅÎÉÊ ÐÏ ÕÍÏÌÞÁÎÉÀ",
-"îÅÄÏÐÕÓÔÉÍÏÅ ÉÍÑ ÂÁÚÙ '%-.64s'",
-"îÅÄÏÐÕÓÔÉÍÏÅ ÉÍÑ ÔÁÂÌÉÃÙ '%-.64s'",
-"SELECT ÏÂÒÁÂÏÔÁÅÔ ÏÞÅÎØ ÍÎÏÇÏ ÚÁÐÉÓÅÊ É ÜÔÏ îáäïìçï. ðÒÏ×ÅÒØÔÅ ÕÓÌÏ×ÉÅ WHERE É ×ÏÓÐÏÌØÚÕÊÔÅÓØ SQL_OPTION BIG_SELECTS=1 ÅÓÌÉ SELECT ËÏÒÒÅËÔÅÎ",
+"úÁÐÉÓÅÊ: %ld äÕÂÌÉËÁÔÏ×: %ld",
+"îÅËÏÒÒÅËÔÎÁÑ ÞÁÓÔØ ËÌÀÞÁ. éÓÐÏÌØÚÕÅÍÁÑ ÞÁÓÔØ ËÌÀÞÁ ÎÅ Ñ×ÌÑÅÔÓÑ ÓÔÒÏËÏÊ, ÕËÁÚÁÎÎÁÑ ÄÌÉÎÁ ÂÏÌØÛÅ, ÞÅÍ ÄÌÉÎÁ ÞÁÓÔÉ ËÌÀÞÁ, ÉÌÉ ÏÂÒÁÂÏÔÞÉË ÔÁÂÌÉÃÙ ÎÅ ÐÏÄÄÅÒÖÉ×ÁÅÔ ÕÎÉËÁÌØÎÙÅ ÞÁÓÔÉ ËÌÀÞÁ",
+"îÅÌØÚÑ ÕÄÁÌÉÔØ ×ÓÅ ÓÔÏÌÂÃÙ Ó ÐÏÍÏÝØÀ ALTER TABLE. éÓÐÏÌØÚÕÊÔÅ DROP TABLE",
+"îÅ×ÏÚÍÏÖÎÏ ÕÄÁÌÉÔØ (DROP) '%-.64s'. õÂÅÄÉÔÅÓØ ÞÔÏ ÓÔÏÌÂÅÃ/ËÌÀÞ ÄÅÊÓÔ×ÉÔÅÌØÎÏ ÓÕÝÅÓÔ×ÕÅÔ",
+"úÁÐÉÓÅÊ: %ld äÕÂÌÉËÁÔÏ×: %ld ðÒÅÄÕÐÒÅÖÄÅÎÉÊ: %ld",
+"îÅ ÄÏÐÕÓËÁÅÔÓÑ ÕËÁÚÁÎÉÅ ÔÁÂÌÉÃÙ '%-.64s' × ÓÐÉÓËÅ ÔÁÂÌÉà FROM ÄÌÑ ×ÎÅÓÅÎÉÑ × ÎÅÅ ÉÚÍÅÎÅÎÉÊ",
+"îÅÉÚ×ÅÓÔÎÙÊ ÎÏÍÅÒ ÐÏÔÏËÁ: %lu",
+"÷Ù ÎÅ Ñ×ÌÑÅÔÅÓØ ×ÌÁÄÅÌØÃÅÍ ÐÏÔÏËÁ %lu",
+"îÉËÁËÉÅ ÔÁÂÌÉÃÙ ÎÅ ÉÓÐÏÌØÚÏ×ÁÎÙ",
+"óÌÉÛËÏÍ ÍÎÏÇÏ ÚÎÁÞÅÎÉÊ ÄÌÑ ÓÔÏÌÂÃÁ %-.64s × SET",
+"îÅ×ÏÚÍÏÖÎÏ ÓÏÚÄÁÔØ ÕÎÉËÁÌØÎÏÅ ÉÍÑ ÆÁÊÌÁ ÖÕÒÎÁÌÁ %-.64s.(1-999)\n",
+"ôÁÂÌÉÃÁ '%-.64s' ÚÁÂÌÏËÉÒÏ×ÁÎÁ ÕÒÏ×ÎÅÍ READ lock É ÎÅ ÍÏÖÅÔ ÂÙÔØ ÉÚÍÅÎÅÎÁ",
+"ôÁÂÌÉÃÁ '%-.64s' ÎÅ ÂÙÌÁ ÚÁÂÌÏËÉÒÏ×ÁÎÁ Ó ÐÏÍÏÝØÀ LOCK TABLES",
+"îÅ×ÏÚÍÏÖÎÏ ÕËÁÚÙ×ÁÔØ ÚÎÁÞÅÎÉÅ ÐÏ ÕÍÏÌÞÁÎÉÀ ÄÌÑ ÓÔÏÌÂÃÁ BLOB '%-.64s'",
+"îÅËÏÒÒÅËÔÎÏÅ ÉÍÑ ÂÁÚÙ ÄÁÎÎÙÈ '%-.100s'",
+"îÅËÏÒÒÅËÔÎÏÅ ÉÍÑ ÔÁÂÌÉÃÙ '%-.100s'",
+"äÌÑ ÔÁËÏÊ ×ÙÂÏÒËÉ SELECT ÄÏÌÖÅÎ ÂÕÄÅÔ ÐÒÏÓÍÏÔÒÅÔØ ÓÌÉÛËÏÍ ÍÎÏÇÏ ÚÁÐÉÓÅÊ É, ×ÉÄÉÍÏ, ÜÔÏ ÚÁÊÍÅÔ ÏÞÅÎØ ÍÎÏÇÏ ×ÒÅÍÅÎÉ. ðÒÏ×ÅÒØÔÅ ×ÁÛÅ ÕËÁÚÁÎÉÅ WHERE, É, ÅÓÌÉ × ÎÅÍ ×ÓÅ × ÐÏÒÑÄËÅ, ÕËÁÖÉÔÅ SET OPTION SQL_BIG_SELECTS=1",
"îÅÉÚ×ÅÓÔÎÁÑ ÏÛÉÂËÁ",
-"îÅÉÚ×ÅÓÔÎÁÑ ÐÒÏÃÅÄÕÒÁ %-.64s",
-"îÅ×ÅÒÎÏÅ ËÏÌÉÞÅÓÔ×Ï ÐÁÒÁÍÅÔÒÏ× × ×ÙÚÏ×Å %-.64s",
-"îÅ×ÅÒÎÙÅ ÐÁÒÁÍÅÔÒÙ × ÐÒÏÃÅÄÕÒÅ %-.64s",
-"îÅÉÚ×ÅÓÔÎÁÑ ÔÁÂÌÉÃÁ '%-.64s' × %-.64s",
-"ðÏÌÅ '%-.64s' ÏÂßÑ×ÌÅÎÎÏ Ä×ÁÖÄÙ",
-"îÅ×ÅÒÎÏÅ ÉÓÐÏÌØÚÏ×ÁÎÉÅ ÇÒÕÐÐÏ×ÏÊ ÆÕÎËÃÉÉ",
-"ôÁÂÌÉÃÁ '%-.64s' ÉÓÐÏÌØÚÕÅÔ ÒÁÓÛÉÒÅÎÉÅ, ÎÅ ÓÕÝÅÓÔ×ÕÀÝÅÅ × ÄÁÎÎÏÊ ×ÅÒÓÉÉ MySQL",
-"÷ ÔÁÂÌÉÃÅ ÄÏÌÖÎÏ ÂÙÔØ ÈÏÔÑ ÂÙ ÏÄÎÏ ÐÏÌÅ",
+"îÅÉÚ×ÅÓÔÎÁÑ ÐÒÏÃÅÄÕÒÁ '%-.64s'",
+"îÅËÏÒÒÅËÔÎÏÅ ËÏÌÉÞÅÓÔ×Ï ÐÁÒÁÍÅÔÒÏ× ÄÌÑ ÐÒÏÃÅÄÕÒÙ '%-.64s'",
+"îÅËÏÒÒÅËÔÎÙÅ ÐÁÒÁÍÅÔÒÙ ÄÌÑ ÐÒÏÃÅÄÕÒÙ '%-.64s'",
+"îÅÉÚ×ÅÓÔÎÁÑ ÔÁÂÌÉÃÁ '%-.64s' × %-.32s",
+"óÔÏÌÂÅà '%-.64s' ÕËÁÚÁÎ Ä×ÁÖÄÙ",
+"îÅÐÒÁ×ÉÌØÎÏÅ ÉÓÐÏÌØÚÏ×ÁÎÉÅ ÇÒÕÐÐÏ×ÙÈ ÆÕÎËÃÉÊ",
+"÷ ÔÁÂÌÉÃÅ '%-.64s' ÉÓÐÏÌØÚÕÀÔÓÑ ×ÏÚÍÏÖÎÏÓÔÉ, ÎÅ ÐÏÄÄÅÒÖÉ×ÁÅÍÙÅ × ÜÔÏÊ ×ÅÒÓÉÉ MySQL",
+"÷ ÔÁÂÌÉÃÅ ÄÏÌÖÅÎ ÂÙÔØ ËÁË ÍÉÎÉÍÕÍ ÏÄÉÎ ÓÔÏÌÂÅÃ",
"ôÁÂÌÉÃÁ '%-.64s' ÐÅÒÅÐÏÌÎÅÎÁ",
-"îÅÉÚ×ÅÓÔÎÙÊ ÎÁÂÏÒ ÓÉÍ×ÏÌÏ×: '%-.64s'",
-"óÌÉÛËÏÍ ÍÎÏÇÏ ÔÁÂÌÉÃ. MySQL ÍÏÖÅÔ ÉÓÐÏÌØÚÏ×ÁÔØ ÔÏÌØËÏ %d ÔÁÂÌÉÃ × ÏÂßÅÄÉÎÅÎÉÉ",
-"óÌÉÛËÏÍ ÍÎÏÇÏ ÐÏÌÅÊ",
-"óÌÉÛËÏÍ ÂÏÌØÛÏÊ ÒÁÚÍÅÒ ÚÁÐÉÓÉ. íÁËÓÉÍÁÌØÎÙÊ ÒÁÚÍÅÒ ÚÁÐÉÓÉ - %d, ÎÅ ÓÞÉÔÁÑ blob. úÁÍÅÎÉÔÅ ÎÅËÏÔÏÒÙÅ ÐÏÌÑ ÎÁ blob",
-"ðÅÒÅÐÏÌÎÅÎÉÅ ÎÉÔÅ×ÏÇÏ ÓÔÅËÁ: éÓÐÏÌØÚÏ×ÁÎÏ %ld ÉÚ %ld. åÓÌÉ ÎÅÏÂÈÏÄÉÍÏ, ÉÓÐÏÌØÚÕÊÔÅ 'mysqld -O thread_stack=#' ÞÔÏÂÙ Õ×ÅÌÉÞÉÔØ ÒÁÚÍÅÒ ÓÔÅËÁ",
-"ðÅÒÅËÒÅÓÔÎÁÑ ÚÁ×ÉÓÉÍÏÓÔØ × OUTER JOIN. ðÒÏ×ÅÒØÔÅ ÕÓÌÏ×ÉÑ ON",
-"ðÏÌÅ '%-.32s' ÉÓÐÏÌØÚÕÅÔÓÑ ËÁË UNIQUE ÉÌÉ INDEX ÎÏ ÎÅ ÏÐÒÅÄÅÌÅÎÏ ËÁË NOT NULL",
-"îÅ ÍÏÇÕ ÚÁÇÒÕÚÉÔØ ÆÕÎËÃÉÀ '%-.64s'",
-"îÅ ÍÏÇÕ ÉÎÉÃÉÁÌÉÚÉÒÏ×ÁÔØ ÆÕÎËÃÉÀ '%-.64s'; %-.80s",
-"îÅÌØÚÑ ÉÓÐÏÌØÚÏ×ÁÔØ ÐÕÔÉ ÄÌÑ ÒÁÚÄÅÌÑÅÍÙÈ ÂÉÂÌÉÏÔÅË",
+"îÅÉÚ×ÅÓÔÎÁÑ ËÏÄÉÒÏ×ËÁ '%-.64s'",
+"óÌÉÛËÏÍ ÍÎÏÇÏ ÔÁÂÌÉÃ. MySQL ÍÏÖÅÔ ÉÓÐÏÌØÚÏ×ÁÔØ ÔÏÌØËÏ %d ÔÁÂÌÉÃ × ÓÏÅÄÉÎÅÎÉÉ",
+"óÌÉÛËÏÍ ÍÎÏÇÏ ÓÔÏÌÂÃÏ×",
+"óÌÉÛËÏÍ ÂÏÌØÛÏÊ ÒÁÚÍÅÒ ÚÁÐÉÓÉ. íÁËÓÉÍÁÌØÎÙÊ ÒÁÚÍÅÒ ÓÔÒÏËÉ, ÉÓËÌÀÞÁÑ ÐÏÌÑ BLOB, - %d. ÷ÏÚÍÏÖÎÏ, ×ÁÍ ÓÌÅÄÕÅÔ ÉÚÍÅÎÉÔØ ÔÉÐ ÎÅËÏÔÏÒÙÈ ÐÏÌÅÊ ÎÁ BLOB",
+"óÔÅË ÐÏÔÏËÏ× ÐÅÒÅÐÏÌÎÅÎ: ÉÓÐÏÌØÚÏ×ÁÎÏ: %ld ÉÚ %ld ÓÔÅËÁ. ðÒÉÍÅÎÑÊÔÅ 'mysqld -O thread_stack=#' ÄÌÑ ÕËÁÚÁÎÉÑ ÂÏÌØÛÅÇÏ ÒÁÚÍÅÒÁ ÓÔÅËÁ, ÅÓÌÉ ÎÅÏÂÈÏÄÉÍÏ",
+"÷ OUTER JOIN ÏÂÎÁÒÕÖÅÎÁ ÐÅÒÅËÒÅÓÔÎÁÑ ÚÁ×ÉÓÉÍÏÓÔØ. ÷ÎÉÍÁÔÅÌØÎÏ ÐÒÏÁÎÁÌÉÚÉÒÕÊÔÅ Ó×ÏÉ ÕÓÌÏ×ÉÑ ON",
+"óÔÏÌÂÅÃ '%-.64s' ÉÓÐÏÌØÚÕÅÔÓÑ × UNIQUE ÉÌÉ × INDEX, ÎÏ ÎÅ ÏÐÒÅÄÅÌÅÎ ËÁË NOT NULL",
+"îÅ×ÏÚÍÏÖÎÏ ÚÁÇÒÕÚÉÔØ ÆÕÎËÃÉÀ '%-.64s'",
+"îÅ×ÏÚÍÏÖÎÏ ÉÎÉÃÉÁÌÉÚÉÒÏ×ÁÔØ ÆÕÎËÃÉÀ '%-.64s'; %-.80s",
+"îÅÄÏÐÕÓÔÉÍÏ ÕËÁÚÙ×ÁÔØ ÐÕÔÉ ÄÌÑ ÄÉÎÁÍÉÞÅÓËÉÈ ÂÉÂÌÉÏÔÅË",
"æÕÎËÃÉÑ '%-.64s' ÕÖÅ ÓÕÝÅÓÔ×ÕÅÔ",
-"îÅ ÍÏÇÕ ÏÔËÒÙÔØ ÒÁÚÄÅÌÑÅÍÕÀ ÂÉÂÌÉÏÔÅËÕ '%-.64s' (ïÛÉÂËÁ: %d %-.64s)",
-"îÅ ÍÏÇÕ ÎÁÊÔÉ ÆÕÎËÃÉÀ '%-.64s' × ÂÉÂÌÉÏÔÅËÅ'",
+"îÅ×ÏÚÍÏÖÎÏ ÏÔËÒÙÔØ ÄÉÎÁÍÉÞÅÓËÕÀ ÂÉÂÌÉÏÔÅËÕ '%-.64s' (ÏÛÉÂËÁ: %d %-.64s)",
+"îÅ×ÏÚÍÏÖÎÏ ÏÔÙÓËÁÔØ ÆÕÎËÃÉÀ '%-.64s' × ÂÉÂÌÉÏÔÅËÅ",
"æÕÎËÃÉÑ '%-.64s' ÎÅ ÏÐÒÅÄÅÌÅÎÁ",
-"èÏÓÔ '%-.64s' ÚÁÂÌÏËÉÒÏ×ÁÎ ÉÚ-ÚÁ ÏÂÉÌÉÑ ÏÛÉÂÏË ÓÏÅÄÉÎÅÎÉÑ. òÁÚÂÌÏËÉÒÏ×ÁÔØ ÍÏÖÎÏ Ó ÐÏÍÏÝØÀ 'mysqladmin flush-hosts'",
-"èÏÓÔÕ '%-.64s' ÎÅ ÒÁÚÒÅÛÅÎÏ ÓÏÅÄÉÎÑÔØÓÑ Ó ÄÁÎÎÙÍ ÓÅÒ×ÅÒÏÍ MySQL",
-"÷Ù ÐÏÄËÌÀÞÅÎÙ Ë MySQL ËÁË ÁÎÏÎÉÍÎÙÊ ÐÏÌØÚÏ×ÁÔÅÌØ É ÷ÁÍ ÎÅ ÒÁÚÒÅÛÅÎÏ ÉÚÍÅÎÑÔØ ÐÁÒÏÌÉ",
-"÷Ù ÄÏÌÖÎÙ ÉÍÅÔØ ÐÒÁ×Á ÎÁ ÏÂÎÏ×ÌÅÎÉÅ ÔÁÂÌÉÃ × ÂÁÚÅ, ÞÔÏÂÙ ÉÚÍÅÎÉÔØ ÐÁÒÏÌØ ÄÒÕÇÉÍ ÐÏÌØÚÏ×ÁÔÅÌÑÍ",
-"îÅ ÍÏÇÕ ÎÁÊÔÉ ÎÉ ÏÄÎÏÇÏ ÓÏÏÔ×ÅÔÓÔ×ÉÑ × ÔÁÂÌÉÃÅ ÐÏÌØÚÏ×ÁÔÅÌÅÊ",
-"óÏÏÔ×ÅÔÓÔ×ÕÀÝÉÈ ÚÁÐÉÓÅÊ: %ld éÚÍÅÎÅÎÏ: %ld ðÒÅÄÕÐÒÅÖÄÅÎÉÊ: %ld",
-"îÅ ÍÏÇÕ ÓÏÚÄÁÔØ ÎÏ×ÕÀ ÎÉÔØ (ÏÛÉÂËÁ %d). åÓÌÉ ÜÔÏ ÎÅ ÉÚ-ÚÁ ÎÅÈ×ÁÔËÉ ÐÁÍÑÔÉ, ÐÏÓÍÏÔÒÉÔÅ × ÒÕËÏ×ÏÄÓÔ×Å ×ÏÚÍÏÖÎÙÅ OS-ÚÁ×ÉÓÉÍÙÅ ÇÌÀËÉ",
-"þÉÓÌÏ ÓÔÏÌÂÃÏ× ÎÅ ÓÏÏÔ×ÅÔÓÔ×ÕÅÔ ÞÉÓÌÕ ÚÎÁÞÅÎÉÊ × ÓÔÒÏËÅ %ld",
-"îÅ ÍÏÇÕ ÚÁÎÏ×Ï ÏÔËÒÙÔØ ÔÁÂÌÉÃÕ: '%-.64s",
-"îÅÐÒÁ×ÉÌØÎÏÅ ÉÓÐÏÌØÚÏ×ÁÎÉÅ ÚÎÁÞÅÎÉÑ NULL",
-"REGEXP ×ÅÒÎÕÌ ÏÛÉÂËÕ '%-.64s'",
-"éÓÐÏÌØÚÏ×ÁÎÉÅ ÁÇÒÅÇÁÔÎÙÈ ÆÕÎËÃÉÊ (MIN(),MAX(),COUNT()...) ÓÏ×ÍÅÓÔÎÏ Ó ÏÂÙÞÎÙÍÉ ÚÎÁÞÅÎÉÑÍÉ ×ÏÚÍÏÖÎÏ ÔÏÌØËÏ ÐÒÉ ÎÁÌÉÞÉÉ ÒÁÚÄÅÌÁ GROUP BY",
-"äÌÑ ÐÏÌØÚÏ×ÁÔÅÌÑ '%-.32s' Ó ÈÏÓÔÁ '%-.64s' ÐÒÉ×ÉÌÅÇÉÉ ÎÅ ÏÐÒÅÄÅÌÅÎÙ",
-"%-.16s ËÏÍÁÎÄÁ ÎÅ ÒÁÚÒÅÛÅÎÁ ÐÏÌØÚÏ×ÁÔÅÌÀ: '%-.32s@%-.64s' ÄÌÑ ÔÁÂÌÉÃÙ '%-.64s'",
-"%-.16s ËÏÍÁÎÄÁ ÎÅ ÒÁÚÒÅÛÅÎÁ ÐÏÌØÚÏ×ÁÔÅÌÀ: '%-.32s@%-.64s'\n ÄÌÑ ÐÏÌÑ '%-.64s' ÉÚ ÔÁÂÌÉÃÙ '%-.64s'",
-"úÁÄÁÎÙ ÎÅ×ÅÒÎÙÅ ÐÒÉ×ÉÌÅÇÉÉ ÄÌÑ ÔÁÂÌÉÃÙ",
-"éÍÑ ÈÏÓÔÁ ÉÌÉ ÐÏÌØÚÏ×ÁÔÅÌÑ ÓÌÉÛËÏÍ ×ÅÌÉËÏ ÄÌÑ ÔÁÂÌÉÃÙ ÐÒÉ×ÉÌÅÇÉÊ",
+"èÏÓÔ '%-.64s' ÚÁÂÌÏËÉÒÏ×ÁÎ ÉÚ-ÚÁ ÓÌÉÛËÏÍ ÂÏÌØÛÏÇÏ ËÏÌÉÞÅÓÔ×Á ÏÛÉÂÏË ÓÏÅÄÉÎÅÎÉÑ. òÁÚÂÌÏËÉÒÏ×ÁÔØ ÅÇÏ ÍÏÖÎÏ Ó ÐÏÍÏÝØÀ 'mysqladmin flush-hosts'",
+"èÏÓÔÕ '%-.64s' ÎÅ ÒÁÚÒÅÛÁÅÔÓÑ ÐÏÄËÌÀÞÁÔØÓÑ Ë ÜÔÏÍÕ ÓÅÒ×ÅÒÕ MySQL",
+"÷Ù ÉÓÐÏÌØÚÕÅÔÅ MySQL ÏÔ ÉÍÅÎÉ ÁÎÏÎÉÍÎÏÇÏ ÐÏÌØÚÏ×ÁÔÅÌÑ, Á ÁÎÏÎÉÍÎÙÍ ÐÏÌØÚÏ×ÁÔÅÌÑÍ ÎÅ ÒÁÚÒÅÛÁÅÔÓÑ ÍÅÎÑÔØ ÐÁÒÏÌÉ",
+"äÌÑ ÔÏÇÏ ÞÔÏÂÙ ÉÚÍÅÎÑÔØ ÐÁÒÏÌÉ ÄÒÕÇÉÈ ÐÏÌØÚÏ×ÁÔÅÌÅÊ, Õ ×ÁÓ ÄÏÌÖÎÙ ÂÙÔØ ÐÒÉ×ÉÌÅÇÉÉ ÎÁ ÉÚÍÅÎÅÎÉÅ ÔÁÂÌÉÃ × ÂÁÚÅ ÄÁÎÎÙÈ mysql",
+"îÅ×ÏÚÍÏÖÎÏ ÏÔÙÓËÁÔØ ÐÏÄÈÏÄÑÝÕÀ ÚÁÐÉÓØ × ÔÁÂÌÉÃÅ ÐÏÌØÚÏ×ÁÔÅÌÅÊ",
+"óÏ×ÐÁÌÏ ÚÁÐÉÓÅÊ: %ld éÚÍÅÎÅÎÏ: %ld ðÒÅÄÕÐÒÅÖÄÅÎÉÊ: %ld",
+"îÅ×ÏÚÍÏÖÎÏ ÓÏÚÄÁÔØ ÎÏ×ÙÊ ÐÏÔÏË (ÏÛÉÂËÁ %d). åÓÌÉ ÜÔÏ ÎÅ ÓÉÔÕÁÃÉÑ, Ó×ÑÚÁÎÎÁÑ Ó ÎÅÈ×ÁÔËÏÊ ÐÁÍÑÔÉ, ÔÏ ×ÁÍ ÓÌÅÄÕÅÔ ÉÚÕÞÉÔØ ÄÏËÕÍÅÎÔÁÃÉÀ ÎÁ ÐÒÅÄÍÅÔ ÏÐÉÓÁÎÉÑ ×ÏÚÍÏÖÎÏÊ ÏÛÉÂËÉ ÒÁÂÏÔÙ × ËÏÎËÒÅÔÎÏÊ ïó",
+"ëÏÌÉÞÅÓÔ×Ï ÓÔÏÌÂÃÏ× ÎÅ ÓÏ×ÐÁÄÁÅÔ Ó ËÏÌÉÞÅÓÔ×ÏÍ ÚÎÁÞÅÎÉÊ × ÚÁÐÉÓÉ %ld",
+"îÅ×ÏÚÍÏÖÎÏ ÚÁÎÏ×Ï ÏÔËÒÙÔØ ÔÁÂÌÉÃÕ '%-.64s'",
+"îÅÐÒÁ×ÉÌØÎÏÅ ÉÓÐÏÌØÚÏ×ÁÎÉÅ ×ÅÌÉÞÉÎÙ NULL",
+"ðÏÌÕÞÅÎÁ ÏÛÉÂËÁ '%-.64s' ÏÔ ÒÅÇÕÌÑÒÎÏÇÏ ×ÙÒÁÖÅÎÉÑ",
+"ïÄÎÏ×ÒÅÍÅÎÎÏÅ ÉÓÐÏÌØÚÏ×ÁÎÉÅ ÓÇÒÕÐÐÉÒÏ×ÁÎÎÙÈ (GROUP) ÓÔÏÌÂÃÏ× (MIN(),MAX(),COUNT(),...) Ó ÎÅÓÇÒÕÐÐÉÒÏ×ÁÎÎÙÍÉ ÓÔÏÌÂÃÁÍÉ Ñ×ÌÑÅÔÓÑ ÎÅËÏÒÒÅËÔÎÙÍ, ÅÓÌÉ × ×ÙÒÁÖÅÎÉÉ ÅÓÔØ GROUP BY",
+"ôÁËÉÅ ÐÒÁ×Á ÎÅ ÏÐÒÅÄÅÌÅÎÙ ÄÌÑ ÐÏÌØÚÏ×ÁÔÅÌÑ '%-.32s' ÎÁ ÈÏÓÔÅ '%-.64s'",
+"ëÏÍÁÎÄÁ %-.16s ÚÁÐÒÅÝÅÎÁ ÐÏÌØÚÏ×ÁÔÅÌÀ '%-.32s@%-.64s' ÄÌÑ ÔÁÂÌÉÃÙ '%-.64s'",
+"ëÏÍÁÎÄÁ %-.16s ÚÁÐÒÅÝÅÎÁ ÐÏÌØÚÏ×ÁÔÅÌÀ '%-.32s@%-.64s' ÄÌÑ ÓÔÏÌÂÃÁ '%-.64s' × ÔÁÂÌÉÃÅ '%-.64s'",
+"îÅ×ÅÒÎÁÑ ËÏÍÁÎÄÁ GRANT ÉÌÉ REVOKE. ïÂÒÁÔÉÔÅÓØ Ë ÄÏËÕÍÅÎÔÁÃÉÉ, ÞÔÏÂÙ ×ÙÑÓÎÉÔØ, ËÁËÉÅ ÐÒÉ×ÉÌÅÇÉÉ ÍÏÖÎÏ ÉÓÐÏÌØÚÏ×ÁÔØ",
+"óÌÉÛËÏÍ ÄÌÉÎÎÏÅ ÉÍÑ ÐÏÌØÚÏ×ÁÔÅÌÑ/ÈÏÓÔÁ ÄÌÑ GRANT",
"ôÁÂÌÉÃÁ '%-.64s.%-.64s' ÎÅ ÓÕÝÅÓÔ×ÕÅÔ",
-"ðÒÉ×ÉÌÅÇÉÉ ÐÏÌØÚÏ×ÁÔÅÌÑ '%-.32s' Ó ÈÏÓÔÁ '%-.64s' ÄÌÑ ÔÁÂÌÉÃÙ '%-.64s' ÎÅ ÏÐÒÅÄÅÌÅÎÙ",
-"äÁÎÎÁÑ ËÏÍÁÎÄÁ ÎÅ ÐÏÄÄÅÒÖÉ×ÁÅÔÓÑ ÜÔÏÊ ×ÅÒÓÉÅÊ MySQL",
-"ëÁËÁÑ-ÔÏ ÓÉÎÔÁËÓÉÞÅÓËÁÑ ÏÛÉÂËÁ",
-"ðÏÔÏË ÄÌÑ delayed insert ÎÅ ÍÏÖÅÔ ÐÏÌÕÞÉÔØ ÂÌÏËÉÒÏ×ËÕ ÄÌÑ ÔÁÂÌÉÃÙ %-.64s",
-"éÓÐÏÌØÚÕÅÔÓÑ ÓÌÉÛËÏÍ ÍÎÏÇÏ delayed ÐÏÔÏËÏ×",
-"ðÒÅÒ×ÁÎÎÁÑ Ó×ÑÚØ %ld Ó ÂÁÚÏÊ ÄÁÎÎÙÈ: '%-.64s' ÐÏÌØÚÏ×ÁÔÅÌØ: '%-.64s' (%-.64s)",
-"ðÁËÅÔ ÂÏÌØÛÅ ÞÅÍ 'max_allowed_packet'",
-"ïÛÉÂËÁ ÞÔÅÎÉÑ ÉÚ ÔÒÕÂÙ ËÏÎÎÅËÔÁ",
-"fcntl() ×ÅÒÎÕÌ ÏÛÉÂËÕ",
-"ðÏÌÕÞÅÎ ÐÁËÅÔ × ÎÅÐÒÁ×ÉÌØÎÏÍ ÐÏÒÑÄËÅ",
-"îÅ ÍÏÇÕ ÒÁÓÐÁËÏ×ÁÔØ ÐÁËÅÔ",
-"ïÛÉÂËÁ ÐÒÉ ÞÔÅÎÉÉ ÐÁËÅÔÏ×",
-"ôÁÊÍÁÕÔ ÐÒÉ ÞÔÅÎÉÉ ÐÁËÅÔÏ×",
-"ïÛÉÂËÁ ÐÒÉ ÏÔÐÒÁ×ËÅ ÐÁËÅÔÏ×",
-"ïÛÉÂËÁ ÐÒÉ ÏÔÐÒÁ×ËÅ ÐÁËÅÔÏ×",
-"òÅÚÕÌØÔÉÒÕÀÝÁÑ ÓÔÒÏËÁ ÂÏÌØÛÅ ÞÅÍ max_allowed_packet",
-"éÓÐÏÌØÚÕÅÍÁÑ ÔÁÂÌÉÃÁ ÎÅ ÐÏÄÄÅÒÖÉ×ÁÅÔ ÐÏÌÑ BLOB/TEXT",
-"éÓÐÏÌØÚÕÅÍÁÑ ÔÁÂÌÉÃÁ ÎÅ ÐÏÄÄÅÒÖÉ×ÁÅÔ ÐÏÌÑ AUTO_INCREMENT",
-"INSERT DELAYED ÎÅ ÍÏÖÅÔ ÉÓÐÏÌØÚÏ×ÁÔØÓÑ Ó ÔÁÂÌÉÃÅÊ '%-.64s', ÏÎÁ ÚÁÎÑÔÁ ÉÓÐÏÌØÚÏ×ÁÎÉÅÍ LOCK TABLES",
-"îÅ×ÅÒÎÏÅ ÉÍÑ ÐÏÌÑ '%-.100s'",
-"ôÁÂÌÉÃÁ ÉÓÐÏÌØÚÕÅÍÏÇÏ ÔÉÐÁ ÎÅ ÍÏÖÅÔ ÉÎÄÅËÓÉÒÏ×ÁÔØ ÐÏÌÅ '%-.64s'",
+"ôÁËÉÅ ÐÒÁ×Á ÎÅ ÏÐÒÅÄÅÌÅÎÙ ÄÌÑ ÐÏÌØÚÏ×ÁÔÅÌÑ '%-.32s' ÎÁ ËÏÍÐØÀÔÅÒÅ '%-.64s' ÄÌÑ ÔÁÂÌÉÃÙ '%-.64s'",
+"üÔÁ ËÏÍÁÎÄÁ ÎÅ ÄÏÐÕÓËÁÅÔÓÑ × ÄÁÎÎÏÊ ×ÅÒÓÉÉ MySQL",
+"õ ×ÁÓ ÏÛÉÂËÁ × ÚÁÐÒÏÓÅ. éÚÕÞÉÔÅ ÄÏËÕÍÅÎÔÁÃÉÀ ÐÏ ÉÓÐÏÌØÚÕÅÍÏÊ ×ÅÒÓÉÉ MySQL ÎÁ ÐÒÅÄÍÅÔ ËÏÒÒÅËÔÎÏÇÏ ÓÉÎÔÁËÓÉÓÁ",
+"ðÏÔÏË, ÏÂÓÌÕÖÉ×ÁÀÝÉÊ ÏÔÌÏÖÅÎÎÕÀ ×ÓÔÁ×ËÕ (delayed insert), ÎÅ ÓÍÏÇ ÐÏÌÕÞÉÔØ ÚÁÐÒÁÛÉ×ÁÅÍÕÀ ÂÌÏËÉÒÏ×ËÕ ÎÁ ÔÁÂÌÉÃÕ %-.64s",
+"óÌÉÛËÏÍ ÍÎÏÇÏ ÐÏÔÏËÏ×, ÏÂÓÌÕÖÉ×ÁÀÝÉÈ ÏÔÌÏÖÅÎÎÕÀ ×ÓÔÁ×ËÕ (delayed insert)",
+"ðÒÅÒ×ÁÎÏ ÓÏÅÄÉÎÅÎÉÅ %ld Ë ÂÁÚÅ ÄÁÎÎÙÈ '%-.64s' ÐÏÌØÚÏ×ÁÔÅÌÑ '%-.32s' (%-.64s)",
+"ðÏÌÕÞÅÎÎÙÊ ÐÁËÅÔ ÂÏÌØÛÅ, ÞÅÍ 'max_allowed_packet'",
+"ðÏÌÕÞÅÎÁ ÏÛÉÂËÁ ÞÔÅÎÉÑ ÏÔ ÐÏÔÏËÁ ÓÏÅÄÉÎÅÎÉÑ (connection pipe)",
+"ðÏÌÕÞÅÎÁ ÏÛÉÂËÁ ÏÔ fcntl()",
+"ðÁËÅÔÙ ÐÏÌÕÞÅÎÙ × ÎÅ×ÅÒÎÏÍ ÐÏÒÑÄËÅ",
+"îÅ×ÏÚÍÏÖÎÏ ÒÁÓÐÁËÏ×ÁÔØ ÐÁËÅÔ, ÐÏÌÕÞÅÎÎÙÊ ÞÅÒÅÚ ËÏÍÍÕÎÉËÁÃÉÏÎÎÙÊ ÐÒÏÔÏËÏÌ",
+"ðÏÌÕÞÅÎÁ ÏÛÉÂËÁ × ÐÒÏÃÅÓÓÅ ÐÏÌÕÞÅÎÉÑ ÐÁËÅÔÁ ÞÅÒÅÚ ËÏÍÍÕÎÉËÁÃÉÏÎÎÙÊ ÐÒÏÔÏËÏÌ ",
+"ðÏÌÕÞÅÎ ÔÁÊÍÁÕÔ ÏÖÉÄÁÎÉÑ ÐÁËÅÔÁ ÞÅÒÅÚ ËÏÍÍÕÎÉËÁÃÉÏÎÎÙÊ ÐÒÏÔÏËÏÌ ",
+"ðÏÌÕÞÅÎÁ ÏÛÉÂËÁ ÐÒÉ ÐÅÒÅÄÁÞÅ ÐÁËÅÔÁ ÞÅÒÅÚ ËÏÍÍÕÎÉËÁÃÉÏÎÎÙÊ ÐÒÏÔÏËÏÌ ",
+"ðÏÌÕÞÅÎ ÔÁÊÍÁÕÔ × ÐÒÏÃÅÓÓÅ ÐÅÒÅÄÁÞÉ ÐÁËÅÔÁ ÞÅÒÅÚ ËÏÍÍÕÎÉËÁÃÉÏÎÎÙÊ ÐÒÏÔÏËÏÌ ",
+"òÅÚÕÌØÔÉÒÕÀÝÁÑ ÓÔÒÏËÁ ÂÏÌØÛÅ, ÞÅÍ 'max_allowed_packet'",
+"éÓÐÏÌØÚÕÅÍÁÑ ÔÁÂÌÉÃÁ ÎÅ ÐÏÄÄÅÒÖÉ×ÁÅÔ ÔÉÐÙ BLOB/TEXT",
+"éÓÐÏÌØÚÕÅÍÁÑ ÔÁÂÌÉÃÁ ÎÅ ÐÏÄÄÅÒÖÉ×ÁÅÔ Á×ÔÏÉÎËÒÅÍÅÎÔÎÙÅ ÓÔÏÌÂÃÙ",
+"îÅÌØÚÑ ÉÓÐÏÌØÚÏ×ÁÔØ INSERT DELAYED ÄÌÑ ÔÁÂÌÉÃÙ '%-.64s', ÐÏÔÏÍÕ ÞÔÏ ÏÎÁ ÚÁÂÌÏËÉÒÏ×ÁÎÁ Ó ÐÏÍÏÝØÀ LOCK TABLES",
+"îÅ×ÅÒÎÏÅ ÉÍÑ ÓÔÏÌÂÃÁ '%-.100s'",
+"éÓÐÏÌØÚÏ×ÁÎÎÙÊ ÏÂÒÁÂÏÔÞÉË ÔÁÂÌÉÃÙ ÎÅ ÍÏÖÅÔ ÐÒÏÉÎÄÅËÓÉÒÏ×ÁÔØ ÓÔÏÌÂÅà '%-.64s'",
"îÅ ×ÓÅ ÔÁÂÌÉÃÙ × MERGE ÏÐÒÅÄÅÌÅÎÙ ÏÄÉÎÁËÏ×Ï",
-"îÅ ÍÏÇÕ ÐÉÓÁÔØ × ÔÁÂÌÉÃÕ '%-.64s' ÉÚ-ÚÁ UNIQUE ÕÓÌÏ×ÉÊ",
-"ðÏÌÅ ÔÉÐÁ BLOB '%-.64s' × ÏÐÒÅÄÅÌÅÎÉÉ ÉÎÄÅËÓÁ ÂÅÚ ÕËÁÚÁÎÉÑ ÄÌÉÎÙ",
-"÷ÓÅ ÞÁÓÔÉ PRIMARY KEY ÄÏÌÖÎÙ ÂÙÔØ NOT NULL; ÅÓÌÉ NULL × ÉÎÄÅËÓÅ ÎÅÏÂÈÏÄÉÍ, ÉÓÐÏÌØÚÕÊÔÅ UNIQUE",
-"òÅÚÕÌØÔÁÔ ÓÏÄÅÒÖÉÔ ÂÏÌØÛÅ ÏÄÎÏÊ ÓÔÒÏËÉ",
-"ôÁÂÌÉÃÁ ÜÔÏÇÏ ÔÉÐÁ ÏÂÑÚÁÎÁ ÉÍÅÔØ PRIMARY KEY",
-"üÔÁ ËÏÐÉÑ MySQL ÓËÏÍÐÉÌÉÒÏ×ÁÎÁ ÂÅÚ ÐÏÄÄÅÒÖËÉ RAID",
-"MySQL ÒÁÂÏÔÁÅÔ × ÒÅÖÉÍÅ ÚÁÝÉÔÙ ÏÔ ÄÕÒÁËÏ× (safe_mode) - ÎÅ ÍÏÇÕ UPDATE ÂÅÚ WHERE Ó ËÁËÉÍ-ÎÅÂÕÄØ KEY",
-"éÎÄÅËÓ '%-.64s' ÎÅ ÎÁÊÄÅÎ × ÔÁÂÌÉÃÅ '%-.64s'",
-"îÅ ÍÏÇÕ ÏÔËÒÙÔØ ÔÁÂÌÉÃÕ",
-"äÁÎÎÙÊ ÔÉÐ ÔÁÂÌÉà ÎÅ ÐÏÄÄÅÒÖÉ×ÁÅÔ ËÏÍÁÎÄÕ %s",
-"üÔÁ ËÏÍÁÎÄÁ ×ÎÕÔÒÉ ÔÒÁÎÚÁËÃÉÉ ÚÁÐÒÅÝÅÎÁ",
-"ïÛÉÂËÁ %d ×Ï ×ÒÅÍÑ COMMIT",
-"ïÛÉÂËÁ %d ×Ï ×ÒÅÍÑ ROLLBACK",
-"ïÛÉÂËÁ %d ×Ï ×ÒÅÍÑ FLUSH_LOGS",
-"ïÛÉÂËÁ %d ×Ï ×ÒÅÍÑ CHECKPOINT",
-"ðÒÅÒ×ÁÎÎÏÅ ÓÏÅÄÉÎÅÎÉÅ %ld Ë ÂÁÚÅ ÄÁÎÎÙÈ: '%-.64s' ÐÏÌØÚÏ×ÁÔÅÌØ: '%-.32s' ÈÏÓÔ: `%-.64s' (%-.64s)",
-"üÔÏÔ ÔÉÐ ÔÁÂÌÉà ÎÅ ÐÏÄÄÅÒÖÉ×ÁÅÔ binary table dump",
-"òÅÐÌÉËÁÃÉÏÎÎÙÊ ÌÏÇ ÚÁËÒÙÔ, ÎÅ ÍÏÇÕ ÓÄÅÌÁÔØ RESET MASTER",
-"ïÛÉÂËÁ ÐÒÉ ×ÏÓÓÔÁÎÏ×ÌÅÎÉÉ ÉÎÄÅËÓÁ ÐÅÒÅËÁÞÁÎÎÏÊ ÔÁÂÌÉÃÙ '%-.64s'",
-"ïÛÉÂËÁ ÎÁ ÍÁÓÔÅÒÅ: '%-.64s'",
-"óÅÔÅ×ÁÑ ÏÛÉÂËÁ ÐÒÉ ÞÔÅÎÉÉ Ó ÍÁÓÔÅÒÁ",
-"óÅÔÅ×ÁÑ ÏÛÉÂËÁ ÐÒÉ ÐÉÓÁÎÉÉ ÍÁÓÔÅÒÕ",
-"FULLTEXT ÉÎÄÅËÓ, ÓÏÏÔ×ÅÔÓÔ×ÕÀÝÉÊ ÚÁÄÁÎÎÏÍÕ ÓÐÉÓËÕ ÓÔÏÌÂÃÏ×, ÎÅ ÎÁÊÄÅÎ",
-"îÅ ÍÏÇÕ ×ÙÐÏÌÎÉÔØ ËÏÍÍÁÎÄÕ ÉÚ-ÚÁ ÁËÔÉ×ÎÙÈ locked ÔÁÂÌÉà ÉÌÉ ÁËÔÉ×ÎÏÊ ÔÒÁÎÚÁËÃÉÉ",
+"îÅ×ÏÚÍÏÖÎÏ ÚÁÐÉÓÁÔØ × ÔÁÂÌÉÃÕ '%-.64s' ÉÚ-ÚÁ ÏÇÒÁÎÉÞÅÎÉÊ ÕÎÉËÁÌØÎÏÇÏ ËÌÀÞÁ",
+"óÔÏÌÂÅÃ ÔÉÐÁ BLOB '%-.64s' ÂÙÌ ÕËÁÚÁÎ × ÏÐÒÅÄÅÌÅÎÉÉ ËÌÀÞÁ ÂÅÚ ÕËÁÚÁÎÉÑ ÄÌÉÎÙ ËÌÀÞÁ",
+"÷ÓÅ ÞÁÓÔÉ ÐÅÒ×ÉÞÎÏÇÏ ËÌÀÞÁ (PRIMARY KEY) ÄÏÌÖÎÙ ÂÙÔØ ÏÐÒÅÄÅÌÅÎÙ ËÁË NOT NULL; åÓÌÉ ×ÁÍ ÎÕÖÎÁ ÐÏÄÄÅÒÖËÁ ×ÅÌÉÞÉÎ NULL × ËÌÀÞÅ, ×ÏÓÐÏÌØÚÕÊÔÅÓØ ÉÎÄÅËÓÏÍ UNIQUE",
+"÷ ÒÅÚÕÌØÔÁÔÅ ×ÏÚ×ÒÁÝÅÎÁ ÂÏÌÅÅ ÞÅÍ ÏÄÎÁ ÓÔÒÏËÁ",
+"üÔÏÔ ÔÉÐ ÔÁÂÌÉÃÙ ÔÒÅÂÕÅÔ ÏÐÒÅÄÅÌÅÎÉÑ ÐÅÒ×ÉÞÎÏÇÏ ËÌÀÞÁ",
+"üÔÁ ×ÅÒÓÉÑ MySQL ÓËÏÍÐÉÌÉÒÏ×ÁÎÁ ÂÅÚ ÐÏÄÄÅÒÖËÉ RAID",
+"÷Ù ÒÁÂÏÔÁÅÔÅ × ÒÅÖÉÍÅ ÂÅÚÏÐÁÓÎÙÈ ÏÂÎÏ×ÌÅÎÉÊ (safe update mode) É ÐÏÐÒÏÂÏ×ÁÌÉ ÉÚÍÅÎÉÔØ ÔÁÂÌÉÃÕ ÂÅÚ ÉÓÐÏÌØÚÏ×ÁÎÉÑ ËÌÀÞÅ×ÏÇÏ ÓÔÏÌÂÃÁ × ÞÁÓÔÉ WHERE",
+"ëÌÀÞ '%-.64s' ÎÅ ÓÕÝÅÓÔ×ÕÅÔ × ÔÁÂÌÉÃÅ '%-.64s'",
+"îÅ×ÏÚÍÏÖÎÏ ÏÔËÒÙÔØ ÔÁÂÌÉÃÕ",
+"ïÂÒÁÂÏÔÞÉË ÔÁÂÌÉÃÙ ÎÅ ÐÏÄÄÅÒÖÉ×ÁÅÔ ÜÔÏÇÏ: %s",
+"÷ÁÍ ÎÅ ÒÁÚÒÅÛÅÎÏ ×ÙÐÏÌÎÑÔØ ÜÔÕ ËÏÍÁÎÄÕ × ÔÒÁÎÚÁËÃÉÉ",
+"ðÏÌÕÞÅÎÁ ÏÛÉÂËÁ %d × ÐÒÏÃÅÓÓÅ COMMIT",
+"ðÏÌÕÞÅÎÁ ÏÛÉÂËÁ %d × ÐÒÏÃÅÓÓÅ ROLLBACK",
+"ðÏÌÕÞÅÎÁ ÏÛÉÂËÁ %d × ÐÒÏÃÅÓÓÅ FLUSH_LOGS",
+"ðÏÌÕÞÅÎÁ ÏÛÉÂËÁ %d × ÐÒÏÃÅÓÓÅ CHECKPOINT",
+"ðÒÅÒ×ÁÎÏ ÓÏÅÄÉÎÅÎÉÅ %ld Ë ÂÁÚÅ ÄÁÎÎÙÈ '%-.64s' ÐÏÌØÚÏ×ÁÔÅÌÑ '%-.32s' Ó ÈÏÓÔÁ `%-.64s' (%-.64s)",
+"ïÂÒÁÂÏÔÞÉË ÜÔÏÊ ÔÁÂÌÉÃÙ ÎÅ ÐÏÄÄÅÒÖÉ×ÁÅÔ Ä×ÏÉÞÎÏÇÏ ÓÏÈÒÁÎÅÎÉÑ ÏÂÒÁÚÁ ÔÁÂÌÉÃÙ (dump)",
+"ä×ÏÉÞÎÙÊ ÖÕÒÎÁÌ ÏÂÎÏ×ÌÅÎÉÑ ÚÁËÒÙÔ, ÎÅ×ÏÚÍÏÖÎÏ ×ÙÐÏÌÎÉÔØ RESET MASTER",
+"ïÛÉÂËÁ ÐÅÒÅÓÔÒÏÊËÉ ÉÎÄÅËÓÁ ÓÏÈÒÁÎÅÎÎÏÊ ÔÁÂÌÉÃÙ '%-.64s'",
+"ïÛÉÂËÁ ÏÔ ÇÏÌÏ×ÎÏÇÏ ÓÅÒ×ÅÒÁ: '%-.64s'",
+"÷ÏÚÎÉËÌÁ ÏÛÉÂËÁ ÞÔÅÎÉÑ × ÐÒÏÃÅÓÓÅ ËÏÍÍÕÎÉËÁÃÉÉ Ó ÇÏÌÏ×ÎÙÍ ÓÅÒ×ÅÒÏÍ",
+"÷ÏÚÎÉËÌÁ ÏÛÉÂËÁ ÚÁÐÉÓÉ × ÐÒÏÃÅÓÓÅ ËÏÍÍÕÎÉËÁÃÉÉ Ó ÇÏÌÏ×ÎÙÍ ÓÅÒ×ÅÒÏÍ",
+"îÅ×ÏÚÍÏÖÎÏ ÏÔÙÓËÁÔØ ÐÏÌÎÏÔÅËÓÔÏ×ÙÊ (FULLTEXT) ÉÎÄÅËÓ, ÓÏÏÔ×ÅÔÓÔ×ÕÀÝÉÊ ÓÐÉÓËÕ ÓÔÏÌÂÃÏ×",
+"îÅ×ÏÚÍÏÖÎÏ ×ÙÐÏÌÎÉÔØ ÕËÁÚÁÎÎÕÀ ËÏÍÁÎÄÕ, ÐÏÓËÏÌØËÕ Õ ×ÁÓ ÐÒÉÓÕÔÓÔ×ÕÀÔ ÁËÔÉ×ÎÏ ÚÁÂÌÏËÉÒÏ×ÁÎÎÙÅ ÔÁÂÌÉÃÁ ÉÌÉ ÏÔËÒÙÔÁÑ ÔÒÁÎÚÁËÃÉÑ",
"îÅÉÚ×ÅÓÔÎÁÑ ÓÉÓÔÅÍÎÁÑ ÐÅÒÅÍÅÎÎÁÑ '%-.64s'",
-"ôÁÂÌÉÃÁ '%-.64s' ÐÏÍÅÞÅÎÁ ËÁË ÉÓÐÏÒÞÅÎÎÁÑ É ÄÏÌÖÎÁ ÂÙÔØ ÉÓÐÒÁ×ÌÅÎÁ",
-"ôÁÂÌÉÃÁ '%-.64s' ÐÏÍÅÞÅÎÁ ËÁË ÉÓÐÏÒÞÅÎÎÁÑ É ÐÏÓÌÅÄÎÑÑ ÐÏÐÙÔËÁ ÉÓÐÒÁ×ÌÅÎÉÑ (Á×ÔÏÍÁÔÉÞÅÓËÁÑ?) ÎÅ ÕÄÁÌÁÓØ",
-"ðÒÅÄÕÐÒÅÖÄÅÎÉÅ: ÎÅËÏÔÏÒÙÅ ÎÅÔÒÁÎÚÁËÃÉÏÎÎÙÅ ÔÁÂÌÉÃÙ ÎÅ ÐÏÄÞÉÎÑÀÔÓÑ ROLLBACK",
-"íÎÏÇÏÚÁÐÒÏÓÎÁÑ ÔÒÁÎÚÁËÃÉÑ ÔÒÅÂÕÅÔ Õ×ÅÌÉÞÅÎÉÑ 'max_binlog_cache_size' - Õ×ÅÌÉÞÔÅ ÜÔÕ ÐÅÒÅÍÅÎÎÕÀ É ÐÏÐÒÏÂÕÊÔÅ ÅÝÅ ÒÁÚ",
-"üÔÁ ÏÐÅÒÁÃÉÑ ÎÅ×ÏÚÍÏÖÎÁ Ó ÁËÔÉ×ÎÙÍ slave, ÎÁÄÏ STOP SLAVE",
-"üÔÁ ÏÐÅÒÁÃÉÑ ÎÅ×ÏÚÍÏÖÎÁ Ó ÐÁÓÓÉ×ÎÙÍ slave, ÎÁÄÏ START SLAVE",
-"üÔÏÔ ÓÅÒ×ÅÒ ÎÅ slave, ÉÓÐÒÁ×ØÔÅ × ËÏÎÆÉÇÕÒÁÃÉÏÎÎÏÍ ÆÁÊÌÅ ÉÌÉ ËÏÍÍÁÎÄÏÊ CHANGE MASTER TO",
-"îÅ ÐÏÌÕÞÉÌÏÓØ ÉÎÉÃÉÁÌÉÚÉÒÏ×ÁÔØ ÓÔÒÕËÔÕÒÕ master info, ÐÒÏ×ÅÒÔÅ persmissions ÎÁ ÆÁÊÌÅ master.info",
-"îÅ ÍÏÇÕ ÓÏÚÄÁÔØ ÐÒÏÃÅÓÓ SLAVE, ÐÒÏ×ÅÒØÔÅ ÓÉÓÔÅÍÎÙÅ ÒÅÓÕÒÓÙ",
+"ôÁÂÌÉÃÁ '%-.64s' ÐÏÍÅÞÅÎÁ ËÁË ÉÓÐÏÒÞÅÎÎÁÑ É ÄÏÌÖÎÁ ÐÒÏÊÔÉ ÐÒÏ×ÅÒËÕ É ÒÅÍÏÎÔ",
+"ôÁÂÌÉÃÁ '%-.64s' ÐÏÍÅÞÅÎÁ ËÁË ÉÓÐÏÒÞÅÎÎÁÑ É ÐÏÓÌÅÄÎÉÊ (Á×ÔÏÍÁÔÉÞÅÓËÉÊ?) ÒÅÍÏÎÔ ÎÅ ÂÙÌ ÕÓÐÅÛÎÙÍ",
+"÷ÎÉÍÁÎÉÅ: ÐÏ ÎÅËÏÔÏÒÙÍ ÉÚÍÅÎÅÎÎÙÍ ÎÅÔÒÁÎÚÁËÃÉÏÎÎÙÍ ÔÁÂÌÉÃÁÍ ÎÅ×ÏÚÍÏÖÎÏ ÂÕÄÅÔ ÐÒÏÉÚ×ÅÓÔÉ ÏÔËÁÔ ÔÒÁÎÚÁËÃÉÉ",
+"ôÒÁÎÚÁËÃÉÉ, ×ËÌÀÞÁÀÝÅÊ ÂÏÌØÛÏÅ ËÏÌÉÞÅÓÔ×Ï ËÏÍÁÎÄ, ÐÏÔÒÅÂÏ×ÁÌÏÓØ ÂÏÌÅÅ ÞÅÍ 'max_binlog_cache_size' ÂÁÊÔ. õ×ÅÌÉÞØÔÅ ÜÔÕ ÐÅÒÅÍÅÎÎÕÀ ÓÅÒ×ÅÒÁ mysqld É ÐÏÐÒÏÂÕÊÔÅ ÅÝÅ ÒÁÚ",
+"üÔÕ ÏÐÅÒÁÃÉÀ ÎÅ×ÏÚÍÏÖÎÏ ×ÙÐÏÌÎÉÔØ ÐÒÉ ÒÁÂÏÔÁÀÝÅÍ ÐÏÔÏËÅ ÐÏÄÞÉÎÅÎÎÏÇÏ ÓÅÒ×ÅÒÁ. óÎÁÞÁÌÁ ×ÙÐÏÌÎÉÔÅ STOP SLAVE",
+"äÌÑ ÜÔÏÊ ÏÐÅÒÁÃÉÉ ÔÒÅÂÕÅÔÓÑ ÒÁÂÏÔÁÀÝÉÊ ÐÏÄÞÉÎÅÎÎÙÊ ÓÅÒ×ÅÒ. óÎÁÞÁÌÁ ×ÙÐÏÌÎÉÔÅ START SLAVE",
+"üÔÏÔ ÓÅÒ×ÅÒ ÎÅ ÎÁÓÔÒÏÅÎ ËÁË ÐÏÄÞÉÎÅÎÎÙÊ. ÷ÎÅÓÉÔÅ ÉÓÐÒÁ×ÌÅÎÉÑ × ËÏÎÆÉÇÕÒÁÃÉÏÎÎÏÍ ÆÁÊÌÅ ÉÌÉ Ó ÐÏÍÏÝØÀ CHANGE MASTER TO",
+"îÅ×ÏÚÍÏÖÎÏ ÉÎÉÃÉÁÌÉÚÉÒÏ×ÁÔØ ÓÔÒÕËÔÕÒÕ ÄÌÑ ÉÎÆÏÒÍÁÃÉÉ Ï ÇÏÌÏ×ÎÏÍ ÓÅÒ×ÅÒÅ. ðÒÏ×ÅÒØÔÅ ÐÒÁ×Á ÎÁ ÆÁÊÌ master.info",
+"îÅ×ÏÚÍÏÖÎÏ ÓÏÚÄÁÔØ ÐÏÔÏË ÐÏÄÞÉÎÅÎÎÏÇÏ ÓÅÒ×ÅÒÁ. ðÒÏ×ÅÒØÔÅ ÓÉÓÔÅÍÎÙÅ ÒÅÓÕÒÓÙ",
"õ ÐÏÌØÚÏ×ÁÔÅÌÑ %-.64s ÕÖÅ ÂÏÌØÛÅ ÞÅÍ 'max_user_connections' ÁËÔÉ×ÎÙÈ ÓÏÅÄÉÎÅÎÉÊ",
-"íÏÖÎÏ ÉÓÐÏÌØÚÏ×ÁÔØ ÔÏÌØËÏ ×ÙÒÁÖÅÎÉÅ-ËÏÎÓÔÁÎÔÕ ÓÏ×ÍÅÓÔÎÏ Ó SET",
-"ôÁÊÍÁÕÔ ÏÖÉÄÁÎÉÑ ÂÌÏËÉÒÏ×ËÉ",
-"ïÂÝÅÅ ËÏÌÉÞÅÓÔ×Ï ÂÌÏËÉÒÏ×ÏË ÐÒÅ×ÙÓÉÌÏ ÒÁÚÍÅÒ ÔÁÂÌÉÃÙ ÂÌÏËÉÒÏ×ÏË",
-"âÌÏËÉÒÏ×ËÁ ÉÚÍÅÎÅÎÉÑ ÎÅ ÍÏÖÅÔ ÂÙÔØ ÐÏÌÕÞÅÎÁ ×Ï ×ÒÅÍÑ READ UNCOMMITTED ÔÒÁÎÚÁËÃÉÉ",
-"DROP DATABASE ÚÁÐÒÅÝÅÎ ×Ï ×ÒÅÍÑ ÇÌÏÂÁÌØÎÏÊ ÂÌÏËÉÒÏ×ËÉ ÞÔÅÎÉÑ",
-"CREATE DATABASE ÚÁÐÒÅÝÅÎ ×Ï ×ÒÅÍÑ ÇÌÏÂÁÌØÎÏÊ ÂÌÏËÉÒÏ×ËÉ ÞÔÅÎÉÑ",
-"îÅÐÒÁ×ÉÌØÎÙÅ ÁÒÇÕÍÅÔÎÙ Õ %s",
-"%-.32s@%-.64s ÎÅ ÉÍÅÅÔ ÐÒÉ×ÉÌÅÇÉÊ ÓÏÚÄÁ×ÁÔØ ÎÏ×ÙÈ ÐÏÌØÚÏ×ÁÔÅÌÅÊ",
-"îÅ×ÅÒÎÏÅ ÏÐÒÅÄÅÌÅÎÉÅ ÔÁÂÌÉÃÙ; ÷ÓÅ MERGE-ÔÁÂÌÉÃÙ ÄÏÌÖÎÙ ÂÙÔØ × ÏÄÎÏÊ ÂÁÚÅ ÄÁÎÎÙÈ",
-"ïÂÎÁÒÕÖÅÎ deadlock ×Ï ×ÒÅÍÑ ÐÏÌÕÞÅÎÉÑ ÂÌÏËÉÒÏ×ËÉ; ðÏÐÒÏÂÕÊÔÅ ÐÅÒÅÚÁÐÕÓÔÉÔØ ÔÒÁÎÚÁËÃÉÀ",
-"ôÁÂÌÉÃÁ ÄÁÎÎÏÇÏ ÔÉÐÁ ÎÅ ÍÏÖÅÔ ÉÍÅÔØ FULLTEXT ÉÎÄÅËÓÁ",
-"Cannot add foreign key constraint",
-"Cannot add a child row: a foreign key constraint fails",
-"Cannot delete a parent row: a foreign key constraint fails",
-"ïÛÉÂËÁ ÓÏÅÄÉÎÅÎÉÑ Ó master: %-.128s",
-"ïÛÉÂËÁ ×Ù×ÏÌÎÅÎÉÑ ÚÁÐÒÏÓÁ ÎÁ master: %-.128s",
-"ïÛÉÂËÁ ×ÙÐÏÌÎÅÎÉÑ ËÏÍÁÎÄÙ %s: %-.128s",
-"îÅÐÒÁ×ÉÌØÎÏÅ ÉÓÐÏÌØÚÏ×ÁÎÉÅ %s É %s",
-"éÓÐÏÌØÚÕÅÍÙÅ SELECT-×ÙÒÁÖÅÎÉÑ ÉÍÅÀÔ ÒÁÚÎÙÅ ËÏÌÉÞÅÓÔ×Á ÓÔÏÌÂÃÏ×",
-"îÅ×ÏÚÍÏÖÎÏ ×ÙÐÏÌÎÉÔØ ÚÁÐÒÏÓ ÉÚ-ÚÁ ËÏÎÆÌÉËÔÎÏÊ ÂÌÏËÉÒÏ×ËÉ ÞÔÅÎÉÑ",
-"ïÄÎÏ×ÒÅÍÅÎÎÏÅ ÉÓÐÏÌØÚÏ×ÁÎÉÅ transactional É non-transactional ÔÁÂÌÉà ÏÔËÌÀÞÅÎÏ",
-"ïÐÃÉÑ '%s' ÉÓÐÏÌØÚÏ×ÁÎÁ Ä×ÁÖÄÙ",
-"User '%-.64s' has exceeded the '%s' resource (current value: %ld)",
-"Access denied. You need the %-.128s privilege for this operation",
-"Variable '%-.64s' is a LOCAL variable and can't be used with SET GLOBAL",
-"Variable '%-.64s' is a GLOBAL variable and should be set with SET GLOBAL",
-"Variable '%-.64s' doesn't have a default value",
-"Variable '%-.64s' can't be set to the value of '%-.64s'",
-"Wrong argument type to variable '%-.64s'",
-"Variable '%-.64s' can only be set, not read",
-"Wrong usage/placement of '%s'",
-"This version of MySQL doesn't yet support '%s'",
-"Got fatal error %d: '%-.128s' from master when reading data from binary log",
+"÷Ù ÍÏÖÅÔÅ ÉÓÐÏÌØÚÏ×ÁÔØ × SET ÔÏÌØËÏ ËÏÎÓÔÁÎÔÎÙÅ ×ÙÒÁÖÅÎÉÑ",
+"ôÁÊÍÁÕÔ ÏÖÉÄÁÎÉÑ ÂÌÏËÉÒÏ×ËÉ ÉÓÔÅË; ÐÏÐÒÏÂÕÊÔÅ ÐÅÒÅÚÁÐÕÓÔÉÔØ ÔÒÁÎÚÁËÃÉÀ",
+"ïÂÝÅÅ ËÏÌÉÞÅÓÔ×Ï ÂÌÏËÉÒÏ×ÏË ÐÒÅ×ÙÓÉÌÏ ÒÁÚÍÅÒÙ ÔÁÂÌÉÃÙ ÂÌÏËÉÒÏ×ÏË",
+"âÌÏËÉÒÏ×ËÉ ÏÂÎÏ×ÌÅÎÉÊ ÎÅÌØÚÑ ÐÏÌÕÞÉÔØ × ÐÒÏÃÅÓÓÅ ÞÔÅÎÉÑ ÎÅ ÐÒÉÎÑÔÏÊ (× ÒÅÖÉÍÅ READ UNCOMMITTED) ÔÒÁÎÚÁËÃÉÉ",
+"îÅ ÄÏÐÕÓËÁÅÔÓÑ DROP DATABASE, ÐÏËÁ ÐÏÔÏË ÄÅÒÖÉÔ ÇÌÏÂÁÌØÎÕÀ ÂÌÏËÉÒÏ×ËÕ ÞÔÅÎÉÑ",
+"îÅ ÄÏÐÕÓËÁÅÔÓÑ CREATE DATABASE, ÐÏËÁ ÐÏÔÏË ÄÅÒÖÉÔ ÇÌÏÂÁÌØÎÕÀ ÂÌÏËÉÒÏ×ËÕ ÞÔÅÎÉÑ",
+"îÅ×ÅÒÎÙÅ ÐÁÒÁÍÅÔÒÙ ÄÌÑ %s",
+"%-.32s@%-.64s ÎÅ ÒÁÚÒÅÛÁÅÔÓÑ ÓÏÚÄÁ×ÁÔØ ÎÏ×ÙÈ ÐÏÌØÚÏ×ÁÔÅÌÅÊ",
+"îÅ×ÅÒÎÏÅ ÏÐÒÅÄÅÌÅÎÉÅ ÔÁÂÌÉÃÙ; ÷ÓÅ ÔÁÂÌÉÃÙ × MERGE ÄÏÌÖÎÙ ÐÒÉÎÁÄÌÅÖÁÔØ ÏÄÎÏÊ É ÔÏÊ ÖÅ ÂÁÚÅ ÄÁÎÎÙÈ",
+"÷ÏÚÎÉËÌÁ ÔÕÐÉËÏ×ÁÑ ÓÉÔÕÁÃÉÑ × ÐÒÏÃÅÓÓÅ ÐÏÌÕÞÅÎÉÑ ÂÌÏËÉÒÏ×ËÉ; ðÏÐÒÏÂÕÊÔÅ ÐÅÒÅÚÁÐÕÓÔÉÔØ ÔÒÁÎÚÁËÃÉÀ",
+"éÓÐÏÌØÚÕÅÍÙÊ ÔÉÐ ÔÁÂÌÉà ÎÅ ÐÏÄÄÅÒÖÉ×ÁÅÔ ÐÏÌÎÏÔÅËÓÔÏ×ÙÈ ÉÎÄÅËÓÏ×",
+"îÅ×ÏÚÍÏÖÎÏ ÄÏÂÁ×ÉÔØ ÏÇÒÁÎÉÞÅÎÉÑ ×ÎÅÛÎÅÇÏ ËÌÀÞÁ",
+"îÅ×ÏÚÍÏÖÎÏ ÄÏÂÁ×ÉÔØ ÉÌÉ ÏÂÎÏ×ÉÔØ ÄÏÞÅÒÎÀÀ ÓÔÒÏËÕ: ÐÒÏ×ÅÒËÁ ÏÇÒÁÎÉÞÅÎÉÊ ×ÎÅÛÎÅÇÏ ËÌÀÞÁ ÎÅ ×ÙÐÏÌÎÑÅÔÓÑ",
+"îÅ×ÏÚÍÏÖÎÏ ÕÄÁÌÉÔØ ÉÌÉ ÏÂÎÏ×ÉÔØ ÒÏÄÉÔÅÌØÓËÕÀ ÓÔÒÏËÕ: ÐÒÏ×ÅÒËÁ ÏÇÒÁÎÉÞÅÎÉÊ ×ÎÅÛÎÅÇÏ ËÌÀÞÁ ÎÅ ×ÙÐÏÌÎÑÅÔÓÑ",
+"ïÛÉÂËÁ ÓÏÅÄÉÎÅÎÉÑ Ó ÇÏÌÏ×ÎÙÍ ÓÅÒ×ÅÒÏÍ: %-.128s",
+"ïÛÉÂËÁ ×ÙÐÏÌÎÅÎÉÑ ÚÁÐÒÏÓÁ ÎÁ ÇÏÌÏ×ÎÏÍ ÓÅÒ×ÅÒÅ: %-.128s",
+"ïÛÉÂËÁ ÐÒÉ ×ÙÐÏÌÎÅÎÉÉ ËÏÍÁÎÄÙ %s: %-.128s",
+"îÅ×ÅÒÎÏÅ ÉÓÐÏÌØÚÏ×ÁÎÉÅ %s É %s",
+"éÓÐÏÌØÚÏ×ÁÎÎÙÅ ÏÐÅÒÁÔÏÒÙ ×ÙÂÏÒËÉ (SELECT) ÄÁÀÔ ÒÁÚÎÏÅ ËÏÌÉÞÅÓÔ×Ï ÓÔÏÌÂÃÏ×",
+"îÅ×ÏÚÍÏÖÎÏ ÉÓÐÏÌÎÉÔØ ÚÁÐÒÏÓ, ÐÏÓËÏÌØËÕ Õ ×ÁÓ ÕÓÔÁÎÏ×ÌÅÎÙ ËÏÎÆÌÉËÔÕÀÝÉÅ ÂÌÏËÉÒÏ×ËÉ ÞÔÅÎÉÑ",
+"éÓÐÏÌØÚÏ×ÁÎÉÅ ÔÒÁÎÚÁËÃÉÏÎÎÙÈ ÔÁÂÌÉà ÎÁÒÑÄÕ Ó ÎÅÔÒÁÎÚÁËÃÉÏÎÎÙÍÉ ÚÁÐÒÅÝÅÎÏ",
+"ïÐÃÉÑ '%s' Ä×ÁÖÄÙ ÉÓÐÏÌØÚÏ×ÁÎÁ × ×ÙÒÁÖÅÎÉÉ",
+"ðÏÌØÚÏ×ÁÔÅÌØ '%-.64s' ÐÒÅ×ÙÓÉÌ ÉÓÐÏÌØÚÏ×ÁÎÉÅ ÒÅÓÕÒÓÁ '%s' (ÔÅËÕÝÅÅ ÚÎÁÞÅÎÉÅ: %ld)",
+"÷ ÄÏÓÔÕÐÅ ÏÔËÁÚÁÎÏ. ÷ÁÍ ÎÕÖÎÙ ÐÒÉ×ÉÌÅÇÉÉ %-.128s ÄÌÑ ÜÔÏÊ ÏÐÅÒÁÃÉÉ",
+"ðÅÒÅÍÅÎÎÁÑ '%-.64s' Ñ×ÌÑÅÔÓÑ ÐÏÔÏËÏ×ÏÊ (LOCAL) ÐÅÒÅÍÅÎÎÏÊ É ÎÅ ÍÏÖÅÔ ÂÙÔØ ÉÚÍÅÎÅÎÁ Ó ÐÏÍÏÝØÀ SET GLOBAL",
+"ðÅÒÅÍÅÎÎÁÑ '%-.64s' Ñ×ÌÑÅÔÓÑ ÇÌÏÂÁÌØÎÏÊ (GLOBAL) ÐÅÒÅÍÅÎÎÏÊ, É ÅÅ ÓÌÅÄÕÅÔ ÉÚÍÅÎÑÔØ Ó ÐÏÍÏÝØÀ SET GLOBAL",
+"ðÅÒÅÍÅÎÎÁÑ '%-.64s' ÎÅ ÉÍÅÅÔ ÚÎÁÞÅÎÉÑ ÐÏ ÕÍÏÌÞÁÎÉÀ",
+"ðÅÒÅÍÅÎÎÁÑ '%-.64s' ÎÅ ÍÏÖÅÔ ÂÙÔØ ÕÓÔÁÎÏ×ÌÅÎÁ × ÚÎÁÞÅÎÉÅ '%-.64s'",
+"îÅ×ÅÒÎÙÊ ÔÉÐ ÁÒÇÕÍÅÎÔÁ ÄÌÑ ÐÅÒÅÍÅÎÎÏÊ '%-.64s'",
+"ðÅÒÅÍÅÎÎÁÑ '%-.64s' ÍÏÖÅÔ ÂÙÔØ ÔÏÌØËÏ ÕÓÔÁÎÏ×ÌÅÎÁ, ÎÏ ÎÅ ÓÞÉÔÁÎÁ",
+"îÅ×ÅÒÎÏÅ ÉÓÐÏÌØÚÏ×ÁÎÉÅ ÉÌÉ × ÎÅ×ÅÒÎÏÍ ÍÅÓÔÅ ÕËÁÚÁÎ '%s'",
+"üÔÁ ×ÅÒÓÉÑ MySQL ÐÏËÁ ÅÝÅ ÎÅ ÐÏÄÄÅÒÖÉ×ÁÅÔ '%s'",
+"ðÏÌÕÞÅÎÁ ÎÅÉÓÐÒÁ×ÉÍÁÑ ÏÛÉÂËÁ %d: '%-.128s' ÏÔ ÇÏÌÏ×ÎÏÇÏ ÓÅÒ×ÅÒÁ × ÐÒÏÃÅÓÓÅ ×ÙÂÏÒËÉ ÄÁÎÎÙÈ ÉÚ Ä×ÏÉÞÎÏÇÏ ÖÕÒÎÁÌÁ",
"Wrong foreign key definition for '%-.64s': %s",
"Key reference and table reference doesn't match",
"ïÛÉÂËÁ ÍÏÝØÎÏÓÔÉ ÍÎÏÖÅÓÔ×Á (ÂÏÌØÛÅ/ÍÅÎØÛÅ %d ËÏÌÏÎÏË)",
diff --git a/sql/slave.cc b/sql/slave.cc
index a5761f7b74e..6ab25959063 100644
--- a/sql/slave.cc
+++ b/sql/slave.cc
@@ -235,8 +235,6 @@ int init_relay_log_pos(RELAY_LOG_INFO* rli,const char* log,
DBUG_ENTER("init_relay_log_pos");
*errmsg=0;
- if (rli->log_pos_current) // TODO: When can this happen ?
- DBUG_RETURN(0);
pthread_mutex_t *log_lock=rli->relay_log.get_log_lock();
pthread_mutex_lock(log_lock);
if (need_data_lock)
@@ -298,7 +296,6 @@ int init_relay_log_pos(RELAY_LOG_INFO* rli,const char* log,
}
if (pos > BIN_LOG_HEADER_SIZE)
my_b_seek(rli->cur_log,(off_t)pos);
- rli->log_pos_current=1;
err:
pthread_cond_broadcast(&rli->data_cond);
@@ -361,17 +358,37 @@ int purge_relay_logs(RELAY_LOG_INFO* rli, THD *thd, bool just_reset,
{
int error=0;
DBUG_ENTER("purge_relay_logs");
+
+ /*
+ Even if rli->inited==0, we still try to empty rli->master_log_* variables.
+ Indeed, rli->inited==0 does not imply that they already are empty.
+ It could be that slave's info initialization partly succeeded :
+ for example if relay-log.info existed but *relay-bin*.*
+ have been manually removed, init_relay_log_info reads the old
+ relay-log.info and fills rli->master_log_*, then init_relay_log_info
+ checks for the existence of the relay log, this fails and
+ init_relay_log_info leaves rli->inited to 0.
+ In that pathological case, rli->master_log_pos* will be properly reinited
+ at the next START SLAVE (as RESET SLAVE or CHANGE
+ MASTER, the callers of purge_relay_logs, will delete bogus *.info files
+ or replace them with correct files), however if the user does SHOW SLAVE
+ STATUS before START SLAVE, he will see old, confusing rli->master_log_*.
+ In other words, we reinit rli->master_log_* for SHOW SLAVE STATUS
+ to display fine in any case.
+ */
+
+ rli->master_log_name[0]= 0;
+ rli->master_log_pos= 0;
+ rli->pending= 0;
+
if (!rli->inited)
- DBUG_RETURN(0); /* successfully do nothing */
+ DBUG_RETURN(0);
DBUG_ASSERT(rli->slave_running == 0);
DBUG_ASSERT(rli->mi->slave_running == 0);
rli->slave_skip_counter=0;
pthread_mutex_lock(&rli->data_lock);
- rli->pending=0;
- rli->master_log_name[0]=0;
- rli->master_log_pos=0; // 0 means uninitialized
if (rli->relay_log.reset_logs(thd))
{
*errmsg = "Failed during log reset";
@@ -385,7 +402,6 @@ int purge_relay_logs(RELAY_LOG_INFO* rli, THD *thd, bool just_reset,
rli->log_space_total= BIN_LOG_HEADER_SIZE;
rli->relay_log_pos= BIN_LOG_HEADER_SIZE;
rli->relay_log.reset_bytes_written();
- rli->log_pos_current=0;
if (!just_reset)
error= init_relay_log_pos(rli, rli->relay_log_name, rli->relay_log_pos,
0 /* do not need data lock */, errmsg);
@@ -421,9 +437,9 @@ int terminate_slave_threads(MASTER_INFO* mi,int thread_mask,bool skip_lock)
DBUG_PRINT("info",("Terminating IO thread"));
mi->abort_slave=1;
if ((error=terminate_slave_thread(mi->io_thd,io_lock,
- io_cond_lock,
- &mi->stop_cond,
- &mi->slave_running)) &&
+ io_cond_lock,
+ &mi->stop_cond,
+ &mi->slave_running)) &&
!force_all)
DBUG_RETURN(error);
}
@@ -463,12 +479,10 @@ int terminate_slave_thread(THD* thd, pthread_mutex_t* term_lock,
be referening freed memory trying to kick it
*/
THD_CHECK_SENTRY(thd);
- if (*slave_running)
+
+ while (*slave_running) // Should always be true
{
KICK_SLAVE(thd);
- }
- while (*slave_running)
- {
/*
There is a small chance that slave thread might miss the first
alarm. To protect againts it, resend the signal until it reacts
@@ -476,10 +490,6 @@ int terminate_slave_thread(THD* thd, pthread_mutex_t* term_lock,
struct timespec abstime;
set_timespec(abstime,2);
pthread_cond_timedwait(term_cond, cond_lock, &abstime);
- if (*slave_running)
- {
- KICK_SLAVE(thd);
- }
}
if (term_lock)
pthread_mutex_unlock(term_lock);
@@ -1225,7 +1235,6 @@ int init_relay_log_info(RELAY_LOG_INFO* rli, const char* info_fname)
rli->pending = 0;
rli->cur_log_fd = -1;
rli->slave_skip_counter=0;
- rli->log_pos_current=0;
rli->abort_pos_wait=0;
rli->skip_log_purge=0;
rli->log_space_limit = relay_log_space_limit;
@@ -1270,8 +1279,9 @@ int init_relay_log_info(RELAY_LOG_INFO* rli, const char* info_fname)
if (init_relay_log_pos(rli,NullS,BIN_LOG_HEADER_SIZE,0 /* no data lock */,
&msg))
goto err;
- rli->master_log_pos = 0; // uninitialized
- rli->info_fd = info_fd;
+ rli->master_log_name[0]= 0;
+ rli->master_log_pos= 0;
+ rli->info_fd= info_fd;
}
else // file exists
{
@@ -1660,7 +1670,7 @@ st_relay_log_info::st_relay_log_info()
cur_log_old_open_count(0), log_space_total(0),
slave_skip_counter(0), abort_pos_wait(0), slave_run_id(0),
sql_thd(0), last_slave_errno(0), inited(0), abort_slave(0),
- slave_running(0), log_pos_current(0), skip_log_purge(0),
+ slave_running(0), skip_log_purge(0),
inside_transaction(0) /* the default is autocommit=1 */
{
relay_log_name[0] = master_log_name[0] = 0;
@@ -1882,7 +1892,8 @@ static int init_slave_thread(THD* thd, SLAVE_THD_TYPE thd_type)
if (init_thr_lock() || thd->store_globals())
{
- end_thread(thd,0);
+ thd->cleanup();
+ delete thd;
DBUG_RETURN(-1);
}
@@ -2163,6 +2174,7 @@ extern "C" pthread_handler_decl(handle_slave_io,arg)
// needs to call my_thread_init(), otherwise we get a coredump in DBUG_ stuff
my_thread_init();
+ DBUG_ENTER("handle_slave_io");
#ifndef DBUG_OFF
slave_begin:
@@ -2180,7 +2192,6 @@ slave_begin:
#endif
thd= new THD; // note that contructor of THD uses DBUG_ !
- DBUG_ENTER("handle_slave_io");
THD_CHECK_SENTRY(thd);
pthread_detach_this_thread();
@@ -2240,7 +2251,7 @@ connected:
on with life.
*/
thd->proc_info = "Registering slave on master";
- if (register_slave_on_master(mysql) || update_slave_list(mysql))
+ if (register_slave_on_master(mysql) || update_slave_list(mysql, mi))
goto err;
}
@@ -2437,6 +2448,7 @@ extern "C" pthread_handler_decl(handle_slave_sql,arg)
// needs to call my_thread_init(), otherwise we get a coredump in DBUG_ stuff
my_thread_init();
+ DBUG_ENTER("handle_slave_sql");
#ifndef DBUG_OFF
slave_begin:
@@ -2449,7 +2461,6 @@ slave_begin:
#ifndef DBUG_OFF
rli->events_till_abort = abort_slave_event_count;
#endif
- DBUG_ENTER("handle_slave_sql");
thd = new THD; // note that contructor of THD uses DBUG_ !
THD_CHECK_SENTRY(thd);
@@ -2542,7 +2553,6 @@ the slave SQL thread with \"SLAVE START\". We stopped at log \
TODO: see if we can do this conditionally in next_event() instead
to avoid unneeded position re-init
*/
- rli->log_pos_current=0;
thd->temporary_tables = 0; // remove tempation from destructor to close them
DBUG_ASSERT(thd->net.buff != 0);
net_end(&thd->net); // destructor will not free it, because we are weird
@@ -2889,7 +2899,6 @@ void end_relay_log_info(RELAY_LOG_INFO* rli)
rli->cur_log_fd = -1;
}
rli->inited = 0;
- rli->log_pos_current=0;
rli->relay_log.close(1);
DBUG_VOID_RETURN;
}
diff --git a/sql/slave.h b/sql/slave.h
index 4923eec3ae7..0ebd07bf6d8 100644
--- a/sql/slave.h
+++ b/sql/slave.h
@@ -186,7 +186,6 @@ typedef struct st_relay_log_info
/* if not set, the value of other members of the structure are undefined */
bool inited;
volatile bool abort_slave, slave_running;
- bool log_pos_current;
bool skip_log_purge;
bool inside_transaction;
diff --git a/sql/sql_analyse.cc b/sql/sql_analyse.cc
index d121a151011..9bcfff62ba0 100644
--- a/sql/sql_analyse.cc
+++ b/sql/sql_analyse.cc
@@ -240,14 +240,16 @@ bool test_if_number(NUM_INFO *info, const char *str, uint str_len)
}
else
return 0;
-} //test_if_number
+}
-// Stores the biggest and the smallest value from current 'info'
-// to ev_num_info
-// If info contains an ulonglong number, which is bigger than
-// biggest positive number able to be stored in a longlong variable
-// and is marked as negative, function will return 0, else 1.
+/*
+ Stores the biggest and the smallest value from current 'info'
+ to ev_num_info
+ If info contains an ulonglong number, which is bigger than
+ biggest positive number able to be stored in a longlong variable
+ and is marked as negative, function will return 0, else 1.
+*/
bool get_ev_num_info(EV_NUM_INFO *ev_info, NUM_INFO *info, const char *num)
{
@@ -275,11 +277,13 @@ void free_string(String *s)
s->free();
}
+
void field_str::add()
{
char buff[MAX_FIELD_WIDTH], *ptr;
String s(buff, sizeof(buff),&my_charset_bin), *res;
ulong length;
+ TREE_ELEMENT *element;
if (!(res = item->val_str(&s)))
{
@@ -414,9 +418,11 @@ void field_real::add()
room_in_tree = 0; // Remove tree, out of RAM ?
delete_tree(&tree);
}
- // if element->count == 1, this element can be found only once from tree
- // if element->count == 2, or more, this element is already in tree
- else if (element->count == 1 && (tree_elements++) > pc->max_tree_elements)
+ /*
+ if element->count == 1, this element can be found only once from tree
+ if element->count == 2, or more, this element is already in tree
+ */
+ else if (element->count == 1 && (tree_elements++) >= pc->max_tree_elements)
{
room_in_tree = 0; // Remove tree, too many elements
delete_tree(&tree);
@@ -445,6 +451,7 @@ void field_real::add()
}
} // field_real::add
+
void field_longlong::add()
{
char buff[MAX_FIELD_WIDTH];
@@ -467,9 +474,11 @@ void field_longlong::add()
room_in_tree = 0; // Remove tree, out of RAM ?
delete_tree(&tree);
}
- // if element->count == 1, this element can be found only once from tree
- // if element->count == 2, or more, this element is already in tree
- else if (element->count == 1 && (tree_elements++) > pc->max_tree_elements)
+ /*
+ if element->count == 1, this element can be found only once from tree
+ if element->count == 2, or more, this element is already in tree
+ */
+ else if (element->count == 1 && (tree_elements++) >= pc->max_tree_elements)
{
room_in_tree = 0; // Remove tree, too many elements
delete_tree(&tree);
@@ -521,9 +530,11 @@ void field_ulonglong::add()
room_in_tree = 0; // Remove tree, out of RAM ?
delete_tree(&tree);
}
- // if element->count == 1, this element can be found only once from tree
- // if element->count == 2, or more, this element is already in tree
- else if (element->count == 1 && (tree_elements++) > pc->max_tree_elements)
+ /*
+ if element->count == 1, this element can be found only once from tree
+ if element->count == 2, or more, this element is already in tree
+ */
+ else if (element->count == 1 && (tree_elements++) >= pc->max_tree_elements)
{
room_in_tree = 0; // Remove tree, too many elements
delete_tree(&tree);
@@ -604,14 +615,16 @@ bool analyse::end_of_records()
func_items[8]->null_value = 1;
else
func_items[8]->set(res->ptr(), res->length(), res->charset());
- // count the dots, quotas, etc. in (ENUM("a","b","c"...))
- // if tree has been removed, don't suggest ENUM.
- // treemem is used to measure the size of tree for strings,
- // tree_elements is used to count the elements in tree in case of numbers.
- // max_treemem tells how long the string starting from ENUM("... and
- // ending to ..") shall at maximum be. If case is about numbers,
- // max_tree_elements will tell the length of the above, now
- // every number is considered as length 1
+ /*
+ count the dots, quotas, etc. in (ENUM("a","b","c"...))
+ If tree has been removed, don't suggest ENUM.
+ treemem is used to measure the size of tree for strings,
+ tree_elements is used to count the elements
+ max_treemem tells how long the string starting from ENUM("... and
+ ending to ..") shall at maximum be. If case is about numbers,
+ max_tree_elements will tell the length of the above, now
+ every number is considered as length 1
+ */
if (((*f)->treemem || (*f)->tree_elements) &&
(*f)->tree.elements_in_tree &&
(((*f)->treemem ? max_treemem : max_tree_elements) >
@@ -654,6 +667,7 @@ bool analyse::end_of_records()
ans.append("DATETIME", 8);
break;
case FIELD_TYPE_DATE:
+ case FIELD_TYPE_NEWDATE:
ans.append("DATE", 4);
break;
case FIELD_TYPE_SET:
@@ -665,9 +679,6 @@ bool analyse::end_of_records()
case FIELD_TYPE_TIME:
ans.append("TIME", 4);
break;
- case FIELD_TYPE_NEWDATE:
- ans.append("NEWDATE", 7);
- break;
case FIELD_TYPE_DECIMAL:
ans.append("DECIMAL", 7);
// if item is FIELD_ITEM, it _must_be_ Field_num in this case
diff --git a/sql/sql_base.cc b/sql/sql_base.cc
index 79f0e7eb269..34884003da3 100644
--- a/sql/sql_base.cc
+++ b/sql/sql_base.cc
@@ -1239,25 +1239,44 @@ bool drop_locked_tables(THD *thd,const char *db, const char *table_name)
}
-/* lock table to force abort of any threads trying to use table */
+/*
+ If we have the table open, which only happens when a LOCK TABLE has been
+ done on the table, change the lock type to a lock that will abort all
+ other threads trying to get the lock.
+*/
void abort_locked_tables(THD *thd,const char *db, const char *table_name)
{
TABLE *table;
- for (table=thd->open_tables; table ; table=table->next)
+ for (table= thd->open_tables; table ; table= table->next)
{
if (!strcmp(table->real_name,table_name) &&
!strcmp(table->table_cache_key,db))
+ {
mysql_lock_abort(thd,table);
+ break;
+ }
}
}
-/****************************************************************************
-** open_unireg_entry
-** Purpose : Load a table definition from file and open unireg table
-** Args : entry with DB and table given
-** Returns : 0 if ok
-** Note that the extra argument for open is taken from thd->open_options
+
+/*
+ Load a table definition from file and open unireg table
+
+ SYNOPSIS
+ open_unireg_entry()
+ thd Thread handle
+ entry Store open table definition here
+ db Database name
+ name Table name
+ alias Alias name
+
+ NOTES
+ Extra argument for open is taken from thd->open_options
+
+ RETURN
+ 0 ok
+ # Error
*/
static int open_unireg_entry(THD *thd, TABLE *entry, const char *db,
@@ -1677,8 +1696,7 @@ Field *find_field_in_table(THD *thd,TABLE *table,const char *name,uint length,
else
thd->dupp_field=field;
}
- if (check_grants && !thd->master_access &&
- check_grant_column(thd,table,name,length))
+ if (check_grants && check_grant_column(thd,table,name,length))
return WRONG_GRANT;
return field;
}
@@ -1728,7 +1746,9 @@ find_field_in_tables(THD *thd, Item_ident *item, TABLE_LIST *tables,
{
found_table=1;
Field *find=find_field_in_table(thd,tables->table,name,length,
- grant_option && !thd->master_access,1);
+ grant_option &&
+ tables->table->grant.want_privilege,
+ 1);
if (find)
{
(*where)= tables;
@@ -1785,7 +1805,8 @@ find_field_in_tables(THD *thd, Item_ident *item, TABLE_LIST *tables,
Field *field=find_field_in_table(thd,tables->table,name,length,
grant_option &&
- !thd->master_access, allow_rowid);
+ tables->table->grant.want_privilege,
+ allow_rowid);
if (field)
{
if (field == WRONG_GRANT)
@@ -2400,6 +2421,17 @@ bool remove_table_from_cache(THD *thd, const char *db, const char *table_name,
}
pthread_mutex_unlock(&in_use->mysys_var->mutex);
}
+ /*
+ Now we must abort all tables locks used by this thread
+ as the thread may be waiting to get a lock for another table
+ */
+ for (TABLE *thd_table= in_use->open_tables;
+ thd_table ;
+ thd_table= thd_table->next)
+ {
+ if (thd_table->db_stat) // If table is open
+ mysql_lock_abort_for_thread(thd, thd_table);
+ }
}
else
result= result || return_if_owned_by_thd;
diff --git a/sql/sql_class.cc b/sql/sql_class.cc
index d215db8736a..f67db09ee67 100644
--- a/sql/sql_class.cc
+++ b/sql/sql_class.cc
@@ -480,6 +480,7 @@ int THD::send_explain_fields(select_result *result)
#ifdef SIGNAL_WITH_VIO_CLOSE
void THD::close_active_vio()
{
+ DBUG_ENTER("close_active_vio");
safe_mutex_assert_owner(&LOCK_delete);
#ifndef EMBEDDED_LIBRARY
if (active_vio)
@@ -488,6 +489,7 @@ void THD::close_active_vio()
active_vio = 0;
}
#endif
+ DBUG_VOID_RETURN;
}
#endif
@@ -530,6 +532,16 @@ bool select_send::send_data(List<Item> &items)
return 0;
}
+#ifdef HAVE_INNOBASE_DB
+ /*
+ We may be passing the control from mysqld to the client: release the
+ InnoDB adaptive hash S-latch to avoid thread deadlocks if it was reserved
+ by thd
+ */
+ if (thd->transaction.all.innobase_tid)
+ ha_release_temporary_latches(thd);
+#endif
+
List_iterator_fast<Item> li(items);
Protocol *protocol= thd->protocol;
char buff[MAX_FIELD_WIDTH];
@@ -555,6 +567,14 @@ bool select_send::send_data(List<Item> &items)
bool select_send::send_eof()
{
+#ifdef HAVE_INNOBASE_DB
+ /* We may be passing the control from mysqld to the client: release the
+ InnoDB adaptive hash S-latch to avoid thread deadlocks if it was reserved
+ by thd */
+ if (thd->transaction.all.innobase_tid)
+ ha_release_temporary_latches(thd);
+#endif
+
/* Unlock tables before sending packet to gain some speed */
if (thd->lock)
{
diff --git a/sql/sql_class.h b/sql/sql_class.h
index dbf9f0d13d6..079c095b2f5 100644
--- a/sql/sql_class.h
+++ b/sql/sql_class.h
@@ -398,7 +398,8 @@ struct system_variables
ulong pseudo_thread_id;
my_bool log_warnings;
- my_bool low_priority_updates;
+ my_bool low_priority_updates;
+ my_bool new_mode;
CONVERT *convert_set;
CHARSET_INFO *thd_charset;
@@ -447,8 +448,9 @@ public:
db - currently selected database
ip - client IP
*/
-
char *host,*user,*priv_user,*db,*ip;
+ /* remote (peer) port */
+ uint16 peer_port;
/* Points to info-string that will show in SHOW PROCESSLIST */
const char *proc_info;
/* points to host if host is available, otherwise points to ip */
@@ -996,7 +998,7 @@ class multi_update : public select_result
{
TABLE_LIST *all_tables, *update_tables, *table_being_updated;
THD *thd;
- TABLE **tmp_tables, *main_table;
+ TABLE **tmp_tables, *main_table, *table_to_update;
TMP_TABLE_PARAM *tmp_table_param;
ha_rows updated, found;
List <Item> *fields, *values;
diff --git a/sql/sql_insert.cc b/sql/sql_insert.cc
index 9ca51ebc053..dcb39f8526f 100644
--- a/sql/sql_insert.cc
+++ b/sql/sql_insert.cc
@@ -23,7 +23,7 @@
static int check_null_fields(THD *thd,TABLE *entry);
static TABLE *delayed_get_table(THD *thd,TABLE_LIST *table_list);
static int write_delayed(THD *thd,TABLE *table, enum_duplicates dup,
- char *query, uint query_length, bool log_on);
+ char *query, uint query_length, int log_on);
static void end_delayed_insert(THD *thd);
extern "C" pthread_handler_decl(handle_delayed_insert,arg);
static void unlink_blobs(register TABLE *table);
@@ -38,6 +38,8 @@ static void unlink_blobs(register TABLE *table);
#define my_safe_afree(ptr, size, min_length) if (size > min_length) my_free(ptr,MYF(0))
#endif
+#define DELAYED_LOG_UPDATE 1
+#define DELAYED_LOG_BIN 2
/*
Check if insert fields are correct
@@ -107,8 +109,13 @@ int mysql_insert(THD *thd,TABLE_LIST *table_list,
enum_duplicates duplic)
{
int error;
- bool log_on= ((thd->options & OPTION_UPDATE_LOG) ||
- !(thd->master_access & SUPER_ACL));
+ /*
+ log_on is about delayed inserts only.
+ By default, both logs are enabled (this won't cause problems if the server
+ runs without --log-update or --log-bin).
+ */
+ int log_on= DELAYED_LOG_UPDATE | DELAYED_LOG_BIN ;
+
bool transactional_table, log_delayed, bulk_insert;
uint value_count;
ulong counter = 1;
@@ -123,6 +130,14 @@ int mysql_insert(THD *thd,TABLE_LIST *table_list,
thd->lex.select_lex.table_list.first;
DBUG_ENTER("mysql_insert");
+ if (thd->master_access & SUPER_ACL)
+ {
+ if (!(thd->options & OPTION_UPDATE_LOG))
+ log_on&= ~(int) DELAYED_LOG_UPDATE;
+ if (!(thd->options & OPTION_BIN_LOG))
+ log_on&= ~(int) DELAYED_LOG_BIN;
+ }
+
/*
in safe mode or with skip-new change delayed insert to be regular
if we are told to replace duplicates, the insert cannot be concurrent
@@ -130,7 +145,7 @@ int mysql_insert(THD *thd,TABLE_LIST *table_list,
*/
if ((lock_type == TL_WRITE_DELAYED &&
((specialflag & (SPECIAL_NO_NEW_FUNC | SPECIAL_SAFE_MODE)) ||
- thd->slave_thread)) ||
+ thd->slave_thread || !max_insert_delayed_threads)) ||
(lock_type == TL_WRITE_CONCURRENT_INSERT && duplic == DUP_REPLACE) ||
(duplic == DUP_UPDATE))
lock_type=TL_WRITE;
@@ -547,12 +562,13 @@ public:
char *record,*query;
enum_duplicates dup;
time_t start_time;
- bool query_start_used,last_insert_id_used,insert_id_used,log_query;
+ bool query_start_used,last_insert_id_used,insert_id_used;
+ int log_query;
ulonglong last_insert_id;
ulong time_stamp;
uint query_length;
- delayed_row(enum_duplicates dup_arg, bool log_query_arg)
+ delayed_row(enum_duplicates dup_arg, int log_query_arg)
:record(0),query(0),dup(dup_arg),log_query(log_query_arg) {}
~delayed_row()
{
@@ -855,7 +871,7 @@ TABLE *delayed_insert::get_local_table(THD* client_thd)
/* Put a question in queue */
static int write_delayed(THD *thd,TABLE *table,enum_duplicates duplic,
- char *query, uint query_length, bool log_on)
+ char *query, uint query_length, int log_on)
{
delayed_row *row=0;
delayed_insert *di=thd->di;
@@ -1242,13 +1258,14 @@ bool delayed_insert::handle_inserts(void)
using_ignore=0;
table->file->extra(HA_EXTRA_NO_IGNORE_DUP_KEY);
}
- if (row->query && row->log_query)
+ if (row->query)
{
- mysql_update_log.write(&thd,row->query, row->query_length);
- if (using_bin_log)
+ if (row->log_query & DELAYED_LOG_UPDATE)
+ mysql_update_log.write(&thd,row->query, row->query_length);
+ if (row->log_query & DELAYED_LOG_BIN && using_bin_log)
{
- Query_log_event qinfo(&thd, row->query, row->query_length,0);
- mysql_bin_log.write(&qinfo);
+ Query_log_event qinfo(&thd, row->query, row->query_length,0);
+ mysql_bin_log.write(&qinfo);
}
}
if (table->blob_fields)
@@ -1399,6 +1416,14 @@ bool select_insert::send_eof()
if (!(error=table->file->extra(HA_EXTRA_NO_CACHE)))
error=table->file->activate_all_index(thd);
table->file->extra(HA_EXTRA_NO_IGNORE_DUP_KEY);
+
+ /* Write to binlog before commiting transaction */
+ if (mysql_bin_log.is_open())
+ {
+ Query_log_event qinfo(thd, thd->query, thd->query_length,
+ table->file->has_transactions());
+ mysql_bin_log.write(&qinfo);
+ }
if ((error2=ha_autocommit_or_rollback(thd,error)) && ! error)
error=error2;
if (info.copied || info.deleted)
@@ -1425,12 +1450,6 @@ bool select_insert::send_eof()
thd->insert_id(last_insert_id); // For update log
::send_ok(thd,info.copied,last_insert_id,buff);
mysql_update_log.write(thd,thd->query,thd->query_length);
- if (mysql_bin_log.is_open())
- {
- Query_log_event qinfo(thd, thd->query, thd->query_length,
- table->file->has_transactions());
- mysql_bin_log.write(&qinfo);
- }
return 0;
}
}
diff --git a/sql/sql_parse.cc b/sql/sql_parse.cc
index bdbec6bc76f..eed5e62555b 100644
--- a/sql/sql_parse.cc
+++ b/sql/sql_parse.cc
@@ -550,7 +550,7 @@ check_connections(THD *thd)
{
char ip[30];
- if (vio_peer_addr(net->vio,ip))
+ if (vio_peer_addr(net->vio, ip, &thd->peer_port))
return (ER_BAD_HOST_ERROR);
if (!(thd->ip = my_strdup(ip,MYF(0))))
return (ER_OUT_OF_RESOURCES);
@@ -582,8 +582,9 @@ check_connections(THD *thd)
else /* Hostname given means that the connection was on a socket */
{
DBUG_PRINT("info",("Host: %s",thd->host));
- thd->host_or_ip=thd->host;
- thd->ip=0;
+ thd->host_or_ip= thd->host;
+ thd->ip= 0;
+ thd->peer_port= 0;
bzero((char*) &thd->remote,sizeof(struct sockaddr));
}
/* Ensure that wrong hostnames doesn't cause buffer overflows */
@@ -1959,6 +1960,7 @@ mysql_execute_command(THD *thd)
if (check_table_access(thd, SELECT_ACL, tables->next))
goto error; // Error message is given
}
+ select_lex->options|= SELECT_NO_UNLOCK;
unit->offset_limit_cnt= select_lex->offset_limit;
unit->select_limit_cnt= select_lex->select_limit+
select_lex->offset_limit;
@@ -2216,8 +2218,14 @@ mysql_execute_command(THD *thd)
break;
}
case SQLCOM_UPDATE:
- if (check_access(thd,UPDATE_ACL,tables->db,&tables->grant.privilege))
+ TABLE_LIST *table;
+ if (check_db_used(thd,tables))
goto error;
+ for (table=tables ; table ; table=table->next)
+ {
+ if (check_access(thd,UPDATE_ACL,table->db,&table->grant.privilege))
+ goto error;
+ }
if (grant_option && check_grant(thd,UPDATE_ACL,tables))
goto error;
if (select_lex->item_list.elements != lex->value_list.elements)
@@ -2310,6 +2318,8 @@ mysql_execute_command(THD *thd)
if ((res=check_table_access(thd, SELECT_ACL, save_next)))
goto error;
}
+ /* Don't unlock tables until command is written to binary log */
+ select_lex->options|= SELECT_NO_UNLOCK;
select_result *result;
unit->offset_limit_cnt= select_lex->offset_limit;
@@ -2341,6 +2351,8 @@ mysql_execute_command(THD *thd)
case SQLCOM_TRUNCATE:
if (check_access(thd,DELETE_ACL,tables->db,&tables->grant.privilege))
goto error; /* purecov: inspected */
+ if (grant_option && check_grant(thd,DELETE_ACL,tables))
+ goto error;
/*
Don't allow this within a transaction because we want to use
re-generate table
@@ -3793,9 +3805,7 @@ TABLE_LIST *st_select_lex::add_table_to_list(THD *thd,
if (!table)
DBUG_RETURN(0); // End of memory
alias_str= alias ? alias->str : table->table.str;
- if (table->table.length > NAME_LEN ||
- (table->table.length &&
- check_table_name(table->table.str,table->table.length)) ||
+ if (check_table_name(table->table.str,table->table.length) ||
table->db.str && check_db_name(table->db.str))
{
net_printf(thd,ER_WRONG_TABLE_NAME,table->table.str);
diff --git a/sql/sql_rename.cc b/sql/sql_rename.cc
index 5b0ec2ec843..19b4d299e59 100644
--- a/sql/sql_rename.cc
+++ b/sql/sql_rename.cc
@@ -31,8 +31,8 @@ static TABLE_LIST *rename_tables(THD *thd, TABLE_LIST *table_list,
bool mysql_rename_tables(THD *thd, TABLE_LIST *table_list)
{
- bool error=1,got_all_locks=1;
- TABLE_LIST *lock_table,*ren_table=0;
+ bool error= 1;
+ TABLE_LIST *ren_table= 0;
DBUG_ENTER("mysql_rename_tables");
/*
@@ -47,23 +47,11 @@ bool mysql_rename_tables(THD *thd, TABLE_LIST *table_list)
}
VOID(pthread_mutex_lock(&LOCK_open));
- for (lock_table=table_list ; lock_table ; lock_table=lock_table->next)
- {
- int got_lock;
- if ((got_lock=lock_table_name(thd,lock_table)) < 0)
- goto end;
- if (got_lock)
- got_all_locks=0;
- }
-
- if (!got_all_locks && wait_for_locked_table_names(thd,table_list))
- goto end;
-
- if (!(ren_table=rename_tables(thd,table_list,0)))
- error=0;
-
-end:
- if (ren_table)
+ if (lock_table_names(thd, table_list))
+ goto err;
+
+ error=0;
+ if ((ren_table=rename_tables(thd,table_list,0)))
{
/* Rename didn't succeed; rename back the tables in reverse order */
TABLE_LIST *prev=0,*table;
@@ -85,7 +73,7 @@ end:
table=table->next->next; // Skip error table
/* Revert to old names */
rename_tables(thd, table, 1);
- /* Note that lock_table == 0 here, so the unlock loop will work */
+ error= 1;
}
/* Lets hope this doesn't fail as the result will be messy */
@@ -100,9 +88,9 @@ end:
send_ok(thd);
}
- for (TABLE_LIST *table=table_list ; table != lock_table ; table=table->next)
- unlock_table_name(thd,table);
- pthread_cond_broadcast(&COND_refresh);
+ unlock_table_names(thd,table_list);
+
+err:
pthread_mutex_unlock(&LOCK_open);
DBUG_RETURN(error);
}
diff --git a/sql/sql_repl.cc b/sql/sql_repl.cc
index dfb4f8fd303..7b05d0d2b98 100644
--- a/sql/sql_repl.cc
+++ b/sql/sql_repl.cc
@@ -776,12 +776,18 @@ int reset_slave(THD *thd, MASTER_INFO* mi)
error=1;
goto err;
}
+ //delete relay logs, clear relay log coordinates
if ((error= purge_relay_logs(&mi->rli, thd,
1 /* just reset */,
&errmsg)))
goto err;
+ //Clear master's log coordinates (only for good display of SHOW SLAVE STATUS)
+ mi->master_log_name[0]= 0;
+ mi->master_log_pos= BIN_LOG_HEADER_SIZE;
+ //close master_info_file, relay_log_info_file, set mi->inited=rli->inited=0
end_master_info(mi);
+ //and delete these two files
fn_format(fname, master_info_file, mysql_data_home, "", 4+32);
if (my_stat(fname, &stat_area, MYF(0)) && my_delete(fname, MYF(MY_WME)))
{
diff --git a/sql/sql_select.cc b/sql/sql_select.cc
index 3e20f21f567..50c666ab64e 100644
--- a/sql/sql_select.cc
+++ b/sql/sql_select.cc
@@ -2925,6 +2925,12 @@ make_join_select(JOIN *join,SQL_SELECT *select,COND *cond)
{
JOIN_TAB *tab=join->join_tab+i;
table_map current_map= tab->table->map;
+ /*
+ Following force including random expression in last table condition.
+ It solve problem with select like SELECT * FROM t1 WHERE rand() > 0.5
+ */
+ if (i == join->tables-1)
+ current_map|= RAND_TABLE_BIT;
bool use_quick_range=0;
used_tables|=current_map;
@@ -3758,6 +3764,7 @@ remove_eq_conds(COND *cond,Item::cond_result *cond_value)
== Item_func::COND_AND_FUNC;
List_iterator<Item> li(*((Item_cond*) cond)->argument_list());
Item::cond_result tmp_cond_value;
+ bool should_fix_fields=0;
*cond_value=Item::COND_UNDEF;
Item *item;
@@ -3777,6 +3784,7 @@ remove_eq_conds(COND *cond,Item::cond_result *cond_value)
delete item; // This may be shared
#endif
VOID(li.replace(new_item));
+ should_fix_fields=1;
}
if (*cond_value == Item::COND_UNDEF)
*cond_value=tmp_cond_value;
@@ -3803,6 +3811,9 @@ remove_eq_conds(COND *cond,Item::cond_result *cond_value)
break; /* purecov: deadcode */
}
}
+ if (should_fix_fields)
+ cond->fix_fields(current_thd,0);
+
if (!((Item_cond*) cond)->argument_list()->elements ||
*cond_value != Item::COND_OK)
return (COND*) 0;
@@ -4903,6 +4914,10 @@ do_select(JOIN *join,List<Item> *fields,TABLE *table,Procedure *procedure)
error=0;
if (!table) // If sending data to client
{
+ /*
+ The following will unlock all cursors if the command wasn't an
+ update command
+ */
join_free(join, 0); // Unlock all cursors
if (join->result->send_eof())
error= 1; // Don't send error
diff --git a/sql/sql_show.cc b/sql/sql_show.cc
index 9c2280768da..76f5a14c6ad 100644
--- a/sql/sql_show.cc
+++ b/sql/sql_show.cc
@@ -1020,6 +1020,7 @@ append_identifier(THD *thd, String *packet, const char *name)
}
}
+#define LIST_PROCESS_HOST_LEN 64
static int
store_create_info(THD *thd, TABLE *table, String *packet)
@@ -1292,7 +1293,7 @@ void mysqld_list_processes(THD *thd,const char *user, bool verbose)
field_list.push_back(new Item_int("Id",0,11));
field_list.push_back(new Item_empty_string("User",16));
- field_list.push_back(new Item_empty_string("Host",64));
+ field_list.push_back(new Item_empty_string("Host",LIST_PROCESS_HOST_LEN));
field_list.push_back(field=new Item_empty_string("db",NAME_LEN));
field->maybe_null=1;
field_list.push_back(new Item_empty_string("Command",16));
@@ -1326,7 +1327,14 @@ void mysqld_list_processes(THD *thd,const char *user, bool verbose)
thd_info->user=thd->strdup(tmp->user ? tmp->user :
(tmp->system_thread ?
"system user" : "unauthenticated user"));
- thd_info->host= thd->strdup(tmp->host_or_ip);
+ if (tmp->peer_port && (tmp->host || tmp->ip))
+ {
+ if ((thd_info->host= thd->alloc(LIST_PROCESS_HOST_LEN+1)))
+ my_snprintf((char *) thd_info->host, LIST_PROCESS_HOST_LEN,
+ "%s:%u", thd->host_or_ip, tmp->peer_port);
+ }
+ else
+ thd_info->host= thd->strdup(thd->host_or_ip);
if ((thd_info->db=tmp->db)) // Safe test
thd_info->db=thd->strdup(thd_info->db);
thd_info->command=(int) tmp->command;
diff --git a/sql/sql_table.cc b/sql/sql_table.cc
index a8428d4f3da..f8d7ba5d277 100644
--- a/sql/sql_table.cc
+++ b/sql/sql_table.cc
@@ -1,4 +1,4 @@
-/* Copyright (C) 2000 MySQL AB & MySQL Finland AB & TCX DataKonsult AB
+/* Copyright (C) 2000-2003 MySQL AB
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -65,7 +65,7 @@ static int copy_data_between_tables(TABLE *from,TABLE *to,
int mysql_rm_table(THD *thd,TABLE_LIST *tables, my_bool if_exists,
my_bool drop_temporary)
{
- int error;
+ int error= 0;
DBUG_ENTER("mysql_rm_table");
/* mark for close and remove all cached entries */
@@ -80,7 +80,7 @@ int mysql_rm_table(THD *thd,TABLE_LIST *tables, my_bool if_exists,
{
my_error(ER_TABLE_NOT_LOCKED_FOR_WRITE,MYF(0),
tables->real_name);
- error = 1;
+ error= 1;
goto err;
}
while (global_read_lock && ! thd->killed)
@@ -93,7 +93,6 @@ int mysql_rm_table(THD *thd,TABLE_LIST *tables, my_bool if_exists,
err:
pthread_mutex_unlock(&LOCK_open);
- VOID(pthread_cond_broadcast(&COND_refresh)); // Signal to refresh
pthread_mutex_lock(&thd->mysys_var->mutex);
thd->mysys_var->current_mutex= 0;
@@ -139,7 +138,6 @@ int mysql_rm_table_part2_with_lock(THD *thd,
dont_log_query);
pthread_mutex_unlock(&LOCK_open);
- VOID(pthread_cond_broadcast(&COND_refresh)); // Signal to refresh
pthread_mutex_lock(&thd->mysys_var->mutex);
thd->mysys_var->current_mutex= 0;
@@ -188,9 +186,12 @@ int mysql_rm_table_part2(THD *thd, TABLE_LIST *tables, bool if_exists,
bool some_tables_deleted=0, tmp_table_deleted=0;
DBUG_ENTER("mysql_rm_table_part2");
+ if (lock_table_names(thd, tables))
+ DBUG_RETURN(1);
+
for (table=tables ; table ; table=table->next)
{
- char *db=table->db ? table->db : thd->db;
+ char *db=table->db;
mysql_ha_closeall(thd, table);
if (!close_temporary_table(thd, db, table->real_name))
{
@@ -266,11 +267,12 @@ int mysql_rm_table_part2(THD *thd, TABLE_LIST *tables, bool if_exists,
}
}
- error = 0;
+ unlock_table_names(thd, tables);
+ error= 0;
if (wrong_tables.length())
{
my_error(ER_BAD_TABLE_ERROR,MYF(0),wrong_tables.c_ptr());
- error=1;
+ error= 1;
}
DBUG_RETURN(error);
}
@@ -418,6 +420,12 @@ int mysql_create_table(THD *thd,const char *db, const char *table_name,
if (!(sql_field->flags & NOT_NULL_FLAG))
null_fields++;
+ if (check_column_name(sql_field->field_name))
+ {
+ my_error(ER_WRONG_COLUMN_NAME, MYF(0), sql_field->field_name);
+ DBUG_RETURN(-1);
+ }
+
/* Check if we have used the same field name before */
for (dup_no=0; (dup_field=it2++) != sql_field; dup_no++)
{
@@ -979,12 +987,6 @@ TABLE *create_table_from_items(THD *thd, HA_CREATE_INFO *create_info,
while ((item=it++))
{
create_field *cr_field;
- if (strlen(item->name) > NAME_LEN ||
- check_column_name(item->name))
- {
- my_error(ER_WRONG_COLUMN_NAME,MYF(0),item->name);
- DBUG_RETURN(0);
- }
Field *field;
if (item->type() == Item::FUNC_ITEM)
field=item->tmp_table_field(&tmp_table);
diff --git a/sql/sql_update.cc b/sql/sql_update.cc
index 95128b2db3d..d07b4f1a8d5 100644
--- a/sql/sql_update.cc
+++ b/sql/sql_update.cc
@@ -565,12 +565,13 @@ multi_update::initialize_tables(JOIN *join)
main_table=join->join_tab->table;
trans_safe= transactional_tables= main_table->file->has_transactions();
log_delayed= trans_safe || main_table->tmp_table != NO_TMP_TABLE;
-
+ table_to_update= (main_table->file->table_flags() & HA_NOT_MULTI_UPDATE) ?
+ (TABLE *) 0 : main_table;
/* Create a temporary table for all tables after except main table */
for (table_ref= update_tables; table_ref; table_ref=table_ref->next)
{
TABLE *table=table_ref->table;
- if (table != main_table)
+ if (table != table_to_update)
{
uint cnt= table_ref->shared;
ORDER group;
@@ -645,13 +646,24 @@ bool multi_update::send_data(List<Item> &not_used_values)
for (cur_table= update_tables; cur_table ; cur_table= cur_table->next)
{
TABLE *table= cur_table->table;
- /* Check if we are using outer join and we didn't find the row */
+ /*
+ Check if we are using outer join and we didn't find the row
+ or if we have already updated this row in the previous call to this
+ function.
+
+ The same row may be presented here several times in a join of type
+ UPDATE t1 FROM t1,t2 SET t1.a=t2.a
+
+ In this case we will do the update for the first found row combination.
+ The join algorithm guarantees that we will not find the a row in
+ t1 several times.
+ */
if (table->status & (STATUS_NULL_ROW | STATUS_UPDATED))
continue;
uint offset= cur_table->shared;
table->file->position(table->record[0]);
- if (table == main_table)
+ if (table == table_to_update)
{
table->status|= STATUS_UPDATED;
store_record(table,1);
@@ -745,7 +757,7 @@ int multi_update::do_updates(bool from_send_error)
for (cur_table= update_tables; cur_table ; cur_table= cur_table->next)
{
table = cur_table->table;
- if (table == main_table)
+ if (table == table_to_update)
continue; // Already updated
org_updated= updated;
diff --git a/sql/stacktrace.c b/sql/stacktrace.c
index 762c45e7184..d0478052fb1 100644
--- a/sql/stacktrace.c
+++ b/sql/stacktrace.c
@@ -197,7 +197,7 @@ terribly wrong...\n");
fprintf(stderr, "Stack trace seems successful - bottom reached\n");
end:
- fprintf(stderr, "Please read http://www.mysql.com/doc/U/s/Using_stack_trace.html and follow instructions on how to resolve the stack trace. Resolved\n\
+ fprintf(stderr, "Please read http://www.mysql.com/doc/en/Using_stack_trace.html and follow instructions on how to resolve the stack trace. Resolved\n\
stack trace is much more helpful in diagnosing the problem, so please do \n\
resolve it\n");
}
diff --git a/sql/table.cc b/sql/table.cc
index 08f6e29489d..58375ecdbeb 100644
--- a/sql/table.cc
+++ b/sql/table.cc
@@ -1229,6 +1229,8 @@ bool check_db_name(char *name)
bool check_table_name(const char *name, uint length)
{
const char *end= name+length;
+ if (!length || length > NAME_LEN)
+ return 1;
while (name != end)
{
@@ -1252,6 +1254,8 @@ bool check_table_name(const char *name, uint length)
bool check_column_name(const char *name)
{
+ const char *start= name;
+
while (*name)
{
#if defined(USE_MB) && defined(USE_MB_IDENT)
@@ -1270,7 +1274,8 @@ bool check_column_name(const char *name)
return 1;
name++;
}
- return 0;
+ /* Error if empty or too long column name */
+ return (name == start || (uint) (name - start) > NAME_LEN);
}
/*
diff --git a/sql/unireg.h b/sql/unireg.h
index 2dc84720b2d..a5cd784a14a 100644
--- a/sql/unireg.h
+++ b/sql/unireg.h
@@ -84,7 +84,7 @@
#define SPECIAL_USE_LOCKS 1 /* Lock used databases */
#define SPECIAL_NO_NEW_FUNC 2 /* Skip new functions */
-#define SPECIAL_NEW_FUNC 4 /* New nonstandard functions */
+#define SPECIAL_SKIP_SHOW_DB 4 /* Don't allow 'show db' */
#define SPECIAL_WAIT_IF_LOCKED 8 /* Wait if locked database */
#define SPECIAL_SAME_DB_NAME 16 /* form name = file name */
#define SPECIAL_ENGLISH 32 /* English error messages */
@@ -94,7 +94,6 @@
#define SPECIAL_NO_HOST_CACHE 512 /* Don't cache hosts */
#define SPECIAL_LONG_LOG_FORMAT 1024
#define SPECIAL_SAFE_MODE 2048
-#define SPECIAL_SKIP_SHOW_DB 4096 /* Don't allow 'show db' */
/* Extern defines */
#define store_record(A,B) bmove_allign((A)->record[B],(A)->record[0],(size_t) (A)->reclength)
diff --git a/support-files/MacOSX/Info.plist.sh b/support-files/MacOSX/Info.plist.sh
index c8e4eb1c2d4..f14902ff379 100644
--- a/support-files/MacOSX/Info.plist.sh
+++ b/support-files/MacOSX/Info.plist.sh
@@ -29,7 +29,7 @@
<key>IFPkgFlagRestartAction</key>
<string>NoRestart</string>
<key>IFPkgFlagRootVolumeOnly</key>
- <false/>
+ <true/>
<key>IFPkgFlagUpdateInstalledLanguages</key>
<false/>
<key>IFPkgFormatVersion</key>
diff --git a/support-files/mysql.spec.sh b/support-files/mysql.spec.sh
index de1ccfe1df7..53912eb2af6 100644
--- a/support-files/mysql.spec.sh
+++ b/support-files/mysql.spec.sh
@@ -446,6 +446,7 @@ fi
%attr(755, root, root) /usr/bin/mysql_explain_log
%attr(755, root, root) /usr/bin/mysql_fix_privilege_tables
%attr(755, root, root) /usr/bin/mysql_install_db
+%attr(755, root, root) /usr/bin/mysql_secure_installation
%attr(755, root, root) /usr/bin/mysql_setpermission
%attr(755, root, root) /usr/bin/mysql_zap
%attr(755, root, root) /usr/bin/mysqlbug
@@ -535,6 +536,11 @@ fi
%changelog
+* Mon Mar 10 2003 Lenz Grimmer <lenz@mysql.com>
+
+- added missing file mysql_secure_installation to server subpackage
+ (bug #141)
+
* Tue Feb 11 2003 Lenz Grimmer <lenz@mysql.com>
- re-added missing pre- and post(un)install scripts to server subpackage
diff --git a/tests/grant.pl b/tests/grant.pl
index 9212c610ac1..5a24127d79d 100644
--- a/tests/grant.pl
+++ b/tests/grant.pl
@@ -11,10 +11,10 @@ use strict;
use vars qw($dbh $user_dbh $opt_help $opt_Information $opt_force $opt_debug
$opt_verbose $opt_server $opt_root_user $opt_password $opt_user
$opt_database $opt_host $version $user $tables_cols $columns_cols
- $tmp_table);
+ $tmp_table $opt_silent);
-$version="1.0";
-$opt_help=$opt_Information=$opt_force=$opt_debug=$opt_verbose=0;
+$version="1.1";
+$opt_help=$opt_Information=$opt_force=$opt_debug=$opt_verbose=$opt_silent=0;
$opt_host="localhost",
$opt_server="mysql";
$opt_root_user="root";
@@ -22,7 +22,7 @@ $opt_password="";
$opt_user="grant_user";
$opt_database="grant_test";
-GetOptions("Information","help","server=s","root-user=s","password=s","user","database=s","force","host=s","debug","verbose") || usage();
+GetOptions("Information","help","server=s","root-user=s","password=s","user","database=s","force","host=s","debug","verbose","silent") || usage();
usage() if ($opt_help || $opt_Information);
$user="$opt_user\@$opt_host";
@@ -210,6 +210,16 @@ user_query("delete from $opt_database.test where a=1",1);
user_query("update $opt_database.test set b=3 where b=1",1);
user_query("update $opt_database.test set b=b+1",1);
+#
+# Test global SELECT privilege combined with table level privileges
+#
+
+safe_query("grant SELECT on *.* to $user");
+user_connect(0);
+user_query("update $opt_database.test set b=b+1");
+safe_query("revoke SELECT on *.* from $user");
+user_connect(0);
+
# Add one privilege at a time until the user has all privileges
user_query("select * from test",1);
safe_query("grant select on $opt_database.test to $user");
@@ -543,7 +553,10 @@ sub user_connect
$password, { PrintError => 0});
if (!$user_dbh)
{
- print "$DBI::errstr\n";
+ if ($opt_verbose || !$ignore_error)
+ {
+ print "Error on connect: $DBI::errstr\n";
+ }
if (!$ignore_error)
{
die "The above should not have failed!";
@@ -558,7 +571,7 @@ sub user_connect
sub safe_query
{
my ($query,$ignore_error)=@_;
- if (do_query($dbh,$query))
+ if (do_query($dbh,$query, $ignore_error))
{
if (!defined($ignore_error))
{
@@ -575,7 +588,7 @@ sub safe_query
sub user_query
{
my ($query,$ignore_error)=@_;
- if (do_query($user_dbh,$query))
+ if (do_query($user_dbh,$query, $ignore_error))
{
if (!defined($ignore_error))
{
@@ -591,8 +604,8 @@ sub user_query
sub do_query
{
- my ($my_dbh, $query)=@_;
- my ($sth,$row,$tab,$col,$found);
+ my ($my_dbh, $query, $ignore_error)=@_;
+ my ($sth, $row, $tab, $col, $found, $fatal_error);
print "$query\n" if ($opt_debug || $opt_verbose);
if (!($sth= $my_dbh->prepare($query)))
@@ -602,25 +615,32 @@ sub do_query
}
if (!$sth->execute)
{
- print "Error in execute: $DBI::errstr\n";
- die if ($DBI::errstr =~ /parse error/);
+ $fatal_error= ($DBI::errstr =~ /parse error/);
+ if (!$ignore_error || $opt_verbose || $fatal_error)
+ {
+ print "Error in execute: $DBI::errstr\n";
+ }
+ die if ($fatal_error);
$sth->finish;
return 1;
}
$found=0;
- while (($row=$sth->fetchrow_arrayref))
+ if (!$opt_silent)
{
- $found=1;
- $tab="";
- foreach $col (@$row)
+ while (($row=$sth->fetchrow_arrayref))
{
- print $tab;
- print defined($col) ? $col : "NULL";
- $tab="\t";
+ $found=1;
+ $tab="";
+ foreach $col (@$row)
+ {
+ print $tab;
+ print defined($col) ? $col : "NULL";
+ $tab="\t";
+ }
+ print "\n";
}
- print "\n";
+ print "\n" if ($found);
}
- print "\n" if ($found);
$sth->finish;
return 0;
}
diff --git a/tests/grant.res b/tests/grant.res
index 15aad01c888..adb4494eb28 100644
--- a/tests/grant.res
+++ b/tests/grant.res
@@ -9,13 +9,13 @@ drop database grant_test
Error in execute: Can't drop database 'grant_test'. Database doesn't exist
create database grant_test
Connecting grant_user
-Access denied for user: '@localhost' to database 'grant_test'
+Error on connect: Access denied for user: '@localhost' to database 'grant_test'
grant select on *.* to grant_user@localhost
set password FOR grant_user2@localhost = password('test')
Error in execute: Can't find any matching row in the user table
set password FOR grant_user=password('test')
Connecting grant_user
-Access denied for user: 'grant_user@localhost' (Using password: NO)
+Error on connect: Access denied for user: 'grant_user@localhost' (Using password: NO)
set password FOR grant_user=''
Connecting grant_user
select * from mysql.user where user = 'grant_user'
@@ -89,7 +89,7 @@ select count(*) from grant_test.test
revoke ALL PRIVILEGES on *.* from grant_user@localhost
Connecting grant_user
-Access denied for user: 'grant_user@localhost' to database 'grant_test'
+Error on connect: Access denied for user: 'grant_user@localhost' to database 'grant_test'
delete from user where user='grant_user'
flush privileges
delete from user where user='grant_user'
@@ -136,7 +136,7 @@ insert into grant_test.test values (6,0)
Error in execute: Access denied for user: 'grant_user@localhost' to database 'grant_test'
REVOKE GRANT OPTION on grant_test.* from grant_user@localhost
Connecting grant_user
-Access denied for user: 'grant_user@localhost' to database 'grant_test'
+Error on connect: Access denied for user: 'grant_user@localhost' to database 'grant_test'
grant ALL PRIVILEGES on grant_test.* to grant_user@localhost
Connecting grant_user
select * from mysql.user where user = 'grant_user'
@@ -159,7 +159,7 @@ localhost grant_user N N N N N N N N N N N N N N N N N N N N N 0 0 0
select * from mysql.db where user = 'grant_user'
Connecting grant_user
-Access denied for user: 'grant_user@localhost' to database 'grant_test'
+Error on connect: Access denied for user: 'grant_user@localhost' to database 'grant_test'
grant create on grant_test.test2 to grant_user@localhost
Connecting grant_user
create table grant_test.test2 (a int not null)
@@ -195,7 +195,12 @@ update grant_test.test set b=3 where b=1
Error in execute: SELECT command denied to user: 'grant_user@localhost' for column 'b' in table 'test'
update grant_test.test set b=b+1
Error in execute: SELECT command denied to user: 'grant_user@localhost' for column 'b' in table 'test'
-select * from test
+grant SELECT on *.* to grant_user@localhost
+Connecting grant_user
+update grant_test.test set b=b+1
+revoke SELECT on *.* from grant_user@localhost
+Connecting grant_user
+lect * from test
Error in execute: select command denied to user: 'grant_user@localhost' for table 'test'
grant select on grant_test.test to grant_user@localhost
delete from grant_test.test where a=1
diff --git a/vio/viosocket.c b/vio/viosocket.c
index 76056704ec2..5f7e48f8e8b 100644
--- a/vio/viosocket.c
+++ b/vio/viosocket.c
@@ -251,13 +251,14 @@ my_socket vio_fd(Vio* vio)
}
-my_bool vio_peer_addr(Vio * vio, char *buf)
+my_bool vio_peer_addr(Vio * vio, char *buf, uint16 *port)
{
DBUG_ENTER("vio_peer_addr");
DBUG_PRINT("enter", ("sd: %d", vio->sd));
if (vio->localhost)
{
strmov(buf,"127.0.0.1");
+ *port= 0;
}
else
{
@@ -269,6 +270,7 @@ my_bool vio_peer_addr(Vio * vio, char *buf)
DBUG_RETURN(1);
}
my_inet_ntoa(vio->remote.sin_addr,buf);
+ *port= ntohs(vio->remote.sin_port);
}
DBUG_PRINT("exit", ("addr: %s", buf));
DBUG_RETURN(0);