1
0
mirror of https://github.com/MariaDB/server.git synced 2025-07-29 05:21:33 +03:00

Merging 5.0->5.1

This commit is contained in:
lars@mysql.com
2005-04-19 11:09:54 +02:00
430 changed files with 9095 additions and 26269 deletions

View File

@ -1107,3 +1107,6 @@ vio/test-sslclient
vio/test-sslserver vio/test-sslserver
vio/viotest-ssl vio/viotest-ssl
VC++Files/client/mysql_amd64.dsp VC++Files/client/mysql_amd64.dsp
client/mysqltestmanager-pwgen
client/mysqltestmanagerc
tools/mysqltestmanager

9
BUILD/compile-pentium-cybozu Executable file
View File

@ -0,0 +1,9 @@
#! /bin/sh
path=`dirname $0`
. "$path/SETUP.sh"
extra_flags="$pentium_cflags $fast_cflags -g"
extra_configs="$pentium_configs --with-charset=utf8 --with-collation=utf8_general_cs"
. "$path/FINISH.sh"

View File

@ -9,6 +9,7 @@ Sinisa@sinisa.nasamreza.org
WAX@sergbook.mysql.com WAX@sergbook.mysql.com
acurtis@ltantony.rdg.cyberkinetica.homeunix.net acurtis@ltantony.rdg.cyberkinetica.homeunix.net
acurtis@pcgem.rdg.cyberkinetica.com acurtis@pcgem.rdg.cyberkinetica.com
acurtis@xiphis.org
administrador@light.hegel.local administrador@light.hegel.local
ahlentz@co3064164-a.rochd1.qld.optusnet.com.au ahlentz@co3064164-a.rochd1.qld.optusnet.com.au
akishkin@work.mysql.com akishkin@work.mysql.com
@ -56,8 +57,10 @@ georg@beethoven.local
georg@beethoven.site georg@beethoven.site
georg@lmy002.wdf.sap.corp georg@lmy002.wdf.sap.corp
gerberb@ou800.zenez.com gerberb@ou800.zenez.com
gluh@eagle.intranet.mysql.r18.ru
gluh@gluh.(none) gluh@gluh.(none)
gluh@gluh.mysql.r18.ru gluh@gluh.mysql.r18.ru
gluh@mysql.com
gordon@zero.local.lan gordon@zero.local.lan
greg@gcw.ath.cx greg@gcw.ath.cx
greg@mysql.com greg@mysql.com

View File

@ -27,6 +27,7 @@ then
fi fi
CHANGESET=`bk -R prs -r+ -h -d':P:::I:' ChangeSet` CHANGESET=`bk -R prs -r+ -h -d':P:::I:' ChangeSet`
CSETKEY=`bk -R prs -r+ -h -d':KEY:' ChangeSet`
BUG=`bk -R prs -r+ -h -d':C:' ChangeSet | sed -ne 's/^.*[Bb][Uu][Gg] *# *\([0-9][0-9]*\).*$/\1/p'` BUG=`bk -R prs -r+ -h -d':C:' ChangeSet | sed -ne 's/^.*[Bb][Uu][Gg] *# *\([0-9][0-9]*\).*$/\1/p'`
WL=`bk -R prs -r+ -h -d':C:' ChangeSet | sed -ne 's/^.*[Ww][Ll] *# *\([0-9][0-9]*\).*$/ WL#\1/p'` WL=`bk -R prs -r+ -h -d':C:' ChangeSet | sed -ne 's/^.*[Ww][Ll] *# *\([0-9][0-9]*\).*$/ WL#\1/p'`
@ -52,6 +53,7 @@ List-ID: <bk.mysql-$VERSION>
From: $FROM From: $FROM
To: $TO To: $TO
Subject: bk commit - $VERSION tree ($CHANGESET)${BS}${WL} Subject: bk commit - $VERSION tree ($CHANGESET)${BS}${WL}
X-CSetKey: <$CSETKEY>
$BH $BH
EOF EOF
bk changes -v -r+ bk changes -v -r+
@ -68,6 +70,7 @@ List-ID: <bk.mysql-$VERSION>
From: $FROM From: $FROM
To: $INTERNALS To: $INTERNALS
Subject: bk commit into $VERSION tree ($CHANGESET)$BS Subject: bk commit into $VERSION tree ($CHANGESET)$BS
X-CSetKey: <$CSETKEY>
$BH $BH
Below is the list of changes that have just been committed into a local Below is the list of changes that have just been committed into a local
$VERSION repository of $USER. When $USER does a push these changes will $VERSION repository of $USER. When $USER does a push these changes will

View File

@ -1,475 +0,0 @@
#!/usr/bin/perl -w
#
# Bootstrap
#
# Script to export a given BK source tree into a separate directory
# and create the source distribution to be used for all binary builds
#
# Use the "--help" option for more info!
#
# written by Lenz Grimmer <lenz@mysql.com>
#
use Cwd;
use Getopt::Long;
Getopt::Long::Configure ("bundling");
# Include helper functions
$LOGGER= "$ENV{HOME}/bin/logger.pm";
if (-f $LOGGER)
{
do "$LOGGER";
}
else
{
die "ERROR: $LOGGER cannot be found!\n";
}
# Some predefined settings
$build_command= "BUILD/compile-dist";
$PWD= cwd();
$opt_docdir= $PWD . "/mysqldoc";
$opt_archive_log= undef;
$opt_build_command= undef;
$opt_changelog= undef;
$opt_delete= undef;
$opt_directory= $PWD;
$opt_dry_run= undef;
$opt_export_only= undef;
$opt_help= $opt_verbose= 0;
$opt_log= undef;
$opt_mail= "build\@mysql.com";
$opt_pull= undef;
$opt_revision= undef;
$opt_suffix= "";
$opt_test= undef;
$opt_skip_check= undef;
$opt_skip_manual= undef;
$opt_win_dist= undef;
$opt_quiet= undef;
$version= "unknown";
$major=$minor=$release=0;
GetOptions(
"archive-log|a",
"build-command|b=s",
"changelog|c:s",
"directory|d=s",
"delete",
"docdir=s",
"dry-run",
"export-only|e",
"help|h",
"log|l:s",
"mail|m=s",
"pull|p",
"revision|r=s",
"skip-check|s",
"skip-manual",
"suffix=s",
"test|t",
"verbose|v",
"win-dist|w",
"quiet|q",
) || print_help("");
#
# Override predefined build command
#
if (defined $opt_build_command)
{
$build_command= $opt_build_command;
}
print_help("") if ($opt_help);
defined($REPO=$ARGV[0]) || print_help("Please enter the BK repository to be used!");
#
# Override predefined Log file name
#
if (defined $opt_log)
{
if ($opt_log ne "")
{
if ($opt_log =~ /^\/.*/)
{
$LOGFILE= $opt_log;
}
else
{
$LOGFILE= $PWD . "/" . $opt_log;
}
}
}
$LOGFILE= $PWD . "/Bootstrap-" . $REPO . ".log" unless ($LOGFILE);
&logger("Starting build");
&abort("The directory \"$REPO\" could not be found!") if (!-d $REPO);
&logger("Using $REPO as the BK parent repository");
system ("bk help > /dev/null") == 0 or &abort("Cannot execute BitKeeper binary!");
system ("bk root $REPO > /dev/null 2>&1") == 0 or &abort("$REPO does not seem to be a valid BK repository!");
if (($opt_directory ne $PWD) && (!-d $opt_directory && !$opt_dry_run))
{
&abort("Could not find target directory \"$opt_directory\"!");
}
&logger("Logging to $LOGFILE") if (defined $opt_log);
#
# Pull recent changes first
#
if ($opt_pull)
{
&bk_pull("$REPO");
&bk_pull("$opt_docdir") unless ($opt_skip_manual);
}
#
# Use a temporary name until we know the version number
#
$target_dir= $opt_directory . "/mysql-" . $$ . "-" . time() . ".tmp";
&logger("Using temporary directory $target_dir");
&abort("Target directory $target_dir already exists!") if (-d $target_dir && !$opt_dry_run);
#
# Export the BK tree
#
$command= "bk export ";
$command.= "-r " . $opt_revision . " " if $opt_revision;
$command.= "-v " if ($opt_verbose || defined $opt_log);
$command.= $REPO . " " . $target_dir;
&logger("Exporting $REPO");
&run_command($command, "Could not create $target_dir!");
#
# Make sure we can write all files
#
$command= "find $target_dir -type f -print0 | xargs --null chmod u+w";
&run_command($command, "Failed to fix file permissions!");
#
# Try to obtain version number from newly extracted configure.in
#
$CONF="$target_dir/configure.in";
&abort("Could not find \"$CONF\" to determine version!") if (!-f $CONF && !$opt_dry_run);
#
# The following can only be done, if the tree has actually been
# exported - it cannot be performed in a dry run.
#
if (!$opt_dry_run)
{
open (CONF, $CONF) or &abort("Unable to open \"$CONF\": $!");
@conf= <CONF>;
close CONF;
foreach (@conf)
{
m/^AM_INIT_AUTOMAKE\(mysql, ([1-9]\.[0-9]{1,2}\.[0-9]{1,2}.*)\)/;
$version= $1;
($major, $minor, $release) = split(/\./,$version);
}
&logger("Found version string: $version");
#
# Add suffix to version string and write out the modified file
#
if ($opt_suffix)
{
$opt_suffix= "-" . &ymd() if ($opt_suffix eq "YMD");
&logger("Replacing $version with $version$opt_suffix");
foreach (@conf)
{
s/^AM_INIT_AUTOMAKE.*/AM_INIT_AUTOMAKE\(mysql, $version$opt_suffix\)/;
}
open(CONF,">$CONF") or &abort("Unable to open \"$CONF\": $!");
print CONF @conf;
close(CONF);
}
}
#
# Rename directory according to the version number found in configure.in
# of the extracted tree (plus suffix, if requested)
#
$temp_name= $target_dir;
$target_dir= $opt_directory . "/mysql-" . $version . $opt_suffix . "-build";
if (-d $target_dir)
{
&logger("Target directory $target_dir already exists!");
if ($opt_delete)
{
&logger("Deleting $target_dir...");
$command= "rm ";
$command.= "-v " if ($opt_verbose || defined $opt_log);
$command.= "$target_dir";
&run_command($command, "Could not delete $target_dir!");
}
else
{
# Get the time stamp of "configure.in"
@stat= stat("$target_dir/configure.in");
my $mtime= $stat[9];
my ($sec,$min,$hour,$mday,$mon,$year) = localtime($mtime);
my $mtime= sprintf("%04d-%02d-%02d-%02d:%02d", $year+1900, $mon+1, $mday, $hour, $min);
&logger("Renaming $target_dir to $target_dir-$mtime");
$command= "mv ";
$command.= "-v " if ($opt_verbose || defined $opt_log);
$command.= "$target_dir $target_dir-$mtime";
&run_command($command, "Could not rename $target_dir!");
}
}
&logger("Renaming temporary directory to $target_dir");
$command= "mv ";
$command.= "-v " if ($opt_verbose || defined $opt_log);
$command.= "$temp_name $target_dir";
&run_command($command, "Could not rename $temp_name!");
#
# Add a ChangeLog (make dist will pick it up automatically)
#
if (defined $opt_changelog)
{
#
# Use some magic to obtain the correct ChangeSet number that identifies
# the last tagged ChangeSet (this relies heavily on our current tagging
# practice!)
#
$opt_changelog=~ s/^=//; # Sometimes, a leading '=' was not stripped.
my $log_base= $opt_changelog;
my $changelogfile;
if ($target_dir =~ m:^/:) # we need an absolute path, as we change directory
{
$changelogfile= $target_dir. "/ChangeLog";
}
else
{
$changelogfile= cwd() . "/" . $target_dir . "/ChangeLog";
}
if ($opt_changelog eq "last")
{
if (!$opt_revision)
{
$log_base= `bk changes -t -d':REV:::TAG:' -n $REPO | grep mysql-$major.$minor | head -1 | cut -f1 -d ":"`;
}
else
{
$log_base= `bk changes -r..$opt_revision -t -d':REV:' -n $REPO | head -2 | tail -1`;
}
chomp($log_base);
}
$msg= "Adding $changelogfile";
$msg.= " (down to revision $log_base)" if $log_base ne "";
&logger($msg);
# Due to a BK error, "bk changes" must be run in $REPO !
$command= "cd $REPO ; ";
$command.= "bk changes -v";
$command.= " -r" if ($log_base ne "" || $opt_revision);
$command.= $log_base if $log_base ne "";
$command.= ".." if ($log_base ne "" && !$opt_revision);
$command.= ".." . $opt_revision if $opt_revision;
$command.= " > $changelogfile";
&logger($command);
# We cannot use run_command here because of output redirection
unless ($opt_dry_run)
{
system($command) == 0 or &abort("Could not create $changelogfile!");
}
}
#
# Add the latest manual and tool from the mysqldoc tree
#
unless ($opt_skip_manual)
{
&logger("Updating manual files");
foreach $file qw/internals manual reservedwords errmsg-table cl-errmsg-table/
{
system ("bk cat $opt_docdir/Docs/$file.texi > $target_dir/Docs/$file.texi") == 0
or &abort("Could not update $file.texi in $target_dir/Docs/!");
}
&run_command("cp $opt_docdir/Docs/Support/texi2html $target_dir/Docs/Support",
"Could not copy $opt_docdir/Docs/Support/texi2html!");
&run_command("rm -f $target_dir/Docs/Images/Makefile*",
"Could not remove Makefiles in $target_dir/Docs/Images/!");
&run_command("cp $opt_docdir/Docs/Images/*.* $target_dir/Docs/Images",
"Could not copy image files in $target_dir/Docs/Images/!");
}
#
# Abort here, if we just wanted to export the tree
#
if ($opt_export_only)
{
&logger("SUCCESS: Export finished successfully.");
exit 0;
}
#
# Enter the target directory first
#
&logger("Entering $target_dir");
if (!$opt_dry_run)
{
chdir($target_dir) or &abort("Cannot chdir to $target_dir: $!");
}
#
# Now build the source distribution
#
&logger("Compiling...");
$command= $build_command;
&run_command($command, "Compilation failed!");
#
# Testing the built binary by running "make test" (optional)
#
if ($opt_test)
{
&logger ("Running test suite");
$command= "make test";
&run_command($command, "\"make test\" failed!");
}
#
# Pack it all up
#
&logger("Creating source distribution");
$command= "make dist";
&run_command($command, "make dist failed!");
#
# Package the Windows source
#
if ($opt_win_dist)
{
&logger ("Creating Windows source package");
$command= "./scripts/make_win_src_distribution --tar --zip";
&run_command($command, "make_win_src_distribution failed!");
}
#
# Run "make distcheck" to verify the source archive
#
if (!$opt_skip_check)
{
&logger ("Checking source distribution");
$command= "make distcheck";
&run_command($command, "make distcheck failed!");
}
#
# All done when we came down here
#
&logger("SUCCESS: Build finished successfully.") if (!$opt_dry_run);
#
# Move the log file into the Log dir of the target dir
#
if ($opt_archive_log)
{
my $logdir= $target_dir . "/Logs";
&logger("Moving $LOGFILE to $logdir");
mkdir "$logdir" if (! -d $logdir);
$command= "mv ";
$command.= "-v " if ($opt_verbose || defined $opt_log);
$command.= "$LOGFILE $logdir";
&run_command($command, "Could not move $LOGFILE to $logdir!");
}
exit 0;
#
# Run a BK pull on the given BK tree
#
sub bk_pull
{
my $bk_tree= $_[0];
&logger("Updating BK tree $bk_tree to latest ChangeSet first");
chdir ($bk_tree) or &abort("Could not chdir to $bk_tree!");
&run_command("bk pull", "Could not update $bk_tree!");
chdir ($PWD) or &abort("Could not chdir to $PWD!");
}
#
# Print the help text message (with an optional message on top)
#
sub print_help
{
my $message= $_[0];
if ($message ne "")
{
print "\n";
print "ERROR: $message\n";
}
print <<EOF;
Usage: Bootstrap [options] <bk repository>
Creates a MySQL source distribution to be used for the release builds.
It checks out (exports) a clear-text version of the given local BitKeeper
repository, creates and adds a Changelog file (if requested), adds the
latest manual files from the mysqldoc BK tree and builds a source
distribution (*.tar.gz) file. Optionally, the test suite and the
distribution check can be run before the source archive is being created.
Options:
-a, --archive-log Move the log file into the Logs directory of
the exported tree after a successful build
-b, --build-command=<cmd> Use <cmd> to compile the sources before packing
the distribution.
(default is "$build_command")
-c, --changelog[=<rev>] Add a ChangeLog [down to revision <rev>]
This will automatically be included in the source
distribution. To get a ChangeLog down to the last
tagged Changeset, simply use "last" as the revision
number.
--delete Delete an already existing distribution directory
in the target directory instead of renaming it.
-d, --directory=<dir> Specify the target directory
(default is "$opt_directory")
--docdir=<dir> Use the MySQL documentation BK tree located
in <dir>
(default is "$opt_docdir")
--dry-run Dry run without executing
-e, --export-only Just export (and add the ChangeLog, if requested),
do not build or test the source distribution
-h, --help Print this help message
-l, --log[=<filename>] Write a log file [to <filename>]
(default is "./Bootstrap-<bk repository>.log")
-m, --mail=<address> Mail a failure report to the given address (and
include a log file snippet, if logging is enabled)
Note that the \@-Sign needs to be quoted!
Example: --mail=user\\\@domain.com
Default: build\@mysql.com
-q, --quiet Be quiet
-p, --pull Update the source BK trees before building
-r, --revision=<rev> Export the tree as of revision <rev>
(default is up to the latest revision)
-s, --skip-check Skip checking the distribution with "make distcheck"
--skip-manual Skip updating the manual from the mysqldoc tree
--suffix=<suffix> Append <suffix> to the version number in
configure.in. Using the special suffix "YMD" will
add the current date as the suffix
(e.g. "-20020518").
-t, --test Run the test suite after build
-v, --verbose Be verbose
-w, --win-dist Also make Windows source distribution
Example:
Bootstrap -c last -v -l -- mysql-4.0
EOF
exit 1;
}

View File

@ -1,108 +0,0 @@
#!/bin/sh
WD=`pwd`
# Don't write a wrong path for BD !!!!!
if [ -w /my/tmp ]
then
BD=/my/tmp/BUILD
elif [ -n "$TMPDIR" ]
then
BD=$TMPDIR/BUILD
else
BD=/tmp/BUILD
fi
TMP_SCRIPT=$WD/Logs/00-temp-for-do-all-build-steps.$$
# We build on work
to_host=`hostname`
cc=gcc
ccc=gcc
EXTRA_CONFIG="--without-perl"
#AM_MAKEFLAGS="-j 2"
echo "Building on $to_host"
rm -rf $BD/*
rm -f $WD/binary/*
mkdir -p $WD/binary
mkdir -p $WD/Logs
mkdir -p $BD/Logs
cat > $TMP_SCRIPT <<END
# Show executed commands
set -x
# Move to the right place
cd "$WD"
# Create a build directory tree
bk export $BD
cd "$BD"
chmod -R u+rw,g+rw .
# Make it easy to remove an old build
umask 002
CC=$cc CXX=$ccc
export CC CXX
gmake -j 2 -k distclean
rm -f NEW-RPMS/*
# Stop on error
set -e
/bin/rm -f */.deps/*.P
/bin/rm -f config.cache
aclocal; autoheader; aclocal; automake; autoconf
(cd bdb/dist && sh s_all)
(cd innobase && aclocal && autoheader && aclocal && automake && autoconf)
# A normal user starts here. We must use mit-threads, bdb and innodb.
# Otherwise they do not end up in the distribution.
./configure \
--with-unix-socket-path=/var/tmp/mysql.sock \
--with-low-memory \
--with-mit-threads=yes $EXTRA_CONFIG \
--enable-thread-safe-client \
--enable-local-infile \
--with-berkeley-db \
--with-innodb \
--with-vio \
--without-pstack \
--with-extra-tools \
--with-embedded-server
gmake -j 2
time gmake -j 2 distcheck \
EXTRA_CONF_ARGS="--with-unix-socket-path=/var/tmp/mysql.sock --with-low-memory $EXTRA_CONFIG"
sh $BD/Build-tools/Do-rpm $*
rm -f $TMP_SCRIPT
END
set -e
log=$WD/Logs/Log-distcheck-`date +%y%m%d-%H%M`
echo "Logging script $TMP_SCRIPT into $log"
if test $to_host = "mysql-work"
then
# Try to get the right user for MySQL builds on work so that all
# files is owned by the same user (mysql)
ssh -n $to_host -l my "time sh $TMP_SCRIPT" > $log 2>&1
else
time sh $TMP_SCRIPT > $log 2>&1
fi
# Create a commercial MySQL distribution (mysqlcom-VER.tar.gz) from
# the newly made source distribution
cd "$BD"
DIST=`ls -t mysql-*.tar.gz | head -1`
$BD/Build-tools/mysql-copyright --target=. $DIST
# move the binaries to the 'binary' directory
mv $BD/mysql*tar.gz $WD/binary
mv $BD/NEW-RPMS/* $WD/binary

View File

@ -1,941 +0,0 @@
#!/usr/bin/perl -w
use File::Basename;
use Getopt::Long;
use Sys::Hostname;
@config_options= ();
@make_options= ();
$opt_comment=$opt_distribution=$opt_user=$opt_config_env=$opt_config_extra_env="";
$opt_dbd_options=$opt_perl_options=$opt_config_options=$opt_make_options=$opt_suffix="";
$opt_tmp=$opt_version_suffix="";
$opt_bundled_zlib=$opt_help=$opt_delete=$opt_debug=$opt_stage=$opt_no_test=$opt_no_perl=$opt_one_error=$opt_with_low_memory=$opt_fast_benchmark=$opt_static_client=$opt_static_server=$opt_static_perl=$opt_sur=$opt_with_small_disk=$opt_local_perl=$opt_tcpip=$opt_build_thread=$opt_use_old_distribution=$opt_enable_shared=$opt_no_crash_me=$opt_no_strip=$opt_with_archive=$opt_with_cluster=$opt_with_csv=$opt_with_example=$opt_with_debug=$opt_no_benchmark=$opt_no_mysqltest=$opt_without_embedded=$opt_readline=$opt_with_blackhole=0;
$opt_skip_embedded_test=$opt_skip_ps_test=$opt_innodb=$opt_bdb=$opt_raid=$opt_libwrap=$opt_clearlogs=$opt_with_federated=$opt_with_big_tables=0;
$global_step="";
GetOptions(
"bdb",
"build-thread=i",
"bundled-zlib",
"comment=s",
"config-env=s" => \@config_env,
"config-extra-env=s" => \@config_extra_env,
"config-options=s" => \@config_options,
"dbd-options=s",
"debug",
"delete",
"distribution=s",
"enable-shared",
"fast-benchmark",
"help|Information",
"innodb",
"libwrap",
"local-perl",
"make-options=s" => \@make_options,
"no-crash-me",
"no-perl",
"no-strip",
"no-test",
"no-mysqltest",
"no-benchmark",
"one-error",
"perl-files=s",
"perl-options=s",
"raid",
"readline",
"skip-embedded-test",
"skip-ps-test",
"stage=i",
"static-client",
"static-perl",
"static-server",
"suffix=s",
"sur",
"tcpip",
"tmp=s",
"use-old-distribution",
"user=s",
"version-suffix=s",
"with-archive",
"with-big-tables",
"with-blackhole",
"with-cluster",
"with-csv",
"with-debug",
"with-example",
"with-federated",
"with-low-memory",
"with-other-libc=s",
"with-small-disk",
"without-embedded",
"clearlogs",
) || usage();
usage() if ($opt_help);
usage() if (!$opt_distribution);
if (@make_options > 0)
{
chomp(@make_options);
$opt_make_options= join(" ", @make_options);
}
if (@config_options > 0)
{
chomp(@config_options);
$opt_config_options= join(" ", @config_options);
}
if (@config_env > 0)
{
chomp(@config_env);
$opt_config_env= join(" ", @config_env);
}
if (@config_extra_env > 0)
{
chomp(@config_extra_env);
$opt_config_extra_env= join(" ", @config_extra_env);
}
$host= hostname();
chomp($uname=`uname`);
$full_host_name=$host;
$connect_option= ($opt_tcpip ? "--host=$host" : "");
$host =~ /^([^.-]*)/;
$host=$1 . $opt_suffix;
$email="$opt_user\@mysql.com";
chomp($pwd = `pwd`);
$VER= basename($opt_distribution);
$VER=~ /mysql.*-([1-9]\.[0-9]{1,2}\.[0-9]{1,2}.*)\.tar*/; $version=$1;
$release=""; # Shut up perl
($major, $minor, $release) = split(/\./,$version);
$log="$pwd/Logs/$host-$major.$minor$opt_version_suffix.log";
$opt_distribution =~ /(mysql[^\/]*)\.tar/;
$ver=$1;
$gcc_version=which("gcc");
$opt_comment= "Official MySQL$opt_version_suffix binary" unless $opt_comment;
if (defined($gcc_version) && ! $opt_config_env)
{
$tmp=`$gcc_version -v 2>&1`;
if ($tmp =~ /version 2\.7\./)
{
$opt_config_env= 'CC=gcc CFLAGS="-O2 -fno-omit-frame-pointer" CXX=gcc CXXFLAGS="-O2 -fno-omit-frame-pointer"';
}
elsif ($tmp =~ /version 3\.0\./)
{
$opt_config_env= 'CC=gcc CFLAGS="-O3 -fno-omit-frame-pointer" CXXFLAGS="-O3 -fno-omit-frame-pointer -felide-constructors -fno-exceptions -fno-rtti"';
}
else
{
$opt_config_env= 'CC=gcc CFLAGS="-O3 -fno-omit-frame-pointer" CXX=gcc CXXFLAGS="-O3 -fno-omit-frame-pointer -felide-constructors -fno-exceptions -fno-rtti"';
}
}
$opt_config_env.=" $opt_config_extra_env";
$new_opt_tmp=0;
if ($opt_tmp)
{
unless (-d $opt_tmp)
{
safe_system("mkdir $opt_tmp");
$new_opt_tmp=1;
}
$ENV{'TMPDIR'}=$opt_tmp;
}
else
{
$opt_tmp="/tmp";
}
$bench_tmpdir="$opt_tmp/my_build-$host";
$ENV{'PATH'}= "$pwd/$host/bin:" . $ENV{'PATH'};
$make=which("gmake","make"); # Can't use -j here!
$tar=which("gtar","tar");
$sendmail=find("/usr/lib/sendmail","/usr/sbin/sendmail");
$sur= $opt_sur ? "/my/local/bin/sur" : "";
delete $ENV{'MYSQL_PWD'}; # Reset possibly password
delete $ENV{'MY_BASEDIR_VERSION'};
$ENV{'MYSQL_TCP_PORT'}= $mysql_tcp_port= 3334 + $opt_build_thread*2;
$ENV{'MYSQL_UNIX_PORT'}=$mysql_unix_port="$opt_tmp/mysql$opt_suffix.build";
$ENV{"PERL5LIB"}="$pwd/$host/perl5:$pwd/$host/perl5/site_perl";
$slave_port=$mysql_tcp_port+16;
$ndbcluster_port= 9350 + $opt_build_thread*4;
$manager_port=$mysql_tcp_port+1;
$mysqladmin_args="--no-defaults -u root --connect_timeout=5 --shutdown_timeout=20";
if ($opt_stage == 0 || $opt_clearlogs)
{
system("mkdir Logs") if (! -d "Logs");
system("mv $log ${log}-old") if (-f $log);
unlink($log);
}
open(LOG,">>$log") || abort("Can't open log file, error $?");
select LOG;
$|=1;
select STDOUT;
$|=1;
info("Compiling MySQL$opt_version_suffix at $host$opt_suffix, stage: $opt_stage\n");
info("LD_LIBRARY_PATH is $ENV{LD_LIBRARY_PATH}");
info("PATH is $ENV{PATH}");
$global_step= "Check MD5, shutdown";
log_timestamp("START");
$md5_result= safe_system("perl $ENV{HOME}/my_md5sum -c ${opt_distribution}.md5");
if ($md5_result != 0)
{
abort("MD5 check failed for $opt_distribution!");
}
else
{
info("SUCCESS: MD5 checks for $opt_distribution");
}
if (-x "$host/bin/mysqladmin")
{
log_system("$host/bin/mysqladmin $mysqladmin_args -S $mysql_unix_port -s shutdown");
log_system("$host/bin/mysqladmin $mysqladmin_args -P $mysql_tcp_port -h $host -s shutdown");
log_system("$host/bin/mysqladmin $mysqladmin_args -P $slave_port -h $host -s shutdown");
log_system("$host/bin/mysqladmin $mysqladmin_args -P 9306 -h $host -s shutdown");
log_system("$host/bin/mysqladmin $mysqladmin_args -P 9307 -h $host -s shutdown");
}
kill_all("mysqlmanager");
#
# Kill all old processes that are in the build directories
# This is to find any old mysqld servers left from previous builds
kill_all("$pwd/host/mysql");
kill_all("$pwd/host/test");
$global_step= "directory cleanup";
if ($opt_stage == 0)
{
log_timestamp("START");
print "$host: Removing old distribution\n" if ($opt_debug);
if (!$opt_use_old_distribution)
{
system("mkdir $host") if (! -d $host);
system("touch $host/mysql-fix-for-glob");
rm_all(<$host/mysql*>);
system("mkdir $host/bin") if (! -d "$host/bin");
}
rm_all("$host/test");
system("mkdir $host/test") if (! -d "$host/test");
}
safe_cd($host);
if ($opt_stage == 0 && ! $opt_use_old_distribution)
{
safe_system("gunzip < $opt_distribution | $tar xf -");
# Fix file times; This is needed because the time for files may be
# in the future. The following is done this way to ensure that
# we don't get any errors from xargs touch
system("touch timestamp");
sleep(2);
system("touch timestamp2");
system("find . -newer timestamp -print | xargs touch");
unlink("timestamp");
unlink("timestamp2");
sleep(2);
# Ensure that files we don't want to rebuild are newer than other files
safe_cd($ver);
foreach $name ("configure",
"Docs/include.texi",
"Docs/*.html", "Docs/manual.txt", "Docs/mysql.info",
"sql/sql_yacc.h", "sql/sql_yacc.cc")
{
system("touch $name");
}
# Fix some file modes in BDB tables that makes life harder.
system("chmod -R u+rw .");
}
safe_cd("$pwd/$host/$ver");
#
# Configure the sources
#
$global_step= "configure";
if ($opt_stage <= 1)
{
# Fix files if this is in another timezone than the build host
log_timestamp("START");
unlink("config.cache");
unlink("bdb/build_unix/config.cache");
unlink("innobase/config.cache");
log_system("$make clean") if ($opt_use_old_distribution);
$opt_config_options.= " --disable-shared" if (!$opt_enable_shared); # Default for binary versions
$opt_config_options.= " --with-berkeley-db" if ($opt_bdb);
$opt_config_options.= " --with-zlib-dir=bundled" if ($opt_bundled_zlib);
$opt_config_options.= " --with-client-ldflags=-all-static" if ($opt_static_client);
$opt_config_options.= " --with-debug" if ($opt_with_debug);
$opt_config_options.= " --without-ndb-debug" if ($opt_with_debug && $opt_with_cluster);
$opt_config_options.= " --with-libwrap" if ($opt_libwrap);
$opt_config_options.= " --with-low-memory" if ($opt_with_low_memory);
$opt_config_options.= " --with-big-tables" if ($opt_with_big_tables);
$opt_config_options.= " --with-mysqld-ldflags=-all-static" if ($opt_static_server);
$opt_config_options.= " --with-raid" if ($opt_raid);
if ($opt_readline)
{
$opt_config_options.= " --with-readline";
}
else
{
$opt_config_options.= " --with-libedit";
}
$opt_config_options.= " --with-embedded-server" unless ($opt_without_embedded);
$opt_skip_embedded_test= 1 if ($opt_without_embedded);
$opt_config_options.= " --with-archive-storage-engine" if ($opt_with_archive);
$opt_config_options.= " --with-blackhole-storage-engine" if ($opt_with_blackhole);
$opt_config_options.= " --with-ndbcluster" if ($opt_with_cluster);
$opt_config_options.= " --with-csv-storage-engine" if ($opt_with_csv);
$opt_config_options.= " --with-example-storage-engine" if ($opt_with_example);
$opt_config_options.= " --with-federated-storage-engine" if ($opt_with_federated);
# Only enable InnoDB when requested (required to be able to
# build the "Classic" packages that do not include InnoDB)
if ($opt_innodb)
{
$opt_config_options.= " --with-innodb";
}
else
{
$opt_config_options.= " --without-innodb";
}
if ($opt_with_other_libc)
{
$opt_with_other_libc= " --with-other-libc=$opt_with_other_libc";
$opt_config_options.= $opt_with_other_libc;
}
$prefix="/usr/local/mysql";
check_system("$opt_config_env ./configure --prefix=$prefix --localstatedir=$prefix/data --libexecdir=$prefix/bin --with-comment=\"$opt_comment\" --with-extra-charsets=complex --with-server-suffix=\"$opt_version_suffix\" --enable-thread-safe-client --enable-local-infile $opt_config_options","Thank you for choosing MySQL");
if (-d "$pwd/$host/include-mysql")
{
safe_system("cp -r $pwd/$host/include-mysql/* $pwd/$host/$ver/include");
}
log_timestamp("DONE ");
}
#
# Compile the binaries
#
$global_step= "compile + link";
if ($opt_stage <= 2)
{
my ($command);
log_timestamp("START");
unlink($opt_distribution) if ($opt_delete && !$opt_use_old_distribution);
$command=$make;
$command.= " $opt_make_options" if (defined($opt_make_options) && $opt_make_options ne "");
safe_system($command);
print LOG "Do-compile: Build successful\n";
log_timestamp("DONE ");
}
#
# Create the binary distribution
#
$global_step= "pack binary distribution";
if ($opt_stage <= 3)
{
log_timestamp("START");
my $flags= "";
log_system("rm -fr mysql-{3,4,5}* $pwd/$host/mysql*.t*gz");
# No need to add the debug symbols, if the binaries are not stripped (saves space)
unless ($opt_with_debug || $opt_no_strip)
{
log_system("nm -n sql/mysqld | gzip -9 -v 2>&1 > sql/mysqld.sym.gz | cat");
}
$flags.= " --no-strip" if ($opt_no_strip || $opt_with_debug);
$flags.= " --with-ndbcluster" if ($opt_with_cluster);
check_system("scripts/make_binary_distribution --tmp=$opt_tmp --suffix=$opt_suffix $flags",".tar.gz created");
safe_system("mv mysql*.t*gz $pwd/$host");
if (-f "client/.libs/mysqladmin")
{
safe_system("cp client/.libs/mysqladmin $pwd/$host/bin");
}
else
{
safe_system("cp client/mysqladmin $pwd/$host/bin");
}
safe_system("$make clean") if ($opt_with_small_disk);
log_timestamp("DONE ");
}
$tar_file=<$pwd/$host/mysql*.t*gz>;
abort ("Could not find tarball!") unless ($tar_file);
# Generate the MD5 for the binary distribution
$tar_file=~ /(mysql[^\/]*)\.(tar\.gz|tgz)/;
$tar_file_lite= "$1.$2";
system("cd $pwd/$host; perl $ENV{HOME}/my_md5sum $tar_file_lite > ${tar_file_lite}.md5");
#
# Unpack the binary distribution
#
$global_step= "extract binary distribution";
if ($opt_stage <= 4 && !$opt_no_test)
{
log_timestamp("START");
rm_all(<$pwd/$host/test/*>);
safe_cd("$pwd/$host/test");
safe_system("gunzip < $tar_file | $tar xf -");
log_timestamp("DONE ");
}
$tar_file =~ /(mysql[^\/]*)\.(tar\.gz|tgz)/;
$ver=$1;
$test_dir="$pwd/$host/test/$ver";
$ENV{"LD_LIBRARY_PATH"}= ("$test_dir/lib" .
(defined($ENV{"LD_LIBRARY_PATH"}) ?
":" . $ENV{"LD_LIBRARY_PATH"} : ""));
#
# Run the test suite
#
$global_step= "tests in default mode";
if ($opt_stage <= 5 && !$opt_no_test && !$opt_no_mysqltest)
{
log_timestamp("START");
my $flags= "";
$flags.= " --with-ndbcluster" if ($opt_with_cluster);
$flags.= " --force" if (!$opt_one_error);
info("Running test suite");
system("mkdir $bench_tmpdir") if (! -d $bench_tmpdir);
safe_cd("${test_dir}/mysql-test");
check_system("./mysql-test-run $flags --tmpdir=$bench_tmpdir --master_port=$mysql_tcp_port --slave_port=$slave_port --ndbcluster_port=$ndbcluster_port --manager-port=$manager_port --no-manager --sleep=10", "were successful");
log_timestamp("DONE ");
$global_step= "tests using prepared statements";
unless ($opt_skip_ps_test)
{
log_timestamp("START");
info("Running test suite using prepared statements");
check_system("./mysql-test-run $flags --ps-protocol --tmpdir=$bench_tmpdir --master_port=$mysql_tcp_port --slave_port=$slave_port --ndbcluster_port=$ndbcluster_port --manager-port=$manager_port --no-manager --sleep=10", "were successful");
log_timestamp("DONE ");
}
$global_step= "tests using embedded server";
unless ($opt_skip_embedded_test)
{
log_timestamp("START");
info("Running embedded server test suite");
# Embedded server and NDB don't jive
$flags=~ s/ --with-ndbcluster//;
check_system("./mysql-test-run $flags --embedded-server --tmpdir=$bench_tmpdir --master_port=$mysql_tcp_port --slave_port=$slave_port --manager-port=$manager_port --no-manager --sleep=10", "were successful");
log_timestamp("DONE ");
}
# 'mysql-test-run' writes its own final message for log evaluation.
}
#
# Start the server if we are going to run any of the benchmarks
#
if (!$opt_no_test && !$opt_no_benchmark)
{
my $extra;
safe_cd($test_dir);
log_system("./bin/mysqladmin $mysqladmin_args -S $mysql_unix_port -s shutdown") || info("There was no mysqld running\n");
sleep(2);
log_system("rm -f ./data/mysql/*");
check_system("scripts/mysql_install_db --no-defaults --skip-locking","https://order");
$extra="";
if ($opt_bdb)
{
$extra.=" --bdb_cache_size=16M --bdb_max_lock=240000"
}
if ($opt_innodb)
{
$extra.=" --innodb_data_file_path=ibdata1:100M:autoextend";
}
safe_system("./bin/mysqld --no-defaults --basedir . --datadir ./data --skip-locking $extra >> $log 2>&1 &");
sleep(2);
}
#
# Compile and install the required Perl modules
#
$global_step= "installing Perl modules";
if ($opt_stage <= 7 && $opt_perl_files && !$opt_no_perl && !$opt_no_test &&
!$opt_no_benchmark)
{
log_timestamp("START");
safe_cd($test_dir);
rm_all("perl");
safe_system("mkdir perl");
$ENV{'IN_MYSQL_DISTRIBUTION'}=1;
$ENV{'MYSQL_BUILD'}=$test_dir;
foreach $module (split(/,/,$opt_perl_files))
{
my $options;
safe_cd("$test_dir/perl");
if ($opt_debug)
{
safe_system("gunzip < $pwd/$module | tar xvf -");
}
else
{
safe_system("gunzip < $pwd/$module | tar xf -");
}
$module =~ m|([^/]+)\.tar\.gz|;
$module = $1;
safe_cd($module);
$options="";
$options= "--mysql-install --noprompt --mysql-incdir=$test_dir/include --mysql-libdir=$test_dir/lib -nomsql-install -nomsql1-install --mysql-test-db=test $opt_dbd_options" if ($module =~ /Msql-Mysql/);
$options.= " PREFIX=$pwd/$host INSTALLPRIVLIB=$pwd/$host/perl5 INSTALLSCRIPT=$pwd/$host/bin INSTALLSITELIB=$pwd/$host/perl5/site_perl INSTALLBIN=$pwd/$host/bin INSTALLMAN1DIR=$pwd/$host/man INSTALLMAN3DIR=$pwd/$host/man/man3" if ($opt_local_perl);
$options.= " $opt_perl_options" if (defined($opt_perl_options));
safe_system($opt_static_perl ? "perl Makefile.PL -static $options" : "perl Makefile.PL $options");
safe_system("$make ; $sur $make install");
}
log_timestamp("DONE ");
}
#
# Run crash-me test
#
$global_step= "crash-me checks";
if ($opt_stage <= 8 && !$opt_no_test && !$opt_no_crash_me)
{
log_timestamp("START");
safe_cd("$test_dir/sql-bench");
log_system("rm -f limits/mysql.cfg");
safe_system("perl ./crash-me --force --batch-mode $connect_option");
log_timestamp("DONE ");
}
#
# Run sql-bench Benchmarks
#
$global_step= "benchmarks";
if ($opt_stage <= 9 && !$opt_no_test && !$opt_no_benchmark)
{
log_timestamp("START");
safe_cd("$test_dir/sql-bench");
log_system("rm -f output/*");
$tmp= $opt_fast_benchmark ? "--fast --user root --small-test" : "";
check_system("perl ./run-all-tests --log --die-on-errors $connect_option $tmp","RUN-mysql");
# Run additional fast test with dynamic-row tables
check_system("perl ./run-all-tests --log --suffix=\"_dynamic_rows\" --die-on-errors $connect_option --fast --user=root --small-test --create-options=\"row_format=dynamic\"","RUN-mysql");
if ($opt_innodb)
{
check_system("perl ./run-all-tests --log --suffix=\"_innodb\" --die-on-errors $connect_option $tmp --create-options=\"type=innodb\"","RUN-mysql");
}
if ($opt_bdb)
{
check_system("perl ./run-all-tests --log --suffix=\"_bdb\" --die-on-errors $connect_option $tmp --create-options=\"type=bdb\"","RUN-mysql");
}
log_timestamp("DONE ");
}
rm_all($bench_tmpdir);
rm_all("$opt_tmp") if ($new_opt_tmp);
log_system("$pwd/$host/bin/mysqladmin $mysqladmin_args -S $mysql_unix_port shutdown");
print LOG "ok\n";
close LOG;
print "$host: ok\n";
exit 0;
sub usage
{
print <<EOF;
$0 version 1.6
$0 takes the following options:
--bdb
Compile with support for Berkeley DB tables
--build-thread=<1,2,3...>
When running several Do-compile runs in parallel, each build
should have its own thread ID, so running the test suites
does not cause conflicts with duplicate TCP port numbers.
--comment=<comment>
Replace the default compilation comment that is embedded into
the mysqld binary.
--config-env=<environment for configure>
To set up the environment, like 'CC=cc CXX=gcc CXXFLAGS=-O3'
--config-extra-env <environment for configure>
Additional flags for environment (not CC or CXX). Should be used when one
wants Do-compile to propose proper CC and CXX flags.
--config-options=<options>
To add some extra options to configure (e.g. '--with-perl=yes')
--dbd-options <options>
Options for Makefile.PL when configuring msql-mysql-modules.
--debug
Print all shell commands on stdout.
--delete
Delete the distribution file.
--distribution=<distribution_file>
Name of the MySQL source distribution file.
--enable-shared
Compile with shared libraries
--fast-benchmark
Run fast benchmark only to speed up testing
--help or --Information
Show this help
--innodb
Compile with support for Innodb tables
--libwrap
Compile with TCP wrapper support
--local-perl
Install Perl modules locally
--make-options=<options>
Options to make after configure. (Like 'CXXLD=gcc')
--no-crash-me
Do not run the "crash-me" test
--no-strip
Do not strip the binaries included in the binary distribution
--no-test
Do not run any tests.
--no-benchmark
Do not run the benchmark test (written in perl)
--no-mysqltest
Do not run the mysql-test-run test (Same as 'make test')
--one-error
Terminate the mysql-test-run test after the first difference (default: use '--force')
--no-perl
Do not compile or install Perl modules, use the system installed ones
--perl-files=<list of files>
Compile and install the given perl modules.
--perl-options=<options>
Build Perl modules with the additional options
--raid
Compile with RAID support
--readline
Compile against readline library instead of libedit
--skip-embedded-test
Skip running the test suite against the embedded server
--skip-ps-test
Skip running the additional test run that uses the prepared statement protocol
--stage=[1-6]
Start script from some specific point.
--static-client
Build statically linked client binaries
--static-perl
Build statically linked Perl modules
--static-server
Build statically linked server binary
--tcpip
Connect to the server to be tested via TCP/IP instead of socket
--tmp=<directory>
Use a different temporary directory than /tmp
--use-old-distribution
Do not clean up the build environment and extract a fresh source
distribution, use an existing one instead.
--user=<user_name>
Mail 'user_name'\@mysql.com if something went wrong.
If user is empty then no mail is sent.
--version-suffix=suffix
Set name suffix (e.g. 'com' or '-max') for a distribution
--with-archive
Enable the Archive storage engine
--with-cluster
Compile and test with NDB Cluster enabled
--with-csv
Enable the CSV storage engine
--with-example
Enable the Example storage engine
--with-federated
Enable the Federated storage engine
--with-debug
Build binaries with debug information (implies "--no-strip")
--with-low-memory
Use less memory when compiling.
--with-other-libc=<path to libc>
Link against libc and other standard libraries installed in the specified
non-standard location overriding default.
--with-small-disk
Clean up the build environment before testing the binary distribution
(to save disk space)
--without-embedded
Don't compile the embedded server.
EOF
exit 1;
}
sub abort
{
my($message)=@_;
my($mail_header_file);
print LOG "\n$message\n";
print "$host: $message\n" if ($opt_debug);
log_timestamp("ABORT");
close LOG;
if ($opt_user)
{
# Take the last 40 lines of the build log
open(LOG, "$log") or die $!;
my @log= <LOG>;
close LOG;
splice @log => 0, -40;
my $mail_file="$opt_tmp/do-command.$$";
open(TMP,">$mail_file") or die $!;
print TMP "From: mysqldev\@$full_host_name\n";
print TMP "To: $email\n";
print TMP "Subject: $host($uname): $ver$opt_version_suffix compilation failed\n\n";
print TMP @log;
close TMP;
system("$sendmail -t -f $email < $mail_file");
unlink($mail_file);
}
exit 1;
}
sub info
{
my($message)=@_;
print LOG "$message\n";
print "$host: $message\n";
}
sub log_system
{
my($com)=@_;
print "$host: $com\n" if ($opt_debug);
if (defined($log))
{
print LOG "$com\n";
system("$com >> $log 2>&1") &&
print LOG ("Info: couldn't execute command, error: " . ($? / 256) ."\n");
}
else
{
system($com) && print "$host: Couldn't execute command, error: " . ($? / 256) ."\n";
}
}
sub safe_system
{
my($com,$res)=@_;
print LOG "$com\n";
print "$host: $com\n" if ($opt_debug);
my $result= system("$com >> $log 2>&1");
abort("error: Couldn't execute command, error: " . ($? / 256)) unless $result == 0;
return $result;
}
sub check_system
{
my($com,$res)=@_;
my ($error,$found);
print LOG "$com\n";
print "$host: $com\n" if ($opt_debug);
open (COM, "$com 2>&1 < /dev/null|") || abort("Got error " . ($?/256) ." opening pipe");
$found=0;
while (<COM>)
{
print LOG $_;
if (index($_,$res) >= 0)
{
$found=1;
last;
}
}
close COM;
abort("Couldn't find '$res' in the command result") if (!$found);
print "$host: Command ok\n" if ($opt_debug);
}
sub safe_cd
{
my($dir)=@_;
print LOG "cd $dir\n";
print "$host: cd $dir\n" if ($opt_debug);
chdir($dir) || abort("Can't cd to $dir");
}
sub which
{
my(@progs)=@_;
foreach $prog (@progs)
{
chomp($found=`which $prog | head -n 1`);
if ($? == 0 && $found ne "" && index($found," ") == -1)
{
$found =~ s|/+|/|g; # Make nicer output
return $found;
}
}
return undef();
}
sub find
{
my (@progs)=@_;
foreach $prog (@progs)
{
return $prog if (-x $prog);
}
return undef();
}
#
# Remove recursively all from a directory
# This is needed because problems with NFS and open files
#
sub rm_all
{
my(@rm_files)=@_;
my($dir,$current_dir,@files,@dirs,$removed);
$current_dir = `pwd`; chomp($current_dir);
foreach $dir (@rm_files)
{
if (-d $dir)
{
chdir($dir) || abort("Can't cd to $dir");
print "$host: Removing from $dir\n" if ($opt_debug);
while (<* .*>)
{
next if ($_ eq "." x (length($_)));
if (-d $_)
{
# die "Can't remove directory that starts with ." if ($_ =~ /^\./ && $_ ne ".libs"); # Safety
push (@dirs,$_);
}
else
{
push (@files,$_);
}
}
if ($#files >= 0)
{
$removed= unlink @files;
print "rm_all : removed $removed files in $current_dir/$dir\n" if ($opt_debug);
abort("Can't remove all $#files+1 from $current_dir/$dir, just $removed") if $removed != $#files+1;
}
foreach $dir (@dirs)
{
rm_all($dir);
}
chdir($current_dir) || abort("Can't cd to $current_dir");
log_system("rmdir $dir");
}
else
{
system("rm -f $dir") && abort("Can't remove file $dir");
}
}
}
sub kill_all
{
my ($pattern) = @_;
my ($USER,$BSD,$LINUX, $pscmd, $user, $os, $pid);
$user=$ENV{'USER'};
$os=defined($ENV{'OS'}) ? $ENV{'OS'} : "unknown";
$BSD = -f '/vmunix' || $os eq "SunOS4" || $^O eq 'darwin';
$LINUX = $^O eq 'linux';
$pscmd = $BSD ? "/bin/ps -auxww" : $LINUX ? "/bin/ps axuw" : "/bin/ps -ef";
if (!open(PS, "$pscmd|"))
{
print "Warning: Can't run $pscmd: $!\n";
log_timestamp("ABORT");
exit;
}
# Catch any errors with eval. A bad pattern, for instance.
process:
while ($cand = <PS>)
{
chop($cand);
($pid_user, $pid) = split(' ', $cand);
next if $pid eq $$;
next process if (! ($cand =~ $pattern) || $pid_user ne $user);
print LOG "Killing $_\n";
&killpid($pid);
}
}
sub killpid
{
local($pid) = @_;
kill 15, $pid;
for (1..5)
{
sleep 2;
return if kill(0, $pid) == 0;
}
kill 9, $pid;
for (1..5) {
sleep 2;
return if kill(0, $pid) == 0;
}
print LOG "$pid will not die!\n";
}
#
# return the current date as a string (YYYY-MM-DD HH:MM:SS)
#
sub log_timestamp
{
my ($message) = @_;
my @ta=localtime(time());
print LOG sprintf("%4d-%02d-%02d %02d:%02d:%02d %s %s\n",
$ta[5]+1900, $ta[4]+1, $ta[3], $ta[2], $ta[1], $ta[0],
$message, $global_step);
}

View File

@ -1,64 +0,0 @@
#!/bin/bash
PM_FILES='Data-Dumper Data-ShowTable DBI Msql-Mysql-modules'
FILE_EXT='tar.gz'
ARCH=`uname -m | perl -p -e 's/^i[0-9]86$/i386/'`
# directories
[ -d /usr/src/redhat ] && RPM_SRC=/usr/src/redhat
[ -d /usr/src/packages ] && RPM_SRC=/usr/src/packages
SRC_DIR=/home/matt/work/pm_rpm/tarballs # pristine tarballs
DEST_DIR=${RPM_SRC}/SOURCES # RPM SOURCES (building area)
RPM_DEPOSIT=/var/tmp/ftp/RPMS # RPM production deposit
SRPM_DEPOSIT=/var/tmp/ftp/SRPMS # SRPM production deposit
# keyword replacement for SPEC templates
REPLACE_KEY='REPLACE_VERSION'
# paths to beloved programs
NEWEST=/home/matt/work/build_pm_rpms/newest
REPLACE=/usr/local/bin/replace
#++
# Copy the source tarballs up to staging area for RPM building.
#--
cd $SRC_DIR
for i in $PM_FILES
do
echo Copying $i...
cp ${SRC_DIR}/`$NEWEST -s $SRC_DIR -b $i -t $FILE_EXT` $DEST_DIR
done
#++
# Do keyword replacements on the SPEC templates, and build RPMS
#--
cd ${RPM_SRC}/SPECS
for i in $PM_FILES
do
cat ${i}.spec.template | $REPLACE $REPLACE_KEY `$NEWEST -s $DEST_DIR -b $i -t $FILE_EXT -v` > ${i}.spec
rpm -ba ${i}.spec
rm ${i}.spec
done
#++
# Copy new RPMS and SRPMS to production deposit
#--
cd $RPM_SRC
# kludge code
PM_FILES=`echo $PM_FILES | $REPLACE Msql-Mysql-modules DBD-Mysql`
tmpv=`$NEWEST -s $DEST_DIR -b Msql-Mysql-modules -t $FILE_EXT -v`
mv SOURCES/Msql-Mysql-modules-${tmpv}.${FILE_EXT} SOURCES/DBD-Mysql-${tmpv}.${FILE_EXT}
for i in $PM_FILES
do
cp RPMS/${ARCH}/${i}-`$NEWEST -s $DEST_DIR -b $i -t $FILE_EXT -v`-1.${ARCH}.rpm $RPM_DEPOSIT
cp SRPMS/${i}-`$NEWEST -s $DEST_DIR -b $i -t $FILE_EXT -v`-1.src.rpm $SRPM_DEPOSIT
rm SOURCES/`$NEWEST -s $DEST_DIR -b $i -t $FILE_EXT`
done

View File

@ -1,85 +0,0 @@
#!/usr/bin/perl
#
# By Matt Wagner <matt@mysql.com> 2005
#
# This script generates HP Depot packages for MySQL Server.
# It basically repackages a binary tarball as a depot.
#
# Usage: ./Do-hpux-depot <untarred-binary-tarball>
#
$fullname = shift @ARGV;
$fullname or die "No package name was specified";
-d $fullname or die "That directory is not present!";
$fullname =~ s,/+$,,; # Remove ending slash if any
chomp($pwd= `pwd`);
%title= (
"mysql-standard" => "MySQL Community Edition - Standard (GPL)",
"mysql-debug" => "MySQL Community Edition - Debug (GPL)",
"mysql-max" => "MySQL Community Edition - Experimental (GPL)",
"mysql-pro" => "MySQL Pro (Commercial)",
"mysql-classic" => "MySQL Classic (Commercial)",
"mysql-cluster" => "MySQL Cluster (Commercial)",
);
%architecture= (
"hpux11.23" => "HP-UX_B.11.23",
"hpux11.11" => "HP-UX_B.11.11",
"hpux11.00" => "HP-UX_B.11.00",
);
%os_release= (
"hpux11.23" => "?.11.2?",
"hpux11.11" => "?.11.1?",
"hpux11.00" => "?.11.0?",
);
%machine_type= (
"ia64" => "ia64*",
"hppa2.0w" => "9000/*",
);
$fullname =~ m/^(mysql-\w+)-([\d\.]+)-hp-(hpux11\.\d\d)-(hppa2\.0w|(ia64))-?(64bit)?$/;
# print "title: $1\n";
# print "version: $2\n";
# print "os: $3\n";
# print "cpu: $4\n";
# print "64: $6\n";
$cpu64= ($6 ne "") ? "_64" : "";
open (PSF,">${fullname}.psf") or die "Unable to write PSF file ($!)\n";
print PSF <<EOF;
product
tag $1
vendor_tag "MySQL_AB"
title "$title{$1}"
description "MySQL Database Server and Clients"
revision $2
architecture $architecture{$3}$cpu64
machine_type $machine_type{$4}
os_name HP-UX
os_release $os_release{$3}
directory /usr/local
fileset
tag all
revision $2
directory $fullname=/usr/local/$fullname
file_permissions -u 222 -g bin -o bin
file *
end
end
EOF
close(PSF);
system("/usr/sbin/swpackage -v -d \"|gzip -c > $fullname.depot.gz\" -x target_type=tape -s ${pwd}/${fullname}.psf");

View File

@ -1,28 +0,0 @@
#! /bin/sh
set -e -x
# Only use the "--with-other-libc" parameter, if another libc actually
# exists, since this will also force static linking, which does not work
# together with OpenSSL
OTHER_LIBC_DIR=/usr/local/mysql-glibc
OTHER_LIBC=""
if [ -d OTHER_LIBC_DIR ] ; then
OTHER_LIBC="--with-other-libc=$OTHER_LIBC_DIR"
fi
BUILD/compile-pentium-max $OTHER_LIBC \
--with-comment="Official MySQL Binary" \
--prefix=/usr/local/mysql --with-extra-charset=complex \
--enable-thread-safe-client --enable-local-infile \
--with-server-suffix=-max
nm -n sql/mysqld | gzip -9 -v 2>&1 > sql/mysqld.sym.gz
scripts/make_binary_distribution
make dist
Build-tools/Do-rpm --local
BUILD/compile-pentium --with-other-libc=$OTHER_LIBC_DIR \
--with-comment="Official MySQL Binary" \
--prefix=/usr/local/mysql --with-extra-charset=complex \
--enable-thread-safe-client --enable-local-infile
nm -n sql/mysqld | gzip -9 -v 2>&1 > sql/mysqld.sym.gz
scripts/make_binary_distribution

View File

@ -1,37 +0,0 @@
#!/bin/sh
# make a patch file of a mysql distribution
# takes as argument the previous version
case $# in
0) echo Usage: $0 previous_version; exit 1;;
esac
PVER=$1;
VER=`grep SERVER_VERSION include/mysql_version.h | cut -d'"' -f2`
NEW="mysql-$VER.tar.gz"
OLD="mysql-$PVER.tar.gz"
RESULT="mysql-$PVER-$VER.patch.gz"
PATCH_DIR=/my/data/tcxwww/html/Downloads/Patches
RESULT_DIR=/my/data/tcxwww/html/Downloads/MySQL-3.22
if test ! -f $NEW
then
echo "$NEW doesn't exist";
exit 1;
fi
if test ! -f $RESULT_DIR/$OLD
then
echo "$RESULT_DIR/$OLD doesn't exist";
exit 1;
fi
mkdir patch
cd patch
gtar xfz ../$NEW
gtar xfz $RESULT_DIR/$OLD
cd mysql-$PVER
diff --context --new-file --recursive . ../mysql-$VER | gzip -9 > ../../$RESULT
cd ../..
/bin/rm -rf patch

View File

@ -1,44 +0,0 @@
#!/bin/sh
# make a patch file of a mysql distribution
# takes as argument the previous version
case $# in
0) echo Usage: $0 previous_version; exit 1;;
esac
PVER=$1;
VER=`grep SERVER_VERSION /my/tmp/BUILD/include/mysql_version.h | cut -d'"' -f2`
NEWDIR="binary"
NEW="mysql-$VER.tar.gz"
OLD="mysql-$PVER.tar.gz"
RESULT="mysql-$PVER-$VER.patch.gz"
PATCH_DIR=/my/web/Downloads-live/Patches
RESULT_DIR=/my/web/Downloads-live/MySQL-4.0
RESULT_DIR_MAX=/my/web/Downloads-live/MySQL-Max-4.0
if test ! -f $NEWDIR/$NEW
then
echo "$NEWDIR/$NEW doesn't exist";
exit 1;
fi
if test ! -f $RESULT_DIR/$OLD
then
echo "$RESULT_DIR/$OLD doesn't exist";
exit 1;
fi
mkdir patch
cd patch
gtar xfz ../$NEWDIR/$NEW
gtar xfz $RESULT_DIR/$OLD
cd mysql-$PVER
diff --unified --new-file --recursive . ../mysql-$VER | gzip -9 > ../../$RESULT
cd ../..
/bin/rm -rf patch
chmod a+r,o-w $RESULT binary/*
mv $RESULT $PATCH_DIR
cp binary/mysqlcom-* binary/mysql*win* /net/web/home/production/data/nweb/customer/Downloads
rm binary/mysqlcom-*
mv binary/*Max* binary/*-max* $RESULT_DIR_MAX
cp binary/* $RESULT_DIR

View File

@ -1,334 +0,0 @@
#!/usr/bin/perl -w
#
# Do-pkg - convert a binary distribution into a Mac OS X PKG and put it
# inside a Disk Image (.dmg). Additionally, add a separate package,
# including the required Startup Item to automatically start MySQL on
# bootup.
#
# 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>
#
use Cwd;
use File::Basename;
use File::Copy;
use Getopt::Long;
Getopt::Long::Configure ("bundling");
use Sys::Hostname;
$opt_dry_run= undef;
$opt_help= undef;
$opt_log= undef;
$opt_mail= "";
$opt_skip_dmg= undef;
$opt_skip_prefpane= undef;
$opt_skip_si= undef;
$opt_suffix= undef;
$opt_verbose= undef;
$opt_version= undef;
GetOptions(
"dry-run",
"help|h",
"log|l:s",
"mail|m=s",
"skip-prefpane|p",
"skip-dmg|skip-disk-image|s",
"skip-si|skip-startup-item",
"suffix=s",
"verbose|v",
"version=s",
) || &print_help;
# Include helper functions
$PWD= cwd();
$LOGGER= "$PWD/logger.pm";
if (-f "$LOGGER")
{
do "$LOGGER";
}
else
{
die "ERROR: $LOGGER cannot be found!\n";
}
$PM= "/Developer/Applications/PackageMaker.app/Contents/MacOS/PackageMaker";
# Try another location on 10.3.3
unless (-e "$PM")
{
$PM= "/Developer/Applications/Utilities/PackageMaker.app/Contents/MacOS/PackageMaker";
}
$TMP= $ENV{TMPDIR};
$TMP eq "" ? $TMP= $TMP . "/PKGBUILD.$$": $TMP= "/tmp/PKGBUILD.$$";
$PKGROOT= "$TMP/PMROOT";
$PKGDEST= "$TMP/PKG";
$RESOURCE_DIR= "$TMP/Resources";
$SUFFIX= $opt_suffix;
$VERSION= $opt_version;
($MAJOR, $MINOR, $RELEASE)= split(/\./, $VERSION);
$NAME= "mysql$SUFFIX-$VERSION";
$HOST= hostname();
$ID= getpwuid($>);
$HOST=~ /^([^.-]*)/;
$HOST= $1;
$LOGFILE= "$PWD/Logs/$HOST-$MAJOR.$MINOR$SUFFIX.log";
$BUILDDIR= "$PWD/$HOST";
$PREFPANE= "$PWD/mysql-administrator/source/mac/PreferencePane/build/MySQL.prefPane";
$SRCBASEDIR= <$BUILDDIR/mysql*-$VERSION>;
$SUPFILEDIR= <$SRCBASEDIR/support-files/MacOSX>;
$TAR= <$BUILDDIR/$NAME-apple-darwin*-powerpc*.tar.gz>;
$TAR =~ /.*\/$NAME(.*)\.tar\.gz$/;
$ARCH= $1;
$NAME= $NAME . $ARCH;
$INFO= <$SUPFILEDIR/Info.plist>;
$DESC= <$SUPFILEDIR/Description.plist>;
$SI_INFO= <$SUPFILEDIR/StartupItem.Info.plist>;
$SI_DESC= <$SUPFILEDIR/StartupItem.Description.plist>;
$SI_PARAMS= <$SUPFILEDIR/StartupParameters.plist>;
$SI_POST= <$SUPFILEDIR/StartupItem.postinstall>;
$SI_NAME= "MySQLStartupItem";
$SI_DIR_NAME= "MySQLCOM";
$SI_SCRIPT= <$SUPFILEDIR/MySQLCOM>;
@RESOURCES= qw/ ReadMe.txt postinstall preinstall /;
@LICENSES= ("$SRCBASEDIR/COPYING","$SRCBASEDIR/MySQLEULA.txt");
&print_help("") if ($opt_help || !$opt_suffix || !$opt_version);
#
# Override predefined Log file name
#
if (defined $opt_log)
{
if ($opt_log ne "")
{
if ($opt_log =~ /^\/.*/)
{
$LOGFILE= $opt_log;
}
else
{
$LOGFILE= $PWD . "/" . $opt_log;
}
}
}
# Creating the UFS disk image requires root privileges
die("You must be root to run this script!") if ($ID ne "root" && !$opt_dry_run);
@files= ($TAR, $INFO, $DESC);
@files= (@files, $SI_INFO, $SI_DESC, $SI_POST, $SI_SCRIPT) unless $opt_skip_si;
foreach $file (@files)
{
&abort("Unable to find $file!") unless (-f "$file");
}
# Remove old temporary build directories first
&logger("Cleaning up temporary build directories");
&run_command("rm -rf $TMP", "Could not clean up $TMP!");
&logger("Creating temp directories");
foreach $dir ($TMP, $PKGROOT, $PKGDEST, $RESOURCE_DIR)
{
if (!-d $dir)
{
&logger("Creating directory $dir!");
unless($opt_dry_run)
{
mkdir($dir) or &abort("Could not make directory $dir!");
}
}
}
foreach $resfile (@RESOURCES)
{
&logger("Copying $SUPFILEDIR/$resfile to $RESOURCE_DIR");
unless($opt_dry_run)
{
copy("$SUPFILEDIR/$resfile", "$RESOURCE_DIR") or
&abort("Error while copying $SUPFILEDIR/$resfile to $RESOURCE_DIR");
}
}
# Search for license file
foreach $license (@LICENSES)
{
if (-f "$license")
{
&logger("Copy $license to $RESOURCE_DIR/License.txt");
unless($opt_dry_run)
{
copy("$license", "$RESOURCE_DIR/License.txt") or
&abort("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!");
&run_command("cd $PKGROOT ; ln -s mysql* ./mysql", "Unable to create symlink!");
&run_command("chown -R root:wheel $PKGROOT/*", "Cannot chown $PKGROOT!");
# Now build the PGK using PackageMaker
# The "|| true" is a nasty hack to work around a problem with Package Maker
# returning a non-zero value, even though the package was created correctly
&logger("Running PackageMaker");
$command= "$PM -build -p $PKGDEST/$NAME.pkg -f $PKGROOT -r $RESOURCE_DIR -i $INFO -d $DESC || true";
&run_command($command, "Error while building package $NAME.pkg!");
#
# Build the Startup Item PKG
#
unless ($opt_skip_si)
{
&logger("Cleaning up $PKGROOT");
&run_command("rm -rf $PKGROOT/*", "Unable to clean up $PKGROOT!");
&logger("Cleaning up $RESOURCE_DIR");
&run_command("rm -rf $RESOURCE_DIR/*", "Unable to clean up $RESOURCE_DIR!");
my $SI_DIR= $PKGROOT . "/" . $SI_DIR_NAME;
&logger("Installing MySQL StartupItem files into $SI_DIR");
unless($opt_dry_run)
{
mkdir("$SI_DIR")
or &abort("Error creating $SI_DIR");
copy("$SI_SCRIPT", "$SI_DIR/")
or &abort("Error copying $SI_SCRIPT!");
chmod(0755, "$SI_DIR/" . basename("$SI_SCRIPT"));
copy("$SI_PARAMS", "$SI_DIR/")
or &abort("Error copying $SI_PARAMS!");
chmod(0644, "$SI_DIR/" . basename("$SI_PARAMS"));
&run_command("chown -R root:wheel $PKGROOT/*", "Cannot chown $PKGROOT!");
copy("$SI_POST", "$RESOURCE_DIR/postinstall")
or &abort("Error copying $SI_POST!");
chmod(0644, "$RESOURCE_DIR/postinstall");
}
&logger("Building $SI_NAME.pkg using PackageMaker");
$command= "$PM -build -p $PKGDEST/$SI_NAME.pkg -f $PKGROOT -r $RESOURCE_DIR -i $SI_INFO -d $SI_DESC || true";
&run_command($command, "Error while building package $SI_NAME.pkg!");
}
#
# Include the MySQL Preference Pane
#
unless ($opt_skip_prefpane)
{
&abort("Could not find PrefPane helper application. Did you compile and install it?")
unless (-f "$PREFPANE/Contents/Resources/mahelper");
&logger("Including $PREFPANE in $PKGDEST");
&run_command("mkdir $PKGDEST/MySQL.prefPane", "Could not create $PKGDEST/MySQL.prefPane!");
&run_command("ditto $PREFPANE $PKGDEST/MySQL.prefPane", "Could not copy $PREFPANE into $PKGDEST!");
&run_command("chown -R root:wheel $PKGDEST/MySQL.prefPane", "Cannot chown $PKGDEST/MySQL.prefPane!");
}
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");
unless($opt_dry_run)
{
chomp($_= `du -sk $PKGDEST`);
@size= split();
$size= int($size[0]+($size[0]*0.05));
&logger("Disk image size: $size KB");
}
unless($opt_dry_run)
{
&abort("Zero bytes? Something is wrong here!") if ($size == 0);
}
# Now create and mount the disk image
$TMPNAME= $NAME . ".tmp";
&logger("Creating temporary Disk image $TMPNAME.dmg");
$command= "hdiutil create $TMPNAME -size ${size}k -ov -fs UFS -volname $NAME";
&run_command($command, "Unable to create disk image $TMPNAME.dmg!");
&logger("Attaching Disk image $TMPNAME.dmg");
&run_command("hdid $TMPNAME.dmg", "Unable to attach $TMPNAME.dmg!");
# Install the PKG into the .dmg
chomp($mountpoint=`mount | grep "\/Volumes\/$NAME" | cut -f3 -d" "`) if (!$opt_dry_run);
&logger("Copying $PKGDEST/$NAME.pkg to Disk image /Volumes/$NAME");
&run_command("ditto $PKGDEST /Volumes/$NAME", "Could not copy $PKGDEST to /Volumes/$NAME!");
&run_command("ditto $SUPFILEDIR/ReadMe.txt /Volumes/$NAME", "Could not copy $SPFILEDIR/ReadMe.txt to /Volumes/$NAME!");
&run_command("chown root:wheel /Volumes/$NAME/ReadMe.txt", "Could not fix ownerships of /Volumes/$NAME/ReadMe.txt!");
chomp($mountpoint=`mount | grep "\/Volumes\/$NAME" | cut -f1 -d" "`) if (!$opt_dry_run);
&abort("/Volumes/$NAME not attached!") if (!$mountpoint && !$opt_dry_run);
&logger("Unmounting $mountpoint");
&run_command("hdiutil detach $mountpoint", "Unable to detach $mountpoint");
&run_command("rm -f $NAME.dmg", "Unable to remove $NAME.dmg!") if (-f "$NAME.dmg");
&logger("Compressing disk image");
$command= "hdiutil convert $TMPNAME.dmg -format UDZO -imagekey zlib-level=9 -o $NAME.dmg";
&run_command($command, "Unable to compress disk image!");
# Final cleanups
&logger("Removing $TMPNAME.dmg");
&run_command("rm -f $TMPNAME.dmg", "Unable to remove $TMPNAME.dmg!");
&logger("Removing $TMP");
&run_command("rm -rf $TMP", "Unable to remove $TMP!");
&logger("SUCCESS: $NAME.dmg created.") if (!$opt_dry_run);
exit 0;
sub print_help
{
my $message= $_[0];
if ($message ne "")
{
print "\n";
print "ERROR: $message\n";
}
print <<EOF;
Usage: Do-pkg <options> --suffix=<suffix> --version=<version>
Creates a Mac OS X installation package (PKG) and stores it inside
a Disk Image (.dmg) file. You need to create a binary distribution
tarball with scripts/make_binary_distribution first!
NOTE: You need to run this script with root privileges (required
to create the disk image)
Options:
--dry-run Dry run without executing
-h, --help Print this help
-l, --log[=<filename>] Write a log file [to <filename>]
(default is "$LOGFILE")
-m, --mail=<address> Mail a failure report to the given
address (and include a log file snippet,
if logging is enabled)
Note that the \@-Sign needs to be quoted!
Example: --mail=user\\\@domain.com
-p, --skip-prefpane Skip including the PreferencePane
-s, --skip-disk-image, --skip-dmg Just build the PKGs, don't put it into a
disk image afterwards
--skip-startup-item, --skip-si Skip the creation of the StartupItem PKG
--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
EOF
exit 1;
}

View File

@ -1,332 +0,0 @@
#!/usr/bin/perl -w
#
# Do-rpm - compile RPM packages out of a source tarball and move the
# resulting RPM packages into the current directory.
#
# The script currently assumes the following environment:
#
# - there must be a source distribution (mysql-<version>.tar.gz)
# in the current directory
# - You must provide the name of an RPM spec file (mysql-<version>.spec)
# as the argument
#
# Use the "--help" option for more info!
#
# written by Lenz Grimmer <lenz@mysql.com>
#
use Cwd;
use File::Basename;
use File::Copy;
use Getopt::Long;
Getopt::Long::Configure ("bundling");
use Sys::Hostname;
$opt_cc= undef;
$opt_cflags= undef;
$opt_clean= undef;
$opt_cxx= undef;
$opt_cxxflags= undef;
$opt_dry_run= undef;
$opt_help= undef;
$opt_log= undef;
$opt_mail= "";
$opt_verbose= undef;
$opt_susebuild= undef;
$opt_susebuildroot= undef;
$opt_suserpms= undef;
# Set a dummy version until we know the correct one
$VERSION= "x.y.z";
$MAJOR= $MINOR= $RELEASE= 0;
$SUFFIX= "";
GetOptions(
"cc=s",
"cflags=s",
"clean|c",
"cxx=s",
"cxxflags=s",
"dry-run|t",
"help|h",
"log|l:s",
"mail|m=s",
"susebuild|s",
"susebuildroot|r=s",
"suserpms=s",
"verbose|v",
) || &print_help;
&print_help("") if ($opt_help);
defined($SPECFILE=$ARGV[0]) || print_help("Please provide the spec file name!");
&print_help("Please define the location of the RPM repository!") if $opt_susebuild && !($opt_suserpms || $ENV{BUILD_RPMS});
unless ($opt_susebuildroot)
{
if ($ENV{BUILD_ROOT})
{
$opt_susebuildroot= $ENV{BUILD_ROOT};
}
else
{
$opt_susebuildroot="/var/tmp/build-root";
}
}
# Include helper functions
$PWD= cwd();
$LOGGER= "$PWD/logger.pm";
if (-f "$LOGGER")
{
do "$LOGGER";
}
else
{
die "ERROR: $LOGGER cannot be found!\n";
}
$subject= "RPM build for $SPECFILE failed" if $opt_mail;
# Open the spec file and extract the version number
open(SPEC, $SPECFILE) or die "Unable to open \"$ARGV[0]\": $!";
@spec= <SPEC>;
close SPEC;
foreach (@spec)
{
if (m/^%define\s*mysql_version\s*(.*)/)
{
$VERSION= $1;
$VERSION_SRPM=$VERSION;
($MAJOR, $MINOR, $RELEASE)= split(/\./,$VERSION);
$VERSION_SRPM= $MAJOR . '.' . $MINOR . '.' . $RELEASE;
$VERSION_SRPM =~ s/\-\w+$//;
($RELEASE, $SUFFIX)= split(/\-/,$RELEASE);
$SUFFIX= "-" . $SUFFIX if ($SUFFIX);
}
}
$HOST= hostname();
$HOST=~ /^([^.-]*)/;
$HOST= $1;
$LOGFILE= "$PWD/Logs/Do-rpm-$HOST-$MAJOR.$MINOR.log";
&logger("Logging to $LOGFILE");
#
# Override predefined Log file name
#
if (defined $opt_log)
{
if ($opt_log ne "")
{
if ($opt_log =~ /^\/.*/)
{
$LOGFILE= $opt_log;
}
else
{
$LOGFILE= $PWD . "/" . $opt_log;
}
}
}
&logger("Using spec file for version: $VERSION");
if ($opt_susebuild)
{
&susebuild;
}
else
{
&rpmbuild;
}
&logger("SUCCESS: RPM files successfully created.") unless ($opt_dry_run);
exit 0;
#
# Build using SUSE's "build" script
#
sub susebuild
{
$BUILD= "/usr/bin/build";
( -x $BUILD) ? &logger("$BUILD found, proceeding.") : &abort("$BUILD could not be found!");
$command= "sudo $BUILD --clean";
$command.= " --root=$opt_susebuildroot";
$command.= " --rpms=$opt_suserpms" if $opt_suserpms;
$command.= " $SPECFILE";
&logger("Building RPMs using SUSE build.");
&run_command($command, "Error while running the SUSE RPM build!");
#
# Move the resulting RPMs into the pwd - we can use broad globs here
# as the build root has been cleaned up before so there should not be
# any residuals from previous build runs
#
$command= "cp";
$command.= " -v " if ($opt_verbose);
$command.= " $opt_susebuildroot/usr/src/packages/SRPMS/MySQL*.src.rpm $PWD";
&logger("Copying source RPM to current dir.");
&run_command($command, "Error moving source RPM!");
$command= "cp";
$command.= " -v " if ($opt_verbose);
$command.= " $opt_susebuildroot/usr/src/packages/RPMS/*/MySQL*.rpm $PWD";
&logger("Copying binary RPMs to current dir.");
&run_command($command, "Error moving binary RPMs!");
}
#
# Build using "plain" RPM
#
sub rpmbuild
{
#
# Newer RPM versions ship with a separate tool "rpmbuild" to build RPMs
#
if (-x "/usr/bin/rpmbuild")
{
$RPM= "/usr/bin/rpmbuild";
$RMSOURCE= "--rmsource --rmspec";
}
else
{
$RPM= "/bin/rpm";
$RMSOURCE= "--rmspec";
}
if ($RPM)
{
&logger("Found rpm binary: $RPM");
}
else
{
&abort("Unable to find RPM binary!");
}
#
# determine some RPM settings for this host
#
chomp($RPMARCH= `$RPM --eval "%{_arch}" 2> /dev/null`);
chomp($RPMDIR= `$RPM --eval "%{_rpmdir}" 2> /dev/null`);
chomp($SOURCEDIR= `$RPM --eval "%{_sourcedir}" 2> /dev/null`);
chomp($SPECDIR= `$RPM --eval "%{_specdir}" 2> /dev/null`);
chomp($SRCRPMDIR= `$RPM --eval "%{_srcrpmdir}" 2> /dev/null`);
$SOURCEFILE= glob "mysql*-$VERSION.tar.gz";
&logger("Starting RPM build of MySQL-$VERSION on $HOST");
foreach $file ($SOURCEFILE, $SPECFILE)
{
&abort("Unable to find $file!") unless (-f "$file");
}
#
# Install source and spec file
#
&logger("Copying SOURCE and SPEC file to build directories.");
unless ($opt_dry_run)
{
copy($SOURCEFILE, $SOURCEDIR)
or &abort("Unable to copy $SOURCEFILE to $SOURCEDIR!");
copy($SPECFILE, $SPECDIR)
or &abort("Unable to copy $SPECFILE to $SPECDIR!");
}
#
# Set environment variables - these are being used in the
# official MySQL RPM spec file
#
&logger("Setting special build environment variables")
if ($opt_cc) or ($opt_cflags) or ($opt_cxxflags) or ($opt_cxx);
$ENV{MYSQL_BUILD_CC}=$opt_cc if ($opt_cc);
$ENV{MYSQL_BUILD_CFLAGS}=$opt_cflags if ($opt_cflags);
$ENV{MYSQL_BUILD_CXXFLAGS}=$opt_cxxflags if ($opt_cxxflags);
$ENV{MYSQL_BUILD_CXX}=$opt_cxx if ($opt_cxx);
#
# Build the RPMs
#
$command= "$RPM";
$command.= " -v" if ($opt_verbose);
$command.= " -ba";
$command.= " --clean $RMSOURCE" if $opt_clean;
$command.= " $SPECDIR/";
$command.= basename($SPECFILE);
&logger("Building RPM.");
&run_command($command, "Error while building the RPMs!");
#
# Move the resulting RPMs into the pwd
#
$command= "mv";
$command.= " -v " if ($opt_verbose);
$command.= " $SRCRPMDIR/MySQL*$VERSION_SRPM*.src.rpm $PWD";
&logger("Moving source RPM to current dir.");
&run_command($command, "Error moving source RPM!");
$command= "mv";
$command.= " -v " if ($opt_verbose);
$command.= " $RPMDIR/$RPMARCH/MySQL*$VERSION_SRPM*.$RPMARCH.rpm $PWD";
&logger("Moving binary RPMs to current dir.");
&run_command($command, "Error moving binary RPMs!");
}
sub print_help
{
my $message= $_[0];
if ($message ne "")
{
print "\n";
print "ERROR: $message\n\n";
}
print <<EOF;
Usage: Do-rpm [options] <specfile>
Creates a binary RPM package out of a MySQL source distribution and moves
the resulting RPMs into the current directory. <specfile> is the MySQL RPM
spec file to use (e.g. mysql-4.0.17.spec).
This script expects to find the required MySQL source distribution
(mysql-<version>.tar.gz) in the current directory.
Options:
--cc=<compiler> Use <compiler> to compile C code
--ccflags=<flags> Use special C compiler flags
--cxx=<compiler> Use <compiler> to compile C++ code
--cxxflags=<flags> Use special C++ compiler flags
-c, --clean Clean up after the build
-t, --dry-run Dry run without executing
-h, --help Print this help
-l, --log[=<filename>] Write a log file [to <filename>]
-m, --mail=<address> Mail a failure report to the given address
(and include a log file snippet, if logging
is enabled)
Note that the \@-Sign needs to be quoted!
Example: --mail=user\\\@domain.com
-s, --susebuild Use the SUSE "build" script instead of RPM
directly (requires sudo privileges to run the
/usr/bin/build command)
-r, --susebuildroot=<root> Use <root> as the build root directory for the
SUSE "build" (default is /var/tmp/build-root
or defined by the BUILD_ROOT environment
variable)
--suserpms=<path> Path to the SUSE RPM repository to build up
the build root (mandatory option when using
--susebuild and the BUILD_RPMS environment
variable is not set.)
-v, --verbose Verbose execution
Example:
Do-rpm -cv mysql-4.0.17.spec
EOF
exit 1;
}

View File

@ -1,183 +0,0 @@
#!/usr/bin/perl
#
# Script to create Solaris packages
#
$INTERACTIVE= 0;
chomp ($hostname= `hostname`);
$find = "/usr/bin/find";
$pkgproto = "/usr/bin/pkgproto";
$pkgmk = "/usr/bin/pkgmk -o";
$pkgtrans = "/usr/bin/pkgtrans";
$temp = "/tmp/prototype$$";
$prototype = "prototype";
$pkginfo = "pkginfo";
($gid ,$pkg ,$uid ,$userInfo ,$email ,$quota ,$group ,$passwd
,$category ,$userHome ,$vendor ,$loginShell ,$pstamp ,$basedir)=();
$tarball= $fullname= shift @ARGV;
$fullname=~ s/.*(mysql.*)\.tar\.gz/$1/;
$workdir= $$;
chomp ($parent_workdir= `pwd`);
$hostname= ($fullname=~ m/^.+-64bit$/) ? $hostname . "-64bit" : $hostname;
$pkgdir= "$ENV{'HOME'}/$hostname";
mkdir $workdir or die "Can't make workdir: $!\n";
chdir $workdir or die "Can't change to workdir: $!\n";
system ("tar xzvf $tarball") == 0 or die "Can't untar: $!\n";
system ("$find . -print | $pkgproto > $temp");
open (PREPROTO,"<$temp") or die "Unable to read prototype information ($!)\n";
open (PROTO,">$prototype") or die "Unable to write file prototype ($!)\n";
print PROTO "i pkginfo=./$pkginfo\n";
while (<PREPROTO>) {
# Read the prototype information from /tmp/prototype$$
chomp;
$thisline = $_;
if ($thisline =~ " prototype "
or $thisline =~ " pkginfo ") {
# We don't need that line
} elsif ($thisline =~ "^[fd] ") {
# Change the ownership for files and directories
($dir, $none, $file, $mode, $user, $group) = split / /,$thisline;
print PROTO "$dir $none $file $mode bin bin\n";
} else {
# Symlinks and other stuff should be printed as well ofcourse
print PROTO "$thisline\n";
}
}
close PROTO;
close PREPROTO;
# Clean up
unlink $temp or warn "Unable to remove tempfile ($!)\n";
# Now we can start building the package
#
# First get some info
$fullname =~ s,/+$,,; # Remove ending slash if any
$fullname =~ /^((mysql)(?:-\w+){1,3})-([\d\.]+\w?)-.+$/
or die "This name is not what I expected - \"$fullname\"";
$default{"name"}= $2;
$default{"version"}= $3;
$default{"pkg"}= $1;
$default{"arch"} = `uname -m`;
chomp $default{"arch"};
$default{"category"}= "application";
$default{"vendor"}= "MySQL AB";
$default{"email"}= "build\@mysql.com";
$default{"pstamp"}= "MySQL AB Build Engineers";
$os = `uname -r`;
$os =~ '\.';
$os = "sol$'";
chomp $os;
$default{"basedir"}= "/usr/local";
$default{"packagename"}= "${fullname}.pkg";
# Check for correctness of guessed values by userinput
%questions = (
pkg => "Please give the name for this package",
name => "Now enter the real name for this package",
arch => "What architecture did you build the package on?",
version => "Enter the version number of the package",
category => "What category does this package belong to?",
vendor => "Who is the vendor of this package?",
email => "Enter the email adress for contact",
pstamp => "Enter your own name",
basedir => "What is the basedir this package will install into?",
packagename => "How should I call the packagefile?",
);
@vars = qw(pkg name arch version category vendor email pstamp basedir
packagename);
foreach $varname (@vars) {
getvar_noq($varname);
}
if ($INTERACTIVE) {
while (!&chkvar()) {
print "\n";
foreach $varname (@vars) {
getvar($varname);
}
@vars = qw(pkg name arch version category vendor email pstamp basedir
packagename);
}
}
$classes = "none";
# Create the pkginfo file
print "\nNow creating $pkginfo file\n";
open (PKGINFO,">$pkginfo") || die "Unable to open $pkginfo for writing ($!)\n";
print PKGINFO "PKG=\"$pkg\"\n";
print PKGINFO "NAME=\"$name\"\n";
print PKGINFO "ARCH=\"$arch\"\n";
print PKGINFO "VERSION=\"$version\"\n";
print PKGINFO "CATEGORY=\"$category\"\n";
print PKGINFO "VENDOR=\"$vendor\"\n";
print PKGINFO "EMAIL=\"$email\"\n";
print PKGINFO "PSTAMP=\"$pstamp\"\n";
print PKGINFO "BASEDIR=\"$basedir\"\n";
print PKGINFO "CLASSES=\"$classes\"\n";
close PKGINFO;
print "Done.\n";
# Build and zip the package
print "Building package\n";
system ("$pkgmk -r `pwd`");
system ("(cd /var/spool/pkg; $pkgtrans -s -o `pwd` /tmp/$packagename $pkg)");
system ("gzip /tmp/$packagename");
# Clean-up the spool area
system ("(cd /var/spool/pkg; rm -rf $pkg)");
# Clean-up the ~/packaging/ area
unlink $pkginfo;
unlink $prototype;
chdir $parent_workdir or die "Can't change to parent workdir '$parent_workdir': $!\n";
system ("rm -rf $workdir") == 0 or die "Can't remove the working dir: $!\n";
system ("mv /tmp/${packagename}.gz $pkgdir") == 0 or die "Can't move the finished package out of /tmp: $!\n";
print "Done. (~/$hostname/$packagename.gz)\n";
# The subroutines
sub chkvar {
print "\n";
print "PKG=$pkg\n";
print "NAME=$name\n";
print "ARCH=$arch\n";
print "VERSION=$version\n";
print "CATEGORY=$category\n";
print "VENDOR=$vendor\n";
print "EMAIL=$email\n";
print "PSTAMP=$pstamp\n";
print "BASEDIR=$basedir\n";
print "PACKAGENAME=$packagename\n";
print "\nIs this information correct? [Y/n]: ";
my $answer= <STDIN>;
chomp $answer;
$answer= 'Y' if ($answer eq "");
$answer= uc $answer;
my $res= ($answer eq 'Y')? 1 : 0;
return($res);
}
sub getvar_noq {
my $questionname = "@_";
$$questionname = $default{$questionname};
}
sub getvar {
my $questionname = "@_";
my $ucquestionname= uc $questionname;
print "$ucquestionname: $questions{$questionname} [$default{\"$questionname\"}]: ";
my $answer = <STDIN>;
chomp $answer;
$$questionname = $answer;
$$questionname = $default{$questionname} if ($$questionname eq "");
}

View File

@ -1,124 +0,0 @@
#!/usr/bin/perl -w
use Getopt::Long;
$opt_help=0;
$opt_tarball=$opt_builddir=$opt_suffix="";
GetOptions(
"help",
"tarball=s",
"builddir=s",
"suffix=s"
) || print_help();
print_help() if ($opt_help);
chomp($MSDEV=`which msdev`);
if (!$opt_builddir) {
$opt_builddir = "/cygdrive/c/mysql-win-build";
}
$opt_tarball =~ /(mysql[^\/]*)-win-src\.tar/;
$mysqlver=$1;
$basedir = "$opt_builddir/$mysqlver";
$scriptdir = `pwd`;
# Make sure build dir exists
mkdir($opt_builddir);
# Clean out any previous build
system("rm -rf $basedir");
# Unpack in the script directory
system("tar -zxvf $opt_tarball");
# Move to the build directory
system("mv $mysqlver $opt_builddir");
if (!chdir($basedir))
{
print "Do-win-build error: Could not change to $basedir";
exit 1;
}
# Check whether this is a classic edition build
if ($opt_suffix =~ /-classic/)
{
# Blank out ha_innodb.cpp
chmod 0644, 'sql/ha_innodb.cpp';
open(OUT, '>', 'sql/ha_innodb.cpp');
close(OUT);
# Remove HAVE_INNOBASE_DB from the requisite project files
for $dspfile ('libmysqld/libmysqld.dsp', 'mysqldemb/mysqldemb.dsp', 'mysqlserver/mysqlserver.dsp', 'sql/mysqld.dsp', 'sql/mysqldmax.dsp')
{
open(IN, '<', $dspfile);
open(OUT, '>', "$dspfile.tmp");
while (readline IN)
{
s/\D \"HAVE_INNOBASE_DB\" //g;
print OUT $_;
}
close(IN);
close(OUT);
unlink $dspfile;
rename "$dspfile.tmp", $dspfile;
}
}
# Perform compilation
system("\"$MSDEV\" mysql.dsw /MAKE \"ALL\" /OUT $mysqlver-build.log");
# Package binary
system("./scripts/make_win_binary_distribution --suffix=$opt_suffix");
# Copy log back to script directory
system("cp $mysqlver$suffix-build.log $scriptdir");
# Move binary package to script directory
system("mv *.zip $scriptdir");
#
# Print a help text message
#
sub print_help
{
print <<EOF;
Usage: Do-compile-win [options] source-tarball
Unpacks a Windows source distribution on the local machine and
compiles it using VC++ 6.0.
This script is intended for Cygwin Perl. You must have a working
MSDEV.EXE in your path for compilation, as well as the following:
sed
tar (GNU tar)
which
Options:
--help
Print this text.
--builddir=<dir>
Set the Cygwin path to build under; the tarball will actually
be moved to <builddir>/mysql-<version>/tarball and extracted under
<builddir>/mysql-<version>/build.
Default: /cygdrive/c/mysql-win-build
--suffix=<suffix>
If specified, the resulting binary will have the specified suffix
in its name. If the suffix is "-classic", the project files will
be stripped of all occurrences of HAVE_INNOBASE_DB and
ha_innodb.cpp will be blanked out, to create classic edition
server binaries.
--tarball=<file>
Windows source tarball to use for this build. Must be of the form
mysql[com]-x.x.x-win-src.tar.gz (REQUIRED)
EOF
exit 1;
}

View File

@ -1,15 +0,0 @@
#! /bin/sh
CVSROOT=my@work.mysql.com:/home/cvs
CVS_RSH=ssh
TMPDIR=/tmp
cd $TMPDIR
[ -d mysql ] && rm -rf mysql
CVSROOT=$CVSROOT CVS_RSH=$CVS_RSH cvs -z 9 co mysql && cd mysql && \
chmod u+w -R * && BUILD/compile-pentium
if test $? = 0
then
cd $TMPDIR && rm -rf mysql
fi

View File

@ -1,112 +0,0 @@
# Helper functions
#
# Create a log entry
#
sub logger
{
my $message= $_[0];
my $cmnd= $_[1];
print $message . "\n" if !$opt_quiet && !$opt_verbose && !$cmnd;
print timestamp() . " " . $message . "\n" if $opt_verbose;
if (defined $opt_log && !$opt_dry_run)
{
open LOG, ">>$LOGFILE" or die "Can't open logfile $LOGFILE!";
print LOG timestamp() . " " . $message . "\n";
close LOG;
}
}
#
# run_command(<command>,<error message>)
# Execute the given command or die with the respective error message
# Just print out the command when doing a dry run
#
sub run_command
{
my $command= $_[0];
my $errormsg= $_[1];
if ($opt_dry_run)
{
print "$command\n";
}
else
{
&logger($command, 1);
$command.= ';' unless ($command =~ m/^.*;$/);
$command =~ s/;/ >> $LOGFILE 2>&1;/g if defined $opt_log;
$command =~ s/;/ > \/dev\/null;/g if (!$opt_verbose && !$opt_log);
system($command) == 0 or &abort("$errormsg\n");
}
}
#
# abort(<message>)
# Exit with giving out the given error message or by sending
# it via email to the given mail address (including a log file snippet,
# if available)
#
sub abort
{
my $message= $_[0];
my $messagefile;
my $subject= "Bootstrap of $REPO failed" if $opt_mail;
$message= "ERROR: " . $message;
&logger($message);
if ($opt_mail && !$opt_dry_run)
{
$messagefile= "/tmp/message.$$";
open(TMP,">$messagefile");
print TMP "$message\n\n";
close TMP;
if (defined $opt_log)
{
system("tail -n 40 $LOGFILE >> $messagefile");
}
system("mail -s \"$subject\" $opt_mail < $messagefile");
unlink($messagefile);
}
exit 1;
}
# Create a time stamp for logging purposes
sub timestamp
{
return &ymd() . " " . &hms();
}
#
# return the current time as a string (HH:MM:SS)
#
sub hms
{
my @ta= localtime(time());
my $h= $ta[2];
$h= "0" . "$h" if ($h <= 9);
my $m= $ta[1];
$m= "0" . "$m" if ($m <= 9);
my $s= $ta[0];
$s="0" . "$s" if ($s <= 9);
return "$h:$m:$s";
}
#
# return the current date as a string (YYYYMMDD)
#
sub ymd
{
my @ta=localtime(time());
my $d=$ta[3];
$d="0" . "$d" if ($d <= 9);
my $m=$ta[4]+1;
$m="0" . "$m" if ($m <= 9);
my $y=1900+$ta[5];
return "$y$m$d";
}

View File

@ -1,141 +0,0 @@
#!/usr/bin/perl
#
# my_md5sum
#
# Script to clone the 'md5sum' command found on modern systems, since that
# command is not always found on all systems.
#
# Use the "--help" option for more info!
#
# Written by Matt Wagner <matt@mysql.com>
#
use strict;
#
# Use local perl libraries first. 'unshift' adds to the front of @INC
# The local perl library dir hidden is $HOME/.perllibs on each build host
#
BEGIN
{
my $homedir= $ENV{HOME};
unshift (@INC, "$homedir/.perllibs");
}
use Digest::MD5;
use Getopt::Long;
my $VER= "1.3";
my $EXIT= 0;
#
# Strip the leading path info off the program name ($0). We want 'my_md5sum'
# not './my_md5sum'.
#
$0=~ s/^.*\/(.+)$/$1/;
my ($opt_check, $opt_help)= undef;
GetOptions(
"check|c" => \$opt_check,
"help|h" => \$opt_help,
) || usage();
#
# Put all the [file1 file2 file3 ...]'s into an array
#
my @files = @ARGV;
#
# Give the "--help" text if:
# - "--help|-h" was specified
# - The number of files given as arguments is nil
# - The "--check|-c" option is used with more than one [file] argument
#
usage() if $opt_help || $#files == -1 || ($opt_check && $#files > 0);
# If "--check|-c", then go into checking
if ($opt_check)
{
open (CHECKFILE, $files[0]) or die "$files[0]: $!";
while (<CHECKFILE>)
{
#
# Goto the next line in the file if it does not match a typical
# digest line like:
#
# f1007efa2c72daa693981ec764cdeaca Bootstrap
#
next if $_!~ m/^([a-z0-9]{32})\s+(.+)$/;
# Collect the trappings from the above regex
my $checksum= $1;
my $checkfile= $2;
# Generate a fresh MD5 for the file in question
my $digest= &mkmd5($checkfile);
# Check the fresh MD5 against what is recorded in the file
# Print an error message if they don't match, else print OK
print "$checkfile: FAILED\n" if $digest ne $checksum;
print "$checkfile: OK\n" if $digest eq $checksum;
# Set the exit() status to non-zero if FAILED
$EXIT= 1 if $digest ne $checksum;
}
}
# Else generate the MD5 digest to STDOUT
else
{
foreach my $file (@files)
{
my $digest= &mkmd5($file);
print "$digest $file\n";
}
}
exit($EXIT);
#
# This routine generates the MD5 digest of a file
#
sub mkmd5
{
my $file= shift;
open (FILE, $file) or die "$file: $!";
binmode(FILE);
my $digest= Digest::MD5->new->addfile(*FILE)->hexdigest;
close FILE;
return $digest;
}
#
# Print the help text
#
sub usage
{
print <<EOF;
$0 version $VER by Matt Wagner <matt\@mysql.com>
Usage:
$0 [-c [file]] | [file1...]
Generates or checks MD5 message digests.
Options:
-c, --check Check message digests (default is generate)
-h, --help Display this text and exit
The input for -c should be the list of message digests and file names that is
printed on STDOUT by this program when it generates digests.
EOF
exit(0);
}

View File

@ -1,372 +0,0 @@
#!/usr/bin/perl -wi
# Untar a MySQL distribution, change the copyright texts,
# pack it up again to a given directory
$VER="1.5";
use Cwd;
use File::Basename;
use File::Copy;
use Getopt::Long;
$opt_help = 0;
$opt_version = 0;
$opt_verbose = 0;
$opt_target = "mysql-copyright-target-";
$opt_target .= `date +%d%m%y-%H%M%S`;
chop $opt_target;
GetOptions("help","version","target=s", "verbose") || error();
# fix the directory prefix for target dir
$WD= cwd();
my $win_flag = 0;
$opt_target= $WD . '/' . $opt_target;
&main();
####
#### main
####
sub main
{
my $REG_BASENAME = '[a-z0-9A-Z\-\_\+]+';
my $REG_VERSION = '[0-9\.\-]+[a-z]?[0-9\.\-]+?(.alpha|.beta|.gamma|pre\d|[0-9\.\-a-z])?';
my $target;
if ($opt_version)
{
print "$0 version $VER by Jani Tolonen\n";
exit(0);
}
usage() if ($opt_help);
print error() if ($#ARGV == -1);
`mkdir -p $opt_target`;
$pec= $? >> 8;
die "Couldn't make the target directory!\n" if ($pec);
for ($i=0; $ARGV[$i]; $i++)
{
my $distfile= $ARGV[$i];
$win_flag = ($distfile =~ /win-src/) ? 1 : 0;
my $dir;
$dir= "mysql-copyright-";
$dir.= `date +%d%m%y-%H%M%S`;
chop $dir;
if (!(mkdir "$dir", 0700))
{
die "Couldn't make directory $dir!";
}
if (!(chdir "$dir"))
{
abort($dir, "Couldn't cd to $dir!");
}
# if the distfile is mysql-3.22.22-alpha.tar.gz, then
# distname is 'mysql-3.22.22-alpha' and suffix '.tar.gz'
if ($distfile =~
m/^($REG_BASENAME)([\-\_])($REG_VERSION){1}([\.\-\+]\w+\-\w+)?[\.\-\+](.*)?$/xo)
{
$distname= $1.$2.$3;
$suffix= $5;
$fileext = $6;
$newdistname= $1."com".$2.$3;
$newdistname .= $suffix if $win_flag;
}
# find out the extract path (should be same as distname!)
chomp($destdir= `tar ztf ../$distfile | head -1`);
# remove slash from the end
$destdir= substr($destdir, 0, -1);
if ("$destdir" ne "$distname")
{
print "Destination directory (the directory that will be extracted\n";
print "from the original distribution file) differs from the\n";
print "distribution name! Are you sure you want to continue? (Y/N) [N]:";
$ans= my_read(1);
abort($dir, "Aborted!") if ("$ans" ne "Y" && "$ans" ne "y");
}
# everything should be ok, continue with extracting..
`tar xfz ../$distfile`;
$pec= $? >> 8;
abort($dir, "Extracting from tar failed!\n") if ($pec);
# remove the 'PUBLIC' file from distribution and copy MySQLEULA.txt
# on the toplevel of the directory instead. file 'PUBLIC' shouldn't
# exist in the new mysql distributions, but let's be sure..
unlink("$destdir/PUBLIC", "$destdir/README");
unlink("$destdir/COPYING", "$destdir/EXCEPTIONS-CLIENT");
copy("$WD/Docs/MySQLEULA.txt", "$destdir");
# remove subdirectories 'bdb', 'cmd-line-utils/readline'
my @extra_fat= ('bdb', 'cmd-line-utils/readline');
foreach my $fat (@extra_fat)
{
&trim_the_fat($fat);
}
# fix file copyrights
&fix_usage_copyright();
&add_copyright();
# fix LICENSE tag in include/mysql_version.h
&fix_mysql_version();
# apply "autotools" - must be last to ensure proper timestamps
&run_autotools();
# rename the directory with new distribution name
chdir("$WD/$dir");
print "renaming $destdir $newdistname\n" if $opt_verbose;
rename($destdir, $newdistname);
# tar the new distribution
`tar cz -f $WD/$newdistname.tar.gz $newdistname`;
$pec= $? >> 8;
abort($dir, "Making new tar archive failed!\n") if ($pec);
# remove temporary directory
chdir($WD) or print "$! Unable to move up one dir\n";
my $cwd = getcwd();
print "current dir is $cwd\n" if $opt_verbose ;
if (-e $dir) {
print "Trying to delete $dir\n" if $opt_verbose;
if ( system("rm -rf $dir")){
print "$! Unable to delete $dir!\n";
}
}
}
exit(0);
}
####
#### This function will s/GPL/Commercial/ in include/mysql_version.h for the
#### LICENSE tag.
####
sub fix_mysql_version
{
my $cwd= getcwd();
chdir("$destdir");
my $header_file= (-f 'include/mysql_version.h.in')? 'include/mysql_version.h.in' : 'include/mysql_version.h';
open(MYSQL_VERSION,"<$header_file") or die "Unable to open $header_file for read: $!\n";
undef $/;
my $mysql_version= <MYSQL_VERSION>;
close(MYSQL_VERSION);
$mysql_version=~ s/\#define LICENSE[\s\t]+GPL/#define LICENSE Commercial/;
open(MYSQL_VERSION,">$header_file") or die "Unable to open $header_file for write: $!\n";
print MYSQL_VERSION $mysql_version;
close(MYSQL_VERSION);
chdir("$cwd");
}
####
#### This function will remove unwanted parts of a src tree for the mysqlcom
#### distributions.
####
sub trim_the_fat
{
my $the_fat= shift;
my $cwd= getcwd();
chdir("$destdir");
if ( -d "${the_fat}" )
{
system("rm -rf ${the_fat}");
if (!$win_flag)
{
open(CONFIG_IN,"<configure.in") or die "Unable to open configure.in for read: $!\n";
undef $/;
my $config_in= <CONFIG_IN>;
close(CONFIG_IN);
#
# If $the_fat Makefile line closes the parenthesis, then
# replace that line with just the closing parenthesis.
#
if ($config_in=~ m|${the_fat}/Makefile\)\n?|)
{
$config_in=~ s|${the_fat}/Makefile(\)\n?)|$1|;
}
#
# Else just delete the line
#
else
{
$config_in=~ s|${the_fat}/Makefile dnl\n?||;
}
open(CONFIG_IN,">configure.in") or die "Unable to open configure.in for write: $!\n";
print CONFIG_IN $config_in;
close(CONFIG_IN);
}
}
chdir("$cwd");
}
####
#### This function will run the autotools on the reduced source tree.
####
sub run_autotools
{
my $cwd= getcwd();
if (!$win_flag)
{
chdir("$destdir");
unlink ("configure") or die "Can't delete $destdir/configure: $!\n";
# File "configure.in" has already been modified by "trim_the_fat()"
# It must be ensured that the timestamps of the relevant files are really
# ascending, for otherwise the Makefile may cause a re-run of these
# autotools. Experience shows that deletion is the only safe way.
unlink ("config.h.in") or die "Can't delete $destdir/config.h.in: $!\n";
unlink ("aclocal.m4") or die "Can't delete $destdir/aclocal.m4: $!\n";
# These sleep commands also ensure the ascending order.
`aclocal && sleep 2 && autoheader && sleep 2 && automake && sleep 2 && autoconf`;
die "'./configure' was not produced!" unless (-f "configure");
if (-d "autom4te.cache") {
print "Trying to delete autom4te.cache dir\n" if $opt_verbose;
system("rm -rf autom4te.cache") or print "Unable to delete autom4te.cache dir: $!\n";
}
chdir("$cwd");
}
}
####
#### mysqld and MySQL client programs have a usage printed with --help.
#### This usage includes a copyright, which needs to be modified
####
sub fix_usage_copyright
{
my $findlist = `find . -type f -name \"*.c*\"`;
my @files = split("\n", $findlist);
my $cwd = getcwd();
foreach my $file (@files)
{
next if ! -f $file;
print "processing file $file in cwd $cwd\n" if $opt_verbose;
`replace "This is free software," "This is commercial software," "and you are welcome to modify and redistribute it under the GPL license" "please see the file MySQLEULA.txt for details" -- "$file"` ;
}
}
####
#### change the copyright text in the beginning of the files
####
sub add_copyright
{
my $findlist = `find . -type f -name "*"`;
my @files = split("\n", $findlist);
my $cwd = getcwd();
foreach my $file (@files)
{
next if ! -f $file;
next if -B $file;
print "processing file $file in cwd $cwd\n" if $opt_verbose;
`$WD/Build-tools/mysql-copyright-2 "$file"`;
}
}
####
#### read stdin
####
sub my_read
{
($length)= @_; # Max allowed length for the string.
$input= getc(STDIN);
if($input eq "\n")
{
return "\n";
}
for($new_input= getc(STDIN); $new_input ne "\n" ;)
{
if(length($input) < $length)
{
$input.= $new_input;
}
$new_input= getc(STDIN);
}
return $input;
}
####
#### abort
####
sub abort
{
my ($dir, $errstr)= @_;
# remove newly made directory and it's contents
print "$errstr\n";
chdir "..";
print "Removing directory $dir...\n";
`rm -rf $dir`;
exit(0);
}
####
#### usage
####
sub usage
{
print <<EOF;
$0 version $VER by Jani Tolonen
Description: The program takes one or more MySQL distributions as an
argument(s), extracts them, changes the copyright text in the
distribution files and makes a new distribution with suffix "com" in
the basename to directory mysql-copyright-target-DATE, where the
command was issued. For example: mysql-3.23.18-beta.tar.gz ->
mysqlcom-3.23.18-beta.tar.gz. DATE is of form DDMMYY-HHMMSS. The
target directory can be changed with option
--target=... mysql-copyright consists of two perl programs, this one
and another, mysql-copyright-2. Make sure the second part of the
script is available to the main script.
Usage:
$0 [options] file1 [file2 file3...]
Options:
--help Show this help and exit.
--target Target directory for new distribution files.
'.' can be used for the current directory.
(Default: $opt_target)
EOF
exit(0);
}
####
#### error
####
sub error
{
if ($#ARGV == -1)
{
print "Too few arguments to $0!\n";
}
exit(1);
}

View File

@ -1,175 +0,0 @@
#!/usr/bin/perl -i
# Add the header to all given files
# This program asumes that after the copyright there is a empty line
#
$opt_v= 0;
require "getopts.pl";
Getopts("v") || die "Aborted";
@copyright=
(
"Copyright (C) 2000 MySQL AB & MySQL Finland AB",
"",
"This software is distributed with NO WARRANTY OF ANY KIND. No author or",
"distributor accepts any responsibility for the consequences of using it, or",
"for whether it serves any particular purpose or works at all, unless he or",
"she says so in writing. Refer to the MySQLEULA.txt file for details.",
"",
"Every copy of this file must include a copy of the License, normally in a",
"plain ASCII text file named MySQLEULA.txt. The License grants you the right to",
"copy, modify and redistribute this file, but only under certain conditions",
"described in the License. Among other things, the License requires that",
"the copyright notice and this notice be preserved on all copies"
);
while (<>)
{
if (!$first++)
{
add_copyright($_);
}
if ($in_copyright)
{
$in_copyright=check_in_copyright($_);
}
print $_ if (!$in_copyright);
if (eof)
{
$first=0; $in_copyright=1;
}
}
exit 0;
sub add_copyright
{
my ($line)=@_;
my ($row);
$in_copyright= $line =~ /copyright/i;
$found_end_copyright=$skip_this_line=0;
if (!($line =~ /Monty/ || $line =~ /MySQL AB/))
{
$in_copyright=0;
print STDERR "File with unknown copyright ", $ARGV,"\n" if ($opt_v);
return;
}
else
{
print STDERR "To be Changed: ", $ARGV, "\n" if ($opt_v);
}
if ($ARGV =~ /Makefile/ ||
$ARGV =~ /makefile/)
{ # Makefile
$start_copyright="# ";
$line_copyright= "# ";
$end_copyright= "";
}
elsif ($line =~ "^#!")
{ # Shell script
$start_copyright="# ";
$line_copyright= "# ";
$end_copyright= "";
$skip_this_line=1;
print $line;
while ($line=<>) # Copy all until new line or copyright
{
if ($line =~ /copyright/i)
{
last;
}
print $line;
last if ($line =~ /^(\s|\n)*$/);
}
$in_copyright=1;
}
elsif ($ARGV =~ /\.c$/ ||
$ARGV =~ /\.cc$/ ||
$ARGV =~ /\.h$/ ||
$ARGV =~ /\.cpp$/ ||
$ARGV =~ /\.txt$/ ||
$ARGV =~ /\.yy$/)
{
$start_copyright="/* ";
$line_copyright= " ";
$end_copyright= "*/";
}
elsif ($ARGV =~ /-x86\.s$/)
{
$start_copyright="# ";
$line_copyright= "# ";
$end_copyright= "";
}
elsif ($ARGV =~ /\.s$/)
{
$start_copyright="! ";
$line_copyright= "! ";
$end_copyright= "";
}
elsif ($ARGV =~ /\.sql$/)
{
$start_copyright="-- ";
$line_copyright= "-- ";
$end_copyright= "";
}
elsif ($ARGV =~ /\.asm$/)
{
$start_copyright="; ";
$line_copyright= "; ";
$end_copyright= "";
}
else # Unknown file
{
$in_copyright=0;
print STDERR "Unknown file type ", $ARGV,"\n" if ($opt_v);
return;
}
$data=\@copyright;
for ($row=0 ; $row <= $#$data ; $row++)
{
print $row == 0 ? $start_copyright : $line_copyright;
print $data->[$row];
print $row != $#$data ? "\n" : $end_copyright . "\n";
}
print "\n";
$end_copyright =~ /\s*([^\s]+)\s*(([^\s].*)|)$/; # Remove pre and post spaces
}
#
# Return 1 if in copyright
#
sub check_in_copyright
{
my ($line)=@_;
$line =~ /^(.*[^\s])(\s|\n|\r)*$/; # Remove end space and newline
$line=$1;
if (!$line)
{
$found_end_copyright=1 if (!length($end_copyright));
return 1; # Skip empty lines
}
return 0 if ($found_end_copyright);
if ($end_copyright)
{
if (index($line,$end_copyright) != -1)
{
$found_end_copyright=1;
}
return 1;
}
if ($line =~ /copyright/i || index($line . " ",$line_copyright) == 0)
{
return 1;
}
if ($skip_this_line)
{
$skip_this_line=0;
return 1;
}
return 0; # Can't trust the empty copyright line yet
}

View File

@ -1,116 +0,0 @@
#!/usr/bin/perl
package NEWEST;
use Getopt::Long;
use File::Basename;
my $src_dir;
my $basename;
my $type = "tar.gz";
my $versions;
my $help;
my %KEEPER;
GetOptions(
"src_dir=s" => \$src_dir,
"basename=s" => \$basename,
"type=s" => \$type,
"versions!" => \$versions,
"help!" => \$help
);
if (!defined $src_dir || !defined $basename) {
$help = 1;
}
if ($help) {
&help();
exit;
}
&extract_version(\$src_dir, \$basename, \$type, \%KEEPER);
&print_max(\%KEEPER, \$type, \$versions, &find_max(\%KEEPER));
sub extract_version {
my $src_dir = shift;
my $basename = shift;
my $type = shift;
my $KEEPER = shift;
while (glob("$${src_dir}/$${basename}*")) {
my $base = basename("$_",".$${type}");
my @ver = split /-/, $base;
my @nums = split /\./, $ver[$#ver];
my $new;
for (my $i=0; $i<$#nums+1; $i++) {
$new =~ s/^([0-9]*)([a-zA-Z]*)$/$1/;
$new .= 10000+$nums[$i];
$new .= $2;
}
$KEEPER->{"$new"} = [$base,$ver[$#ver]];
}
return;
}
sub find_max {
my $KEEPER = shift;
return reverse sort (keys %$KEEPER);
}
sub print_max {
my $KEEPER = shift;
my $type = shift;
my $versions = shift;
my $max_key = shift;
if ($${versions}) {
print "$KEEPER->{$max_key}->[1]\n";
}
else {
print "$KEEPER->{$max_key}->[0]" . ".$${type}\n";
}
return;
}
sub help {
print qq("newest" finds the tarball in a given directory with the newest version number
and returns it's filename. "newest" is meant to be embedded in UNIX shell
scripts.
Usage:
newest -(src_dir | s) /path/to/dir/with/tarballs
-(basename | b) BaseName (ex. BaseName-2.10.tar.gz)
-(type | t) Type of file (default: tar.gz)
-(versions | v) Print only version information
-(help | h) Prints usage help
Ex: \$ /opt/bin/newest -s /opt/incoming/pm_modules -b Data-Dumper
Data-Dumper-2.101.tar.gz
Both arguments, '-s' and '-b' are required; '-t' and '-v' are optional.
);
return;
}

352
COPYING Normal file
View File

@ -0,0 +1,352 @@
GNU GENERAL PUBLIC LICENSE
Version 2, June 1991
Copyright (C) 1989, 1991 Free Software Foundation, Inc.
59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
Everyone is permitted to copy and distribute verbatim copies
of this license document, but changing it is not allowed.
Preamble
========
The licenses for most software are designed to take away your freedom
to share and change it. By contrast, the GNU General Public License is
intended to guarantee your freedom to share and change free
software--to make sure the software is free for all its users. This
General Public License applies to most of the Free Software
Foundation's software and to any other program whose authors commit to
using it. (Some other Free Software Foundation software is covered by
the GNU Library General Public License instead.) You can apply it to
your programs, too.
When we speak of free software, we are referring to freedom, not price.
Our General Public Licenses are designed to make sure that you have
the freedom to distribute copies of free software (and charge for this
service if you wish), that you receive source code or can get it if you
want it, that you can change the software or use pieces of it in new
free programs; and that you know you can do these things.
To protect your rights, we need to make restrictions that forbid anyone
to deny you these rights or to ask you to surrender the rights. These
restrictions translate to certain responsibilities for you if you
distribute copies of the software, or if you modify it.
For example, if you distribute copies of such a program, whether gratis
or for a fee, you must give the recipients all the rights that you
have. You must make sure that they, too, receive or can get the source
code. And you must show them these terms so they know their rights.
We protect your rights with two steps: (1) copyright the software, and
(2) offer you this license which gives you legal permission to copy,
distribute and/or modify the software.
Also, for each author's protection and ours, we want to make certain
that everyone understands that there is no warranty for this free
software. If the software is modified by someone else and passed on, we
want its recipients to know that what they have is not the original, so
that any problems introduced by others will not reflect on the original
authors' reputations.
Finally, any free program is threatened constantly by software patents.
We wish to avoid the danger that redistributors of a free program will
individually obtain patent licenses, in effect making the program
proprietary. To prevent this, we have made it clear that any patent
must be licensed for everyone's free use or not licensed at all.
The precise terms and conditions for copying, distribution and
modification follow.
GNU GENERAL PUBLIC LICENSE
TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
0. This License applies to any program or other work which contains a
notice placed by the copyright holder saying it may be distributed
under the terms of this General Public License. The "Program",
below, refers to any such program or work, and a "work based on
the Program" means either the Program or any derivative work under
copyright law: that is to say, a work containing the Program or a
portion of it, either verbatim or with modifications and/or
translated into another language. (Hereinafter, translation is
included without limitation in the term "modification".) Each
licensee is addressed as "you".
Activities other than copying, distribution and modification are
not covered by this License; they are outside its scope. The act
of running the Program is not restricted, and the output from the
Program is covered only if its contents constitute a work based on
the Program (independent of having been made by running the
Program). Whether that is true depends on what the Program does.
1. You may copy and distribute verbatim copies of the Program's
source code as you receive it, in any medium, provided that you
conspicuously and appropriately publish on each copy an appropriate
copyright notice and disclaimer of warranty; keep intact all the
notices that refer to this License and to the absence of any
warranty; and give any other recipients of the Program a copy of
this License along with the Program.
You may charge a fee for the physical act of transferring a copy,
and you may at your option offer warranty protection in exchange
for a fee.
2. You may modify your copy or copies of the Program or any portion
of it, thus forming a work based on the Program, and copy and
distribute such modifications or work under the terms of Section 1
above, provided that you also meet all of these conditions:
a. You must cause the modified files to carry prominent notices
stating that you changed the files and the date of any change.
b. You must cause any work that you distribute or publish, that
in whole or in part contains or is derived from the Program
or any part thereof, to be licensed as a whole at no charge
to all third parties under the terms of this License.
c. If the modified program normally reads commands interactively
when run, you must cause it, when started running for such
interactive use in the most ordinary way, to print or display
an announcement including an appropriate copyright notice and
a notice that there is no warranty (or else, saying that you
provide a warranty) and that users may redistribute the
program under these conditions, and telling the user how to
view a copy of this License. (Exception: if the Program
itself is interactive but does not normally print such an
announcement, your work based on the Program is not required
to print an announcement.)
These requirements apply to the modified work as a whole. If
identifiable sections of that work are not derived from the
Program, and can be reasonably considered independent and separate
works in themselves, then this License, and its terms, do not
apply to those sections when you distribute them as separate
works. But when you distribute the same sections as part of a
whole which is a work based on the Program, the distribution of
the whole must be on the terms of this License, whose permissions
for other licensees extend to the entire whole, and thus to each
and every part regardless of who wrote it.
Thus, it is not the intent of this section to claim rights or
contest your rights to work written entirely by you; rather, the
intent is to exercise the right to control the distribution of
derivative or collective works based on the Program.
In addition, mere aggregation of another work not based on the
Program with the Program (or with a work based on the Program) on
a volume of a storage or distribution medium does not bring the
other work under the scope of this License.
3. You may copy and distribute the Program (or a work based on it,
under Section 2) in object code or executable form under the terms
of Sections 1 and 2 above provided that you also do one of the
following:
a. Accompany it with the complete corresponding machine-readable
source code, which must be distributed under the terms of
Sections 1 and 2 above on a medium customarily used for
software interchange; or,
b. Accompany it with a written offer, valid for at least three
years, to give any third-party, for a charge no more than your
cost of physically performing source distribution, a complete
machine-readable copy of the corresponding source code, to be
distributed under the terms of Sections 1 and 2 above on a
medium customarily used for software interchange; or,
c. Accompany it with the information you received as to the offer
to distribute corresponding source code. (This alternative is
allowed only for noncommercial distribution and only if you
received the program in object code or executable form with
such an offer, in accord with Subsection b above.)
The source code for a work means the preferred form of the work for
making modifications to it. For an executable work, complete
source code means all the source code for all modules it contains,
plus any associated interface definition files, plus the scripts
used to control compilation and installation of the executable.
However, as a special exception, the source code distributed need
not include anything that is normally distributed (in either
source or binary form) with the major components (compiler,
kernel, and so on) of the operating system on which the executable
runs, unless that component itself accompanies the executable.
If distribution of executable or object code is made by offering
access to copy from a designated place, then offering equivalent
access to copy the source code from the same place counts as
distribution of the source code, even though third parties are not
compelled to copy the source along with the object code.
4. You may not copy, modify, sublicense, or distribute the Program
except as expressly provided under this License. Any attempt
otherwise to copy, modify, sublicense or distribute the Program is
void, and will automatically terminate your rights under this
License. However, parties who have received copies, or rights,
from you under this License will not have their licenses
terminated so long as such parties remain in full compliance.
5. You are not required to accept this License, since you have not
signed it. However, nothing else grants you permission to modify
or distribute the Program or its derivative works. These actions
are prohibited by law if you do not accept this License.
Therefore, by modifying or distributing the Program (or any work
based on the Program), you indicate your acceptance of this
License to do so, and all its terms and conditions for copying,
distributing or modifying the Program or works based on it.
6. Each time you redistribute the Program (or any work based on the
Program), the recipient automatically receives a license from the
original licensor to copy, distribute or modify the Program
subject to these terms and conditions. You may not impose any
further restrictions on the recipients' exercise of the rights
granted herein. You are not responsible for enforcing compliance
by third parties to this License.
7. If, as a consequence of a court judgment or allegation of patent
infringement or for any other reason (not limited to patent
issues), conditions are imposed on you (whether by court order,
agreement or otherwise) that contradict the conditions of this
License, they do not excuse you from the conditions of this
License. If you cannot distribute so as to satisfy simultaneously
your obligations under this License and any other pertinent
obligations, then as a consequence you may not distribute the
Program at all. For example, if a patent license would not permit
royalty-free redistribution of the Program by all those who
receive copies directly or indirectly through you, then the only
way you could satisfy both it and this License would be to refrain
entirely from distribution of the Program.
If any portion of this section is held invalid or unenforceable
under any particular circumstance, the balance of the section is
intended to apply and the section as a whole is intended to apply
in other circumstances.
It is not the purpose of this section to induce you to infringe any
patents or other property right claims or to contest validity of
any such claims; this section has the sole purpose of protecting
the integrity of the free software distribution system, which is
implemented by public license practices. Many people have made
generous contributions to the wide range of software distributed
through that system in reliance on consistent application of that
system; it is up to the author/donor to decide if he or she is
willing to distribute software through any other system and a
licensee cannot impose that choice.
This section is intended to make thoroughly clear what is believed
to be a consequence of the rest of this License.
8. If the distribution and/or use of the Program is restricted in
certain countries either by patents or by copyrighted interfaces,
the original copyright holder who places the Program under this
License may add an explicit geographical distribution limitation
excluding those countries, so that distribution is permitted only
in or among countries not thus excluded. In such case, this
License incorporates the limitation as if written in the body of
this License.
9. The Free Software Foundation may publish revised and/or new
versions of the General Public License from time to time. Such
new versions will be similar in spirit to the present version, but
may differ in detail to address new problems or concerns.
Each version is given a distinguishing version number. If the
Program specifies a version number of this License which applies
to it and "any later version", you have the option of following
the terms and conditions either of that version or of any later
version published by the Free Software Foundation. If the Program
does not specify a version number of this License, you may choose
any version ever published by the Free Software Foundation.
10. If you wish to incorporate parts of the Program into other free
programs whose distribution conditions are different, write to the
author to ask for permission. For software which is copyrighted
by the Free Software Foundation, write to the Free Software
Foundation; we sometimes make exceptions for this. Our decision
will be guided by the two goals of preserving the free status of
all derivatives of our free software and of promoting the sharing
and reuse of software generally.
NO WARRANTY
11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO
WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE
LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT
HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT
WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT
NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE
QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE
PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY
SERVICING, REPAIR OR CORRECTION.
12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN
WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY
MODIFY AND/OR REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE
LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL,
INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR
INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF
DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU
OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY
OTHER PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN
ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
END OF TERMS AND CONDITIONS
How to Apply These Terms to Your New Programs
=============================================
If you develop a new program, and you want it to be of the greatest
possible use to the public, the best way to achieve this is to make it
free software which everyone can redistribute and change under these
terms.
To do so, attach the following notices to the program. It is safest to
attach them to the start of each source file to most effectively convey
the exclusion of warranty; and each file should have at least the
"copyright" line and a pointer to where the full notice is found.
ONE LINE TO GIVE THE PROGRAM'S NAME AND A BRIEF IDEA OF WHAT IT DOES.
Copyright (C) YYYY NAME OF AUTHOR
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.
Also add information on how to contact you by electronic and paper mail.
If the program is interactive, make it output a short notice like this
when it starts in an interactive mode:
Gnomovision version 69, Copyright (C) 19YY NAME OF AUTHOR
Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
This is free software, and you are welcome to redistribute it
under certain conditions; type `show c' for details.
The hypothetical commands `show w' and `show c' should show the
appropriate parts of the General Public License. Of course, the
commands you use may be called something other than `show w' and `show
c'; they could even be mouse-clicks or menu items--whatever suits your
program.
You should also get your employer (if you work as a programmer) or your
school, if any, to sign a "copyright disclaimer" for the program, if
necessary. Here is a sample; alter the names:
Yoyodyne, Inc., hereby disclaims all copyright interest in the program
`Gnomovision' (which makes passes at compilers) written by James Hacker.
SIGNATURE OF TY COON, 1 April 1989
Ty Coon, President of Vice
This General Public License does not permit incorporating your program
into proprietary programs. If your program is a subroutine library,
you may consider it more useful to permit linking proprietary
applications with the library. If this is what you want to do, use the
GNU Library General Public License instead of this License.

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.3 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.0 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.7 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 716 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 909 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.0 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.6 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.6 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.6 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.8 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.6 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.3 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 19 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.0 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 918 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.5 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.7 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 15 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 21 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 17 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 12 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 22 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 42 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.1 KiB

View File

@ -1,31 +0,0 @@
# Copyright (C) 2000 MySQL AB & MySQL Finland AB & TCX DataKonsult AB
#
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Library General Public
# License as published by the Free Software Foundation; either
# version 2 of the License, or (at your option) any later version.
#
# This library 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
# Library General Public License for more details.
#
# You should have received a copy of the GNU Library General Public
# License along with this library; if not, write to the Free
# Software Foundation, Inc., 59 Temple Place - Suite 330, Boston,
# MA 02111-1307, USA
## Process this file with automake to create Makefile.in
# This is a dummy file to satisfy the hierarchy of Makefiles.
# When a release is built, the true Makefile will be copied
# together with the "real" files in this directory.
EXTRA_DIST =
# Nothing to create in this dummy directory.
all:
:
# Don't update the files from bitkeeper
%::SCCS/s.%

Binary file not shown.

Before

Width:  |  Height:  |  Size: 108 B

Binary file not shown.

Binary file not shown.

Before

Width:  |  Height:  |  Size: 13 KiB

View File

@ -9,184 +9,17 @@
# If you know how to fix any of this more elegantly please mail # If you know how to fix any of this more elegantly please mail
# docs@mysql.com # docs@mysql.com
TEXI2HTML_FLAGS = -iso -number -acc noinst_SCRIPTS = Support/generate-text-files.pl
DVIPS = dvips
MAKEINFO = @MAKEINFO@
TEXINFO_TEX = Support/texinfo.tex
noinst_SCRIPTS = Support/texi2html Support/generate-text-files.pl \ EXTRA_DIST = $(noinst_SCRIPTS) mysql.info INSTALL-BINARY
Support/generate-mirror-listing.pl
info_TEXINFOS = manual.texi
targets = manual.txt mysql.info manual.html all: txt_files
BUILT_SOURCES = $(targets) manual_toc.html include.texi
EXTRA_DIST = $(noinst_SCRIPTS) $(BUILT_SOURCES) mysqld_error.txt \
INSTALL-BINARY reservedwords.texi internals.texi
SUBDIRS = Images
all: $(targets) txt_files
txt_files: ../INSTALL-SOURCE ../COPYING ../INSTALL-WIN-SOURCE ../EXCEPTIONS-CLIENT \ txt_files: ../INSTALL-SOURCE ../COPYING ../INSTALL-WIN-SOURCE ../EXCEPTIONS-CLIENT \
INSTALL-BINARY ../support-files/MacOSX/ReadMe.txt INSTALL-BINARY ../support-files/MacOSX/ReadMe.txt
CLEAN_FILES: $(BUILD_SOURCES) CLEAN_FILES: $(txt_files)
touch $(BUILD_SOURCES) touch $(txt_files)
# The PostScript and PDF version are so big that they are not included in the
# standard distribution. It is available for download from the home page.
paper: manual_a4.ps manual_letter.ps $(PDFMANUAL)
#########################################################################
# The Makefile contains the previous version so we can not use that
include.texi: ../configure.in
echo "@c This file is autogenerated by the Makefile" > $@
echo -n "@set mysqlversion " >> $@
grep "AM_INIT_AUTOMAKE(mysql, " ../configure.in | \
sed -e 's;AM_INIT_AUTOMAKE(mysql, ;;' -e 's;);;' >> $@
echo -n "@set defaultport " >> $@
grep "MYSQL_TCP_PORT_DEFAULT=" ../configure.in | \
sed -e 's;MYSQL_TCP_PORT_DEFAULT=;;' >> $@
#
# English Manual
#
# GNU Info
mysql.info: manual.texi include.texi
cd $(srcdir) && $(MAKEINFO) --no-split -I $(srcdir) $<
# Plain Text
manual.txt: manual.texi include.texi
cd $(srcdir) && \
$(MAKEINFO) -I $(srcdir) --no-headers --no-split --output $@ $<
# HTML, all in one file
manual.html: manual.texi include.texi $(srcdir)/Support/texi2html
cd $(srcdir) && @PERL@ $(srcdir)/Support/texi2html $(TEXI2HTML_FLAGS) $<
manual_toc.html: manual.html
# PDF, Portable Document Format
manual.pdf: manual.texi
sed -e 's|@image{[^}]*} *||g' <$< >manual-tmp.texi
pdftex --interaction=nonstopmode manual-tmp.texi
texindex manual-tmp.??
pdftex --interaction=nonstopmode manual-tmp.texi
texindex manual-tmp.??
pdftex --interaction=nonstopmode manual-tmp.texi
mv manual-tmp.pdf $@
rm -f manual-tmp.*
touch $@
# XML, DocBook 4.0
mysql.xml: manual.texi include.texi
$(MAKEINFO) --force --no-ifinfo --docbook $<
mv $@ mysql-tmp.xml
Support/docbook-fixup.pl <mysql-tmp.xml >$@
rm -f mysql-tmp.xml
# Postscript, A4 Paper
manual_a4.ps: manual.texi include.texi
TEXINPUTS=$(srcdir):$$TEXINPUTS \
MAKEINFO='$(MAKEINFO) -I $(srcdir)' \
$(TEXI2DVI) --batch --texinfo --quiet '@afourpaper' $<
$(DVIPS) -t a4 manual.dvi -o $@
touch $@
# Postscript, US Letter Paper
manual_letter.ps: manual.texi include.texi
TEXINPUTS=$(srcdir):$$TEXINPUTS \
MAKEINFO='$(MAKEINFO) -I $(srcdir)' \
$(TEXI2DVI) --batch $<
$(DVIPS) -t letter manual.dvi -o $@
touch $@
#
# German Manual
#
# GNU Info
mysql.de.info: manual.de.texi include.texi
cd $(srcdir) && $(MAKEINFO) --no-split -I $(srcdir) $<
# Plain Text
manual.de.txt: manual.de.texi include.texi
cd $(srcdir) && \
$(MAKEINFO) -I $(srcdir) --no-headers --no-split --output $@ $<
# HTML, all in one file
manual.de.html: manual.de.texi include.texi $(srcdir)/Support/texi2html
cd $(srcdir) && @PERL@ $(srcdir)/Support/texi2html $(TEXI2HTML_FLAGS) $<
manual_toc.de.html: manual.html
# PDF, Portable Document Format
manual.de.pdf: manual.de.texi
sed -e 's|@image{[^}]*} *||g' <$< >manual-tmp.texi
pdftex --interaction=nonstopmode manual-tmp.texi
texindex manual-tmp.??
pdftex --interaction=nonstopmode manual-tmp.texi
texindex manual-tmp.??
pdftex --interaction=nonstopmode manual-tmp.texi
mv manual-tmp.pdf $@
rm -f manual-tmp.*
touch $@
# XML, DocBook 4.0
mysql.de.xml: manual.de.texi include.texi
$(MAKEINFO) --force --no-ifinfo --docbook $<
mv $@ mysql-tmp.xml
Support/docbook-fixup.pl <mysql-tmp.xml >$@
rm -f mysql-tmp.xml
# Postscript, A4 Paper
manual_a4.de.ps: manual.de.texi include.texi
TEXINPUTS=$(srcdir):$$TEXINPUTS \
MAKEINFO='$(MAKEINFO) -I $(srcdir)' \
$(TEXI2DVI) --batch --texinfo --quiet '@afourpaper' $<
$(DVIPS) -t a4 manual.de.dvi -o $@
touch $@
# Postscript, US Letter Paper
manual_letter.de.ps: manual.de.texi include.texi
TEXINPUTS=$(srcdir):$$TEXINPUTS \
MAKEINFO='$(MAKEINFO) -I $(srcdir)' \
$(TEXI2DVI) --batch $<
$(DVIPS) -t letter manual.de.dvi -o $@
touch $@
#
# Miscellaneous
#
# Target to produce NuSphere Manual
nusphere.pdf: manual.texi
sed -e 's/@example/@smallexample/g' \
-e 's/@end example/@end smallexample/g' \
-e 's/@c ifnusphere //g' \
-e 's|@image{[^}]*} *||g' \
<$< >manual-tmp.texi
pdftex --interaction=nonstopmode manual-tmp.texi
texindex manual-tmp.??
pdftex --interaction=nonstopmode manual-tmp.texi
texindex manual-tmp.??
pdftex --interaction=nonstopmode manual-tmp.texi
mv manual-tmp.pdf $@
rm -f manual-tmp.*
touch $@
# Include images for the manual in the distribution
dist-hook:
BD=`cd $(top_srcdir); pwd`; \
echo "PostScript and PDF versions suitable for printing" \
> $(distdir)/manual.ps
echo "are available from http://dev.mysql.com/doc/" \
>> $(distdir)/manual.ps
echo "or any mirror site" \
>> $(distdir)/manual.ps
GT = $(srcdir)/Support/generate-text-files.pl GT = $(srcdir)/Support/generate-text-files.pl
@ -202,9 +35,6 @@ GT = $(srcdir)/Support/generate-text-files.pl
INSTALL-BINARY: mysql.info $(GT) INSTALL-BINARY: mysql.info $(GT)
perl -w $(GT) mysql.info "Installing binary" "Installing source" > $@ perl -w $(GT) mysql.info "Installing binary" "Installing source" > $@
../COPYING: mysql.info $(GT)
perl -w $(GT) mysql.info "GPL license" "MySQL FLOSS License Exception" > $@
../EXCEPTIONS-CLIENT: mysql.info $(GT) ../EXCEPTIONS-CLIENT: mysql.info $(GT)
perl -w $(GT) mysql.info "MySQL FLOSS License Exception" "Function Index" > $@ perl -w $(GT) mysql.info "MySQL FLOSS License Exception" "Function Index" > $@

View File

@ -1,27 +0,0 @@
#!/my/gnu/bin/perl -w -*- perl -*-
# Generate a mirror listing
line: while (<>) { last line if /START_OF_MIRROR_LISTING/;};
print "MySQL mirror listing\n";
line: while (<>)
{
last line if /END_OF_MIRROR_LISTING/;
if (/^\@strong\{([A-Za-z ]+):\}$/)
{
print "\n*** $1\n";
}
elsif (m|^\@image\{Img/[a-z-]+\} ([A-Za-z]+) \[(.*)\]|)
{
print "\n$1 [$2]\n";
}
# A hacky URL regexp
# (m!^\@uref\{((http\|ftp)://[^,]*), (FTP\|WWW)\}!)
elsif (m!^\@uref\{((http|ftp)://[^,]*), (FTP|WWW)\}!)
{
$addr = $1;
print " $addr\n";
}
}

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -1,98 +0,0 @@
#!/usr/bin/perl
# Based on a Emacs macro by david@mysql.com
# Implemented in Perl by jeremy@mysql.com
# 2001-11-20 Fixups by arjen@mysql.com, 2 keywords and 15 synonyms were missing
# 2001-12-07 Fixup by arjen@mysql.com, add column headings for multitable.
# 2002-05-01 Fixup by arjen@mysql.com, use 3 columns instead of 4.
# 2002-05-03 Fixup by arjen@mysql.com, fill last row to full # of columns.
# 2002-06-14 Fixup by arjen@mysql.com, Issue a "bk edit manual.texi".
print STDERR "Scanning lex.h for symbols..\n";
open LEX, "<../sql/lex.h";
while($line = <LEX>) {
if($line =~ /\{\s*\"([A-Z_]+)\"/) {
$words{$1} = $1;
} elsif($line =~ /sql_functions/) {
last;
};
};
close LEX;
print STDERR "Scanning sql_yacc.yy for non-reserved words...\n";
open YACC, "<../sql/sql_yacc.yy";
while(<YACC> !~ /^keyword:/) {};
while(($line = <YACC>) =~ /[\s|]+([A-Z_]+)/) {
$keyword = $1;
$keyword =~ s/_SYM//;
delete $words{$keyword};
};
close YACC;
print STDERR "Copying reserved words to an array...\n";
foreach(keys %words) { push @words, $words{$_}; };
print STDERR "Sorting array...\n";
@words = sort @words;
printf STDERR "There are %i reserved words.\n", scalar @words;
@pre = ("\@item", " \@tab", " \@tab");
$list = "";
for($i=0; $word = shift(@words); $i++) {
$list .= sprintf "%s %s\n", $pre[$i%3], "\@code\{$word\}";
}
# Fill last row to full # of columns.
for( ; $i%3; $i++) {
$list .= sprintf "%s\n", $pre[$i%3];
}
`bk edit manual.texi`;
open OLD, "<manual.texi";
open NEW, ">manual-tmp.texi";
print STDERR "Copying beginning of manual.texi...\n";
while(($line = <OLD>) !~ /START_OF_RESERVED_WORDS/) { print NEW $line; };
print NEW "\@c START_OF_RESERVED_WORDS\n\n";
printf NEW "\@c Reserved word list updated %s by %s.\n".
"\@c To regenerate, use Support/update-reserved-words.pl.\n\n",
&pretty_date, $ENV{USER};
print STDERR "Inserting list of reserved words...\n";
# Ensure the fractions add up to 100% otherwise it looks funny in print:
print NEW "\@multitable \@columnfractions .33 .33 .34\n";
print NEW "\@item \@strong{Word}\n \@tab \@strong{Word}\n \@tab \@strong{Word}\n";
print NEW $list;
print NEW "\@end multitable\n";
print STDERR "Skipping over old list...\n";
while(($line = <OLD>) !~ /END_OF_RESERVED_WORDS/) {};
print NEW "\n\@c END_OF_RESERVED_WORDS\n";
print STDERR "Copying end of manual.texi...\n";
while($line = <OLD>) { print NEW $line; };
close OLD;
close NEW;
print STDERR "Moving manual-tmp.texi to manual.texi...\n";
unlink "manual.texi";
rename "manual-tmp.texi", "manual.texi";
print STDERR "Reserved word list updated successfully!\n";
sub pretty_date {
@time = ($time = shift)?((localtime($time))[0..6]):((localtime)[0..6]);
($sec, $min, $hour, $mday, $mon, $year, $wday) = @time;
$wday = (Sun,Mon,Tue,Wed,Thu,Fri,Sat)[$wday];
$mon = (Jan,Feb,Mar,Apr,May,Jun,Jul,Aug,Sep,Oct,Nov,Dec)[$mon];
$year += 1900;
$pretty = sprintf("%s %s %2i %02i:%02i:%02i %i",
$wday, $mon, $mday, $hour, $min, $sec, $year);
return $pretty;
};

View File

@ -1,271 +0,0 @@
===============================================================================
installing/mysql/binary Fri Jul 17 13:03:03 1998 has
===============================================================================
MySQL for dummies - Part 1
How to get the binary distribution running on a UNIX system
MySQL is a trademark of TcX, Sweden.
===============================================================================
Introduction:
This is a simple cookbook for the helpless newbie taking his very first steps
with MySQL, when he needs a few hints about the options and access rights
installing the system and starting the basic modules, before he has "aha"ed
on how simple and clean the basic structure of MySQL is. It will not help
you with the intricacies and subtle possibilities of SQL as implemented in
MySQL.
The information in this document is all contained in the MySQL manual in a
more or less obvious form, but for the newbie that document is a bit over-
whelming in size, and it contains some new concepts that take some getting
used to. Sorry if it is pitched too low for some readers. It is only
intended to get the binary distribution up and running.
I successfully got MySQL going on both a Sun SparcStation 1 running SunOS 4.1.2
and 2 Linux systems running SuSE release 5.0, one with kernel version 2.0.30,
one with 2.0.33 by doing exactly what is given here. If it doesn't work
for you, I suggest the problem is with your system and not with the
MySQL binary distribution.
-- Howard Schultens hs@neuro-physiol.med.uni-goettingen.de
-------------------------------------------------------------------------------
Nomenclature:
In the following, 'MySQL' refers to the entire database system distributed
and licensed by TcX. 'mysql' means a specific program in this system.
-------------------------------------------------------------------------------
MySQL user administration and access rights ("privileges"):
It is obvious that MySQL needs its own user management because it is a system
that is implemented on a number of architectures -- you should be able to use
it in an identical way on different operating systems. The MySQL user names
and passwords have basically nothing at all to do with user names and
passwords on whatever operating system you install it on. You will,
unfortunately, have to install your users again on MySQL. But this system has
some big advantages: it is a secure system that allows you to finely
differentiate access rights based on WHO is using a database from WHERE. It
does this by the use of its own database containing 3 tables "user" for the
user names, "db" for the databases, and "host" for the machines that access
databases. "user" and "db" are the most important for the newbie.
Section 6 of the manual describes all this in detail.
-------------------------------------------------------------------------------
Doing it:
In the following, "foo>" denotes the prompt from your system in user mode,
"foo#" as root/superuser.
1) Get the appropriate binary distribution from a mirror site or directly
from TcX at URL http://www.tcx.se. The file name has the form
mysql-VERSION-SYSTEM.tgz
VERSION = Version number, e.g. 3.21.33
SYSTEM = OS and architecture, e.g. sunos4.1.4-sparc
i.e., you would download a file mysql-3.21.33-sunos4.1.4-sparc.tgz.
This example is for SunOS, but it works exactly analogously on Linux.
2) cd to /usr/local and unpack this with, e.g. the command
foo#gzip -c -d mysql-VERSION-SYSTEM.tgz|tar xvf -
3) The files are stored in a directory /usr/local/mysql-VERSION-SYSTEM
Make a symbolic link to this directory:
foo#ln -s mysql-VERSION-SYSTEM mysql
At this point, you might want to create a special user for all your
MySQL stuff. I use "mysql". Then you could do
foo#chown -R mysql mysql-VERSION-SYSTEM
4) FIRST, take care of all the PERL stuff:
o) You need PERL 5.004 or later already installed on your system. Take
care of this first if necessary.
a) cd to /usr/local/mysql/perl/DBI and do
foo#perl Makefile.PL
foo#make
foo#make test
foo#make install (if "make test" is successful)
b) cd to /usr/local/mysql/perl/Mysql/modules and do
foo#perl Makefile.PL
foo#make
foo#make test
foo#make install (if "make test" is successful)
c) As an option, you can install Data::ShowTable, but this is not absolutely
necessary for mysql. Get the PERL module Data-ShowTable-VER.tar.gz
(VER = version, eg. 3.3) from a CPAN mirror: I got mine at
ftp://ftp.gwdg.de/pub/languages/perl/CPAN/modules/by-category/06_Data_Type_Utilities/Data/Data-ShowTable-3.3.tar.gz
(You should be able to replace "ftp.gwdg.de" by the name of another
FTP mirror)
Put this into /usr/local/mysql/perl and unpack it.
You get a directory 'Data-ShowTable-VER'. cd into there and
(as root/superuser)
foo#perl Makefile.PL
foo#make
foo#make test
foo#make install (if "make test" is successful)
5) cd to /usr/local/mysql and do
foo#scripts/mysql_install_db
you should be in /usr/local/mysql when you start the script.
==>*NOTE* you might want to edit this script before you run it the first
time. See method 9b) below.
If this is successful, one or more copies of the mysql daemon, mysqld,
will be running. On SunOS 4.1.x, you get one. On Linux, 3 are running.
-------------------------------------------------------------------------------
In the rest of this, I will always suppose you are starting in the directory
/usr/local/mysql, even if it seems mildly inconvenient
-------------------------------------------------------------------------------
6) You can now select the database 'test' and mess around with it using
the client program bin/mysql: start it with
foo>bin/mysql -u root test
This says, "start up the MySQL command-line client with the user name
'root' and use the database named 'test', which is a subdirectory in
'/usr/local/mysql/data". (n.b. this is NOT the root user of your UNIX
system, it is a MySQL user with the same name. You will notice that you
don't need a password for this user to use mysql).
Actually, the way the system is set up by bin/mysql_install_db, you
don't even need a user name to access the database 'test'. You can start
the client simply with
foo>bin/mysql test
'mysql' should start up with a greeting and a line telling you what your
connection id and server version is. At this point, the database 'test'
is empty, no tables or anything are defined.
When you issue SQL commands, DON'T FORGET THE FINAL SEMICOLON, or mysql acts
dumb:
mysql>select * from user
->
->
and you wonder what's going on. 'mysql' reminds you of this on startup.
7) When you want to close down the server, do
foo>bin/mysqladmin shutdown
8) I recommend editing the script bin/safe_mysqld for the binary release
so that it always starts up with the correct directories. I replaced
the entire header up to but not including
pidfile=$DATADIR/`/bin/hostname`.pid
log=$DATADIR/`/bin/hostname`.log
err=$DATADIR/`/bin/hostname`.err
with
MY_BASEDIR_VERSION=/usr/local/mysql
DATADIR=$MY_BASEDIR_VERSION/data
ledir=$MY_BASEDIR_VERSION/bin
cd $MY_BASEDIR_VERSION
This lets you start the mysql daemon from wherever you like.
9) Now let's say you want to put some of your own databases and users into
the system. The simplest, most powerful, and dangerous way to do this is
to start up the mysql daemon again with:
foo>bin/mysqld --basedir=/usr/local/mysql --datadir=/usr/local/mysql/data -Sg
This skips loading the grant tables. The system is open to every kind of
mistake now, so be careful. Any user can muck up the grant tables, ie.
the lists of users, hosts, and databases themselves, so only use this
mode to do these first, very basic things.
Start the client again now, with
foo>bin/mysql mysql
This tells the client to use the database 'mysql', which is the directory
that contains the lists (ie. the tables) of all the users, hosts, and
databases in the system, so be careful!!!!!!!!!!!!
All of what follows is taken essentially from section 6 of the manual.
a) For the start, just define a couple of users for the MySQL system:
i) an administrator, such as 'mysql', with its own password, that
can do everything with the system:
mysql> insert into user values('localhost','mysql',password('xyzzy'),
'Y','Y','Y','Y','Y','Y','Y','Y','Y','Y');
* For some reason, on my Linux system with a German keyboard, I have *
* to use the acute accent instead of the apostrophe, otherwise I get *
* parse errors. *
This defines the user name 'mysql' with password 'xyzzy' that can
do everything. To look at what you just did, type in
mysql> select * from user;
mysql types out a table with all the known users and their privileges.
ii) a privileged user for playing around:
mysql> insert into user values('localhost','john',password('blah0x1'),
'Y','Y','Y','Y','Y','Y','Y','Y','Y','Y');
iii) create your own database for a todo list, phone numbers, whatever:
mysql> create database johns_DB;
mysql> insert into db values('localhost','johns_DB','john','Y','Y','Y','Y','Y','Y');
The first line creates the databse "johns_DB", but that doesn't
make it visible to mysql. The second line does that.
iv) When you are done installing users and databases, quit mysql and
issue the command
foo>bin/mysqladmin reload
b) Another method to do this was suggested by Sinisa Milivojevic, and that
is to edit the script /usr/local/mysql/scripts/mysql_install_db to
define the databases and install the more important users when you
start the system the very first time. This would have the advantage
that you can save the script and re-install the system with it if you
have to, automatically defining the important structures. It requires
a little more knowledge of the MySQL system to do this.
You might want to use this method anyway since it saves editing
mysql_install_db to have it install a superuser with a name other
than "root". The places to change are easy to find. You can, of
course, use the first method above and remove the user named 'root'
when you are done.
===============================================================================
If anyone is interested enough in this document to make suggestions on how
to improve it, I would be glad to get emails on it. I hope it helps
someone get going with MySQL a little easier.
--Howard
hs@neuro-physiol.med.uni-goettingen.de

View File

@ -1,272 +0,0 @@
@chapter MySQL ODBC Suporte
@menu
* Quais ODBC OS:: Sistemas Operacionais s<>o suportados por @strong{MyODBC}
* Problemas ODBC:: Como informar problemas com @strong{MySQL} ODBC
* Clientes MyODBC:: Programas que j<> foram testados com @strong{MyODBC}
* Administrador ODBC:: Como preencher os diversos campos com o programa Administrador
* ODBC e last_insert_id:: Como obter o valor de uma coluna @code{AUTO_INCREMENT} em ODBC
* Informando bug do MyODBC:: Informando problemas com MyODBC
@end menu
@strong{MySQL} fornece suporte para ODBC atrav<61>s do programa @strong{MyODBC}.
@node Quais ODBC OS, ODBC Problemas, ODBC, ODBC
@section Sistemas Operacionais suportados por MyODBC
@strong{MyODBC} <20> um driver 32-bit ODBC (2.50) n<>vel 0 para Windows95
e Windows NT. N<>s esperamos que algu<67>m porte o mesmo para o Windows 3.x.
@node Problemas ODBC, clientes MyODBC, Quais ODBC OS, ODBC
@section Como informar problemas com MyODBC
@strong{MyODBC} tem sido testado com Access, Admndemo.exe, C++-Builder,
Centura Team Developer (formalmente Gupta SQL/Windows), ColdFusion (no
Solaris e NT com svc pack 5), Crystal Reports, DataJunction, Delphi,
ERwin, Excel, iHTML, FileMaker Pro, FoxPro, Notes 4.5/4.6, SBSS, Perl
DBD-ODBC, Paradox, Powerbuilder, Powerdesigner 32 bit, VC++ e Visual
Basic.
Se voc<6F> souber de algum outro aplicativo que funcione com @strong{MyODBC}, por favor
nos escreva sobre isso atrav<61>s do email @email{myodbc@@lists.mysql.com}.
@node Clientes MyODBC, Administrador ODBC, Problemas com ODBC, ODBC
@section Programas testados que funcionam com MyODBC
A maioria dos programas que t<>m suporte para ODBC, funcionam com o @strong{MyODBC},
mas cada um dos listados abaixo, t<>m sido testados por n<>s ou por informa<6D><61>es de
usu<EFBFBD>rios que confirmaram o seu funcionamento.
@table @asis
@item @strong{Program}
@strong{Comment}
@item Access
Como fazer Accces funcionar:
@itemize @bullet
@item
Voc<EFBFBD> dever<65> ter uma chave prim<69>ria na tabela.
@item
Voc<EFBFBD> deve ter um campo timestamp em todas as tabelas em que voc<6F> quer controlar a
atualiza<EFBFBD><EFBFBD>o.
@item
Somente use campos doubles float. Access falha quando faz compara<72><61>es com campos float
simples.
@item
Configure a op<6F><70>o `Return matching rows' quando conectar com o @strong{MySQL}.
@item
O Access no NT acusar<61> colunas @code{BLOB} como @code{OLE OBJECTS}.
Se ao inv<6E>s disso voc<6F> quer colunas @code{MEMO}, deve trocar a coluna para
@code{TEXT} usando @code{ALTER TABLE}.
@item
Access <20>s vezes n<>o lida adequadamente com colunas do tipo @code{DATE}.
Se voc<6F> tiver problemas com essas colunas, mude as colunas para @code{DATETIME}.
@item
Em certas situa<75><61>es, o Access cria consultas SQL ilegais que o
@strong{MySQL} n<>o pode processar. Voc<6F> pode resolver isso selecionando o tipo de
consulta @code{"Query|SQLSpecific|Pass-Through"} no menu do Access.
@end itemize
@item DataJunction
Voc<EFBFBD> tem que trocar para mandar @code{VARCHAR} ao inv<6E>s de @code{ENUM}, porque
o mesmo exporta o <20>ltimo de uma maneira que causa fadiga ao @strong{MySQL}.
@item Excel
Funciona. Algumas dicas:
@itemize @bullet
@item
Se voc<6F> tem problemas com datas, tente selecion<6F>-las como strings usando a
fun<EFBFBD><EFBFBD>o @code{CONCAT()}. Por exemplo:
@example
select CONCAT(rise_time), CONCAT(set_time)
from sunrise_sunset;
@end example
Os dados de datas enviadas como string s<>o corretamente reconhecidas pelo
Excel97 como dados do tipo time.
Neste exemplo o prop<6F>sito de @code{CONCAT()} <20> enganar o ODBC, fazendo-o pensar
que a coluna <20> do 'tipo string'. Sem o @code{CONCAT()}, ODBC sabe que a coluna
<EFBFBD> do tipo time e o Excel n<>o entender<65> isso.
Note que isso <20> um bug no Excel, porque o mesmo converte automaticamente a
string para time. Isto <20> muito bom quando o fonte <20> um arquivo
texto, mas n<>o se pode dizer o mesmo quando o fonte <20> uma conex<65>o
ODBC que informa o tipo exato para cada coluna.
@end itemize
@item odbcadmin
Programa Teste para ODBC.
@item Delphi
Voc<EFBFBD> dever<65> usar DBE 3.2 ou mais atualizado. Configure o campo de op<6F><70>o
`Don't optimize column width' quando conectando com @strong{MySQL}.
Tamb<EFBFBD>m, h<> aqui um c<>digo muito <20>til que configura tanto a
inser<EFBFBD><EFBFBD>o ODBC e a inser<65><72>o BDE para MyODBC (a inser<65><72>o BDE requer um BDE
Alias Editor que pode ser obtido de gra<72>a numa Delphi Super Page
perto de voc<6F>.): (Obrigado a Bryan Brunton @email{bryan@@flesherfab.com} por isto)
@example
fReg:= TRegistry.Create;
fReg.OpenKey('\Software\ODBC\ODBC.INI\DocumentsFab', True);
fReg.WriteString('Database', 'Documents');
fReg.WriteString('Description', ' ');
fReg.WriteString('Driver', 'C:\WINNT\System32\myodbc.dll');
fReg.WriteString('Flag', '1');
fReg.WriteString('Password', '');
fReg.WriteString('Port', ' ');
fReg.WriteString('Server', 'xmark');
fReg.WriteString('User', 'winuser');
fReg.OpenKey('\Software\ODBC\ODBC.INI\ODBC Data Sources', True);
fReg.WriteString('DocumentsFab', 'MySQL');
fReg.CloseKey;
fReg.Free;
Memo1.Lines.Add('DATABASE NAME=');
Memo1.Lines.Add('USER NAME=');
Memo1.Lines.Add('ODBC DSN=DocumentsFab');
Memo1.Lines.Add('OPEN MODE=READ/WRITE');
Memo1.Lines.Add('BATCH COUNT=200');
Memo1.Lines.Add('LANGDRIVER=');
Memo1.Lines.Add('MAX ROWS=-1');
Memo1.Lines.Add('SCHEMA CACHE DIR=');
Memo1.Lines.Add('SCHEMA CACHE SIZE=8');
Memo1.Lines.Add('SCHEMA CACHE TIME=-1');
Memo1.Lines.Add('SQLPASSTHRU MODE=SHARED AUTOCOMMIT');
Memo1.Lines.Add('SQLQRYMODE=');
Memo1.Lines.Add('ENABLE SCHEMA CACHE=FALSE');
Memo1.Lines.Add('ENABLE BCD=FALSE');
Memo1.Lines.Add('ROWSET SIZE=20');
Memo1.Lines.Add('BLOBS TO CACHE=64');
Memo1.Lines.Add('BLOB SIZE=32');
AliasEditor.Add('DocumentsFab','MySQL',Memo1.Lines);
@end example
@item C++Builder
Testado com BDE 3.0. O <20>nico problema conhecido <20> que quando o esquema da tabela
muda, os campos da consulta n<>o s<>o atualizados. BDE entretanto, parece n<>o
reconhecer chaves prim<69>rias, somente <20>ndice PRIMARY, n<>o entanto isto n<>o
tem sido um problema.
@item Visual basic
Para atualizar uma tabela, voc<6F> dever<65> definir uma chave prim<69>ria para a tabela.
@end table
@node Administrador ODBC, ODBC e last_insert_id, Clientes MyODBC, ODBC
@section Como preencher os diversos campos com o programa Administrador
Existem tr<74>s possibilidades para especificar o nome do servidor em
Windows95:
@itemize @bullet
@item
Usando o endere<72>o IP do servidor.
@item
Adicionar um arquivo @file{lmhosts} com a seguinte informa<6D><61>o:
@example
ip nomeservidor
@end example
Por exemplo:
@example
194.216.84.21 my
@end example
@item
Configurar o PC para usar DNS.
@end itemize
Exemplo de como preencher o ``ODBC setup'':
@example
Windows DSN name: teste
Description: Este <20> o meu banco de dados teste
MySql Database: teste
Server: 194.216.84.21
User: monty
Password: minha_senha
Port:
@end example
O valor para o campo @code{Windows DSN name} <20> qualquer nome que seja <20>nico
em seu Windows ODBC setup.
Voc<EFBFBD> n<>o precisa especificar os valores para os seguintes campos: @code{Server},
@code{User}, @code{Password} ou @code{Port} na hora de configurar o ODBC.
Entretanto, se voc<6F> o faz, esses valores devem ser usados como padr<64>o para fazer
uma conex<65>o. Voc<6F> tem a op<6F><70>o de trocar os valores nesse instante.
Se o n<>mero da porta n<>o for especificado, o valor padr<64>o da porta (@value{default_port})
<EFBFBD> usado.
Se voc<6F> especificar a op<6F><70>o @code{Read options from C:\my.cnf}, os
grupos @code{client} e @code{odbc} devem ser lidos do arquivo @file{C:\my.cnf}.
Voc<EFBFBD> pode usar todas as op<6F><70>es que s<>o usadas por @code{mysql_options()}.
@xref{mysql_options, , @code{mysql_options}}.
@node ODBC e last_insert_id, Informando bug do MyODBC, Administrador ODBC, ODBC
@section Como obter o valor de uma coluna @code{AUTO_INCREMENT} no ODBC
Um problema muito usual consiste em como saber o valor de uma coluna do tipo
@code{INSERT} quando a mesma <20> gerada automaticamente. Com ODBC, voc<6F> pode
fazer uma coisa como esta (assumindo que @code{auto} <20> um campo @code{AUTO_INCREMENT}):
@example
INSERT INTO foo (auto,text) VALUES(NULL,'text');
SELECT LAST_INSERT_ID();
@end example
Ou se voc<6F> somente quer adicionar o valor noutra tabela, fa<66>a o
seguinte:
@example
INSERT INTO foo (auto,text) VALUES(NULL,'text');
INSERT INTO foo2 (id,text) VALUES(LAST_INSERT_ID(),'text');
@end example
Para o benef<65>cio de algumas aplica<63><61>es ODBC (pelo menos Delphi e Access),
a seguinte consulta pode ser usada para encontrar o valor do novo registro
adicionado:
@example
SELECT * FROM tbl_name WHERE auto IS NULL;
@end example
@node Informando bug do MyODBC, , ODBC e last_insert_id, ODBC
@section Informando problemas com MyODBC
Se voc<6F> encontra dificuldades com MyODBC, deve come<6D>ar por fazer
um arquivo log no Administrador ODBC (o log voc<6F> tem quando
solicita logs do ODBCADMIN) e um log @strong{MyODBC}. Para gerar um log @strong{MyODBC},
clique a op<6F><70>o `Trace MyODBC' na tela de configura<72><61>o da conex<65>o
@strong{MyODBC}.
O log ser<65> escrito no arquivo @file{C:\myodbc.log}.
Note que voc<6F> deve usar a @code{MYSQL.DLL} e n<>o a
@code{MYSQL2.DLL} para que esta op<6F><70>o funcione!
Verifique as consultas que MyODBC envia para o servidor @strong{MySQL};
Voc<EFBFBD> dever<65> ser capaz de encontrar isto atrav<61>s da pesquisa da
string @code{>mysql_real_query} no arquivo @file{myodbc.log}.
Voc<EFBFBD> deve tamb<6D>m tentar duplicar as consultas no monitor @code{mysql}
ou @code{admndemo} para encontrar se o erro <20> do MyODBC ou do @strong{MySQL}.
Se voc<6F> encontrar algo errado, por favor envie somente as linhas
relevantes (m<>ximo 40 linhas) para o @email{myodbc@@lists.mysql.com}. Favor nunca
enviar os arquivos log completos do MyODBC ou do ODBC !
Se voc<6F> n<>o encontra o qu<71> est<73> errado, a <20>ltima op<6F><70>o
<EFBFBD> fazer um arquivo (tar ou zip) que contenha um arquivo log do MyODBC,
o arquivo log ODBC e um arquivo README que explique o problema.
Voc<EFBFBD> o manda para @uref{ftp://www.mysql.com/pub/mysql/secret}. Somente n<>s da TCX
devemos ter acesso a esses arquivos que voc<6F> manda e n<>s seremos muito discretos com
os dados !
Se voc<6F> pode fazer um programa que tamb<6D>m mostre o mesmo problema, favor mand<6E>-lo
tamb<EFBFBD>m!
Se o programa funciona com outro servidor SQL, voc<6F> pode fazer um
arquivo log que fa<66>a exatamente a mesma coisa com o outro servidor
SQL.
Lembre que quanto mais informa<6D><61>o voc<6F> nos fornece, o resultado <20>
que n<>s podemos resolver o problema!

View File

@ -1,709 +0,0 @@
@cindex Licensing terms
@cindex Support terms
@node Licensing and Support, Installing, Questions, Top
@chapter MySQL licensing and support
@menu
* Licensing policy:: Pol<6F>tica de licenciamento do @strong{MySQL}
* Copyright:: Direitos autorais usados por @strong{MySQL}
* Commercial use:: Distribuindo comercialmente @strong{MySQL}
* Licensing examples:: Exemplos de situa<75><61>es de licenciamento
* Cost:: Pre<72>os de licenciamento e suporte @strong{MySQL}
* Support:: Tipos de suporte comercial
@end menu
Este cap<61>tulo descreve os tipos de licenciamento e suporte do @strong{MySQL}, incluindo:
@itemize @bullet
@item
Nossa pol<6F>tica de licenciamento para sistemas operacionais n<>o Microsoft e Microsoft
@item
Os direitos autorais sob os quais o @strong{MySQL} <20> distribu<62>do
(@pxref{Copyright})
@item
Exemplo de situa<75><61>es quando uma licen<65>a <20> necess<73>ria
(@pxref{Licensing examples})
@item
Pre<EFBFBD>os de licenciamento e suporte (@pxref{Cost}), e
benef<EFBFBD>cios do suporte (@pxref{Support})
@end itemize
@cindex Licensing policy
@node Licensing policy, Copyright, Licensing and Support, Licensing and Support
@section MySQL licensing policy
Os termos formais do licenciamento para sistemas operacionais n<>o Microsoft tais como
Unix ou OS/2 s<>o especificados em @ref{Public license}. Basicamente, nossa pol<6F>tica de
licenciamento <20> como segue:
@itemize @bullet
@item
Para uso interno normal, o @strong{MySQL} geralmente n<>o custa nada. Voc<6F> n<>o precisa
nos pagar se n<>o o quiser.
@item
Uma licen<65>a <20> requerida se:
@itemize @minus
@item
Voc<EFBFBD> vende o servidor @strong{MySQL} diretamente ou como parte de outro produto ou servi<76>o.
@item
Voc<EFBFBD> cobra para instalar e manter um servidor @strong{MySQL} no local do cliente
@item
Voc<EFBFBD> incluie o @strong{MySQL} numa distribui<75><69>o que n<>o <20> redistribu<62>da
e voc<6F> cobra por alguma parte dessa distribui<75><69>o
@end itemize
@item
Para circunst<73>ncias sob as quais uma licen<65>a do @strong{MySQL} <20> requerida,
voc<EFBFBD> necessita uma licen<65>a por m<>quina que roda o servidor @code{mysqld}.
Entretanto, uma m<>quina com m<>ltiplos processadores conta como uma m<>quina
simples e n<>o h<> restri<72><69>o no n<>mero de servidores que rodam numa s<> m<>quina
ou no n<>mero de clientes concurrentes conectados ao servidor em essa m<>quina.
@item
Voc<EFBFBD> n<>o necessita uma licen<65>a para incluir c<>digo de programas clientes
comerciais. O acesso de parte de clientes para o @strong{MySQL} <20> de
dom<EFBFBD>nio p<>blico. O c<>digo do cliente @code{mysql} de linha de comando
incluie c<>digo da livraria @code{readline} que est<73> sob a licen<65>a p<>blica
GNU.
@item
@cindex @code{myisampack}
Para clientes que tem comprado 1 licen<65>a ou suporte MySQL, n<>s fornecemos
funcionalidade adicional. Atualmente, isso significa o fornecimento do
utilit<EFBFBD>rio @code{myisampack} para banco de dados somente de leitura,
r<EFBFBD>pidos e compactados. (O servidor incluie suporte para ler tais bancos
de dados mas n<>o a ferramenta de compactar usada para criar os mesmos).
Quando os acordos de suporte gerem suficientes recursos, n<>s liberaremos
esta ferramenta sob a mesma licen<65>a do servidor @strong{MySQL}.
@item
Se seu uso do @strong{MySQL} n<>o requer uma licen<65>a, por<6F>m voc<6F> gosta
do @strong{MySQL} e deseja encorajar um maior desenvolvimento, voc<6F> <20>
certamente bem-vindo a adquirir uma licen<65>a de qualquer forma.
@item
Se usa o @strong{MySQL} num contexto comercial de tal forma
que obt<62>m benef<65>cios no seu uso, n<>s lhe solicitamos que apoie
o desenvolvimento do @strong{MySQL} atrav<61>s da compra de algum
n<EFBFBD>vel de suporte. N<>s achamos que se o @strong{MySQL} o ajuda
em seu neg<65>cio, <20> razo<7A>vel que solicitemos sua ajuda para o @strong{MySQL}.
Por outro lado, se voc<6F> n<>s faz perguntas de suporte, n<>o somente est<73>
usando de gra<72>a algo no qual n<>s colocamos um enorme trabalho, voc<6F>
tamb<EFBFBD>m est<73> pedindo suporte de gra<72>a.
@end itemize
Para uso em sistemas operacionais Microsoft (Win95/Win98/WinNT),
voc<EFBFBD> precisa de uma licen<65>a @strong{MySQL} depois de 30 dias
de experi<72>ncia, com a exce<63><65>o que licen<65>as podem ser requeridas
sem nenhum custo para uso educacional ou para suportar pesquisas
de governo ou universidades. @xref{Winlicense}.
Uma vers<72>o shareware do @strong{MySQL}-Win32 que voc<6F> pode experimentar
antes de comprar est<73> dispon<6F>vel em @uref{http://www.mysql.com/mysql_w32.htmy}.
Depois que voc<6F> tenha pago, voc<6F> ter<65> uma senha que permite seu acesso a uma
nova vers<72>o @strong{MySQL}-Win32.
Se voc<6F> tem uma pergunta se for o caso ou n<>o de requerer uma licen<65>a para
seu caso em particular do @strong{MySQL}, favor entrar em contato com n<>s.
@xref{Contact information}.
Se voc<6F> requer uma licen<65>a @strong{MySQL}, a forma mais f<>cil para pagar
a mesma <20> usar o formul<75>rio no seguro servidor TcX em @url{https://www.mysql.com/license.htmy}.
Outras formas de pagamento s<>o mencionadas em @ref{Payment information}.
@cindex Copyright
@node Copyright, Commercial use, Licensing policy, Licensing and Support
@section Copyrights used by MySQL
@menu
* Copyright changes:: Poss<73>vel futura mudan<61>a no direito autoral
@end menu
Existem v<>rios direitos autorais diferentes na distribui<75><69>o @strong{MySQL}:
@enumerate
@item
O fonte espec<65>fico @strong{MySQL}necess<73>rio para construir o @code{mysqlclient}
livrarias e programas no diret<65>rio @file{client} est<73> em dom<6F>nio p<>blico.
Cada arquivo que est<73> em dom<6F>nio p<>blico tem um cabe<62>alho que claramente notifica
este estado. Isto incluie tudo no diret<65>rio @file{client}e algumas partes
do @code{mysys}, @code{mystring} e @code{dbug} livrarias.
@item
Algumas pequenas partes do fonte (GNU @code{getopt}) est<73>o cobertas pela
``GNU LIBRARY LIBRARY GENERAL PUBLIC LICENSE''. Ver o arquivo
@file{mysys/COPYING.LIB}.
@item
Algumas pequenas partes do fonte ( (GNU @code{readline}) est<73>o cobertas pela
``GNU GENERAL PUBLIC LICENSE''. Ver o arquivo @file{readline/COPYING}.
@item
Algumas partes do fonte (a @code{regexp} livraria) est<73> coberta pelo estilo de
direito autoral Berkeley.
@item
O outro fonte necess<73>rio para o servidor @strong{MySQL} em plataformas n<>o Microsoft
est<EFBFBD> coberta pela ``MySQL FREE PUBLIC LICENSE'', a qual <20> baseada na
``Aladdin FREE PUBLIC LICENSE.'' @xref{Public license}. Quando o @strong{MySQL}
est<EFBFBD> rodando em qualquer sistema operacional Microsoft, outro licenciamento <20> aplicado.
@end enumerate
Os seguintes pontos direcionam a filosofia sob nossa pol<6F>tica de direito autoral:
@itemize @bullet
@item
A livraria cliente SQL deve ser totalmente livre tal que a mesma pode ser inclu<6C>da
em produtos comerciais sem nenhuma limita<74><61>o.
@item
Pessoas que querem livre acesso ao programa no qual n<>s temos colocado uma grande
quantidade de trabalho, podem t<>-lo, tal que n<>o procurem ganhar dinheiro diretamente
pela distribui<75><69>o e para benef<65>cio.
@item
Pessoas que querem manter o direito da propriedade de seu programa, por<6F>m tamb<6D>m
querem o valor de nosso trabalho, podem pagar pelo previl<69>gio.
@item
O uso normal em casa <20> de GRA<52>A. Mas se voc<6F> usa o @strong{MySQL} para algo
importante para voc<6F>, voc<6F> pode ajudar o desenvolvimento futuro pela
compra de uma licen<65>a ou contrato de suporte.@xref{Support}.
@end itemize
@node Copyright changes, , Copyright, Copyright
@subsection Possible future copyright changes
N<EFBFBD>s poderemos optar para distribuir vers<72>es antigas do @strong{MySQL}
com a GPL no futuro. Entretanto, essas vers<72>es devem ser identificadas
como @strong{GNU MySQL}. Tamb<6D>m, todas notas de direitos autorais dos
arquivos relativos devem ser mudados para a GPL.
@node Commercial use, Licensing examples, Copyright, Licensing and Support
@section Distributing MySQL commercially
Esta se<73><65>o <20> um esclarecimento dos termos de licen<65>a que s<>o a base na
``MySQL FREE PUBLIC LICENSE'' (FPL). @xref{Public license}.
O @strong{MySQL} pode ser @strong{usado} livremente , incluindo
entidades comerciais para avalia<69><61>o ou uso interno sem suporte.
Entretanto, @strong{distribui<75><69>o} para prop<6F>sitos comerciais
do @strong{MySQL}, ou qualquer coisa contendo ou derivando do @strong{MySQL}
no seu todo ou parte, requer uma licen<65>a comercial escrita da TcX AB,
a <20>nica entidade autorizada para garantir tais licen<65>as.
Voc<EFBFBD> n<>o pode incluir o @strong{MySQL} ``de gra<72>a'' num pacote contendo
qualquer coisa pela qual um pagamento est<73> sendo feito, exceto como
notado abaixo:
A inten<65><6E>o da exce<63><65>o providenciada na segunda cla<6C>sula da licen<65>a <20>
para permitir que organiza<7A><61>es comerciais operando um servidor FTP ou
uma ag<61>ncia de not<6F>cias possam distribuir livremente o @strong{MySQL},
desde que:
@enumerate
@item
A organiza<7A><61>o complace com as outras provis<69>es da FPL, a qual
incluie entre outras coisas um requerimento para distribuir o
c<EFBFBD>digo fonte inteiro do @strong{MySQL} e qualquer outro trabalho
derivado, e para distribuir a FPL em si junto com @strong{MySQL};
@item
A <20>nica cobran<61>a para abaixar o @strong{MySQL} <20> a cobran<61>a baseada
na distribui<75><69>o do servi<76>o e n<>o numa baseada no contexto da
informa<EFBFBD><EFBFBD>o sendo recebida (ex: a cobran<61>a dever<65> ser a mesma para
o recebimento de uma cole<6C><65>o qualquer de bits do mesmo tamanho);
@item
O servidor ou BBS <20> acess<73>vel para o p<>blico em geral, ex. o n<>mero de
telefone ou enedere<72>o IP n<>o <20> guardado em secreto, e qualquer um pode
obter acesso para a informa<6D><61>o (possivelmente pagando uma inscri<72><69>o ou
acesso cobrado que n<>o <20> dependente ou relacionado para comprar qualquer
outra coisa).
@end enumerate
Se voc<6F> quer para distribuir programas em um contexto comercial que
incorpora @strong{MySQL} e voc<6F> @strong{n<>o} quer encontrar essas
condi<EFBFBD><EFBFBD>es, voc<6F> deve contatar TcX AB para encontrar um licenciamento
comercial, o qual envolve um pagamento. O <20>nico meio legal que
voc<EFBFBD> pode distribuir @strong{MySQL} ou qualquer coisa contendo @strong{MySQL}
s<EFBFBD>o pela distribui<75><69>o do @strong{MySQL} sob os requerimentos da FPL, ou pela
obten<EFBFBD><EFBFBD>o de uma licen<65>a comercial da TcX AB.
@node Licensing examples, Cost, Commercial use, Licensing and Support
@section Example licensing situations
@menu
* Products that use MySQL:: Vendendo produtos que usam @strong{MySQL}
* MySQL services:: Vendendo servi<76>os relacionados ao @strong{MySQL}
* ISP:: Servi<76>os de ISP com @strong{MySQL}
* Web server:: Rodando um servidor web usando o @strong{MySQL}.
@end menu
Esta se<73><65>o descreve algumas situa<75><61>es ilustrando se <20> o caso ou n<>o que
voc<EFBFBD> deve licen<65>ar o servidor @strong{MySQL}. Geralmente esses exemplos
envolvem o fornecimento do @strong{MySQL} como parte de um produto ou
servi<EFBFBD>o que voc<6F> est<73> vendendo para um cliente, ou requer que o @strong{MySQL}
seja usado em conjunto com seu produto. Em tais casos, <20> sua responsabilidade
para obter uma licen<65>a para o cliente se uma <20> necess<73>ria (Este requerimento
pode ser deixado de lado se seu cliente j<> tem uma licen<65>a @strong{MySQL}.
Por<EFBFBD>m, o vendedor deve enviar informa<6D><61>o do cliente e o n<>mero da licen<65>a
para TcX, e a licen<65>a dever<65> ser completa, n<>o uma licen<65>a OEM).
Note que uma simples licen<65>a do @strong{MySQL} cobre qualquer n<>mero de
CPUs/usu<73>rios/clientes/servidores @code{mysqld} numa s<> m<>quina!
@node Products that use MySQL, MySQL services, Licensing examples, Licensing examples
@subsection Selling products that use MySQL
Para determinar caso seja necess<73>rio ou n<>o uma licen<65>a @strong{MySQL}
quando vendendo a sua aplica<63><61>o, voc<6F> deve perguntar caso seja necess<73>rio
para o funcionamento adequado de sua aplica<63><61>o a conting<6E>ncia no uso do
@strong{MySQL} e seja necess<73>rio voc<6F> incluir o @strong{MySQL} com seu
produto. Existem v<>rios casos a considerar:
@itemize @bullet
@item
Sua aplica<63><61>o precisa do @strong{MySQL} para funcionar adequadamente ?
Se o seu produto precisa do @strong{MySQL}, voc<6F> necessita uma licen<65>a
para cada m<>quina que roda o servidor @code{mysqld}. Por exemplo,
se voc<6F> projeta uma aplica<63><61>o sobre o @strong{MySQL}, ent<6E>o voc<6F> tem
feito realmente um produto comercial que necessita do servidor, tal que
necessita de uma licen<65>a.
Se sua aplica<63><61>o n<>o requer o @strong{MySQL}, voc<6F> n<>o necessita obter uma
licen<EFBFBD>a. Por exemplo, se o @strong{MySQL} apenas adiciona uma nova caracter<65>stica
a seu produto (tal como adicionando loggin a um banco de dados e se o @strong{MySQL}
<EFBFBD> usado no lugar de um arquivo texto), o mesmo entra como um uso normal, e uma
licen<EFBFBD>a n<>o precisa ser requerida.
Em outras palavras, voc<6F> necessita de uma licen<65>a se voc<6F> vende um produto
projetado para uso com o @strong{MySQL} ou que precisa do servidor @strong{MySQL}
para um funcionamento completo. Isto <20> verdadeiro caso haja necessidade ou n<>o de fornecer
o @strong{MySQL} para seu cliente como parte da distribui<75><69>o de seu produto.
Isso tamb<6D>m depende no que voc<6F> est<73> fazendo para o cliente. Voc<6F> planeja fornecer
a seu cliente com instru<72><75>es e detalhes na instala<6C><61>o do @strong{MySQL} com seu
programa ?. Ent<6E>o seu produto contencialmente precisa do @strong{MySQL};
Sim <20> tal, voc<6F> necessita comprar uma licen<65>a. Se voc<6F> simplesmente usa um banco de
dados que espera j<> estiver instalado no instante en seu programa <20> comprado, ent<6E>o
provavelmente n<>o necessita de uma licen<65>a.
@item
Voc<EFBFBD> incluie o @strong{MySQL} numa distribui<75><69>o e cobra pela mesma ?
Se voc<6F> incluie @strong{MySQL} com a distribui<75><69>o que vende para os clientes,
voc<EFBFBD> necessita uma licen<65>a para cada m<>quina que roda o servidor @code{mysqld},
porque neste caso voc<6F> est<73> vendendo um sistema que incluie @strong{MySQL}.
Isto <20> verdadeiro no caso que o @strong{MySQL} com seu produto seja requerido
ou opcional.
@item
Voc<EFBFBD> n<>o requer nem incluie o @strong{MySQL} com seu produto ?
Suponha que quer vender um produto projetado de uma maneira geral para usar
com "qualquer banco de dados" e que pode ser configurado para usar qualquer
uma das v<>rias alternativas de sistemas de banco de dados (@strong{MySQL},
PostgreSQL, ou qualquer outro. Isto <20>, seu produto n<>o requer @strong{MySQL},
mas pode suportar qualquer banco de dados com o n<>vel base de funcionalidade
e voc<6F> n<>o depende de qualquer coisa que somente @strong{MySQL} suporta.
Nenhum de voc<6F>s paga para n<>s se o seu cliente realmente seleciona para
usar @strong{MySQL}?
Neste caso, se voc<6F> n<>o fornece, obt<62>m ou configura o @strong{MySQL} para
o cliente e decide o cliente para us<75>-lo, nenhum de voc<6F>s precisa de uma
licen<EFBFBD>a. Se voc<6F> faz um servi<76>o, vide @ref{MySQL services, ,
@strong{MySQL} servi<76>os}.
@end itemize
@node MySQL services, ISP, Products that use MySQL, Licensing examples
@subsection Selling MySQL-related services
Se voc<6F> faz uma instala<6C><61>o numa m<>quina de um cliente do @strong{MySQL}
e h<> cobran<61>a pelo servi<76>o (direta ou indiretamente), ent<6E>o voc<6F> comprar
uma licen<65>a @strong{MySQL}.
Se voc<6F> vende uma aplica<63><61>o para a qual o @strong{MySQL} n<>o <20> estritamente
requerido, por<6F>m pode ser usado, uma licen<65>a deve indicada, dependendo
como o @strong{MySQL} <20> configurado. Suponha que seu produto n<>o requera e
n<EFBFBD>o incluia o @strong{MySQL} na sua distribui<75><69>o, por<6F>m pode ser configurado
para usar o @strong{MySQL} para os clientes que assim o desejar. (Este pode ser
o caso, por exemplo, se seu produto pode usar qualquer um de servidores de
banco de dados).
Se o cliente obt<62>m e instala o @strong{MySQL}, nenhuma licen<65>a <20> necess<73>ria.
Entretanto, se voc<6F> faz o servi<76>o para seu cliente, ent<6E>o <20> necess<73>rio uma
licen<EFBFBD>a, porque voc<6F> est<73> vendendo um servi<76>o que incluie o @strong{MySQL}.
@node ISP, Web server, MySQL services, Licensing examples
@subsection ISP MySQL services
Provedores de Servi<76>o Internet (ISPs) <20>s vezes hospedam servidores @strong{MySQL}
para seus cliente.
Se voc<6F> <20> um ISP que permite a seus clientes instalar e administrar o
@strong{MySQL} por si pr<70>prios na sua m<>quina sem nenhuma assist<73>ncia
de sua parte, nem voc<6F> nem o cliente precisa de uma licen<65>a @strong{MySQL}.
Se voc<6F> cobra para instalar e administrar o @strong{MySQL} como parte de seu
servi<EFBFBD>o para o cliente, ent<6E>o voc<6F> precisa de uma licen<65>a, porque est<73> vendendo
um servi<76>o que incluie o @strong{MySQL}.
@node Web server, , ISP, Licensing examples
@subsection Running a web server using MySQL
Se voc<6F> usa o @strong{MySQL} em conjunto com um servidor web, voc<6F> n<>o tem
que pagar uma licen<65>a.
Isto <20> verdadeiro se voc<6F> roda um servidor web comercial que usa @strong{MySQL},
desde que voc<6F> n<>o esteja vendendo o @strong{MySQL}. Entretanto, neste caso
n<EFBFBD>s gostariamos que voc<6F> compre suporte @strong{MySQL}, porque @strong{MySQL}
est<EFBFBD> ajudando a sua empresa.
@cindex Costs, licensing and support
@cindex Licensing costs
@cindex Support costs
@node Cost, Support, Licensing examples, Licensing and Support
@section MySQL licensing and support costs
@menu
* Payment information:: Informa<6D><61>o de Pagamento
* Contact information:: Informa<6D><61>o de contato
@end menu
Nossos pre<72>os atuais de licen<65>a s<>o mostrados abaixo. Todos os pre<72>os s<>o
em US D<>lar. Se voc<6F> paga com cart<72>o de cr<63>dito, a moeda <20> o EURO (European Union Euro),
tais pre<72>os diferem levemente.
@multitable @columnfractions .25 .2 .3
@item @strong{N<>mero de licen<65>as} @tab @strong{Pre<72>o por c<>pia} @tab @strong{Total}
@item 1 @tab US $200 @tab US $200
@item 10 pacotes @tab US $150 @tab US $1500
@item 50 pacotes @tab US $120 @tab US $6000
@end multitable
Para compras em alto volume (OEM), os seguintes pre<72>os s<>o aplicados:
@multitable @columnfractions .25 .2 .3 .25
@item @strong{N<>mero de licen<65>as} @tab @strong{Pre<72>o por c<>pia} @tab @strong{M<>nimo de uma vez} @tab @strong{Pagamento m<>nimo}
@item 100-999 @tab US $40 @tab 100 @tab US $4000
@item 1000-2499 @tab US $25 @tab 200 @tab US $5000
@item 2500-4999 @tab US $20 @tab 400 @tab US $8000
@end multitable
Para compras OEM, voc<6F> deve atuar como o intermedi<64>rio para eventuais
problemas ou solicita<74><61>es de seus usu<73>rios. N<>s tamb<6D>m requeremos que
clientes OEM tenham ao menos um contrato de suporte extended email.
Se voc<6F> tem uma margem baixa em alto volume de produtos, voc<6F> pode falar
com n<>s sobre outros termos (por exemplo, a porcentagem dos pre<72>os de
venda). Se voc<6F> faz, por favor seja informativo sobre seu produto, pre<72>o,
mercado e qualquer outra informa<6D><61>o que seja relevante.
@cindex @code{myisampack}
Depois de comprar 1 licen<65>a @strong{MySQL}, voc<6F> ter<65> uma c<>pia pessoal
do utilit<69>rio @code{myisampack}. Voc<6F> n<>o est<73> permitido em distribuir
esse utilit<69>rio por<6F>m voc<6F> pode distribuir tabelas compactadas com ele.
Um pre<72>o completo de uma licen<65>a n<>o <20> um acordo de suporte e incluie um
m<EFBFBD>nimo suporte. Isto significa que n<>s tentamos responder qualquer pergunta
relevante. Se a resposta est<73> na documenta<74><61>o, n<>s direcionamos voc<6F> <20>
apropriada se<73><65>o. Se voc<6F> n<>o tem comprado uma licen<65>a ou suporte, n<>s
provavelmente n<>o responderemos ao tudo.
Se voc<6F> descobre o que consideramos um real bug, n<>s estamos prontificados
a solucionar o erro em qualquer caso. Por<6F>m se voc<6F> paga por suporte n<>s
o notificaremos sobre o andamento da solu<6C><75>o ao inv<6E>s de soluncion<6F>-lo
nos pr<70>ximos lan<61>amentos.
Suporte mais amplo <20> vendido separadamente. Descri<72><69>es do que incluie cada
n<EFBFBD>vel de suporte s<>o dadas em @ref{Support}. Custos para os v<>rios tipos
comerciais de suporte s<>o mostrados abaixo. O n<>vel de pre<72>os de suporte
est<EFBFBD>o em EURO (European Union Euro). Um EURO <20> aproximadamente 1.17 USD.
@multitable @columnfractions .3 .3
@item @strong{Tipo de suporte} @tab @strong{Custo por ano}
@item Basic email support @tab EURO 170
@item Extended email support @tab EURO 1000
@item Login support @tab EURO 2000
@item Extended login support @tab EURO 5000
@end multitable
Voc<EFBFBD> pode atualizar um n<>vel mais baixo sw suporte para um de maior
n<EFBFBD>vel, pela diferen<65>a entre os pre<72>os dos dois n<>veis.
@cindex Payment information
@node Payment information, Contact information, Cost, Cost
@subsection Payment information
Correntemente n<>s podemos tomar pagamentos SWIFT, cheques ou cart<72>es de cr<63>dito.
O pagamento poder<65> ser feito a:
@example
Postgirot Bank AB
105 06 STOCKHOLM, SWEDEN
TCX DataKonsult AB
BOX 6434
11382 STOCKHOLM, SWEDEN
SWIFT address: PGSI SESS
N<EFBFBD>mero da Conta: 96 77 06 - 3
@end example
Especificar: licen<65>a e/ou suporte, seu nome e endere<72>o de e-mail.
Em europa e Jap<61>o voc<6F> pode usar EuroGiro (que pode ser menos caro) para a mesma
conta.
Se voc<6F> quer pagar atrav<61>s de cheque, fa<66>a-o nominal a ``Monty Program KB'' e mande
um e-mail para o endere<72>o abaixo:
@example
TCX DataKonsult AB
BOX 6434, Torsgatan 21
11382 STOCKHOLM, SWEDEN
@end example
Se voc<6F> quer pagar com cart<72>o de cr<63>dito usando a Internet, voc<6F> pode
usar o seguro formul<75>rio de licen<65>a da TcX:
@uref{https://www.mysql.com/license.htmy.
Voc<EFBFBD> pode tamb<6D>m imprimir uma c<>pia do formul<75>rio de licen<65>a, prench<63>-lo e mand<6E>-lo
via fax para:
+46-8-729 69 05
Se voc<6F> quer que n<>s uma cobran<61>a para voc<6F>, voc<6F> pode usar o formul<75>rio de
licen<EFBFBD>a e escrever ``bill us'' no campo de coment<6E>rios. Voc<6F> pode tamb<6D>m
mandar uma mensagem via e-mail para @email{sales@@mysql.com} (@strong{not}
@email{mysql@@lists.mysql.com}!) com a informa<6D><61>o de sua companhia e pedir
para n<>s para efetuar a cobran<61>a.
@cindex Contact information
@node Contact information, , Payment information, Cost
@subsection Contact information
Para licenciamento comercial, ou se voc<6F> t<>m qualquer pergunta sobre
informa<EFBFBD><EFBFBD>o desta se<73><65>o, por favor contatar a equipe de licenciamento
do @strong{MySQL}. O mais preferido m<>todo <20> o e-mail para
@email{mysql-licensing@@mysql.com}. Fax <20> tamb<6D>m poss<73>vel por<6F>m sua
manipula<EFBFBD><EFBFBD>o pode demorar muito (Fax +46-8-729 69 05).
@example
David Axmark
Detron HB
Kungsgatan 65 B
753 21 UPPSALA
SWEDEN
Fone Voz +46-18-10 22 80 (Timezone GMT+1. Fala Sueco e Ingl<67>s)
@end example
@cindex Support, types
@cindex Types of support
@node Support, , Cost, Licensing and Support
@section Types of commercial support
@menu
* Basic email support:: Basic email support
* Extended email support:: Extended email support
* Login support:: Login support
* Extended login support:: Extended login support
@end menu
@node Basic email support, Extended email support, Support, Support
@subsection Basic email support
Basic email support <20> a op<6F><70>o mais barata de suporte e dever<65> ser vista
como uma forma de suportar nosso desenvolvimento do @strong{MySQL} que
uma real op<6F><70>o de suporte.
Neste n<>vel de suporte, a lista de e-mail do @strong{MySQL} <20> o preferido
meio de comunica<63><61>o. Perguntas normalmente podem ser enviadas para a
principal lista de e-mail (@email{mysql@@lists.mysql.com}) ou uma das outras
listas regulares (por exemplo, @email{mysql-win32@@lists.mysql.com} relacionada
<EFBFBD>s perguntas para o @strong{MySQL} Windows, tal que qualquer pessoa pode j<> ter
experimentado e resolvido o problema que voc<6F> tem. @xref{Asking questions}.
Entretanto, comprando o suporte basic email support, voc<6F> tamb<6D>m tem acesso
ao e-mail @email{mysql-support@@mysql.com}, o qual n<>o <20> dispon<6F>vel
como parte do suporte m<>nimo que se tem quando se adquire uma licen<65>a @strong{MySQL}.
Isto significa que para perguntas cr<63>ticas, voc<6F> pode mandar sua mensagem para
@email{mysql-support@@mysql.com}. (Se a mensagem tem dados privados, voc<6F> s<>
deve mandar para o @email{mysql-support@@mysql.com}.)
@emph{LEMBRE-SE!} para SEMPRE incluir o n<>mero de registro e data de
t<EFBFBD>rmino quando mandar uma mensagem para
@email{mysql-support@@mysql.com}.
Basic email support incluie os seguintes tipos de servi<76>os:
@itemize @bullet
@item
Se sua pergunta j<> est<73> respondida no manual, n<>s o informamos da correta
se<EFBFBD><EFBFBD>o na qual pode encontrar a resposta. Se a resposta n<>o est<73> no manual,
n<EFBFBD>s o colocamos na dire<72><65>o certa para resolver seu problema.
@item
N<EFBFBD>s garantimos em tempo apropriado a resposta das mensagem de seu e-mail.
N<EFBFBD>s n<>o podemos garantir que podemos resolver qualquer problema, por<6F>m ao
menos voc<6F> receve uma resposta se podemos contat<61>-lo por e-mail.
@item
N<EFBFBD>s podemos ajud<75>-lo com problemas inesperados quando instala @strong{MySQL}
a partir de uma distribui<75><69>o bin<69>ria em plataformas suportadas. Este n<>vel de
suporte n<>o cobre instala<6C><61>o do @strong{MySQL} a partir de uma distribui<75><69>o
fonte. Plataformas ``Suportadas'' s<>o aquelas plataformas nas quais o @strong{MySQL}
<EFBFBD> conhecido que funciona.
@xref{Which OS}.
@item
N<EFBFBD>s ajudaremos voc<6F> com bugs e problemas de caracter<65>sticas. Qualquer
bug que for encontrado n<>s o solucionamos no pr<70>ximo lan<61>amento do @strong{MySQL}.
Se o bug <20> cr<63>tico para voc<6F>, n<>s enviamos um e-mail com o patch
t<EFBFBD>o logo como o bug <20> resolvido. Bugs cr<63>ticos t<>m sempre para n<>s a maior
prioridade, para assegurar que sejam solucionados t<>o pronto como poss<73>vel.
@item
Suas sugest<73>es para desenvolvimento posterior do @strong{MySQL} s<>o tomadas
em considera<72><61>o. Obtendo o email support, voc<6F> j<> ajuda o desenvolvimento
posterior do @strong{MySQL}. Se voc<6F> quer p<>r mais, fa<66>a a atualiza<7A><61>o
para um n<>vel mais alto de suporte.
@item
Se voc<6F> quer n<>s ajudar a otimizar seu sistema, voc<6F> deve atualizar
para um n<>vel maior de suporte.
@item
@cindex @code{myisampack}
N<EFBFBD>s incluimos uma vers<72>o bin<69>ria da ferramenta de compacta<74><61>o @code{myisampack}
para criar r<>pidos bancos de dados compactados, somente de leitura. O atual
servidor incluie suporte para ler esses bancos de dados mas n<>o a ferramenta
para criar os mesmos.
@end itemize
@node Extended email support, Login support, Basic email support, Support
@subsection Extended email support
Extended email support incluie tudo o do basic email support com estas
adi<EFBFBD><EFBFBD>es:
@itemize @bullet
@item
Seu e-mail ser<65> tratado antes dos e-amil dos usu<73>rios do basic email support
e dos usu<73>rios n<>o registrados.
@item
Suas sugest<73>es para o pr<70>ximo desenvolvimento do @strong{MySQL} receber<65>
uma forte considera<72><61>o. Simples extens<6E>es que fazem os gols do @strong{MySQL}
s<EFBFBD>o a implementa<74><61>o em quest<73>o de dias. adquirindo o extended email support
voc<EFBFBD> auxilia daqui para frente o desenvolvimento do @strong{MySQL}.
@item
Perguntas t<>picas que s<>o cobertas pelo extended email support s<>o:
@itemize @minus
@item
N<EFBFBD>s respondemos e (dentro do razo<7A>vel) resolvemos as perguntas relacionadas
a poss<73>veis bugs no @strong{MySQL}. T<>o pronto como os bugs s<>o encontrados
e corregidoa, n<>s mandamos por e-mail o pacth para ele.
@item
N<EFBFBD>s auxiliamos com inesperados problemas quando voc<6F> instala o @strong{MySQL}
a partir do fonte ou distribui<75><69>o bin<69>ria nas plataformas suportadas.
@item
N<EFBFBD>s responderemos perguntas sobre caracter<65>sticas perdidad e ofereceremos
dicas como trabalhar e contornar elas.
@item
N<EFBFBD>s forneceremos dicas na otimiza<7A><61>o do @code{mysqld}para sua situa<75><61>o.
@end itemize
@item
Voc<EFBFBD> est<73> permitido a influenciar a prioridade de itens do TODO do @strong{MySQL}.
Isso assegura que as caracter<65>sticas que voc<6F> realmente precisa sejam implementadas
rapidamente que as mesmas poderia ser de outra forma.
@end itemize
@node Login support, Extended login support, Extended email support, Support
@subsection Login support
O Login support incluie tudo do extended email support com estas adi<64><69>es:
@itemize @bullet
@item
Seu e-mail ter<65> prioridade sobre os usu<73>rios do suporte extended email.
@item
Suas sugest<73>es para o pr<70>ximo desenvolvimento do @strong{MySQL} ser<65> tomado
com uma alta considera<72><61>o. Extens<6E>es reais que podem ser implementadas num
par de horas e que fazem os gols do @strong{MySQL} ser<65>o implementadas
t<EFBFBD>o logo como poss<73>vel.
@item
Se voc<6F> tem um problema muito espec<65>fico, n<>s tentaremos logar no seu
sistema para resolver o problema ''no local''.
@item
Tal como qualquer outro vendedor de banco de dados, n<>o podemos garantir que
podemos recuperar qualquer dado de tabelas corrompidas, por<6F>m se o pior acontece
n<EFBFBD>s poderemos a recuperar tanto quanto seja poss<73>vel. O @strong{MySQL}tem provado
ser muito seguro, por<6F>m qualquer <20> poss<73>vel devido a circunt<6E>ncias fora de nosso
controle (por exemplo, se seu sistema crash ou algu<67>m kill o servidor executando
um comando @code{kill -9}).
@item
N<EFBFBD>s providenciaremos dicas na otimiza<7A><61>o de seu sistema e consultas.
@item
Voc<EFBFBD> est<73> permitido para chamar um desenvolvedor @strong{MySQL} (moderadamente) e
discutir seu problemas relacionados com o @strong{MySQL}.
@end itemize
@node Extended login support, , Login support, Support
@subsection Extended login support
O Extended login support incluie tudo do login support com estas adi<64><69>es:
@itemize @bullet
@item
Seu e-mail tem a mais alta prioridade poss<73>vel.
@item
N<EFBFBD>s ativamente examinamos seu sistema e ajudamos a otimiz<69>-lo assim como suas
consultas. N<>s tamb<6D>m podemos otimizar e/ou extender o @strong{MySQL}
para suprir melhor suas necessidades.
@item
Voc<EFBFBD> tamb<6D>m pode solicitar extens<6E>es es peciais apenas para voc<6F>. Por exemplo:
@example
mysql> select MY_CALCULATION(col_name1,col_name2) from tbl_name;
@end example
@item
N<EFBFBD>s podemos fornecer uma distribui<75><69>o bin<69>ria para todas as atualiza<7A><61>es
mais importantes do @strong{MySQL} para seu sistema, t<>o logo como podemos
obter uma conta em um sistema similar. No pior dos casos, n<>s podemos requerer
acesso para seu sistema para ser capaz de criar uma distribui<75><69>o bin<69>ria.
@item
Se voc<6F> pode providenciar acomoda<64><61>es e pagar os custos de viagem para um
desenvolvedor @strong{MySQL} para vist<73>-lo e oferecer ajuda com seus problemas.
O suporte Extended login support entitula voc<6F> para um encontro pessoal por
ano, por<6F>m n<>s sempre somos muito flex<65>veis para levar para frente nossos
clientes!.
@end itemize
@node Installing, Compatibility, Licensing and Support, Top

View File

@ -1,107 +0,0 @@
\input texinfo @c -*-texinfo-*-
@c
@c *********************************************************
@c
@c This is a dummy placeholder file for manual.de.texi in the
@c MySQL source trees.
@c
@c Note, that the manual has been moved into a separate
@c BitKeeper source tree named "mysqldoc" - do not attempt
@c to add NEWS entries or documentation to this file! All
@c changes to the manual should be done in the mysqldoc tree.
@c
@c See http://www.mysql.com/doc/en/Installing_source_tree.html
@c for information about how to work with BitKeeper source trees.
@c
@c This dummy file is being replaced with the real manual from the
@c mysqldoc tree when building the official source distribution.
@c
@c Please e-mail docs@mysql.com for more information or if
@c you are interested in doing a translation.
@c
@c *********************************************************
@c
@c %**start of header
@setfilename mysql.de.info
@c We want the types in the same index
@syncodeindex tp fn
@c Get version information. This file is generated by the Makefile!!
@include include.texi
@ifclear tex-debug
@c This removes the black squares in the right margin
@finalout
@end ifclear
@c Set background for HTML
@set _body_tags BGCOLOR=silver TEXT=#000000 LINK=#101090 VLINK=#7030B0
@c Set some style elements for the manual in HTML form. 'suggested'
@c natural language colors: aqua, black, blue, fuchsia, gray, green,
@c lime, maroon, navy, olive, purple, red, silver, teal, white, and
@c yellow. From Steeve Buehler <ahr@YogElements.com>
@set _extra_head <style> code {color:purple} tt {color:green} samp {color:navy} pre {color:maroon} </style>
@settitle Dummy MySQL Reference Manual for version @value{mysql_version}.
@c We want single-sided heading format, with chapters on new pages. To
@c get double-sided format change 'on' below to 'odd'
@setchapternewpage on
@paragraphindent 0
@c %**end of header
@ifinfo
@format
START-INFO-DIR-ENTRY
* mysql: (mysql). MySQL documentation.
END-INFO-DIR-ENTRY
@end format
@end ifinfo
@titlepage
@sp 10
@center @titlefont{Empty placeholder for the MySQL Reference Manual}
@sp 10
@center Copyright @copyright{} 1995-2002 MySQL AB
@c blank page after title page makes page 1 be a page front.
@c also makes the back of the title page blank.
@page
@end titlepage
@c This should be added. The HTML conversion also needs a MySQL version
@c number somewhere.
@iftex
@c change this to double if you want formatting for double-sided
@c printing
@headings single
@oddheading @thischapter @| @| @thispage
@evenheading @thispage @| @| MySQL Technical Reference for Version @value{mysql_version}
@end iftex
@node Top, (dir), (dir), (dir)
@ifinfo
This is an empty placeholder file for the MySQL manual.
The MySQL manual is now maintained in a separate BitKeeper source tree!
Please see @url{http://www.mysql.com/doc/en/Installing_source_tree.html}
for more info on how to work with BitKeeper.
Please do not attempt to edit this file to add NEWS entries or to add
documentation! Use the one in the @code{mysqldoc} BK tree instead.
This file will be replaced with the current @code{manual.de.texi} when building
the official source distribution.
You can find a specific manual for any older version of MySQL
in the binary or source distribution for that version.
@end ifinfo
@bye

View File

@ -1,107 +0,0 @@
\input texinfo @c -*-texinfo-*-
@c
@c *********************************************************
@c
@c This is a dummy placeholder file for manual.texi in the
@c MySQL source trees.
@c
@c Note, that the manual has been moved into a separate
@c BitKeeper source tree named "mysqldoc" - do not attempt
@c to add NEWS entries or documentation to this file! All
@c changes to the manual should be done in the mysqldoc tree.
@c
@c See http://www.mysql.com/doc/en/Installing_source_tree.html
@c for information about how to work with BitKeeper source trees.
@c
@c This dummy file is being replaced with the real manual from the
@c mysqldoc tree when building the official source distribution.
@c
@c Please e-mail docs@mysql.com for more information or if
@c you are interested in doing a translation.
@c
@c *********************************************************
@c
@c %**start of header
@setfilename mysql.info
@c We want the types in the same index
@syncodeindex tp fn
@c Get version information. This file is generated by the Makefile!!
@include include.texi
@ifclear tex-debug
@c This removes the black squares in the right margin
@finalout
@end ifclear
@c Set background for HTML
@set _body_tags BGCOLOR=silver TEXT=#000000 LINK=#101090 VLINK=#7030B0
@c Set some style elements for the manual in HTML form. 'suggested'
@c natural language colors: aqua, black, blue, fuchsia, gray, green,
@c lime, maroon, navy, olive, purple, red, silver, teal, white, and
@c yellow. From Steeve Buehler <ahr@YogElements.com>
@set _extra_head <style> code {color:purple} tt {color:green} samp {color:navy} pre {color:maroon} </style>
@settitle Dummy MySQL Reference Manual for version @value{mysql_version}.
@c We want single-sided heading format, with chapters on new pages. To
@c get double-sided format change 'on' below to 'odd'
@setchapternewpage on
@paragraphindent 0
@c %**end of header
@ifinfo
@format
START-INFO-DIR-ENTRY
* mysql: (mysql). MySQL documentation.
END-INFO-DIR-ENTRY
@end format
@end ifinfo
@titlepage
@sp 10
@center @titlefont{Empty placeholder for the MySQL Reference Manual}
@sp 10
@center Copyright @copyright{} 1995-2002 MySQL AB
@c blank page after title page makes page 1 be a page front.
@c also makes the back of the title page blank.
@page
@end titlepage
@c This should be added. The HTML conversion also needs a MySQL version
@c number somewhere.
@iftex
@c change this to double if you want formatting for double-sided
@c printing
@headings single
@oddheading @thischapter @| @| @thispage
@evenheading @thispage @| @| MySQL Technical Reference for Version @value{mysql_version}
@end iftex
@node Top, (dir), (dir), (dir)
@ifinfo
This is an empty placeholder file for the MySQL manual.
The MySQL manual is now maintained in a separate BitKeeper source tree!
Please see @url{http://www.mysql.com/doc/en/Installing_source_tree.html}
for more info on how to work with BitKeeper.
Please do not attempt to edit this file to add NEWS entries or to add
documentation! Use the one in the @code{mysqldoc} BK tree instead.
This file will be replaced with the current @code{manual.texi} when building
the official source distribution.
You can find a specific manual for any older version of MySQL
in the binary or source distribution for that version.
@end ifinfo
@bye

View File

@ -1,9 +0,0 @@
<html>
<head>
<title>Place holder for manual_toc.html</title>
</head>
<body>
This is just a place holder for the autogenerated manual_toc.html
to make "make dist" happy.
</body>
</html>

View File

@ -1,446 +0,0 @@
@strong{Europe:}
@itemize @bullet
@item
@image{Flags/armenia} Armenia [AbideWeb Technologies] @@
WWW (@uref{http://mysql.abideweb.com/})
FTP (@uref{ftp://mysql.abideweb.com/mirrors/MySQL/})
@item
@image{Flags/austria} Austria [Univ. of Technology/Vienna] @@
WWW (@uref{http://gd.tuwien.ac.at/db/mysql/})
FTP (@uref{ftp://gd.tuwien.ac.at/db/mysql/})
@item
@image{Flags/belgium} Belgium [BELNET] @@
WWW (@uref{http://mysql.belnet.be/})
FTP (@uref{ftp://ftp.belnet.be/mirror/ftp.mysql.com/pub/mysql/})
@item
@image{Flags/bulgaria} Bulgaria [online.bg/Sofia] @@
WWW (@uref{http://mysql.online.bg/})
FTP (@uref{ftp://mysql.online.bg/})
@item
@image{Flags/czech-republic} Czech Republic [Masaryk University in Brno] @@
WWW (@uref{http://mysql.linux.cz/})
FTP (@uref{ftp://ftp.fi.muni.cz/pub/mysql/})
@item
@image{Flags/czech-republic} Czech Republic [www.gin.cz] @@
WWW (@uref{http://mysql.gin.cz/})
FTP (@uref{ftp://ftp.gin.cz/pub/MIRRORS/www.mysql.com/})
@item
@image{Flags/czech-republic} Czech Republic [www.sopik.cz] @@
WWW (@uref{http://www.mysql.cz/})
@item
@image{Flags/denmark} Denmark [Borsen] @@
WWW (@uref{http://mysql.borsen.dk/})
@item
@image{Flags/denmark} Denmark [Cybercity Internet] @@
WWW (@uref{http://mysql.mirrors.cybercity.dk/})
@item
@image{Flags/denmark} Denmark [SunSITE] @@
WWW (@uref{http://mirrors.sunsite.dk/mysql/})
FTP (@uref{ftp://sunsite.dk/mirrors/mysql/})
@item
@image{Flags/estonia} Estonia [OK Interactive] @@
WWW (@uref{http://mysql.mirror.ok.ee/})
@item
@image{Flags/finland} Finland [KPNQwest] @@
WWW (@uref{http://mysql.kpnqwest.fi/})
@item
@image{Flags/finland} Finland [Mediatraffic] @@
WWW (@uref{http://mysql.mediatraffic.fi/})
@item
@image{Flags/finland} Finland [tonnikala.net] @@
WWW (@uref{http://mysql.tonnikala.org/})
@item
@image{Flags/france} France [free.fr] @@
WWW (@uref{http://mysql-mirror.free.fr/})
FTP (@uref{ftp://ftp.free.fr/pub/MySQL/})
@item
@image{Flags/france} France [mir2.ovh.net/] @@
WWW (@uref{http://mir2.ovh.net/ftp.mysql.com/})
FTP (@uref{ftp://mir1.ovh.net/ftp.mysql.com/})
@item
@image{Flags/france} France [Netsample] @@
WWW (@uref{http://www.mysql.netsample.com/})
@item
@image{Flags/france} France [Universite Paris 10] @@
WWW (@uref{http://ftp.u-paris10.fr/mysql.com})
FTP (@uref{ftp://ftp.u-paris10.fr/mysql.com})
@item
@image{Flags/germany} Germany [GWDG] @@
WWW (@uref{http://ftp.gwdg.de/pub/misc/mysql/})
FTP (@uref{ftp://ftp.gwdg.de/pub/misc/mysql/})
@item
@image{Flags/germany} Germany [SunSITE Central Europe] @@
WWW (@uref{http://sunsite.informatik.rwth-aachen.de/mysql/})
FTP (@uref{ftp://sunsite.informatik.rwth-aachen.de/pub/mirror/www.mysql.com/})
@item
@image{Flags/germany} Germany [Tiscali] @@
WWW (@uref{http://filepile.tiscali.de/mirror/mysql/})
FTP (@uref{ftp://filepile.tiscali.de/mirror/mysql/})
@item
@image{Flags/germany} Germany [Wolfenbuettel] @@
WWW (@uref{http://www.fh-wolfenbuettel.de/ftp/pub/database/mysql/})
FTP (@uref{ftp://ftp.fh-wolfenbuettel.de/pub/database/mysql/})
@item
@image{Flags/greece} Greece [NTUA, Athens] @@
WWW (@uref{http://www.ntua.gr/mysql/})
FTP (@uref{ftp://ftp.ntua.gr/pub/databases/mysql/})
@item
@image{Flags/hungary} Hungary [stop.hu] @@
WWW (@uref{http://mysql.mirror.stop.hu/})
@item
@image{Flags/hungary} Hungary [TiszaneT] @@
WWW (@uref{http://mysql.tiszanet.hu/})
FTP (@uref{ftp://mysql.tiszanet.hu/pub/mirrors/mysql/})
@item
@image{Flags/hungary} Hungary [Xenia] @@
WWW (@uref{http://mysql.sote.hu/})
FTP (@uref{ftp://xenia.sote.hu/pub/mirrors/www.mysql.com/})
@item
@image{Flags/iceland} Iceland [Tv<54>und] @@
WWW (@uref{http://mysql.tviund.is/})
@item
@image{Flags/ireland} Ireland [Esat Net] @@
WWW (@uref{http://ftp.esat.net/mirrors/download.sourceforge.net/pub/mirrors/mysql/})
FTP (@uref{ftp://ftp.esat.net/mirrors/download.sourceforge.net/pub/mirrors/mysql/})
@item
@image{Flags/ireland} Ireland [MD NMTB Media] @@
WWW (@uref{http://mirrors.nmtbmedia.com/mysql/})
@item
@image{Flags/israel} Israel [fresh.co.il] @@
WWW (@uref{http://mysql.fresh.co.il/})
@item
@image{Flags/italy} Italy [feelinglinux.com] @@
WWW (@uref{http://mysql.feelinglinux.com/})
@item
@image{Flags/italy} Italy [Teta Srl] @@
WWW (@uref{http://www.teta.it/mysql/})
@item
@image{Flags/italy} Italy [tzone.it] @@
WWW (@uref{http://mysql.tzone.it/})
@item
@image{Flags/latvia} Latvia [linux.lv] @@
FTP (@uref{ftp://ftp.linux.lv/pub/software/mysql/})
@item
@image{Flags/netherlands} Netherlands [OMS-Net] @@
WWW (@uref{http://mysql.oms-net.nl/})
@item
@image{Flags/netherlands} Netherlands [ProServe] @@
WWW (@uref{http://mysql.proserve.nl/})
@item
@image{Flags/netherlands} Netherlands [WideXS BV] @@
WWW (@uref{http://mysql.mirror.widexs.nl/})
FTP (@uref{ftp://mirror.widexs.nl/pub/mysql/})
@item
@image{Flags/norway} Norway [Brainpeddlers AS] @@
WWW (@uref{http://mysql.brainpeddlers.com/})
@item
@image{Flags/poland} Poland [ncservice.com/Gdansk] @@
WWW (@uref{http://mysql.service.net.pl/})
@item
@image{Flags/poland} Poland [SunSITE] @@
WWW (@uref{http://sunsite.icm.edu.pl/mysql/})
FTP (@uref{ftp://sunsite.icm.edu.pl/pub/unix/mysql/})
@item
@image{Flags/portugal} Portugal [Instituto Supertior T<>cnico] @@
WWW (@uref{http://darkstar.ist.utl.pt/mysql/})
FTP (@uref{ftp://darkstar.ist.utl.pt/pub/mysql/})
@item
@image{Flags/portugal} Portugal [Netvis<69>o] @@
WWW (@uref{http://mysql.netvisao.pt/})
FTP (@uref{ftp://mirrors2.netvisao.pt/pub/mysql/})
@item
@image{Flags/portugal} Portugal [VIZZAVI] @@
WWW (@uref{http://ftp.vizzavi.pt/pub/mysql/})
FTP (@uref{ftp://ftp.vizzavi.pt/pub/mysql/})
@item
@image{Flags/romania} Romania [roedu.net/Bucharest] @@
FTP (@uref{ftp://ftp.roedu.net/pub/mirrors/ftp.mysql.com/})
@item
@image{Flags/russia} Russia [DirectNet] @@
WWW (@uref{http://mysql.directnet.ru/})
FTP (@uref{ftp://ftp.dn.ru/pub/MySQL/})
@item
@image{Flags/russia} Russia [Scientific Center/Chernogolovka] @@
FTP (@uref{ftp://ftp.chg.ru/pub/databases/mysql/})
@item
@image{Flags/slovenia} Slovenia [ARNES] @@
WWW (@uref{http://ftp.arnes.si/mysql/})
FTP (@uref{ftp://ftp.arnes.si/packages/mysql/})
@item
@image{Flags/sweden} Sweden [Sunet] @@
WWW (@uref{http://ftp.sunet.se/pub/unix/databases/relational/mysql/})
FTP (@uref{ftp://ftp.sunet.se/pub/unix/databases/relational/mysql/})
@item
@image{Flags/switzerland} Switzerland [SunSITE] @@
WWW (@uref{http://sunsite.cnlab-switch.ch/ftp/mirror/mysql/})
FTP (@uref{ftp://sunsite.cnlab-switch.ch/mirror/mysql/})
@item
@image{Flags/turkey} Turkey [proGEN] @@
WWW (@uref{http://mysql.progen.com.tr/})
@item
@image{Flags/turkey} Turkey [Turkish National Academic Network & Information Center] @@
WWW (@uref{http://mysql.ulak.net.tr/})
@item
@image{Flags/great-britain} UK [PLiG/UK] @@
WWW (@uref{http://ftp.plig.org/pub/mysql/})
FTP (@uref{ftp://ftp.plig.org/pub/mysql/})
@item
@image{Flags/ukraine} Ukraine [ISP Alkar Teleport/Dnepropetrovsk] @@
WWW (@uref{http://mysql.dp.ua/})
FTP (@uref{ftp://ftp.tlk-l.net/pub/mirrors/mysql.com/})
@item
@image{Flags/ukraine} Ukraine [PACO] @@
WWW (@uref{http://mysql.paco.net.ua/})
FTP (@uref{ftp://mysql.paco.net.ua/})
@item
@image{Flags/yugoslavia} Yugoslavia [Open Source Network of Yugoslavia] @@
WWW (@uref{http://mysql.boa.org.yu/})
FTP (@uref{ftp://ftp.linux.org.yu/pub/MySQL/})
@end itemize
@strong{North America:}
@itemize @bullet
@item
@image{Flags/canada} Canada [Tryc] @@
WWW (@uref{http://web.tryc.on.ca/mysql/})
@item
@image{Flags/mexico} Mexico [UAM] @@
WWW (@uref{http://mysql.azc.uam.mx/})
FTP (@uref{ftp://mysql.azc.uam.mx/mirrors/mysql/})
@item
@image{Flags/mexico} Mexico [UNAM] @@
WWW (@uref{http://mysql.unam.mx/})
FTP (@uref{ftp://mysql.unam.mx/pub/mysql/})
@item
@image{Flags/usa} USA [adgrafix.com / Boston, MA] @@
WWW (@uref{http://mysql.adgrafix.com/})
@item
@image{Flags/usa} USA [Argonne National Laboratory / Chicago, IL] @@
FTP (@uref{ftp://mirror.mcs.anl.gov/pub/mysql/})
@item
@image{Flags/usa} USA [Hurricane Electric / San Jose, CA] @@
WWW (@uref{http://mysql.he.net/})
@item
@image{Flags/usa} USA [netNumina / Cambridge, MA] @@
WWW (@uref{http://mysql.mirrors.netnumina.com/})
@item
@image{Flags/usa} USA [NIXC / Vienna, VA] @@
WWW (@uref{http://mysql.nixc.net/})
FTP (@uref{ftp://mysql.nixc.net/pub/mysql/})
@item
@image{Flags/usa} USA [Oregon State University / Corvallis, OR] @@
WWW (@uref{http://mysql.orst.edu/})
FTP (@uref{ftp://ftp.orst.edu/pub/mysql/})
@item
@image{Flags/usa} USA [University of Wisconsin / Wisconsin] @@
WWW (@uref{http://mirror.sit.wisc.edu/mysql/})
FTP (@uref{ftp://mirror.sit.wisc.edu/mirrors/mysql/})
@item
@image{Flags/usa} USA [UUNet] @@
WWW (@uref{http://mysql.secsup.org/})
FTP (@uref{ftp://mysql.secsup.org/pub/software/mysql/})
@end itemize
@strong{South America:}
@itemize @bullet
@item
@image{Flags/argentina} Argentina [bannerlandia.com] @@
WWW (@uref{http://mysql.bannerlandia.com.ar/})
FTP (@uref{ftp://mysql.bannerlandia.com.ar/mirrors/mysql/})
@item
@image{Flags/chile} Chile [PSINet] @@
WWW (@uref{http://mysql.psinet.cl/})
FTP (@uref{ftp://ftp.psinet.cl/pub/database/mysql/})
@item
@image{Flags/chile} Chile [Tecnoera] @@
WWW (@uref{http://mysql.tecnoera.com/})
@item
@image{Flags/chile} Chile [Vision] @@
WWW (@uref{http://mysql.vision.cl/})
@item
@image{Flags/costa-rica} Costa Rica [Ogmios Communications] @@
WWW (@uref{http://mysql.ogmios.co.cr/})
FTP (@uref{ftp://mysql.ogmios.co.cr/pub/mysql/})
@end itemize
@strong{Asia:}
@itemize @bullet
@item
@image{Flags/china} China [HKLPG/Hong Kong] @@
WWW (@uref{http://mysql.hklpg.org/})
@item
@image{Flags/china} China [linuxforum.net] @@
FTP (@uref{http://www2.linuxforum.net/mirror/mysql/})
@item
@image{Flags/china} China [shellhung.org/Hong Kong] @@
WWW (@uref{http://mysql.shellhung.org/})
FTP (@uref{ftp://ftp.shellhung.org/pub/Mirror/mysql/})
@item
@image{Flags/indonesia} Indonesia [CBN] @@
WWW (@uref{http://mysql.cbn.net.id/})
@item
@image{Flags/indonesia} Indonesia [incaf.net] @@
WWW (@uref{http://mysql.incaf.net/})
FTP (@uref{ftp://mysql.incaf.net/})
@item
@image{Flags/indonesia} Indonesia [M-Web] @@
WWW (@uref{http://mysql.mweb.net.id/})
FTP (@uref{ftp://mysql.mweb.net.id/pub/database/mysql/})
@item
@image{Flags/indonesia} Indonesia [web.id] @@
WWW (@uref{http://mysql.itb.web.id/})
FTP (@uref{ftp://mysql.itb.web.id/pub/MySQL/})
@item
@image{Flags/japan} Japan [Soft Agency] @@
WWW (@uref{http://www.softagency.co.jp/MySQL/})
@item
@image{Flags/japan} Japan [u-aizu.ac.jp/Aizu] @@
FTP (@uref{ftp://ftp.u-aizu.ac.jp/ftp/pub/dbms/mysql/mysql.com/})
@item
@image{Flags/philippines} Philippines [Ateneo de Zamboanga University] @@
WWW (@uref{http://mysql.adzu.edu.ph/})
@item
@image{Flags/singapore} Singapore [HJC] @@
WWW (@uref{http://mysql.hjc.edu.sg/})
FTP (@uref{ftp://ftp.hjc.edu.sg/mysql/})
@item
@image{Flags/south-korea} South Korea [HolyNet] @@
WWW (@uref{http://mysql.holywar.net/})
@item
@image{Flags/south-korea} South Korea [Webiiz] @@
WWW (@uref{http://mysql.webiiz.com/})
@item
@image{Flags/taiwan} Taiwan [I-SHOU University] @@
WWW (@uref{http://mysql.isu.edu.tw/})
@item
@image{Flags/taiwan} Taiwan [nctu.edu/HsinChu] @@
WWW (@uref{http://mysql.nctu.edu.tw/})
@item
@image{Flags/taiwan} Taiwan [TTN] @@
WWW (@uref{http://mysql.ttn.net/})
@end itemize
@strong{Australia:}
@itemize @bullet
@item
@image{Flags/australia} Australia [InterActive Consulting] @@
WWW (@uref{http://mysql.oranged.to})
@item
@image{Flags/australia} Australia [planetmirror.com] @@
WWW (@uref{http://mysql.planetmirror.com/})
FTP (@uref{ftp://planetmirror.com/pub/mysql/})
@item
@image{Flags/new-zealand} New Zealand [Cubalan] @@
WWW (@uref{http://mysql.soa.co.nz/})
@end itemize
@strong{Africa:}
@itemize @bullet
@item
@image{Flags/south-africa} South African Republic [The Internet Solution/Johannesburg] @@
FTP (@uref{ftp://ftp.is.co.za/linux/mysql/})
@end itemize

27
Docs/mysql.info Normal file
View File

@ -0,0 +1,27 @@
This is mysql.info, produced by makeinfo version 4.8 from manual.texi.
START-INFO-DIR-ENTRY
* mysql: (mysql). MySQL documentation.
END-INFO-DIR-ENTRY

File: mysql.info, Node: Top, Next: (dir), Prev: (dir), Up: (dir)
This is an empty placeholder file for the MySQL manual.
The MySQL manual is now maintained in a separate BitKeeper source tree!
Please see `http://www.mysql.com/doc/en/Installing_source_tree.html'
for more info on how to work with BitKeeper.
This file will be replaced with the current `mysql.info' when building
the official source distribution.
You can find a specific manual for any older version of MySQL in the
binary or source distribution for that version.

Tag Table:
Node: Top166

End Tag Table

View File

@ -1,599 +0,0 @@
/* Copyright Abandoned 1997 TCX DataKonsult AB & Monty Program KB & Detron HB
This file is public domain and comes with NO WARRANTY of any kind */
character-set=latin1
#define ER_HASHCHK 1000
"hashchk",
#define ER_NISAMCHK 1001
"isamchk",
#define ER_NO 1002
"NO",
#define ER_YES 1003
"YES",
#define ER_CANT_CREATE_FILE 1004
"Can't create file '%-.64s' (errno: %d)",
#define ER_CANT_CREATE_TABLE 1005
"Can't create table '%-.64s' (errno: %d)",
#define ER_CANT_CREATE_DB 1006
"Can't create database '%-.64s' (errno: %d)",
#define ER_DB_CREATE_EXISTS 1007
"Can't create database '%-.64s'; database exists",
#define ER_DB_DROP_EXISTS 1008
"Can't drop database '%-.64s'; database doesn't exist",
#define ER_DB_DROP_DELETE 1009
"Error dropping database (can't delete '%-.64s', errno: %d)",
#define ER_DB_DROP_RMDIR 1010
"Error dropping database (can't rmdir '%-.64s', errno: %d)",
#define ER_CANT_DELETE_FILE 1011
"Error on delete of '%-.64s' (errno: %d)",
#define ER_CANT_FIND_SYSTEM_REC 1012
"Can't read record in system table",
#define ER_CANT_GET_STAT 1013
"Can't get status of '%-.64s' (errno: %d)",
#define ER_CANT_GET_WD 1014
"Can't get working directory (errno: %d)",
#define ER_CANT_LOCK 1015
"Can't lock file (errno: %d)",
#define ER_CANT_OPEN_FILE 1016
"Can't open file: '%-.64s' (errno: %d)",
#define ER_FILE_NOT_FOUND 1017
"Can't find file: '%-.64s' (errno: %d)",
#define ER_CANT_READ_DIR 1018
"Can't read dir of '%-.64s' (errno: %d)",
#define ER_CANT_SET_WD 1019
"Can't change dir to '%-.64s' (errno: %d)",
#define ER_CHECKREAD 1020
"Record has changed since last read in table '%-.64s'",
#define ER_DISK_FULL 1021
"Disk full (%s). Waiting for someone to free some space...",
#define ER_DUP_KEY 1022
"Can't write, duplicate key in table '%-.64s'",
#define ER_ERROR_ON_CLOSE 1023
"Error on close of '%-.64s' (errno: %d)",
#define ER_ERROR_ON_READ 1024
"Error reading file '%-.64s' (errno: %d)",
#define ER_ERROR_ON_RENAME 1025
"Error on rename of '%-.64s' to '%-.64s' (errno: %d)",
#define ER_ERROR_ON_WRITE 1026
"Error writing file '%-.64s' (errno: %d)",
#define ER_FILE_USED 1027
"'%-.64s' is locked against change",
#define ER_FILSORT_ABORT 1028
"Sort aborted",
#define ER_FORM_NOT_FOUND 1029
"View '%-.64s' doesn't exist for '%-.64s'",
#define ER_GET_ERRNO 1030
"Got error %d from storage engine",
#define ER_ILLEGAL_HA 1031
"Table storage engine for '%-.64s' doesn't have this option",
#define ER_KEY_NOT_FOUND 1032
"Can't find record in '%-.64s'",
#define ER_NOT_FORM_FILE 1033
"Incorrect information in file: '%-.64s'",
#define ER_NOT_KEYFILE 1034
"Incorrect key file for table: '%-.64s'; try to repair it",
#define ER_OLD_KEYFILE 1035
"Old key file for table '%-.64s'; repair it!",
#define ER_OPEN_AS_READONLY 1036
"Table '%-.64s' is read only",
#define ER_OUTOFMEMORY 1037
"Out of memory. Restart daemon and try again (needed %d bytes)",
#define ER_OUT_OF_SORTMEMORY 1038
"Out of sort memory. Increase daemon sort buffer size",
#define ER_UNEXPECTED_EOF 1039
"Unexpected eof found when reading file '%-.64s' (errno: %d)",
#define ER_CON_COUNT_ERROR 1040
"Too many connections",
#define ER_OUT_OF_RESOURCES 1041
"Out of memory; Check if mysqld or some other process uses all available memory. If not you may have to use 'ulimit' to allow mysqld to use more memory or you can add more swap space",
#define ER_BAD_HOST_ERROR 1042
"Can't get hostname for your address",
#define ER_HANDSHAKE_ERROR 1043
"Bad handshake",
#define ER_DBACCESS_DENIED_ERROR 1044
"Access denied for user: '%-.32s'@'%-.64s' to database '%-.64s'",
#define ER_ACCESS_DENIED_ERROR 1045
"Access denied for user: '%-.32s'@'%-.64s' (Using password: %s)",
#define ER_NO_DB_ERROR 1046
"No Database Selected",
#define ER_UNKNOWN_COM_ERROR 1047
"Unknown command",
#define ER_BAD_NULL_ERROR 1048
"Column '%-.64s' cannot be null",
#define ER_BAD_DB_ERROR 1049
"Unknown database '%-.64s'",
#define ER_TABLE_EXISTS_ERROR 1050
"Table '%-.64s' already exists",
#define ER_BAD_TABLE_ERROR 1051
"Unknown table '%-.64s'",
#define ER_NON_UNIQ_ERROR 1052
"Column: '%-.64s' in %-.64s is ambiguous",
#define ER_SERVER_SHUTDOWN 1053
"Server shutdown in progress",
#define ER_BAD_FIELD_ERROR 1054
"Unknown column '%-.64s' in '%-.64s'",
#define ER_WRONG_FIELD_WITH_GROUP 1055
"'%-.64s' isn't in GROUP BY",
#define ER_WRONG_GROUP_FIELD 1056
"Can't group on '%-.64s'",
#define ER_WRONG_SUM_SELECT 1057
"Statement has sum functions and columns in same statement",
#define ER_WRONG_VALUE_COUNT 1058
"Column count doesn't match value count",
#define ER_TOO_LONG_IDENT 1059
"Identifier name '%-.100s' is too long",
#define ER_DUP_FIELDNAME 1060
"Duplicate column name '%-.64s'",
#define ER_DUP_KEYNAME 1061
"Duplicate key name '%-.64s'",
#define ER_DUP_ENTRY 1062
"Duplicate entry '%-.64s' for key %d",
#define ER_WRONG_FIELD_SPEC 1063
"Incorrect column specifier for column '%-.64s'",
#define ER_PARSE_ERROR 1064
"%s near '%-.80s' at line %d",
#define ER_EMPTY_QUERY 1065
"Query was empty",
#define ER_NONUNIQ_TABLE 1066
"Not unique table/alias: '%-.64s'",
#define ER_INVALID_DEFAULT 1067
"Invalid default value for '%-.64s'",
#define ER_MULTIPLE_PRI_KEY 1068
"Multiple primary key defined",
#define ER_TOO_MANY_KEYS 1069
"Too many keys specified; max %d keys allowed",
#define ER_TOO_MANY_KEY_PARTS 1070
"Too many key parts specified. Max %d parts allowed",
#define ER_TOO_LONG_KEY 1071
"Specified key was too long; max key length is %d bytes",
#define ER_KEY_COLUMN_DOES_NOT_EXITS 1072
"Key column '%-.64s' doesn't exist in table",
#define ER_BLOB_USED_AS_KEY 1073
"BLOB column '%-.64s' can't be used in key specification with the used table type",
#define ER_TOO_BIG_FIELDLENGTH 1074
"Too big column length for column '%-.64s' (max = %d). Use BLOB instead",
#define ER_WRONG_AUTO_KEY 1075
"Incorrect table definition; There can only be one auto column and it must be defined as a key",
#define ER_READY 1076
"%s: ready for connections.\nVersion: '%s' socket: '%s' port: %d\n",
#define ER_NORMAL_SHUTDOWN 1077
"%s: Normal shutdown\n",
#define ER_GOT_SIGNAL 1078
"%s: Got signal %d. Aborting!\n",
#define ER_SHUTDOWN_COMPLETE 1079
"%s: Shutdown Complete\n",
#define ER_FORCING_CLOSE 1080
"%s: Forcing close of thread %ld user: '%-.32s'\n",
#define ER_IPSOCK_ERROR 1081
"Can't create IP socket",
#define ER_NO_SUCH_INDEX 1082
"Table '%-.64s' has no index like the one used in CREATE INDEX. Recreate the table",
#define ER_WRONG_FIELD_TERMINATORS 1083
"Field separator argument is not what is expected. Check the manual",
#define ER_BLOBS_AND_NO_TERMINATED 1084
"You can't use fixed rowlength with BLOBs. Please use 'fields terminated by'",
#define ER_TEXTFILE_NOT_READABLE 1085
"The file '%-.64s' must be in the database directory or be readable by all",
#define ER_FILE_EXISTS_ERROR 1086
"File '%-.80s' already exists",
#define ER_LOAD_INFO 1087
"Records: %ld Deleted: %ld Skipped: %ld Warnings: %ld",
#define ER_ALTER_INFO 1088
"Records: %ld Duplicates: %ld",
#define ER_WRONG_SUB_KEY 1089
"Incorrect sub part key. The used key part isn't a string, the used length is longer than the key part or the storage engine doesn't support unique sub keys",
#define ER_CANT_REMOVE_ALL_FIELDS 1090
"You can't delete all columns with ALTER TABLE. Use DROP TABLE instead",
#define ER_CANT_DROP_FIELD_OR_KEY 1091
"Can't DROP '%-.64s'. Check that column/key exists",
#define ER_INSERT_INFO 1092
"Records: %ld Duplicates: %ld Warnings: %ld",
#define ER_UPDATE_TABLE_USED 1093
"You can't specify target table '%-.64s' for update in FROM clause",
#define ER_NO_SUCH_THREAD 1094
"Unknown thread id: %lu",
#define ER_KILL_DENIED_ERROR 1095
"You are not owner of thread %lu",
#define ER_NO_TABLES_USED 1096
"No tables used",
#define ER_TOO_BIG_SET 1097
"Too many strings for column %-.64s and SET",
#define ER_NO_UNIQUE_LOGFILE 1098
"Can't generate a unique log-filename %-.64s.(1-999)\n",
#define ER_TABLE_NOT_LOCKED_FOR_WRITE 1099
"Table '%-.64s' was locked with a READ lock and can't be updated",
#define ER_TABLE_NOT_LOCKED 1100
"Table '%-.64s' was not locked with LOCK TABLES",
#define ER_BLOB_CANT_HAVE_DEFAULT 1101
"BLOB/TEXT column '%-.64s' can't have a default value",
#define ER_WRONG_DB_NAME 1102
"Incorrect database name '%-.100s'",
#define ER_WRONG_TABLE_NAME 1103
"Incorrect table name '%-.100s'",
#define ER_TOO_BIG_SELECT 1104
"The SELECT would examine more rows than MAX_JOIN_SIZE. Check your WHERE and use SET SQL_BIG_SELECTS=1 or SET SQL_MAX_JOIN_SIZE=# if the SELECT is ok",
#define ER_UNKNOWN_ERROR 1105
"Unknown error",
#define ER_UNKNOWN_PROCEDURE 1106
"Unknown procedure '%-.64s'",
#define ER_WRONG_PARAMCOUNT_TO_PROCEDURE 1107
"Incorrect parameter count to procedure '%-.64s'",
#define ER_WRONG_PARAMETERS_TO_PROCEDURE 1108
"Incorrect parameters to procedure '%-.64s'",
#define ER_UNKNOWN_TABLE 1109
"Unknown table '%-.64s' in %-.32s",
#define ER_FIELD_SPECIFIED_TWICE 1110
"Column '%-.64s' specified twice",
#define ER_INVALID_GROUP_FUNC_USE 1111
"Invalid use of group function",
#define ER_UNSUPPORTED_EXTENSION 1112
"Table '%-.64s' uses an extension that doesn't exist in this MySQL version",
#define ER_TABLE_MUST_HAVE_COLUMNS 1113
"A table must have at least 1 column",
#define ER_RECORD_FILE_FULL 1114
"The table '%-.64s' is full",
#define ER_UNKNOWN_CHARACTER_SET 1115
"Unknown character set: '%-.64s'",
#define ER_TOO_MANY_TABLES 1116
"Too many tables. MySQL can only use %d tables in a join",
#define ER_TOO_MANY_FIELDS 1117
"Too many columns",
#define ER_TOO_BIG_ROWSIZE 1118
"Too big row size. The maximum row size for the used table type, not counting BLOBs, is %ld. You have to change some fields to TEXT or BLOBs",
#define ER_STACK_OVERRUN 1119
"Thread stack overrun: Used: %ld of a %ld stack. Use 'mysqld -O thread_stack=#' to specify a bigger stack if needed",
#define ER_WRONG_OUTER_JOIN 1120
"Cross dependency found in OUTER JOIN. Examine your ON conditions",
#define ER_NULL_COLUMN_IN_INDEX 1121
"Column '%-.64s' is used with UNIQUE or INDEX but is not defined as NOT NULL",
#define ER_CANT_FIND_UDF 1122
"Can't load function '%-.64s'",
#define ER_CANT_INITIALIZE_UDF 1123
"Can't initialize function '%-.64s'; %-.80s",
#define ER_UDF_NO_PATHS 1124
"No paths allowed for shared library",
#define ER_UDF_EXISTS 1125
"Function '%-.64s' already exist",
#define ER_CANT_OPEN_LIBRARY 1126
"Can't open shared library '%-.64s' (errno: %d %-.64s)",
#define ER_CANT_FIND_DL_ENTRY 1127
"Can't find function '%-.64s' in library'",
#define ER_FUNCTION_NOT_DEFINED 1128
"Function '%-.64s' is not defined",
#define ER_HOST_IS_BLOCKED 1129
"Host '%-.64s' is blocked because of many connection errors. Unblock with 'mysqladmin flush-hosts'",
#define ER_HOST_NOT_PRIVILEGED 1130
"Host '%-.64s' is not allowed to connect to this MySQL server",
#define ER_PASSWORD_ANONYMOUS_USER 1131
"You are using MySQL as an anonymous users and anonymous users are not allowed to change passwords",
#define ER_PASSWORD_NOT_ALLOWED 1132
"You must have privileges to update tables in the mysql database to be able to change passwords for others",
#define ER_PASSWORD_NO_MATCH 1133
"Can't find any matching row in the user table",
#define ER_UPDATE_INFO 1134
"Rows matched: %ld Changed: %ld Warnings: %ld",
#define ER_CANT_CREATE_THREAD 1135
"Can't create a new thread (errno %d). If you are not out of available memory, you can consult the manual for a possible OS-dependent bug",
#define ER_WRONG_VALUE_COUNT_ON_ROW 1136
"Column count doesn't match value count at row %ld",
#define ER_CANT_REOPEN_TABLE 1137
"Can't reopen table: '%-.64s'",
#define ER_INVALID_USE_OF_NULL 1138
"Invalid use of NULL value",
#define ER_REGEXP_ERROR 1139
"Got error '%-.64s' from regexp",
#define ER_MIX_OF_GROUP_FUNC_AND_FIELDS 1140
"Mixing of GROUP columns (MIN(),MAX(),COUNT()...) with no GROUP columns is illegal if there is no GROUP BY clause",
#define ER_NONEXISTING_GRANT 1141
"There is no such grant defined for user '%-.32s' on host '%-.64s'",
#define ER_TABLEACCESS_DENIED_ERROR 1142
"%-.16s command denied to user: '%-.32s'@'%-.64s' for table '%-.64s'",
#define ER_COLUMNACCESS_DENIED_ERROR 1143
"%-.16s command denied to user: '%-.32s'@'%-.64s' for column '%-.64s' in table '%-.64s'",
#define ER_ILLEGAL_GRANT_FOR_TABLE 1144
"Illegal GRANT/REVOKE command. Please consult the manual which privileges can be used",
#define ER_GRANT_WRONG_HOST_OR_USER 1145
"The host or user argument to GRANT is too long",
#define ER_NO_SUCH_TABLE 1146
"Table '%-.64s.%-.64s' doesn't exist",
#define ER_NONEXISTING_TABLE_GRANT 1147
"There is no such grant defined for user '%-.32s' on host '%-.64s' on table '%-.64s'",
#define ER_NOT_ALLOWED_COMMAND 1148
"The used command is not allowed with this MySQL version",
#define ER_SYNTAX_ERROR 1149
"You have an error in your SQL syntax. Check the manual that corresponds to your MySQL server version for the right syntax to use",
#define ER_DELAYED_CANT_CHANGE_LOCK 1150
"Delayed insert thread couldn't get requested lock for table %-.64s",
#define ER_TOO_MANY_DELAYED_THREADS 1151
"Too many delayed threads in use",
#define ER_ABORTING_CONNECTION 1152
"Aborted connection %ld to db: '%-.64s' user: '%-.32s' (%-.64s)",
#define ER_NET_PACKET_TOO_LARGE 1153
"Got a packet bigger than 'max_allowed_packet'",
#define ER_NET_READ_ERROR_FROM_PIPE 1154
"Got a read error from the connection pipe",
#define ER_NET_FCNTL_ERROR 1155
"Got an error from fcntl()",
#define ER_NET_PACKETS_OUT_OF_ORDER 1156
"Got packets out of order",
#define ER_NET_UNCOMPRESS_ERROR 1157
"Couldn't uncompress communication packet",
#define ER_NET_READ_ERROR 1158
"Got an error reading communication packets",
#define ER_NET_READ_INTERRUPTED 1159
"Got timeout reading communication packets",
#define ER_NET_ERROR_ON_WRITE 1160
"Got an error writing communication packets",
#define ER_NET_WRITE_INTERRUPTED 1161
"Got timeout writing communication packets",
#define ER_TOO_LONG_STRING 1162
"Result string is longer than max_allowed_packet",
#define ER_TABLE_CANT_HANDLE_BLOB 1163
"The used table type doesn't support BLOB/TEXT columns",
#define ER_TABLE_CANT_HANDLE_AUTO_INCREMENT 1164
"The used table type doesn't support AUTO_INCREMENT columns",
#define ER_DELAYED_INSERT_TABLE_LOCKED 1165
"INSERT DELAYED can't be used with table '%-.64s' because it is locked with LOCK TABLES",
#define ER_WRONG_COLUMN_NAME 1166
"Incorrect column name '%-.100s'",
#define ER_WRONG_KEY_COLUMN 1167
"The used storage engine can't index column '%-.64s'",
#define ER_WRONG_MRG_TABLE 1168
"All tables in the MERGE table are not identically defined",
#define ER_DUP_UNIQUE 1169
"Can't write, because of unique constraint, to table '%-.64s'",
#define ER_BLOB_KEY_WITHOUT_LENGTH 1170
"BLOB/TEXT column '%-.64s' used in key specification without a key length",
#define ER_PRIMARY_CANT_HAVE_NULL 1171
"All parts of a PRIMARY KEY must be NOT NULL; If you need NULL in a key, use UNIQUE instead",
#define ER_TOO_MANY_ROWS 1172
"Result consisted of more than one row",
#define ER_REQUIRES_PRIMARY_KEY 1173
"This table type requires a primary key",
#define ER_NO_RAID_COMPILED 1174
"This version of MySQL is not compiled with RAID support",
#define ER_UPDATE_WITHOUT_KEY_IN_SAFE_MODE 1175
"You are using safe update mode and you tried to update a table without a WHERE that uses a KEY column",
#define ER_KEY_DOES_NOT_EXITS 1176
"Key '%-.64s' doesn't exist in table '%-.64s'",
#define ER_CHECK_NO_SUCH_TABLE 1177
"Can't open table",
#define ER_CHECK_NOT_IMPLEMENTED 1178
"The storage engine for the table doesn't support %s",
#define ER_CANT_DO_THIS_DURING_AN_TRANSACTION 1179
"You are not allowed to execute this command in a transaction",
#define ER_ERROR_DURING_COMMIT 1180
"Got error %d during COMMIT",
#define ER_ERROR_DURING_ROLLBACK 1181
"Got error %d during ROLLBACK",
#define ER_ERROR_DURING_FLUSH_LOGS 1182
"Got error %d during FLUSH_LOGS",
#define ER_ERROR_DURING_CHECKPOINT 1183
"Got error %d during CHECKPOINT",
#define ER_NEW_ABORTING_CONNECTION 1184
"Aborted connection %ld to db: '%-.64s' user: '%-.32s' host: `%-.64s' (%-.64s)",
#define ER_DUMP_NOT_IMPLEMENTED 1185
"The storage engine for the table does not support binary table dump",
#define ER_FLUSH_MASTER_BINLOG_CLOSED 1186
"Binlog closed, cannot RESET MASTER",
#define ER_INDEX_REBUILD 1187
"Failed rebuilding the index of dumped table '%-.64s'",
#define ER_MASTER 1188
"Error from master: '%-.64s'",
#define ER_MASTER_NET_READ 1189
"Net error reading from master",
#define ER_MASTER_NET_WRITE 1190
"Net error writing to master",
#define ER_FT_MATCHING_KEY_NOT_FOUND 1191
"Can't find FULLTEXT index matching the column list",
#define ER_LOCK_OR_ACTIVE_TRANSACTION 1192
"Can't execute the given command because you have active locked tables or an active transaction",
#define ER_UNKNOWN_SYSTEM_VARIABLE 1193
"Unknown system variable '%-.64s'",
#define ER_CRASHED_ON_USAGE 1194
"Table '%-.64s' is marked as crashed and should be repaired",
#define ER_CRASHED_ON_REPAIR 1195
"Table '%-.64s' is marked as crashed and last (automatic?) repair failed",
#define ER_WARNING_NOT_COMPLETE_ROLLBACK 1196
"Some non-transactional changed tables couldn't be rolled back",
#define ER_TRANS_CACHE_FULL 1197
"Multi-statement transaction required more than 'max_binlog_cache_size' bytes of storage. Increase this mysqld variable and try again",
#define ER_SLAVE_MUST_STOP 1198
"This operation cannot be performed with a running slave, run STOP SLAVE first",
#define ER_SLAVE_NOT_RUNNING 1199
"This operation requires a running slave, configure slave and do START SLAVE",
#define ER_BAD_SLAVE 1200
"The server is not configured as slave, fix in config file or with CHANGE MASTER TO",
#define ER_MASTER_INFO 1201
"Could not initialize master info structure, more error messages can be found in the MySQL error log",
#define ER_SLAVE_THREAD 1202
"Could not create slave thread, check system resources",
#define ER_TOO_MANY_USER_CONNECTIONS 1203
"User %-.64s has already more than 'max_user_connections' active connections",
#define ER_SET_CONSTANTS_ONLY 1204
"You may only use constant expressions with SET",
#define ER_LOCK_WAIT_TIMEOUT 1205
"Lock wait timeout exceeded; Try restarting transaction",
#define ER_LOCK_TABLE_FULL 1206
"The total number of locks exceeds the lock table size",
#define ER_READ_ONLY_TRANSACTION 1207
"Update locks cannot be acquired during a READ UNCOMMITTED transaction",
#define ER_DROP_DB_WITH_READ_LOCK 1208
"DROP DATABASE not allowed while thread is holding global read lock",
#define ER_CREATE_DB_WITH_READ_LOCK 1209
"CREATE DATABASE not allowed while thread is holding global read lock",
#define ER_WRONG_ARGUMENTS 1210
"Wrong arguments to %s",
#define ER_NO_PERMISSION_TO_CREATE_USER 1211
"'%-.32s'@'%-.64s' is not allowed to create new users",
#define ER_UNION_TABLES_IN_DIFFERENT_DIR 1212
"Incorrect table definition; all MERGE tables must be in the same database",
#define ER_LOCK_DEADLOCK 1213
"Deadlock found when trying to get lock; Try restarting transaction",
#define ER_TABLE_CANT_HANDLE_FT 1214
"The used table type doesn't support FULLTEXT indexes",
#define ER_CANNOT_ADD_FOREIGN 1215
"Cannot add foreign key constraint",
#define ER_NO_REFERENCED_ROW 1216
"Cannot add or update a child row: a foreign key constraint fails",
#define ER_ROW_IS_REFERENCED 1217
"Cannot delete or update a parent row: a foreign key constraint fails",
#define ER_CONNECT_TO_MASTER 1218
"Error connecting to master: %-.128s",
#define ER_QUERY_ON_MASTER 1219
"Error running query on master: %-.128s",
#define ER_ERROR_WHEN_EXECUTING_COMMAND 1220
"Error when executing command %s: %-.128s",
#define ER_WRONG_USAGE 1221
"Wrong usage of %s and %s",
#define ER_WRONG_NUMBER_OF_COLUMNS_IN_SELECT 1222
"The used SELECT statements have a different number of columns",
#define ER_CANT_UPDATE_WITH_READLOCK 1223
"Can't execute the query because you have a conflicting read lock",
#define ER_MIXING_NOT_ALLOWED 1224
"Mixing of transactional and non-transactional tables is disabled",
#define ER_DUP_ARGUMENT 1225
"Option '%s' used twice in statement",
#define ER_USER_LIMIT_REACHED 1226
"User '%-.64s' has exceeded the '%s' resource (current value: %ld)",
#define ER_SPECIFIC_ACCESS_DENIED_ERROR 1227
"Access denied. You need the %-.128s privilege for this operation",
#define ER_LOCAL_VARIABLE 1228
"Variable '%-.64s' is a SESSION variable and can't be used with SET GLOBAL",
#define ER_GLOBAL_VARIABLE 1229
"Variable '%-.64s' is a GLOBAL variable and should be set with SET GLOBAL",
#define ER_NO_DEFAULT 1230
"Variable '%-.64s' doesn't have a default value",
#define ER_WRONG_VALUE_FOR_VAR 1231
"Variable '%-.64s' can't be set to the value of '%-.64s'",
#define ER_WRONG_TYPE_FOR_VAR 1232
"Wrong argument type to variable '%-.64s'",
#define ER_VAR_CANT_BE_READ 1233
"Variable '%-.64s' can only be set, not read",
#define ER_CANT_USE_OPTION_HERE 1234
"Wrong usage/placement of '%s'",
#define 1235
"This version of MySQL doesn't yet support '%s'",
#define ER_MASTER_FATAL_ERROR_READING_BINLOG 1236
"Got fatal error %d: '%-.128s' from master when reading data from binary log",
#define ER_SLAVE_IGNORED_TABLE 1237
"Slave SQL thread ignored the query because of replicate-*-table rules",
#define ER_INCORRECT_GLOBAL_LOCAL_VAR 1238
"Variable '%-.64s' is a %s variable",
#define ER_WRONG_FK_DEF 1239
"Wrong foreign key definition for '%-.64s': %s",
#define ER_KEY_REF_DO_NOT_MATCH_TABLE_REF 1240
"Key reference and table reference doesn't match",
#define ER_OPERAND_COLUMNS 1241
"Operand should contain %d column(s)",
#define ER_SUBQUERY_NO_1_ROW 1242
"Subquery returns more than 1 row",
#define ER_UNKNOWN_STMT_HANDLER 1243
"Unknown prepared statement handler (%ld) given to %s",
#define ER_CORRUPT_HELP_DB 1244
"Help database is corrupt or does not exist",
#define ER_CYCLIC_REFERENCE 1245
"Cyclic reference on subqueries",
#define ER_AUTO_CONVERT 1246
"Converting column '%s' from %s to %s",
#define ER_ILLEGAL_REFERENCE 1247
"Reference '%-.64s' not supported (%s)",
#define ER_DERIVED_MUST_HAVE_ALIAS 1248
"Every derived table must have it's own alias",
#define ER_SELECT_REDUCED 1249
"Select %u was reduced during optimisation",
#define ER_TABLENAME_NOT_ALLOWED_HERE 1250
"Table '%-.64s' from one of SELECT's can not be used in %-.32s",
#define ER_NOT_SUPPORTED_AUTH_MODE 1251
"Client does not support authentication protocol requested by server; consider upgrading MySQL client",
#define ER_SPATIAL_CANT_HAVE_NULL 1252
"All parts of a SPATIAL KEY must be NOT NULL",
#define ER_COLLATION_CHARSET_MISMATCH 1253
"COLLATION '%s' is not valid for CHARACTER SET '%s'",
#define ER_SLAVE_WAS_RUNNING 1254
"Slave is already running",
#define ER_SLAVE_WAS_NOT_RUNNING 1255
"Slave has already been stopped",
#define ER_TOO_BIG_FOR_UNCOMPRESS 1256
"Too big size of uncompressed data. The maximum size is %d. (probably, length of uncompressed data was corrupted)",
#define ER_ZLIB_Z_MEM_ERROR 1257
"ZLIB: Not enough memory",
#define ER_ZLIB_Z_BUF_ERROR 1258
"ZLIB: Not enough room in the output buffer (probably, length of uncompressed data was corrupted)",
#define ER_ZLIB_Z_DATA_ERROR 1259
"ZLIB: Input data corrupted",
#define ER_CUT_VALUE_GROUP_CONCAT 1260
"%d line(s) was(were) cut by group_concat()",
#define ER_WARN_TOO_FEW_RECORDS 1261
"Row %ld doesn't contain data for all columns",
#define ER_WARN_TOO_MANY_RECORDS 1262
"Row %ld was truncated; It contained more data than there were input columns",
#define ER_WARN_NULL_TO_NOTNULL 1263
"Data truncated, NULL supplied to NOT NULL column '%s' at row %ld",
#define ER_WARN_DATA_OUT_OF_RANGE 1264
"Data truncated, out of range for column '%s' at row %ld",
#define ER_WARN_DATA_TRUNCATED 1265
"Data truncated for column '%s' at row %ld",
#define ER_WARN_USING_OTHER_HANDLER 1266
"Using storage engine %s for table '%s'",
#define ER_CANT_AGGREGATE_2COLLATIONS 1267
"Illegal mix of collations (%s,%s) and (%s,%s) for operation '%s'",
#define ER_HANDLE_USER 1268
"Operation %s failed for %d of the requested users",
#define ER_REVOKE_GRANTS 1269
"Can't revoke all privileges, grant for one or more of the requested users",
#define ER_CANT_AGGREGATE_3COLLATIONS 1270
"Illegal mix of collations (%s,%s), (%s,%s), (%s,%s) for operation '%s'",
#define ER_CANT_AGGREGATE_NCOLLATIONS 1271
"Illegal mix of collations for operation '%s'",
#define ER_VARIABLE_IS_NOT_STRUCT 1272
"Variable '%-.64s' is not a variable component (Can't be used as XXXX.variable_name)",
#define ER_UNKNOWN_COLLATION 1273
"Unknown collation: '%-.64s'",
#define ER_SLAVE_IGNORED_SSL_PARAMS 1274
"SSL parameters in CHANGE MASTER are ignored because this MySQL slave was compiled without SSL support; they can be used later when MySQL slave with SSL will be started",
#define ER_SERVER_IS_IN_SECURE_AUTH_MODE 1275
"Server is running in --secure-auth mode, but '%s'@'%s' has a password in the old format; please change the password to the new format",
#define ER_WARN_FIELD_RESOLVED 1276
"Field or reference '%-.64s%s%-.64s%s%-.64s' of SELECT #%d was resolved in SELECT #%d",
#define ER_BAD_SLAVE_UNTIL_COND 1277
"Wrong parameter or combination of parameters for START SLAVE UNTIL",
#define ER_MISSING_SKIP_SLAVE 1278
"It is recommended to use --skip-slave-start when doing step-by-step replication with START SLAVE UNTIL. Otherwise you will get problems if you get an unexpected slave's mysqld restart",
#define ER_UNTIL_COND_IGNORED 1279
"SQL thread is not to be started so UNTIL options are ignored",
#define ER_WRONG_NAME_FOR_INDEX 1280
"Incorrect index name '%-.100s'",
#define ER_WRONG_NAME_FOR_CATALOG 1281
"Incorrect catalog name '%-.100s'",
#define ER_WARN_QC_RESIZE 1282
"Query cache failed to set size %lu, new query cache size is %lu",
#define ER_BAD_FT_COLUMN 1283
"Column '%-.64s' cannot be part of FULLTEXT index",
#define ER_UNKNOWN_KEY_CACHE 1284
"Unknown key cache '%-.100s'",
#define ER_WARN_HOSTNAME_WONT_WORK 1285
"MySQL is started in --skip-name-resolve mode. You need to restart it without this switch for this grant to work",
#define ER_UNKNOWN_STORAGE_ENGINE 1286
"Unknown table engine '%s'",
#define ER_WARN_DEPRECATED_SYNTAX 1287
"'%s' is deprecated, use '%s' instead",
#define ER_NON_UPDATABLE_TABLE 1288
"The target table %-.100s of the %s is not updatable",
#define ER_FEATURE_DISABLED 1289
"The '%s' feature was disabled; you need MySQL built with '%s' to have it working",
#define ER_OPTION_PREVENTS_STATEMENT 1290
"The MySQL server is running with the %s option so it cannot execute this statement",
#define ER_DUPLICATED_VALUE_IN_TYPE 1291
"Column '%-.100s' has duplicated value '%-.64s' in %s"
#define ER_TRUNCATED_WRONG_VALUE 1292
"Truncated wrong %-.32s value: '%-.128s'"
#define ER_TOO_MUCH_AUTO_TIMESTAMP_COLS 1293
"Incorrect table definition; There can only be one TIMESTAMP column with CURRENT_TIMESTAMP in DEFAULT or ON UPDATE clause"
#define ER_INVALID_ON_UPDATE 1294
"Invalid ON UPDATE clause for '%-.64s' field",
#define ER_UNSUPPORTED_PS 1295
"This command is not supported in the prepared statement protocol yet",
#define ER_CANT_CREATE_USER_WITH_GRANT 1296
"You are not allowed to create a user with GRANT"

View File

@ -1,14 +0,0 @@
@c This is a placeholder file for the autogenerated MySQL reserved
@c word list "reservedwords.texi", which is being included in
@c manual.texi when building the manual.
@c
@c This file will be replaced with the actual reserved word list
@c from the "mysqldoc" BK source tree when building the official
@c source distribution.
@c
@c Please note, that the manual is now maintained in a separate
@c "mysqldoc" BitKeeper tree! See
@c
@c http://www.mysql.com/doc/en/Installing_source_tree.html
@c
@c for more info on how to work with the MySQL BK source trees.

View File

@ -147,6 +147,10 @@ SOURCE="..\strings\ctype-bin.c"
# End Source File # End Source File
# Begin Source File # Begin Source File
SOURCE="..\strings\ctype-cp932.c"
# End Source File
# Begin Source File
SOURCE="..\strings\ctype-czech.c" SOURCE="..\strings\ctype-czech.c"
# End Source File # End Source File
# Begin Source File # Begin Source File
@ -155,6 +159,10 @@ SOURCE="..\strings\ctype-euc_kr.c"
# End Source File # End Source File
# Begin Source File # Begin Source File
SOURCE="..\strings\ctype-eucjpms.c"
# End Source File
# Begin Source File
SOURCE="..\strings\ctype-extra.c" SOURCE="..\strings\ctype-extra.c"
# End Source File # End Source File
# Begin Source File # Begin Source File

View File

@ -147,6 +147,10 @@ SOURCE="..\strings\ctype-bin.c"
# End Source File # End Source File
# Begin Source File # Begin Source File
SOURCE="..\strings\ctype-cp932.c"
# End Source File
# Begin Source File
SOURCE="..\strings\ctype-czech.c" SOURCE="..\strings\ctype-czech.c"
# End Source File # End Source File
# Begin Source File # Begin Source File
@ -155,6 +159,10 @@ SOURCE="..\strings\ctype-euc_kr.c"
# End Source File # End Source File
# Begin Source File # Begin Source File
SOURCE="..\strings\ctype-eucjpms.c"
# End Source File
# Begin Source File
SOURCE="..\strings\ctype-extra.c" SOURCE="..\strings\ctype-extra.c"
# End Source File # End Source File
# Begin Source File # Begin Source File

View File

@ -139,6 +139,10 @@ SOURCE="..\strings\ctype-bin.c"
# End Source File # End Source File
# Begin Source File # Begin Source File
SOURCE="..\strings\ctype-cp932.c"
# End Source File
# Begin Source File
SOURCE="..\strings\ctype-czech.c" SOURCE="..\strings\ctype-czech.c"
# End Source File # End Source File
# Begin Source File # Begin Source File
@ -147,6 +151,10 @@ SOURCE="..\strings\ctype-euc_kr.c"
# End Source File # End Source File
# Begin Source File # Begin Source File
SOURCE="..\strings\ctype-eucjpms.c"
# End Source File
# Begin Source File
SOURCE="..\strings\ctype-extra.c" SOURCE="..\strings\ctype-extra.c"
# End Source File # End Source File
# Begin Source File # Begin Source File

View File

@ -138,6 +138,10 @@ SOURCE="..\strings\ctype-bin.c"
# End Source File # End Source File
# Begin Source File # Begin Source File
SOURCE="..\strings\ctype-cp932.c"
# End Source File
# Begin Source File
SOURCE="..\strings\ctype-czech.c" SOURCE="..\strings\ctype-czech.c"
# End Source File # End Source File
# Begin Source File # Begin Source File
@ -146,6 +150,10 @@ SOURCE="..\strings\ctype-euc_kr.c"
# End Source File # End Source File
# Begin Source File # Begin Source File
SOURCE="..\strings\ctype-eucjpms.c"
# End Source File
# Begin Source File
SOURCE="..\strings\ctype-extra.c" SOURCE="..\strings\ctype-extra.c"
# End Source File # End Source File
# Begin Source File # Begin Source File

View File

@ -58,7 +58,7 @@ BSC32=bscmake.exe
# ADD BSC32 /nologo # ADD BSC32 /nologo
LINK32=xilink6.exe LINK32=xilink6.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:console /machine:I386 # 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:console /machine:I386
# 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\mysys.lib ..\lib_release\strings.lib ..\lib_release\regex.lib ..\lib_release\heap.lib /nologo /subsystem:console /pdb:none /machine:I386 /out:"../client_release/mysqld-opt.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\mysys.lib ..\lib_release\strings.lib ..\lib_release\regex.lib ..\lib_release\heap.lib /nologo /subsystem:console /pdb:none /machine:I386 /out:"../client_release/mysqld.exe"
# SUBTRACT LINK32 /debug # SUBTRACT LINK32 /debug
!ELSEIF "$(CFG)" == "mysqld - Win32 Debug" !ELSEIF "$(CFG)" == "mysqld - Win32 Debug"
@ -84,7 +84,7 @@ BSC32=bscmake.exe
# ADD BSC32 /nologo # ADD BSC32 /nologo
LINK32=xilink6.exe LINK32=xilink6.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:console /debug /machine:I386 /pdbtype:sept # 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:console /debug /machine:I386 /pdbtype:sept
# 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_debug\dbug.lib ..\lib_debug\vio.lib ..\lib_debug\mysys.lib ..\lib_debug\strings.lib ..\lib_debug\regex.lib ..\lib_debug\heap.lib ..\lib_debug\bdb.lib ..\lib_debug\innodb.lib /nologo /subsystem:console /incremental:no /debug /machine:I386 /out:"../client_debug/mysqld.exe" /pdbtype:sept # 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_debug\dbug.lib ..\lib_debug\vio.lib ..\lib_debug\mysys.lib ..\lib_debug\strings.lib ..\lib_debug\regex.lib ..\lib_debug\heap.lib ..\lib_debug\bdb.lib ..\lib_debug\innodb.lib /nologo /subsystem:console /incremental:no /debug /machine:I386 /out:"../client_debug/mysqld-debug.exe" /pdbtype:sept
!ELSEIF "$(CFG)" == "mysqld - Win32 nt" !ELSEIF "$(CFG)" == "mysqld - Win32 nt"

View File

@ -113,10 +113,18 @@ SOURCE=".\ctype-bin.c"
# End Source File # End Source File
# Begin Source File # Begin Source File
SOURCE=".\ctype-cp932.c"
# End Source File
# Begin Source File
SOURCE=".\ctype-czech.c" SOURCE=".\ctype-czech.c"
# End Source File # End Source File
# Begin Source File # Begin Source File
SOURCE=".\ctype-eucjpms.c"
# End Source File
# Begin Source File
SOURCE=".\ctype-euc_kr.c" SOURCE=".\ctype-euc_kr.c"
# End Source File # End Source File
# Begin Source File # Begin Source File

View File

@ -112,6 +112,10 @@ SOURCE=".\ctype-bin.c"
# End Source File # End Source File
# Begin Source File # Begin Source File
SOURCE=".\ctype-cp932.c"
# End Source File
# Begin Source File
SOURCE=".\ctype-czech.c" SOURCE=".\ctype-czech.c"
# End Source File # End Source File
# Begin Source File # Begin Source File
@ -120,6 +124,10 @@ SOURCE=".\ctype-euc_kr.c"
# End Source File # End Source File
# Begin Source File # Begin Source File
SOURCE=".\ctype-eucjpms.c"
# End Source File
# Begin Source File
SOURCE=".\ctype-extra.c" SOURCE=".\ctype-extra.c"
# End Source File # End Source File
# Begin Source File # Begin Source File

View File

@ -145,7 +145,7 @@ typedef struct st_mysql {
unsigned long thread_id; /* Id for connection in server */ unsigned long thread_id; /* Id for connection in server */
my_ulonglong affected_rows; my_ulonglong affected_rows;
my_ulonglong insert_id; /* id if insert on table with NEXTNR */ my_ulonglong insert_id; /* id if insert on table with NEXTNR */
my_ulonglong extra_info; /* Used by mysqlshow */ my_ulonglong extra_info; /* Not used */
unsigned long packet_length; unsigned long packet_length;
enum mysql_status status; enum mysql_status status;
MYSQL_FIELD *fields; MYSQL_FIELD *fields;

View File

@ -23,7 +23,8 @@ LIBS = @CLIENT_LIBS@
LDADD= @CLIENT_EXTRA_LDFLAGS@ \ LDADD= @CLIENT_EXTRA_LDFLAGS@ \
$(top_builddir)/libmysql/libmysqlclient.la $(top_builddir)/libmysql/libmysqlclient.la
bin_PROGRAMS = mysql mysqladmin mysqlcheck mysqlshow \ bin_PROGRAMS = mysql mysqladmin mysqlcheck mysqlshow \
mysqldump mysqlimport mysqltest mysqlbinlog mysqlmanagerc mysqlmanager-pwgen mysqldump mysqlimport mysqltest mysqlbinlog \
mysqltestmanagerc mysqltestmanager-pwgen
noinst_HEADERS = sql_string.h completion_hash.h my_readline.h \ noinst_HEADERS = sql_string.h completion_hash.h my_readline.h \
client_priv.h client_priv.h
mysql_SOURCES = mysql.cc readline.cc sql_string.cc completion_hash.cc mysql_SOURCES = mysql.cc readline.cc sql_string.cc completion_hash.cc
@ -33,7 +34,8 @@ mysqlbinlog_LDADD = $(LDADD) $(CXXLDFLAGS)
mysqltest_SOURCES= mysqltest.c $(top_srcdir)/mysys/my_getsystime.c mysqltest_SOURCES= mysqltest.c $(top_srcdir)/mysys/my_getsystime.c
mysqltest_LDADD = $(top_builddir)/regex/libregex.a $(LDADD) mysqltest_LDADD = $(top_builddir)/regex/libregex.a $(LDADD)
mysqlbinlog_SOURCES = mysqlbinlog.cc $(top_srcdir)/mysys/mf_tempdir.c mysqlbinlog_SOURCES = mysqlbinlog.cc $(top_srcdir)/mysys/mf_tempdir.c
mysqlmanagerc_SOURCES = mysqlmanagerc.c mysqltestmanagerc_SOURCES = mysqlmanagerc.c
mysqltestmanager_pwgen_SOURCES = mysqlmanager-pwgen.c
sql_src=log_event.h mysql_priv.h log_event.cc my_decimal.h my_decimal.cc sql_src=log_event.h mysql_priv.h log_event.cc my_decimal.h my_decimal.cc
strings_src=decimal.c strings_src=decimal.c

View File

@ -566,6 +566,7 @@ static void print_result()
my_bool found_error=0; my_bool found_error=0;
res = mysql_use_result(sock); res = mysql_use_result(sock);
prev[0] = '\0'; prev[0] = '\0';
for (i = 0; (row = mysql_fetch_row(res)); i++) for (i = 0; (row = mysql_fetch_row(res)); i++)
{ {
@ -595,7 +596,7 @@ static void print_result()
putchar('\n'); putchar('\n');
} }
if (found_error && opt_auto_repair && what_to_do != DO_REPAIR && if (found_error && opt_auto_repair && what_to_do != DO_REPAIR &&
(!opt_fast || strcmp(row[3],"OK"))) !opt_fast)
insert_dynamic(&tables4repair, prev); insert_dynamic(&tables4repair, prev);
mysql_free_result(res); mysql_free_result(res);
} }

View File

@ -37,7 +37,7 @@
** 10 Jun 2003: SET NAMES and --no-set-names by Alexander Barkov ** 10 Jun 2003: SET NAMES and --no-set-names by Alexander Barkov
*/ */
#define DUMP_VERSION "10.9" #define DUMP_VERSION "10.10"
#include <my_global.h> #include <my_global.h>
#include <my_sys.h> #include <my_sys.h>
@ -396,7 +396,7 @@ static int dump_all_databases();
static char *quote_name(const char *name, char *buff, my_bool force); static char *quote_name(const char *name, char *buff, my_bool force);
static const char *check_if_ignore_table(const char *table_name); static const char *check_if_ignore_table(const char *table_name);
static char *primary_key_fields(const char *table_name); static char *primary_key_fields(const char *table_name);
static my_bool getViewStructure(char *table, char* db); static my_bool get_view_structure(char *table, char* db);
static my_bool dump_all_views_in_db(char *database); static my_bool dump_all_views_in_db(char *database);
#include <help_start.h> #include <help_start.h>
@ -777,16 +777,16 @@ static int get_options(int *argc, char ***argv)
/* /*
** DBerror -- prints mysql error message and exits the program. ** DB_error -- prints mysql error message and exits the program.
*/ */
static void DBerror(MYSQL *mysql, const char *when) static void DB_error(MYSQL *mysql, const char *when)
{ {
DBUG_ENTER("DBerror"); DBUG_ENTER("DB_error");
my_printf_error(0,"Got error: %d: %s %s", MYF(0), my_printf_error(0,"Got error: %d: %s %s", MYF(0),
mysql_errno(mysql), mysql_error(mysql), when); mysql_errno(mysql), mysql_error(mysql), when);
safe_exit(EX_MYSQLERR); safe_exit(EX_MYSQLERR);
DBUG_VOID_RETURN; DBUG_VOID_RETURN;
} /* DBerror */ } /* DB_error */
/* /*
@ -862,7 +862,7 @@ static int dbConnect(char *host, char *user,char *passwd)
NULL,opt_mysql_port,opt_mysql_unix_port, NULL,opt_mysql_port,opt_mysql_unix_port,
0))) 0)))
{ {
DBerror(&mysql_connection, "when trying to connect"); DB_error(&mysql_connection, "when trying to connect");
return 1; return 1;
} }
/* /*
@ -1093,7 +1093,7 @@ static void print_xml_row(FILE *xml_file, const char *row_name,
number of fields in table, 0 if error number of fields in table, 0 if error
*/ */
static uint getTableStructure(char *table, char *db) static uint get_table_structure(char *table, char *db)
{ {
MYSQL_RES *tableRes; MYSQL_RES *tableRes;
MYSQL_ROW row; MYSQL_ROW row;
@ -1104,7 +1104,7 @@ static uint getTableStructure(char *table, char *db)
char name_buff[NAME_LEN+3],table_buff[NAME_LEN*2+3]; char name_buff[NAME_LEN+3],table_buff[NAME_LEN*2+3];
char table_buff2[NAME_LEN*2+3]; char table_buff2[NAME_LEN*2+3];
FILE *sql_file = md_result_file; FILE *sql_file = md_result_file;
DBUG_ENTER("getTableStructure"); DBUG_ENTER("get_table_structure");
delayed= opt_delayed ? " DELAYED " : ""; delayed= opt_delayed ? " DELAYED " : "";
@ -1457,7 +1457,7 @@ continue_xml:
my_fclose(sql_file, MYF(MY_WME)); my_fclose(sql_file, MYF(MY_WME));
} }
DBUG_RETURN(numFields); DBUG_RETURN(numFields);
} /* getTableStructure */ } /* get_table_structure */
static char *add_load_option(char *ptr,const char *object, static char *add_load_option(char *ptr,const char *object,
@ -1523,10 +1523,12 @@ static char *alloc_query_str(ulong size)
return query; return query;
} }
/* /*
** dumpTable saves database contents as a series of INSERT statements. ** dump_table saves database contents as a series of INSERT statements.
*/ */
static void dumpTable(uint numFields, char *table)
static void dump_table(uint numFields, char *table)
{ {
char query_buf[QUERY_LENGTH], *end, buff[256],table_buff[NAME_LEN+3]; char query_buf[QUERY_LENGTH], *end, buff[256],table_buff[NAME_LEN+3];
char *result_table, table_buff2[NAME_LEN*2+3], *opt_quoted_table; char *result_table, table_buff2[NAME_LEN*2+3], *opt_quoted_table;
@ -1592,7 +1594,7 @@ static void dumpTable(uint numFields, char *table)
} }
if (mysql_real_query(sock, query, (uint) (end - query))) if (mysql_real_query(sock, query, (uint) (end - query)))
{ {
DBerror(sock, "when executing 'SELECT INTO OUTFILE'"); DB_error(sock, "when executing 'SELECT INTO OUTFILE'");
return; return;
} }
} }
@ -1639,13 +1641,13 @@ static void dumpTable(uint numFields, char *table)
check_io(md_result_file); check_io(md_result_file);
} }
if (mysql_query_with_error_report(sock, 0, query)) if (mysql_query_with_error_report(sock, 0, query))
DBerror(sock, "when retrieving data from server"); DB_error(sock, "when retrieving data from server");
if (quick) if (quick)
res=mysql_use_result(sock); res=mysql_use_result(sock);
else else
res=mysql_store_result(sock); res=mysql_store_result(sock);
if (!res) if (!res)
DBerror(sock, "when retrieving data from server"); DB_error(sock, "when retrieving data from server");
if (verbose) if (verbose)
fprintf(stderr, "-- Retrieving rows...\n"); fprintf(stderr, "-- Retrieving rows...\n");
if (mysql_num_fields(res) != numFields) if (mysql_num_fields(res) != numFields)
@ -1946,7 +1948,7 @@ err:
my_free(query, MYF(MY_ALLOW_ZERO_PTR)); my_free(query, MYF(MY_ALLOW_ZERO_PTR));
safe_exit(error); safe_exit(error);
return; return;
} /* dumpTable */ } /* dump_table */
static char *getTableName(int reset) static char *getTableName(int reset)
@ -2035,7 +2037,7 @@ static int init_dumping(char *database)
if (mysql_select_db(sock, database)) if (mysql_select_db(sock, database))
{ {
DBerror(sock, "when selecting the database"); DB_error(sock, "when selecting the database");
return 1; /* If --force */ return 1; /* If --force */
} }
if (!path && !opt_xml) if (!path && !opt_xml)
@ -2123,14 +2125,14 @@ static int dump_all_tables_in_db(char *database)
dynstr_append(&query, " READ /*!32311 LOCAL */,"); dynstr_append(&query, " READ /*!32311 LOCAL */,");
} }
if (numrows && mysql_real_query(sock, query.str, query.length-1)) if (numrows && mysql_real_query(sock, query.str, query.length-1))
DBerror(sock, "when using LOCK TABLES"); DB_error(sock, "when using LOCK TABLES");
/* We shall continue here, if --force was given */ /* We shall continue here, if --force was given */
dynstr_free(&query); dynstr_free(&query);
} }
if (flush_logs) if (flush_logs)
{ {
if (mysql_refresh(sock, REFRESH_LOG)) if (mysql_refresh(sock, REFRESH_LOG))
DBerror(sock, "when doing refresh"); DB_error(sock, "when doing refresh");
/* We shall continue here, if --force was given */ /* We shall continue here, if --force was given */
} }
while ((table= getTableName(0))) while ((table= getTableName(0)))
@ -2138,9 +2140,9 @@ static int dump_all_tables_in_db(char *database)
char *end= strmov(afterdot, table); char *end= strmov(afterdot, table);
if (include_table(hash_key, end - hash_key)) if (include_table(hash_key, end - hash_key))
{ {
numrows = getTableStructure(table, database); numrows = get_table_structure(table, database);
if (!dFlag && numrows > 0) if (!dFlag && numrows > 0)
dumpTable(numrows,table); dump_table(numrows,table);
my_free(order_by, MYF(MY_ALLOW_ZERO_PTR)); my_free(order_by, MYF(MY_ALLOW_ZERO_PTR));
order_by= 0; order_by= 0;
} }
@ -2188,18 +2190,18 @@ static my_bool dump_all_views_in_db(char *database)
dynstr_append(&query, " READ /*!32311 LOCAL */,"); dynstr_append(&query, " READ /*!32311 LOCAL */,");
} }
if (numrows && mysql_real_query(sock, query.str, query.length-1)) if (numrows && mysql_real_query(sock, query.str, query.length-1))
DBerror(sock, "when using LOCK TABLES"); DB_error(sock, "when using LOCK TABLES");
/* We shall continue here, if --force was given */ /* We shall continue here, if --force was given */
dynstr_free(&query); dynstr_free(&query);
} }
if (flush_logs) if (flush_logs)
{ {
if (mysql_refresh(sock, REFRESH_LOG)) if (mysql_refresh(sock, REFRESH_LOG))
DBerror(sock, "when doing refresh"); DB_error(sock, "when doing refresh");
/* We shall continue here, if --force was given */ /* We shall continue here, if --force was given */
} }
while ((table= getTableName(0))) while ((table= getTableName(0)))
getViewStructure(table, database); get_view_structure(table, database);
if (opt_xml) if (opt_xml)
{ {
fputs("</database>\n", md_result_file); fputs("</database>\n", md_result_file);
@ -2226,7 +2228,7 @@ static int get_actual_table_name(const char *old_table_name,
int buf_size) int buf_size)
{ {
int retval; int retval;
MYSQL_RES *tableRes; MYSQL_RES *table_res;
MYSQL_ROW row; MYSQL_ROW row;
char query[50 + 2*NAME_LEN]; char query[50 + 2*NAME_LEN];
char show_name_buff[FN_REFLEN]; char show_name_buff[FN_REFLEN];
@ -2242,18 +2244,22 @@ static int get_actual_table_name(const char *old_table_name,
safe_exit(EX_MYSQLERR); safe_exit(EX_MYSQLERR);
} }
tableRes= mysql_store_result( sock );
retval = 1; retval = 1;
if (tableRes != NULL)
if ((table_res= mysql_store_result(sock)))
{ {
my_ulonglong numRows = mysql_num_rows(tableRes); my_ulonglong num_rows= mysql_num_rows(table_res);
if (numRows > 0) if (num_rows > 0)
{ {
row= mysql_fetch_row( tableRes ); /*
strmake(new_table_name, row[0], buf_size-1); Return first row
retval = 0; TODO: Return all matching rows
} */
mysql_free_result(tableRes); row= mysql_fetch_row(table_res);
strmake(new_table_name, row[0], buf_size-1);
retval= 0;
}
mysql_free_result(table_res);
} }
return retval; return retval;
} }
@ -2278,37 +2284,36 @@ static int dump_selected_tables(char *db, char **table_names, int tables)
dynstr_append(&query, " READ /*!32311 LOCAL */,"); dynstr_append(&query, " READ /*!32311 LOCAL */,");
} }
if (mysql_real_query(sock, query.str, query.length-1)) if (mysql_real_query(sock, query.str, query.length-1))
DBerror(sock, "when doing LOCK TABLES"); DB_error(sock, "when doing LOCK TABLES");
/* We shall countinue here, if --force was given */ /* We shall countinue here, if --force was given */
dynstr_free(&query); dynstr_free(&query);
} }
if (flush_logs) if (flush_logs)
{ {
if (mysql_refresh(sock, REFRESH_LOG)) if (mysql_refresh(sock, REFRESH_LOG))
DBerror(sock, "when doing refresh"); DB_error(sock, "when doing refresh");
/* We shall countinue here, if --force was given */ /* We shall countinue here, if --force was given */
} }
if (opt_xml) if (opt_xml)
print_xml_tag1(md_result_file, "", "database name=", db, "\n"); print_xml_tag1(md_result_file, "", "database name=", db, "\n");
for (i=0 ; i < tables ; i++) for (i=0 ; i < tables ; i++)
{ {
char new_table_name[NAME_LEN]; char new_table_name[NAME_LEN];
/* the table name passed on commandline may be wrong case */ /* the table name passed on commandline may be wrong case */
if (!get_actual_table_name( table_names[i], new_table_name, sizeof(new_table_name) )) if (!get_actual_table_name( table_names[i], new_table_name,
{ sizeof(new_table_name)))
{
numrows = getTableStructure(new_table_name, db); numrows= get_table_structure(new_table_name, db);
dump_table(numrows, new_table_name);
dumpTable(numrows, new_table_name); }
}
my_free(order_by, MYF(MY_ALLOW_ZERO_PTR)); my_free(order_by, MYF(MY_ALLOW_ZERO_PTR));
order_by= 0; order_by= 0;
} }
if (was_views) if (was_views)
{ {
for (i=0 ; i < tables ; i++) for (i=0 ; i < tables ; i++)
getViewStructure(table_names[i], db); get_view_structure(table_names[i], db);
} }
if (opt_xml) if (opt_xml)
{ {
@ -2613,7 +2618,7 @@ cleanup:
Getting VIEW structure Getting VIEW structure
SYNOPSIS SYNOPSIS
getViewStructure() get_view_structure()
table view name table view name
db db name db db name
@ -2622,9 +2627,9 @@ cleanup:
1 ERROR 1 ERROR
*/ */
static my_bool getViewStructure(char *table, char* db) static my_bool get_view_structure(char *table, char* db)
{ {
MYSQL_RES *tableRes; MYSQL_RES *table_res;
MYSQL_ROW row; MYSQL_ROW row;
MYSQL_FIELD *field; MYSQL_FIELD *field;
char *result_table, *opt_quoted_table; char *result_table, *opt_quoted_table;
@ -2632,7 +2637,7 @@ static my_bool getViewStructure(char *table, char* db)
char table_buff2[NAME_LEN*2+3]; char table_buff2[NAME_LEN*2+3];
char buff[20+FN_REFLEN]; char buff[20+FN_REFLEN];
FILE *sql_file = md_result_file; FILE *sql_file = md_result_file;
DBUG_ENTER("getViewStructure"); DBUG_ENTER("get_view_structure");
if (tFlag) if (tFlag)
DBUG_RETURN(0); DBUG_RETURN(0);
@ -2667,8 +2672,8 @@ static my_bool getViewStructure(char *table, char* db)
} }
write_header(sql_file, db); write_header(sql_file, db);
} }
tableRes= mysql_store_result(sock); table_res= mysql_store_result(sock);
field= mysql_fetch_field_direct(tableRes, 0); field= mysql_fetch_field_direct(table_res, 0);
if (strcmp(field->name, "View") != 0) if (strcmp(field->name, "View") != 0)
{ {
if (verbose) if (verbose)
@ -2688,10 +2693,10 @@ static my_bool getViewStructure(char *table, char* db)
check_io(sql_file); check_io(sql_file);
} }
row= mysql_fetch_row(tableRes); row= mysql_fetch_row(table_res);
fprintf(sql_file, "%s;\n", row[1]); fprintf(sql_file, "%s;\n", row[1]);
check_io(sql_file); check_io(sql_file);
mysql_free_result(tableRes); mysql_free_result(table_res);
if (sql_file != md_result_file) if (sql_file != md_result_file)
{ {

View File

@ -611,6 +611,7 @@ list_fields(MYSQL *mysql,const char *db,const char *table,
char query[1024],*end; char query[1024],*end;
MYSQL_RES *result; MYSQL_RES *result;
MYSQL_ROW row; MYSQL_ROW row;
ulong rows;
if (mysql_select_db(mysql,db)) if (mysql_select_db(mysql,db))
{ {
@ -618,6 +619,17 @@ list_fields(MYSQL *mysql,const char *db,const char *table,
mysql_error(mysql)); mysql_error(mysql));
return 1; return 1;
} }
sprintf(query,"select count(*) from `%s`", table);
if (mysql_query(mysql,query) || !(result=mysql_store_result(mysql)))
{
fprintf(stderr,"%s: Cannot get record count for db: %s, table: %s: %s\n",
my_progname,db,table,mysql_error(mysql));
return 1;
}
row = mysql_fetch_row(result);
rows = (ulong) strtoull(row[0], (char**) 0, 10);
mysql_free_result(result);
end=strmov(strmov(strmov(query,"show /*!32332 FULL */ columns from `"),table),"`"); end=strmov(strmov(strmov(query,"show /*!32332 FULL */ columns from `"),table),"`");
if (wild && wild[0]) if (wild && wild[0])
strxmov(end," like '",wild,"'",NullS); strxmov(end," like '",wild,"'",NullS);
@ -628,8 +640,8 @@ list_fields(MYSQL *mysql,const char *db,const char *table,
return 1; return 1;
} }
printf("Database: %s Table: %s Rows: %lu", db,table, printf("Database: %s Table: %s Rows: %lu", db, table, rows);
(ulong) mysql->extra_info);
if (wild && wild[0]) if (wild && wild[0])
printf(" Wildcard: %s",wild); printf(" Wildcard: %s",wild);
putchar('\n'); putchar('\n');

View File

@ -294,6 +294,7 @@ Q_QUERY_VERTICAL, Q_QUERY_HORIZONTAL,
Q_START_TIMER, Q_END_TIMER, Q_START_TIMER, Q_END_TIMER,
Q_CHARACTER_SET, Q_DISABLE_PS_PROTOCOL, Q_ENABLE_PS_PROTOCOL, Q_CHARACTER_SET, Q_DISABLE_PS_PROTOCOL, Q_ENABLE_PS_PROTOCOL,
Q_EXIT, Q_EXIT,
Q_DISABLE_RECONNECT, Q_ENABLE_RECONNECT,
Q_UNKNOWN, /* Unknown command. */ Q_UNKNOWN, /* Unknown command. */
Q_COMMENT, /* Comments, ignored. */ Q_COMMENT, /* Comments, ignored. */
@ -382,6 +383,8 @@ const char *command_names[]=
"disable_ps_protocol", "disable_ps_protocol",
"enable_ps_protocol", "enable_ps_protocol",
"exit", "exit",
"disable_reconnect",
"enable_reconnect",
0 0
}; };
@ -642,6 +645,7 @@ int dyn_string_cmp(DYNAMIC_STRING* ds, const char* fname)
{ {
DBUG_PRINT("info",("Size differs: result size: %u file size: %u", DBUG_PRINT("info",("Size differs: result size: %u file size: %u",
ds->length, stat_info.st_size)); ds->length, stat_info.st_size));
DBUG_PRINT("info",("result: '%s'", ds->str));
DBUG_RETURN(2); DBUG_RETURN(2);
} }
if (!(tmp = (char*) my_malloc(stat_info.st_size + 1, MYF(MY_WME)))) if (!(tmp = (char*) my_malloc(stat_info.st_size + 1, MYF(MY_WME))))
@ -3620,8 +3624,8 @@ static void init_var_hash(MYSQL *mysql)
if (hash_init(&var_hash, charset_info, if (hash_init(&var_hash, charset_info,
1024, 0, 0, get_var_key, var_free, MYF(0))) 1024, 0, 0, get_var_key, var_free, MYF(0)))
die("Variable hash initialization failed"); die("Variable hash initialization failed");
if (opt_big_test) my_hash_insert(&var_hash, (byte*) var_init(0,"BIG_TEST", 0,
my_hash_insert(&var_hash, (byte*) var_init(0,"BIG_TEST", 0, "1",0)); (opt_big_test) ? "1" : "0", 0));
v= var_init(0,"MAX_TABLES", 0, (sizeof(ulong) == 4) ? "31" : "62",0); v= var_init(0,"MAX_TABLES", 0, (sizeof(ulong) == 4) ? "31" : "62",0);
my_hash_insert(&var_hash, (byte*) v); my_hash_insert(&var_hash, (byte*) v);
v= var_init(0,"SERVER_VERSION", 0, mysql_get_server_info(mysql), 0); v= var_init(0,"SERVER_VERSION", 0, mysql_get_server_info(mysql), 0);
@ -3790,6 +3794,12 @@ int main(int argc, char **argv)
if (q->query == q->query_buf) if (q->query == q->query_buf)
q->query += q->first_word_len + 1; q->query += q->first_word_len + 1;
display_result_vertically= (q->type==Q_QUERY_VERTICAL); display_result_vertically= (q->type==Q_QUERY_VERTICAL);
if (save_file[0])
{
strmov(q->record_file,save_file);
q->require_file=require_file;
save_file[0]=0;
}
error|= run_query(&cur_con->mysql, q, QUERY_REAP|QUERY_SEND); error|= run_query(&cur_con->mysql, q, QUERY_REAP|QUERY_SEND);
display_result_vertically= old_display_result_vertically; display_result_vertically= old_display_result_vertically;
break; break;
@ -3895,6 +3905,12 @@ int main(int argc, char **argv)
case Q_ENABLE_PS_PROTOCOL: case Q_ENABLE_PS_PROTOCOL:
ps_protocol_enabled= ps_protocol; ps_protocol_enabled= ps_protocol;
break; break;
case Q_DISABLE_RECONNECT:
cur_con->mysql.reconnect= 0;
break;
case Q_ENABLE_RECONNECT:
cur_con->mysql.reconnect= 1;
break;
case Q_EXIT: case Q_EXIT:
abort_flag= 1; abort_flag= 1;
@ -4180,8 +4196,8 @@ static REP_SET *make_new_set(REP_SETS *sets);
static void make_sets_invisible(REP_SETS *sets); static void make_sets_invisible(REP_SETS *sets);
static void free_last_set(REP_SETS *sets); static void free_last_set(REP_SETS *sets);
static void free_sets(REP_SETS *sets); static void free_sets(REP_SETS *sets);
static void set_bit(REP_SET *set, uint bit); static void internal_set_bit(REP_SET *set, uint bit);
static void clear_bit(REP_SET *set, uint bit); static void internal_clear_bit(REP_SET *set, uint bit);
static void or_bits(REP_SET *to,REP_SET *from); static void or_bits(REP_SET *to,REP_SET *from);
static void copy_bits(REP_SET *to,REP_SET *from); static void copy_bits(REP_SET *to,REP_SET *from);
static int cmp_bits(REP_SET *set1,REP_SET *set2); static int cmp_bits(REP_SET *set1,REP_SET *set2);
@ -4258,7 +4274,7 @@ REPLACE *init_replace(my_string *from, my_string *to,uint count,
{ {
if (from[i][0] == '\\' && from[i][1] == '^') if (from[i][0] == '\\' && from[i][1] == '^')
{ {
set_bit(start_states,states+1); internal_set_bit(start_states,states+1);
if (!from[i][2]) if (!from[i][2])
{ {
start_states->table_offset=i; start_states->table_offset=i;
@ -4267,8 +4283,8 @@ REPLACE *init_replace(my_string *from, my_string *to,uint count,
} }
else if (from[i][0] == '\\' && from[i][1] == '$') else if (from[i][0] == '\\' && from[i][1] == '$')
{ {
set_bit(start_states,states); internal_set_bit(start_states,states);
set_bit(word_states,states); internal_set_bit(word_states,states);
if (!from[i][2] && start_states->table_offset == (uint) ~0) if (!from[i][2] && start_states->table_offset == (uint) ~0)
{ {
start_states->table_offset=i; start_states->table_offset=i;
@ -4277,11 +4293,11 @@ REPLACE *init_replace(my_string *from, my_string *to,uint count,
} }
else else
{ {
set_bit(word_states,states); internal_set_bit(word_states,states);
if (from[i][0] == '\\' && (from[i][1] == 'b' && from[i][2])) if (from[i][0] == '\\' && (from[i][1] == 'b' && from[i][2]))
set_bit(start_states,states+1); internal_set_bit(start_states,states+1);
else else
set_bit(start_states,states); internal_set_bit(start_states,states);
} }
for (pos=from[i], len=0; *pos ; pos++) for (pos=from[i], len=0; *pos ; pos++)
{ {
@ -4387,9 +4403,9 @@ REPLACE *init_replace(my_string *from, my_string *to,uint count,
follow[i].len > found_end) follow[i].len > found_end)
found_end=follow[i].len; found_end=follow[i].len;
if (chr && follow[i].chr) if (chr && follow[i].chr)
set_bit(new_set,i+1); /* To next set */ internal_set_bit(new_set,i+1); /* To next set */
else else
set_bit(new_set,i); internal_set_bit(new_set,i);
} }
} }
if (found_end) if (found_end)
@ -4406,7 +4422,7 @@ REPLACE *init_replace(my_string *from, my_string *to,uint count,
if (follow[bit_nr-1].len < found_end || if (follow[bit_nr-1].len < found_end ||
(new_set->found_len && (new_set->found_len &&
(chr == 0 || !follow[bit_nr].chr))) (chr == 0 || !follow[bit_nr].chr)))
clear_bit(new_set,i); internal_clear_bit(new_set,i);
else else
{ {
if (chr == 0 || !follow[bit_nr].chr) if (chr == 0 || !follow[bit_nr].chr)
@ -4555,13 +4571,13 @@ static void free_sets(REP_SETS *sets)
return; return;
} }
static void set_bit(REP_SET *set, uint bit) static void internal_set_bit(REP_SET *set, uint bit)
{ {
set->bits[bit / WORD_BIT] |= 1 << (bit % WORD_BIT); set->bits[bit / WORD_BIT] |= 1 << (bit % WORD_BIT);
return; return;
} }
static void clear_bit(REP_SET *set, uint bit) static void internal_clear_bit(REP_SET *set, uint bit)
{ {
set->bits[bit / WORD_BIT] &= ~ (1 << (bit % WORD_BIT)); set->bits[bit / WORD_BIT] &= ~ (1 << (bit % WORD_BIT));
return; return;

View File

@ -359,16 +359,23 @@ case $default_charset in
;; ;;
utf8) utf8)
default_charset_default_collation="utf8_general_ci" default_charset_default_collation="utf8_general_ci"
define(UTFC1, utf8_general_ci utf8_bin) if test "$default_collation" = "utf8_general_cs"; then
define(UTFC2, utf8_czech_ci utf8_danish_ci) # For those who explicitly desire "utf8_general_cs", support it,
define(UTFC3, utf8_estonian_ci utf8_icelandic_ci) # and then also set the CPP switch enabling that code.
define(UTFC4, utf8_latvian_ci utf8_lithuanian_ci) UTFC="utf8_general_cs"
define(UTFC5, utf8_persian_ci utf8_polish_ci utf8_romanian_ci) AC_DEFINE([HAVE_UTF8_GENERAL_CS], [1], [certain Japanese customer])
define(UTFC6, utf8_slovak_ci utf8_slovenian_ci) else
define(UTFC7, utf8_spanish2_ci utf8_spanish_ci) define(UTFC1, utf8_general_ci utf8_bin)
define(UTFC8, utf8_swedish_ci utf8_turkish_ci) define(UTFC2, utf8_czech_ci utf8_danish_ci)
define(UTFC9, utf8_unicode_ci) define(UTFC3, utf8_estonian_ci utf8_icelandic_ci)
UTFC="UTFC1 UTFC2 UTFC3 UTFC4 UTFC5 UTFC6 UTFC7 UTFC8 UTFC9" define(UTFC4, utf8_latvian_ci utf8_lithuanian_ci)
define(UTFC5, utf8_persian_ci utf8_polish_ci utf8_romanian_ci)
define(UTFC6, utf8_slovak_ci utf8_slovenian_ci)
define(UTFC7, utf8_spanish2_ci utf8_spanish_ci)
define(UTFC8, utf8_swedish_ci utf8_turkish_ci)
define(UTFC9, utf8_unicode_ci)
UTFC="UTFC1 UTFC2 UTFC3 UTFC4 UTFC5 UTFC6 UTFC7 UTFC8 UTFC9"
fi
default_charset_collations="$UTFC" default_charset_collations="$UTFC"
;; ;;
*) *)

View File

@ -1,15 +0,0 @@
AC_DEFUN([MYSQL_CHECK_ISAM], [
AC_ARG_WITH([isam], [
--with-isam Enable the ISAM table type],
[with_isam="$withval"],
[with_isam=no])
isam_libs=
if test X"$with_isam" = X"yes"
then
AC_DEFINE([HAVE_ISAM], [1], [Using old ISAM tables])
isam_libs="\$(top_builddir)/isam/libnisam.a\
\$(top_builddir)/merge/libmerge.a"
fi
AC_SUBST(isam_libs)
])

View File

@ -41,7 +41,6 @@ sinclude(config/ac-macros/ha_blackhole.m4)
sinclude(config/ac-macros/ha_example.m4) sinclude(config/ac-macros/ha_example.m4)
sinclude(config/ac-macros/ha_federated.m4) sinclude(config/ac-macros/ha_federated.m4)
sinclude(config/ac-macros/ha_innodb.m4) sinclude(config/ac-macros/ha_innodb.m4)
sinclude(config/ac-macros/ha_isam.m4)
sinclude(config/ac-macros/ha_ndbcluster.m4) sinclude(config/ac-macros/ha_ndbcluster.m4)
sinclude(config/ac-macros/ha_tina.m4) sinclude(config/ac-macros/ha_tina.m4)
sinclude(config/ac-macros/large_file.m4) sinclude(config/ac-macros/large_file.m4)
@ -351,11 +350,30 @@ then
if echo $CXX | grep gcc > /dev/null 2>&1 if echo $CXX | grep gcc > /dev/null 2>&1
then then
if $CXX -v 2>&1 | grep 'version 3' > /dev/null 2>&1 GCC_VERSION=`gcc -v 2>&1 | grep version | sed -e 's/[[^0-9. ]]//g; s/^ *//g; s/ .*//g'`
then case $SYSTEM_TYPE in
# Statically link the language support function's found in libsupc++.a *freebsd*)
LIBS="$LIBS -lsupc++" # The libsupc++ library on freebsd with gcc 3.4.2 is dependent on
fi # libstdc++, disable it since other solution works fine
GCC_VERSION="NOSUPCPP_$GCC_VERSION"
;;
*)
;;
esac
echo "Using gcc version '$GCC_VERSION'"
case "$GCC_VERSION" in
3.4.*|3.5.*)
# Statically link the language support function's found in libsupc++.a
LIBS="$LIBS -lsupc++"
echo "Using -libsupc++ for static linking with gcc"
;;
*)
# Using -lsupc++ doesn't work in gcc 3.3 on SuSE 9.2
# (causes link failures when linking things staticly)
CXXFLAGS="$CXXFLAGS -DUSE_MYSYS_NEW -DDEFINE_CXA_PURE_VIRTUAL"
echo "Using MYSYS_NEW for static linking with gcc"
;;
esac
fi fi
fi fi
@ -2735,7 +2753,7 @@ AC_CONFIG_FILES(Makefile extra/Makefile mysys/Makefile dnl
dbug/Makefile scripts/Makefile dnl dbug/Makefile scripts/Makefile dnl
include/Makefile sql-bench/Makefile tools/Makefile dnl include/Makefile sql-bench/Makefile tools/Makefile dnl
server-tools/Makefile server-tools/instance-manager/Makefile dnl server-tools/Makefile server-tools/instance-manager/Makefile dnl
tests/Makefile Docs/Makefile Docs/Images/Makefile support-files/Makefile dnl tests/Makefile Docs/Makefile support-files/Makefile dnl
support-files/MacOSX/Makefile mysql-test/Makefile dnl support-files/MacOSX/Makefile mysql-test/Makefile dnl
netware/Makefile dnl netware/Makefile dnl
include/mysql_version.h dnl include/mysql_version.h dnl

View File

@ -24,7 +24,7 @@ pkginclude_HEADERS = my_dbug.h m_string.h my_sys.h my_list.h my_xml.h \
sslopt-vars.h sslopt-case.h sql_common.h keycache.h \ sslopt-vars.h sslopt-case.h sql_common.h keycache.h \
mysql_time.h $(BUILT_SOURCES) mysql_time.h $(BUILT_SOURCES)
noinst_HEADERS = config-win.h config-os2.h config-netware.h \ noinst_HEADERS = config-win.h config-os2.h config-netware.h \
nisam.h heap.h merge.h my_bitmap.h\ heap.h my_bitmap.h\
myisam.h myisampack.h myisammrg.h ft_global.h\ myisam.h myisampack.h myisammrg.h ft_global.h\
mysys_err.h my_base.h help_start.h help_end.h \ mysys_err.h my_base.h help_start.h help_end.h \
my_nosys.h my_alarm.h queues.h rijndael.h sha1.h \ my_nosys.h my_alarm.h queues.h rijndael.h sha1.h \

View File

@ -351,7 +351,6 @@ inline double ulonglong2double(ulonglong value)
#define DO_NOT_REMOVE_THREAD_WRAPPERS #define DO_NOT_REMOVE_THREAD_WRAPPERS
#define thread_safe_increment(V,L) InterlockedIncrement((long*) &(V)) #define thread_safe_increment(V,L) InterlockedIncrement((long*) &(V))
#define thread_safe_decrement(V,L) InterlockedDecrement((long*) &(V)) #define thread_safe_decrement(V,L) InterlockedDecrement((long*) &(V))
#define thread_safe_dec_and_test(V, L) thread_safe_decrement(V,L)
/* The following is only used for statistics, so it should be good enough */ /* The following is only used for statistics, so it should be good enough */
#ifdef __NT__ /* This should also work on Win98 but .. */ #ifdef __NT__ /* This should also work on Win98 but .. */
#define thread_safe_add(V,C,L) InterlockedExchangeAdd((long*) &(V),(C)) #define thread_safe_add(V,C,L) InterlockedExchangeAdd((long*) &(V),(C))
@ -379,6 +378,7 @@ inline double ulonglong2double(ulonglong value)
/* #undef HAVE_CHARSET_armscii8 */ /* #undef HAVE_CHARSET_armscii8 */
/* #undef HAVE_CHARSET_ascii */ /* #undef HAVE_CHARSET_ascii */
#define HAVE_CHARSET_big5 1 #define HAVE_CHARSET_big5 1
#define HAVE_CHARSET_cp932
#define HAVE_CHARSET_cp1250 1 #define HAVE_CHARSET_cp1250 1
/* #undef HAVE_CHARSET_cp1251 */ /* #undef HAVE_CHARSET_cp1251 */
/* #undef HAVE_CHARSET_cp1256 */ /* #undef HAVE_CHARSET_cp1256 */
@ -387,6 +387,7 @@ inline double ulonglong2double(ulonglong value)
/* #undef HAVE_CHARSET_cp852 */ /* #undef HAVE_CHARSET_cp852 */
/* #undef HAVE_CHARSET_cp866 */ /* #undef HAVE_CHARSET_cp866 */
/* #undef HAVE_CHARSET_dec8 */ /* #undef HAVE_CHARSET_dec8 */
#define HAVE_CHARSET_eucjpms 1
#define HAVE_CHARSET_euckr 1 #define HAVE_CHARSET_euckr 1
#define HAVE_CHARSET_gb2312 1 #define HAVE_CHARSET_gb2312 1
#define HAVE_CHARSET_gbk 1 #define HAVE_CHARSET_gbk 1

View File

@ -149,7 +149,8 @@ typedef struct my_charset_handler_st
uint (*numchars)(struct charset_info_st *, const char *b, const char *e); uint (*numchars)(struct charset_info_st *, const char *b, const char *e);
uint (*charpos)(struct charset_info_st *, const char *b, const char *e, uint pos); uint (*charpos)(struct charset_info_st *, const char *b, const char *e, uint pos);
uint (*well_formed_len)(struct charset_info_st *, uint (*well_formed_len)(struct charset_info_st *,
const char *b,const char *e, uint nchars); const char *b,const char *e,
uint nchars, int *error);
uint (*lengthsp)(struct charset_info_st *, const char *ptr, uint length); uint (*lengthsp)(struct charset_info_st *, const char *ptr, uint length);
uint (*numcells)(struct charset_info_st *, const char *b, const char *e); uint (*numcells)(struct charset_info_st *, const char *b, const char *e);
@ -186,7 +187,7 @@ typedef struct my_charset_handler_st
int base, char **e, int *err); int base, char **e, int *err);
double (*strntod)(struct charset_info_st *, char *s, uint l, char **e, double (*strntod)(struct charset_info_st *, char *s, uint l, char **e,
int *err); int *err);
longlong (*my_strtoll10)(struct charset_info_st *cs, longlong (*strtoll10)(struct charset_info_st *cs,
const char *nptr, char **endptr, int *error); const char *nptr, char **endptr, int *error);
ulong (*scan)(struct charset_info_st *, const char *b, const char *e, ulong (*scan)(struct charset_info_st *, const char *b, const char *e,
int sq); int sq);
@ -349,7 +350,8 @@ int my_wildcmp_8bit(CHARSET_INFO *,
uint my_numchars_8bit(CHARSET_INFO *, const char *b, const char *e); uint my_numchars_8bit(CHARSET_INFO *, const char *b, const char *e);
uint my_numcells_8bit(CHARSET_INFO *, const char *b, const char *e); uint my_numcells_8bit(CHARSET_INFO *, const char *b, const char *e);
uint my_charpos_8bit(CHARSET_INFO *, const char *b, const char *e, uint pos); uint my_charpos_8bit(CHARSET_INFO *, const char *b, const char *e, uint pos);
uint my_well_formed_len_8bit(CHARSET_INFO *, const char *b, const char *e, uint pos); uint my_well_formed_len_8bit(CHARSET_INFO *, const char *b, const char *e,
uint pos, int *error);
int my_mbcharlen_8bit(CHARSET_INFO *, uint c); int my_mbcharlen_8bit(CHARSET_INFO *, uint c);
@ -367,7 +369,8 @@ int my_wildcmp_mb(CHARSET_INFO *,
uint my_numchars_mb(CHARSET_INFO *, const char *b, const char *e); uint my_numchars_mb(CHARSET_INFO *, const char *b, const char *e);
uint my_numcells_mb(CHARSET_INFO *, const char *b, const char *e); uint my_numcells_mb(CHARSET_INFO *, const char *b, const char *e);
uint my_charpos_mb(CHARSET_INFO *, const char *b, const char *e, uint pos); uint my_charpos_mb(CHARSET_INFO *, const char *b, const char *e, uint pos);
uint my_well_formed_len_mb(CHARSET_INFO *, const char *b, const char *e, uint pos); uint my_well_formed_len_mb(CHARSET_INFO *, const char *b, const char *e,
uint pos, int *error);
uint my_instr_mb(struct charset_info_st *, uint my_instr_mb(struct charset_info_st *,
const char *b, uint b_length, const char *b, uint b_length,
const char *s, uint s_length, const char *s, uint s_length,

View File

@ -1,93 +0,0 @@
/* Copyright (C) 2000 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 file should be included when using merge_isam_funktions */
/* Author: Michael Widenius */
#ifndef _merge_h
#define _merge_h
#ifdef __cplusplus
extern "C" {
#endif
#ifndef _my_base_h
#include <my_base.h>
#endif
#ifndef _nisam_h
#include <nisam.h>
#endif
#define MRG_NAME_EXT ".MRG"
/* Param to/from mrg_info */
typedef struct st_mrg_info /* Struct from h_info */
{
ulonglong records; /* Records in database */
ulonglong deleted; /* Deleted records in database */
ulonglong recpos; /* Pos for last used record */
ulonglong data_file_length;
uint reclength; /* Recordlength */
int errkey; /* With key was dupplicated on err */
uint options; /* HA_OPTION_... used */
} MERGE_INFO;
typedef struct st_mrg_table_info
{
N_INFO *table;
ulonglong file_offset;
} MRG_TABLE;
typedef struct st_merge
{
MRG_TABLE *open_tables,*current_table,*end_table,*last_used_table;
ulonglong records; /* records in tables */
ulonglong del; /* Removed records */
ulonglong data_file_length;
uint tables,options,reclength;
my_bool cache_in_use;
LIST open_list;
} MRG_INFO;
typedef ulong mrg_off_t;
/* Prototypes for merge-functions */
extern int mrg_close(MRG_INFO *file);
extern int mrg_delete(MRG_INFO *file,const byte *buff);
extern MRG_INFO *mrg_open(const char *name,int mode,int wait_if_locked);
extern int mrg_panic(enum ha_panic_function function);
extern int mrg_rfirst(MRG_INFO *file,byte *buf,int inx);
extern int mrg_rkey(MRG_INFO *file,byte *buf,int inx,const byte *key,
uint key_len, enum ha_rkey_function search_flag);
extern int mrg_rrnd(MRG_INFO *file,byte *buf, mrg_off_t pos);
extern int mrg_rsame(MRG_INFO *file,byte *record,int inx);
extern int mrg_update(MRG_INFO *file,const byte *old,const byte *new_rec);
extern int mrg_info(MRG_INFO *file,MERGE_INFO *x,int flag);
extern int mrg_lock_database(MRG_INFO *file,int lock_type);
extern int mrg_create(const char *name,const char **table_names);
extern int mrg_extra(MRG_INFO *file,enum ha_extra_function function);
extern ha_rows mrg_records_in_range(MRG_INFO *info,int inx,
const byte *start_key,uint start_key_len,
enum ha_rkey_function start_search_flag,
const byte *end_key,uint end_key_len,
enum ha_rkey_function end_search_flag);
extern mrg_off_t mrg_position(MRG_INFO *info);
#ifdef __cplusplus
}
#endif
#endif

View File

@ -312,7 +312,9 @@ enum ha_base_keytype {
#define HA_ERR_TABLE_EXIST 156 /* The table existed in storage engine */ #define HA_ERR_TABLE_EXIST 156 /* The table existed in storage engine */
#define HA_ERR_NO_CONNECTION 157 /* Could not connect to storage engine */ #define HA_ERR_NO_CONNECTION 157 /* Could not connect to storage engine */
#define HA_ERR_NULL_IN_SPATIAL 158 /* NULLs are not supported in spatial index */ #define HA_ERR_NULL_IN_SPATIAL 158 /* NULLs are not supported in spatial index */
#define HA_ERR_LAST 158 /*Copy last error nr.*/ #define HA_ERR_TABLE_DEF_CHANGED 159 /* The table changed in storage engine */
#define HA_ERR_LAST 159 /*Copy last error nr.*/
/* Add error numbers before HA_ERR_LAST and change it accordingly. */ /* Add error numbers before HA_ERR_LAST and change it accordingly. */
#define HA_ERR_ERRORS (HA_ERR_LAST - HA_ERR_FIRST + 1) #define HA_ERR_ERRORS (HA_ERR_LAST - HA_ERR_FIRST + 1)

View File

@ -678,7 +678,6 @@ extern pthread_t shutdown_th, main_th, signal_th;
#ifdef HAVE_ATOMIC_ADD #ifdef HAVE_ATOMIC_ADD
#define thread_safe_increment(V,L) atomic_inc((atomic_t*) &V) #define thread_safe_increment(V,L) atomic_inc((atomic_t*) &V)
#define thread_safe_decrement(V,L) atomic_dec((atomic_t*) &V) #define thread_safe_decrement(V,L) atomic_dec((atomic_t*) &V)
#define thread_safe_dec_and_test(V, L) atomic_dec_and_test((atomic_t*) &V)
#define thread_safe_add(V,C,L) atomic_add((C),(atomic_t*) &V) #define thread_safe_add(V,C,L) atomic_add((C),(atomic_t*) &V)
#define thread_safe_sub(V,C,L) atomic_sub((C),(atomic_t*) &V) #define thread_safe_sub(V,C,L) atomic_sub((C),(atomic_t*) &V)
#else #else
@ -689,22 +688,6 @@ extern pthread_t shutdown_th, main_th, signal_th;
#define thread_safe_add(V,C,L) (pthread_mutex_lock((L)), (V)+=(C), pthread_mutex_unlock((L))) #define thread_safe_add(V,C,L) (pthread_mutex_lock((L)), (V)+=(C), pthread_mutex_unlock((L)))
#define thread_safe_sub(V,C,L) \ #define thread_safe_sub(V,C,L) \
(pthread_mutex_lock((L)), (V)-=(C), pthread_mutex_unlock((L))) (pthread_mutex_lock((L)), (V)-=(C), pthread_mutex_unlock((L)))
#ifdef __cplusplus
static inline bool thread_safe_dec_and_test(ulong &V, pthread_mutex_t *L)
{
ulong res;
pthread_mutex_lock(L);
res=--V;
pthread_mutex_unlock(L);
return res==0;
}
#else
/*
what should we do ? define it as static ?
a regular function somewhere in mysys/ ?
for now it's only used in c++ code, so there's no need to bother
*/
#endif
#endif /* HAVE_ATOMIC_ADD */ #endif /* HAVE_ATOMIC_ADD */
#ifdef SAFE_STATISTICS #ifdef SAFE_STATISTICS
#define statistic_increment(V,L) thread_safe_increment((V),(L)) #define statistic_increment(V,L) thread_safe_increment((V),(L))

View File

@ -54,11 +54,10 @@ extern int NEAR my_errno; /* Last error in mysys */
#define MY_FAE 8 /* Fatal if any error */ #define MY_FAE 8 /* Fatal if any error */
#define MY_WME 16 /* Write message on error */ #define MY_WME 16 /* Write message on error */
#define MY_WAIT_IF_FULL 32 /* Wait and try again if disk full error */ #define MY_WAIT_IF_FULL 32 /* Wait and try again if disk full error */
#define MY_RAID 64 /* Support for RAID (not the "Johnson&Johnson"-s one ;) */ #define MY_IGNORE_BADFD 32 /* my_sync: ignore 'bad descriptor' errors */
#define MY_FULL_IO 512 /* For my_read - loop intil I/O #define MY_RAID 64 /* Support for RAID */
is complete #define MY_FULL_IO 512 /* For my_read - loop intil I/O is complete */
*/ #define MY_DONT_CHECK_FILESIZE 128 /* Option to init_io_cache() */
#define MY_DONT_CHECK_FILESIZE 128 /* Option to init_io_cache() */
#define MY_LINK_WARNING 32 /* my_redel() gives warning if links */ #define MY_LINK_WARNING 32 /* my_redel() gives warning if links */
#define MY_COPYTIME 64 /* my_redel() copys time */ #define MY_COPYTIME 64 /* my_redel() copys time */
#define MY_DELETE_OLD 256 /* my_create_with_symlink() */ #define MY_DELETE_OLD 256 /* my_create_with_symlink() */
@ -72,7 +71,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_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_HOLD_ON_ERROR 256 /* my_realloc() ; Return old ptr on error */
#define MY_THREADSAFE 128 /* pread/pwrite: Don't allow interrupts */ #define MY_THREADSAFE 128 /* pread/pwrite: Don't allow interrupts */
#define MY_DONT_OVERWRITE_FILE 1024 /* my_copy; Don't overwrite file */ #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_CHECK_ERROR 1 /* Params to my_end; Check open-close */
#define MY_GIVE_INFO 2 /* Give time info about process*/ #define MY_GIVE_INFO 2 /* Give time info about process*/

View File

@ -231,7 +231,7 @@ typedef struct st_mysql
MEM_ROOT field_alloc; MEM_ROOT field_alloc;
my_ulonglong affected_rows; my_ulonglong affected_rows;
my_ulonglong insert_id; /* id if insert on table with NEXTNR */ my_ulonglong insert_id; /* id if insert on table with NEXTNR */
my_ulonglong extra_info; /* Used by mysqlshow */ my_ulonglong extra_info; /* Not used */
unsigned long thread_id; /* Id for connection in server */ unsigned long thread_id; /* Id for connection in server */
unsigned long packet_length; unsigned long packet_length;
unsigned int port; unsigned int port;

View File

@ -24,7 +24,6 @@
#undef HAVE_PSTACK /* No stacktrace */ #undef HAVE_PSTACK /* No stacktrace */
#undef HAVE_DLOPEN /* No udf functions */ #undef HAVE_DLOPEN /* No udf functions */
#undef HAVE_OPENSSL #undef HAVE_OPENSSL
#undef HAVE_ISAM
#undef HAVE_SMEM /* No shared memory */ #undef HAVE_SMEM /* No shared memory */
#undef HAVE_NDBCLUSTER_DB /* No NDB cluster */ #undef HAVE_NDBCLUSTER_DB /* No NDB cluster */

View File

@ -1,212 +0,0 @@
/* Copyright (C) 2000 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 file should be included when using nisam_funktions */
/* Author: Michael Widenius */
#ifndef _nisam_h
#define _nisam_h
#ifdef __cplusplus
extern "C" {
#endif
#ifndef _my_base_h
#include <my_base.h>
#endif
/* defines used by nisam-funktions */
#define N_MAXKEY 16 /* Max allowed keys */
#define N_MAXKEY_SEG 16 /* Max segments for key */
#define N_MAX_KEY_LENGTH 256 /* May be increased up to 500 */
#define N_MAX_KEY_BUFF (N_MAX_KEY_LENGTH+N_MAXKEY_SEG+sizeof(double)-1)
#define N_MAX_POSSIBLE_KEY_BUFF 500+9
#define N_NAME_IEXT ".ISM"
#define N_NAME_DEXT ".ISD"
#define NI_POS_ERROR (~ (ulong) 0)
/* Param to/from nisam_info */
typedef struct st_n_isaminfo /* Struct from h_info */
{
ulong records; /* Records in database */
ulong deleted; /* Deleted records in database */
ulong recpos; /* Pos for last used record */
ulong newrecpos; /* Pos if we write new record */
ulong dupp_key_pos; /* Position to record with dupp key */
ulong data_file_length, /* Length of data file */
max_data_file_length,
index_file_length,
max_index_file_length,
delete_length;
uint reclength; /* Recordlength */
uint mean_reclength; /* Mean recordlength (if packed) */
uint keys; /* How many keys used */
uint options; /* HA_OPTION_... used */
int errkey, /* With key was dupplicated on err */
sortkey; /* clustered by this key */
File filenr; /* (uniq) filenr for datafile */
time_t create_time; /* When table was created */
time_t isamchk_time;
time_t update_time;
ulong *rec_per_key; /* for sql optimizing */
} N_ISAMINFO;
/* Info saved on file for each info-part */
#ifdef __WATCOMC__
#pragma pack(2)
#define uint uint16 /* Same format as in MSDOS */
#endif
#ifdef __ZTC__
#pragma ZTC align 2
#define uint uint16 /* Same format as in MSDOS */
#endif
typedef struct st_n_save_keyseg /* Key-portion */
{
uint8 type; /* Typ av nyckel (f|r sort) */
uint8 flag; /* HA_DIFF_LENGTH */
uint16 start; /* Start of key in record */
uint16 length; /* Keylength */
} N_SAVE_KEYSEG;
typedef struct st_n_save_keydef /* Key definition with create & info */
{
uint8 flag; /* NOSAME, PACK_USED */
uint8 keysegs; /* Number of key-segment */
uint16 block_length; /* Length of keyblock (auto) */
uint16 keylength; /* Tot length of keyparts (auto) */
uint16 minlength; /* min length of (packed) key (auto) */
uint16 maxlength; /* max length of (packed) key (auto) */
} N_SAVE_KEYDEF;
typedef struct st_n_save_recinfo /* Info of record */
{
int16 type; /* en_fieldtype */
uint16 length; /* length of field */
} N_SAVE_RECINFO;
#ifdef __ZTC__
#pragma ZTC align
#undef uint
#endif
#ifdef __WATCOMC__
#pragma pack()
#undef uint
#endif
struct st_isam_info; /* For referense */
#ifndef ISAM_LIBRARY
typedef struct st_isam_info N_INFO;
#endif
typedef struct st_n_keyseg /* Key-portion */
{
N_SAVE_KEYSEG base;
} N_KEYSEG;
typedef struct st_n_keydef /* Key definition with open & info */
{
N_SAVE_KEYDEF base;
N_KEYSEG seg[N_MAXKEY_SEG+1];
int (*bin_search)(struct st_isam_info *info,struct st_n_keydef *keyinfo,
uchar *page,uchar *key,
uint key_len,uint comp_flag,uchar * *ret_pos,
uchar *buff);
uint (*get_key)(struct st_n_keydef *keyinfo,uint nod_flag,uchar * *page,
uchar *key);
} N_KEYDEF;
typedef struct st_decode_tree /* Decode huff-table */
{
uint16 *table;
uint quick_table_bits;
byte *intervalls;
} DECODE_TREE;
struct st_bit_buff;
typedef struct st_n_recinfo /* Info of record */
{
N_SAVE_RECINFO base;
#ifndef NOT_PACKED_DATABASES
void (*unpack)(struct st_n_recinfo *rec,struct st_bit_buff *buff,
uchar *start,uchar *end);
enum en_fieldtype base_type;
uint space_length_bits,pack_type;
DECODE_TREE *huff_tree;
#endif
} N_RECINFO;
extern my_string nisam_log_filename; /* Name of logfile */
extern uint nisam_block_size;
extern my_bool nisam_flush;
/* Prototypes for nisam-functions */
extern int nisam_close(struct st_isam_info *file);
extern int nisam_delete(struct st_isam_info *file,const byte *buff);
extern struct st_isam_info *nisam_open(const char *name,int mode,
uint wait_if_locked);
extern int nisam_panic(enum ha_panic_function function);
extern int nisam_rfirst(struct st_isam_info *file,byte *buf,int inx);
extern int nisam_rkey(struct st_isam_info *file,byte *buf,int inx,
const byte *key,
uint key_len, enum ha_rkey_function search_flag);
extern int nisam_rlast(struct st_isam_info *file,byte *buf,int inx);
extern int nisam_rnext(struct st_isam_info *file,byte *buf,int inx);
extern int nisam_rprev(struct st_isam_info *file,byte *buf,int inx);
extern int nisam_rrnd(struct st_isam_info *file,byte *buf,ulong pos);
extern int nisam_rsame(struct st_isam_info *file,byte *record,int inx);
extern int nisam_rsame_with_pos(struct st_isam_info *file,byte *record,
int inx,ulong pos);
extern int nisam_update(struct st_isam_info *file,const byte *old,
const byte *new_record);
extern int nisam_write(struct st_isam_info *file,const byte *buff);
extern int nisam_info(struct st_isam_info *file,N_ISAMINFO *x,int flag);
extern ulong nisam_position(struct st_isam_info *info);
extern int nisam_lock_database(struct st_isam_info *file,int lock_type);
extern int nisam_create(const char *name,uint keys,N_KEYDEF *keyinfo,
N_RECINFO *recinfo,ulong records,
ulong reloc,uint flags,uint options,
ulong data_file_length);
extern int nisam_extra(struct st_isam_info *file,
enum ha_extra_function function);
extern ulong nisam_records_in_range(struct st_isam_info *info,int inx,
const byte *start_key,uint start_key_len,
enum ha_rkey_function start_search_flag,
const byte *end_key,uint end_key_len,
enum ha_rkey_function end_search_flag);
extern int nisam_log(int activate_log);
extern int nisam_is_changed(struct st_isam_info *info);
extern uint _calc_blob_length(uint length , const byte *pos);
#ifdef __cplusplus
}
#endif
#endif

View File

@ -14,6 +14,7 @@ Created 2/23/1996 Heikki Tuuri
#include "ut0byte.h" #include "ut0byte.h"
#include "rem0cmp.h" #include "rem0cmp.h"
#include "trx0trx.h"
/****************************************************************** /******************************************************************
Allocates memory for a persistent cursor object and initializes the cursor. */ Allocates memory for a persistent cursor object and initializes the cursor. */
@ -206,7 +207,14 @@ btr_pcur_restore_position(
ut_a(cursor->pos_state == BTR_PCUR_WAS_POSITIONED ut_a(cursor->pos_state == BTR_PCUR_WAS_POSITIONED
|| cursor->pos_state == BTR_PCUR_IS_POSITIONED); || cursor->pos_state == BTR_PCUR_IS_POSITIONED);
ut_a(cursor->old_stored == BTR_PCUR_OLD_STORED); if (cursor->old_stored != BTR_PCUR_OLD_STORED) {
ut_print_buf(stderr, (const byte*)cursor, sizeof(btr_pcur_t));
if (cursor->trx_if_known) {
trx_print(stderr, cursor->trx_if_known);
}
ut_a(0);
}
if (cursor->rel_pos == BTR_PCUR_AFTER_LAST_IN_TREE if (cursor->rel_pos == BTR_PCUR_AFTER_LAST_IN_TREE
|| cursor->rel_pos == BTR_PCUR_BEFORE_FIRST_IN_TREE) { || cursor->rel_pos == BTR_PCUR_BEFORE_FIRST_IN_TREE) {

View File

@ -2201,7 +2201,8 @@ ulint
dict_foreign_add_to_cache( dict_foreign_add_to_cache(
/*======================*/ /*======================*/
/* out: DB_SUCCESS or error code */ /* out: DB_SUCCESS or error code */
dict_foreign_t* foreign) /* in, own: foreign key constraint */ dict_foreign_t* foreign, /* in, own: foreign key constraint */
ibool check_types) /* in: TRUE=check type compatibility */
{ {
dict_table_t* for_table; dict_table_t* for_table;
dict_table_t* ref_table; dict_table_t* ref_table;
@ -2237,10 +2238,16 @@ dict_foreign_add_to_cache(
} }
if (for_in_cache->referenced_table == NULL && ref_table) { if (for_in_cache->referenced_table == NULL && ref_table) {
dict_index_t* types_idx;
if (check_types) {
types_idx = for_in_cache->foreign_index;
} else {
types_idx = NULL;
}
index = dict_foreign_find_index(ref_table, index = dict_foreign_find_index(ref_table,
(const char**) for_in_cache->referenced_col_names, (const char**) for_in_cache->referenced_col_names,
for_in_cache->n_fields, for_in_cache->n_fields,
for_in_cache->foreign_index); types_idx);
if (index == NULL) { if (index == NULL) {
dict_foreign_error_report(ef, for_in_cache, dict_foreign_error_report(ef, for_in_cache,
@ -2264,10 +2271,16 @@ dict_foreign_add_to_cache(
} }
if (for_in_cache->foreign_table == NULL && for_table) { if (for_in_cache->foreign_table == NULL && for_table) {
dict_index_t* types_idx;
if (check_types) {
types_idx = for_in_cache->referenced_index;
} else {
types_idx = NULL;
}
index = dict_foreign_find_index(for_table, index = dict_foreign_find_index(for_table,
(const char**) for_in_cache->foreign_col_names, (const char**) for_in_cache->foreign_col_names,
for_in_cache->n_fields, for_in_cache->n_fields,
for_in_cache->referenced_index); types_idx);
if (index == NULL) { if (index == NULL) {
dict_foreign_error_report(ef, for_in_cache, dict_foreign_error_report(ef, for_in_cache,
@ -3333,6 +3346,9 @@ try_find_index:
"Cannot find an index in the referenced table where the\n" "Cannot find an index in the referenced table where the\n"
"referenced columns appear as the first columns, or column types\n" "referenced columns appear as the first columns, or column types\n"
"in the table and the referenced table do not match for constraint.\n" "in the table and the referenced table do not match for constraint.\n"
"Note that the internal storage type of ENUM and SET changed in\n"
"tables created with >= InnoDB-4.1.12, and such columns in old tables\n"
"cannot be referenced by such columns in new tables.\n"
"See http://dev.mysql.com/doc/mysql/en/InnoDB_foreign_key_constraints.html\n" "See http://dev.mysql.com/doc/mysql/en/InnoDB_foreign_key_constraints.html\n"
"for correct foreign key definition.\n", "for correct foreign key definition.\n",
start_of_latest_foreign); start_of_latest_foreign);

View File

@ -868,7 +868,7 @@ dict_load_table(
dict_load_indexes(table, heap); dict_load_indexes(table, heap);
err = dict_load_foreigns(table->name); err = dict_load_foreigns(table->name, TRUE);
/* /*
if (err != DB_SUCCESS) { if (err != DB_SUCCESS) {
@ -1089,8 +1089,9 @@ ulint
dict_load_foreign( dict_load_foreign(
/*==============*/ /*==============*/
/* out: DB_SUCCESS or error code */ /* out: DB_SUCCESS or error code */
const char* id) /* in: foreign constraint id as a const char* id, /* in: foreign constraint id as a
null-terminated string */ null-terminated string */
ibool check_types)/* in: TRUE=check type compatibility */
{ {
dict_foreign_t* foreign; dict_foreign_t* foreign;
dict_table_t* sys_foreign; dict_table_t* sys_foreign;
@ -1102,7 +1103,6 @@ dict_load_foreign(
rec_t* rec; rec_t* rec;
byte* field; byte* field;
ulint len; ulint len;
ulint err;
mtr_t mtr; mtr_t mtr;
#ifdef UNIV_SYNC_DEBUG #ifdef UNIV_SYNC_DEBUG
@ -1204,9 +1204,7 @@ dict_load_foreign(
a new foreign key constraint but loading one from the data a new foreign key constraint but loading one from the data
dictionary. */ dictionary. */
err = dict_foreign_add_to_cache(foreign); return(dict_foreign_add_to_cache(foreign, check_types));
return(err);
} }
/*************************************************************************** /***************************************************************************
@ -1220,7 +1218,8 @@ ulint
dict_load_foreigns( dict_load_foreigns(
/*===============*/ /*===============*/
/* out: DB_SUCCESS or error code */ /* out: DB_SUCCESS or error code */
const char* table_name) /* in: table name */ const char* table_name, /* in: table name */
ibool check_types) /* in: TRUE=check type compatibility */
{ {
btr_pcur_t pcur; btr_pcur_t pcur;
mem_heap_t* heap; mem_heap_t* heap;
@ -1320,7 +1319,7 @@ loop:
/* Load the foreign constraint definition to the dictionary cache */ /* Load the foreign constraint definition to the dictionary cache */
err = dict_load_foreign(id); err = dict_load_foreign(id, check_types);
if (err != DB_SUCCESS) { if (err != DB_SUCCESS) {
btr_pcur_close(&pcur); btr_pcur_close(&pcur);

Some files were not shown because too many files have changed in this diff Show More