Commit a88acf4a authored by lenz@mysql.com's avatar lenz@mysql.com

Merge mysql.com:/space/my/mysql-4.1

into mysql.com:/space/my/mysql-4.1-build
parents 01627022 c4fb796e
#!/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;
}
#!/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
#!/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_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-example",
"with-debug",
"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);
# 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-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);
}
#!/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
#!/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");
#! /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
#!/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
#!/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
#!/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;
}
#!/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;
}
#!/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 "");
}
#!/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;
}
#! /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
# 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";
}
#!/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);
}
#!/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);
}
#!/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
}
#!/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;
}
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.
This diff was suppressed by a .gitattributes entry.
# 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:
:
# Nothing to cleanup in this dummy directory.
clean:
:
# Don't update the files from bitkeeper
%::SCCS/s.%
This diff was suppressed by a .gitattributes entry.
...@@ -9,184 +9,17 @@ ...@@ -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 ...@@ -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" > $@
......
#!/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";
}
}
#!/usr/bin/perl
# Add path to perl on the previous line and make this executable
# if you want to use this as a normal script.
'di ';
'ig 00 ';
#+##############################################################################
# #
# File: texi2html #
# #
# Description: Program to transform most Texinfo documents to HTML #
# #
#-##############################################################################
# @(#)texi2html 1.52 971230 Written (mainly) by Lionel Cons, Lionel.Cons@cern.ch
# Enhanced by David Axmark
# The man page for this program is included at the end of this file and can be
# viewed using the command 'nroff -man texi2html'.
# Please read the copyright at the end of the man page.
#+++############################################################################
# #
# Constants #
# #
#---############################################################################
$DEBUG_TOC = 1;
$DEBUG_INDEX = 2;
$DEBUG_BIB = 4;
$DEBUG_GLOSS = 8;
$DEBUG_DEF = 16;
$DEBUG_HTML = 32;
$DEBUG_USER = 64;
$BIBRE = '\[[\w\/]+\]'; # RE for a bibliography reference
$FILERE = '[\/\w.+-]+'; # RE for a file name
$VARRE = '[^\s\{\}]+'; # RE for a variable name
$NODERE = '[^@{}:\'`",]+'; # RE for a node name
$NODESRE = '[^@{}:\'`"]+'; # RE for a list of node names
$XREFRE = '[^@{}]+'; # RE for a xref (should use NODERE)
$ERROR = "***"; # prefix for errors and warnings
$THISPROG = "texi2html 1.52 (with additions by MySQL AB)"; # program name and version
$TODAY = &pretty_date; # like "20 September 1993"
$SPLITTAG = "<!-- SPLIT HERE -->\n"; # tag to know where to split
$PROTECTTAG = "_ThisIsProtected_"; # tag to recognize protected sections
$html2_doctype = '<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0 Strict Level 2//EN">';
#
# language dependent constants
#
#$LDC_SEE = 'see';
#$LDC_SECTION = 'section';
#$LDC_IN = 'in';
#$LDC_TOC = 'Table of Contents';
#$LDC_GOTO = 'Go to the';
#$LDC_FOOT = 'Footnotes';
# TODO: @def* shortcuts
#$user_sub{"email"} = "fix_email";
#
# pre-defined indices
#
%predefined_index = (
'cp', 'c',
'fn', 'f',
'vr', 'v',
'ky', 'k',
'pg', 'p',
'tp', 't',
);
#
# valid indices
#
%valid_index = (
'c', 1,
'f', 1,
'v', 1,
'k', 1,
'p', 1,
't', 1,
);
#
# texinfo section names to level
#
%sec2level = (
'top', 0,
'chapter', 1,
'unnumbered', 1,
'majorheading', 1,
'chapheading', 1,
'appendix', 1,
'section', 2,
'unnumberedsec', 2,
'heading', 2,
'appendixsec', 2,
'appendixsection', 2,
'subsection', 3,
'unnumberedsubsec', 3,
'subheading', 3,
'appendixsubsec', 3,
'subsubsection', 4,
'unnumberedsubsubsec', 4,
'subsubheading', 4,
'appendixsubsubsec', 4,
);
#
# accent map, TeX command to ISO name
#
%accent_map = (
'"', 'uml',
'\'', 'acute',
',{', 'cedil',
'~', 'tilde',
'^', 'circ',
'`', 'grave',
'ringaccent{', 'ring',
);
#
# texinfo "simple things" (@foo) to HTML ones
#
%simple_map = (
# cf. makeinfo.c
"*", "<br />", # HTML+
" ", " ",
"\n", "\n",
"|", "",
# spacing commands
":", "",
"!", "!",
"?", "?",
".", ".",
# @- means "allow word break", not &mdash;
"-", "",
);
#
# texinfo "things" (@foo{}) to HTML ones
#
%things_map = (
'TeX', 'TeX',
'br', '<p>', # paragraph break
'bullet', '*',
'copyright', '(C)',
'registeredsymbol', '(R)',
'dots', '...',
'equiv', '==',
'error', 'error-->',
'expansion', '==>',
'minus', '-',
'point', '-!-',
'print', '-|',
'result', '=>',
'today', $TODAY,
);
#
# texinfo styles (@foo{bar}) to HTML ones
#
%style_map = (
'asis', '',
'b', 'B',
'cite', 'cite',
'code', 'code',
'command', 'code',
'ctrl', '&do_ctrl', # special case
'dfn', 'strong', # DFN tag is illegal in the standard
'dmn', '', # useless
'email', '&fix_email', # special
'emph', 'em',
'file', '"tt', # will put quotes, cf. &apply_style
'i', 'i',
'kbd', 'kbd',
'key', 'kbd',
'r', '', # unsupported
'samp', '"samp', # will put quotes, cf. &apply_style
'sc', '&do_sc', # special case
'strong', 'strong',
't', 'tt',
'titlefont', '', # useless
'image', '&fix_image', # Image
'url', '&fix_url', # URL
'uref', '&fix_uref', # URL Reference
'var', 'var',
'w', '', # unsupported
);
#
# texinfo format (@foo/@end foo) to HTML ones
#
%format_map = (
'display', 'PRE',
'example', 'PRE',
'format', 'PRE',
'lisp', 'PRE',
'quotation', 'BLOCKQUOTE',
'smallexample', 'PRE',
'smalllisp', 'PRE',
# lists
'itemize', 'UL',
'enumerate', 'OL',
# poorly supported
'flushleft', 'PRE',
'flushright', 'PRE',
);
#
# texinfo definition shortcuts to real ones
#
%def_map = (
# basic commands
'deffn', 0,
'defvr', 0,
'deftypefn', 0,
'deftypevr', 0,
'defcv', 0,
'defop', 0,
'deftp', 0,
# basic x commands
'deffnx', 0,
'defvrx', 0,
'deftypefnx', 0,
'deftypevrx', 0,
'defcvx', 0,
'defopx', 0,
'deftpx', 0,
# shortcuts
'defun', 'deffn Function',
'defmac', 'deffn Macro',
'defspec', 'deffn {Special Form}',
'defvar', 'defvr Variable',
'defopt', 'defvr {User Option}',
'deftypefun', 'deftypefn Function',
'deftypevar', 'deftypevr Variable',
'defivar', 'defcv {Instance Variable}',
'defmethod', 'defop Method',
# x shortcuts
'defunx', 'deffnx Function',
'defmacx', 'deffnx Macro',
'defspecx', 'deffnx {Special Form}',
'defvarx', 'defvrx Variable',
'defoptx', 'defvrx {User Option}',
'deftypefunx', 'deftypefnx Function',
'deftypevarx', 'deftypevrx Variable',
'defivarx', 'defcvx {Instance Variable}',
'defmethodx', 'defopx Method',
);
#
# things to skip
#
%to_skip = (
# comments
'c', 1,
'comment', 1,
# useless
'contents', 1,
'shortcontents', 1,
'summarycontents', 1,
'footnotestyle', 1,
'end ifclear', 1,
'end ifset', 1,
'titlepage', 1,
'end titlepage', 1,
# unsupported commands (formatting)
'afourpaper', 1,
'cropmarks', 1,
'finalout', 1,
'headings', 1,
'need', 1,
'page', 1,
'setchapternewpage', 1,
'everyheading', 1,
'everyfooting', 1,
'evenheading', 1,
'evenfooting', 1,
'oddheading', 1,
'oddfooting', 1,
'smallbook', 1,
'vskip', 1,
'filbreak', 1,
# unsupported formats
'cartouche', 1,
'end cartouche', 1,
'group', 1,
'end group', 1,
);
#+++############################################################################
# #
# Argument parsing, initialisation #
# #
#---############################################################################
%value = (); # hold texinfo variables
$use_bibliography = 1;
$use_acc = 0;
$debug = 0;
$doctype = '';
$check = 0;
$expandinfo = 0;
$use_glossary = 0;
$invisible_mark = '';
$use_iso = 0;
@include_dirs = ();
$show_menu = 0;
$number_sections = 0;
$split_node = 0;
$split_chapter = 0;
$monolithic = 0;
$verbose = 0;
$opt_use_numbers = 0;
$opt_empty_headers = 0;
$opt_special_links = "";
$usage = <<EOT;
This is $THISPROG
To convert a Texinfo file to HMTL: $0 [options] file
where options can be:
-acc : convert @"-like accents to &entities;
-expandinfo : use \@ifinfo sections, not \@iftex
-glossary : handle a glossary
-invisible name: use 'name' as an invisible anchor
-I dir : search also for files in 'dir'
-Dvar=value : define a variable, as with \@set
-menu : handle menus
-monolithic : output only one file including ToC
-number : number sections
-split_chapter : split on main sections
-split_node : split on nodes
-ref_num : use numeric names when spliting
-empty_headers : no headers and implicit links (for inclusion into other documents)
-usage : print usage instructions
-verbose : verbose output
To check converted files: $0 -check [-verbose] files
EOT
#
while ($#ARGV >= 0 && $ARGV[0] =~ /^-/)
{
$_ = shift(@ARGV);
if (/^-acc$/) { $use_acc = 1; next; }
if (/^-d(ebug)?(\d+)?$/) { $debug = $2 || shift(@ARGV); next; }
if (/^-doctype$/) { $doctype = shift(@ARGV); next; }
if (/^-c(heck)?$/) { $check = 1; next; }
if (/^-e(xpandinfo)?$/) { $expandinfo = 1; next; }
if (/^-g(lossary)?$/) { $use_glossary = 1; next; }
if (/^-i(nvisible)?$/) { $invisible_mark = shift(@ARGV); next; }
if (/^-iso$/) { $use_iso = 1; next; }
if (/^-I(.+)?$/) { push(@include_dirs, $2 || shift(@ARGV)); next; }
if (/^-D([a-zA-Z0-9]+)=?(.+)?$/)
{ $value{$1} = $2 ? $2 : 1; next; }
if (/^-m(enu)?$/) { $show_menu = 1; next; }
if (/^-mono(lithic)?$/) { $monolithic = 1; next; }
if (/^-n(umber)?$/) { $number_sections = 1; next; }
if (/^-ref_num$/) { $opt_use_numbers = 1; next; }
if (/^-empty_headers$/) { $opt_empty_headers = 1; next; }
if (/^-special_links$/) { $opt_special_links = $2 || shift(@ARGV); next; }
if (/^-s(plit)?_?(n(ode)?|c(hapter)?)?$/) {
if ($2 =~ /^n/) {
$split_node = 1;
} else {
$split_chapter = 1;
}
next;
}
if (/^-v(erbose)?$/) { $verbose = 1; next; }
die $usage;
}
if ($check) {
die $usage unless @ARGV > 0;
&check;
exit;
}
die "Can't use -special_links with -ref_num.\n"
if $opt_special_links && $opt_use_numbers;
die "Must have -split_node with -special_links.\n"
if $opt_special_links && !$split_node;
if (($split_node || $split_chapter) && $monolithic) {
warn "Can't use -monolithic with -split, -monolithic ignored.\n";
$monolithic = 0;
}
if ($expandinfo) {
$to_skip{'ifinfo'}++;
$to_skip{'end ifinfo'}++;
} else {
$to_skip{'iftex'}++;
$to_skip{'end iftex'}++;
}
$invisible_mark = '<IMG SRC="invisible.xbm">' if $invisible_mark eq 'xbm';
die $usage unless @ARGV == 1;
$docu = shift(@ARGV);
if ($docu =~ /.*\//) {
chop($docu_dir = $&);
$docu_name = $';
} else {
$docu_dir = '.';
$docu_name = $docu;
}
unshift(@include_dirs, $docu_dir);
$docu_name =~ s/\.te?x(i|info)?$//; # basename of the document
$docu_doc = "$docu_name.html"; # document's contents
$link_doc = $docu_doc;
if ($monolithic) {
$docu_toc = $docu_foot = $docu_doc;
} else {
$docu_toc = "${docu_name}_toc.html"; # document's table of contents
$docu_foot = "${docu_name}_foot.html"; # document's footnotes
}
#
# variables
#
$value{'html'} = 1; # predefine html (the output format)
$value{'texi2html'} = '1.52'; # predefine texi2html (the translator)
# _foo: internal to track @foo
foreach ('_author', '_title', '_subtitle',
'_settitle', '_setfilename') {
$value{$_} = ''; # prevent -w warnings
}
%node2sec = (); # node to section name
%node2href = (); # node to HREF
%bib2href = (); # bibliography reference to HREF
%gloss2href = (); # glossary term to HREF
@sections = (); # list of sections
%tag2pro = (); # protected sections
#
# initial indexes
#
$bib_num = 0;
$foot_num = 0;
$gloss_num = 0;
$idx_num = 0;
$sec_num = 0;
$doc_num = 0;
$current_chapter_link = "";
@maybe_wrong_links = ();
$html_num = 0;
#
# can I use ISO8879 characters? (HTML+)
#
if ($use_iso) {
$things_map{'bullet'} = "&bull;";
$things_map{'copyright'} = "&copy;";
$things_map{'registeredsymbol'} = "&reg;";
$things_map{'dots'} = "&hellip;";
$things_map{'equiv'} = "&equiv;";
$things_map{'expansion'} = "&rarr;";
$things_map{'point'} = "&lowast;";
$things_map{'result'} = "&rArr;";
$things_map{'ss'} = "&szlig;";
$things_map{'o'} = "&oslash;";
$things_map{'O'} = "&Oslash;";
}
#
# read texi2html extensions (if any)
#
$extensions = 'texi2html.ext'; # extensions in working directory
if (-f $extensions) {
print "# reading extensions from $extensions\n" if $verbose;
require($extensions);
}
($progdir = $0) =~ s/[^\/]+$//;
if ($progdir && ($progdir ne './'))
{
$extensions = "${progdir}texi2html.ext"; # extensions in texi2html directory
if (-f $extensions) {
print "# reading extensions from $extensions\n" if $verbose;
require($extensions);
}
}
print "# reading from $docu\n" if $verbose;
#+++############################################################################
# #
# Pass 1: read source, handle command, variable, simple substitution #
# #
#---############################################################################
@lines = (); # whole document
@toc_lines = (); # table of contents
$toplevel = 0; # top level seen in hierarchy
$curlevel = 0; # current level in TOC
$node = ''; # current node name
$in_table = 0; # am I inside a table
$table_type = ''; # type of table ('', 'f', 'v')
@tables = (); # nested table support
$in_bibliography = 0; # am I inside a bibliography
$in_glossary = 0; # am I inside a glossary
$in_top = 0; # am I inside the top node
$in_pre = 0; # am I inside a preformatted section
$in_list = 0; # am I inside a list
$in_html = 0; # am I inside an HTML section
$first_line = 1; # is it the first line
$dont_html = 0; # don't protect HTML on this line
$split_num = 0; # split index
$deferred_ref = ''; # deferred reference for indexes
@html_stack = (); # HTML elements stack
$html_element = ''; # current HTML element
&html_reset;
# build code for simple substitutions
# the maps used (%simple_map and %things_map) MUST be aware of this
# watch out for regexps, / and escaped characters!
$subst_code = '';
foreach (keys(%simple_map)) {
$re = quotemeta $_; # protect regexp chars
$sub = quotemeta $simple_map{$_};
$subst_code .= "s/\\\@$re/$sub/g;\n";
}
foreach (keys(%things_map)) {
$re = quotemeta $_; # protect regexp chars
$sub = quotemeta $things_map{$_};
$subst_code .= "s/\\\@$re\\{\\}/$sub/g;\n";
}
if ($use_acc) {
# accentuated characters
foreach (keys(%accent_map)) {
my $brace = /{$/ ? '}' : '';
if ($_ eq "`") {
$subst_code .= "s/$;3";
} elsif ($_ eq "'") {
$subst_code .= "s/$;4";
} else {
$subst_code .= "s/\\\@\\Q$_\\E";
}
$subst_code .= "(\\w)$brace/&\${1}$accent_map{$_};/gi;\n";
}
}
eval("sub simple_substitutions { $subst_code }");
&init_input;
READ_LINE: while ($_ = &next_line)
{
#
# remove \input on the first lines only
#
if ($first_line) {
next if /^\\input/;
$first_line = 0;
}
#
# parse texinfo tags
#
$tag = '';
$end_tag = '';
if (/^\s*\@end\s+(\w+)\b/) {
$end_tag = $1;
} elsif (/^\s*\@(\w+)\b/) {
$tag = $1;
}
#
# handle @ifhtml / @end ifhtml
#
if ($in_html) {
if ($end_tag eq 'ifhtml') {
$in_html = 0;
} else {
$tag2pro{$in_html} .= $_;
}
next;
} elsif ($tag eq 'ifhtml') {
$in_html = $PROTECTTAG . ++$html_num;
push(@lines, $in_html);
next;
}
#
# try to skip the line
#
if ($end_tag) {
next if $to_skip{"end $end_tag"};
} elsif ($tag) {
next if $to_skip{$tag};
last if $tag eq 'bye';
}
if ($in_top) {
# parsing the top node
if ($tag eq 'node' || $tag eq 'include' || $sec2level{$tag}) {
# no more in top
$in_top = 0;
} else {
# skip it
next;
}
}
#
# try to remove inlined comments
# syntax from tex-mode.el comment-start-skip
#
s/((^|[^\s*\@])(\@\@)*)\@c(omment)? .*/$1/;
# non-@ substitutions cf. texinfmt.el
# Since these changes break code examples in the source they were removed. David 990729
#s/``/\"/g;
#s/''/\"/g;
s/([\w ])---([\w ])/$1--$2/g;
#
# analyze the tag
#
if ($tag) {
# skip lines
&skip_until($tag), next if $tag eq 'ignore';
if ($expandinfo) {
&skip_until($tag), next if $tag eq 'iftex';
} else {
&skip_until($tag), next if $tag eq 'ifinfo';
}
&skip_until($tag), next if $tag eq 'tex';
# handle special tables
if ($tag eq 'table') {
$table_type = '';
} elsif ($tag eq 'ftable') {
$tag = 'table';
$table_type = 'f';
} elsif ($tag eq 'vtable') {
$tag = 'table';
$table_type = 'v';
}
# special cases
if ($tag eq 'top' || ($tag eq 'node' && /^\s*\@node\s+top\s*,/i)) {
$in_top = 1;
@lines = (); # ignore all lines before top (title page garbage)
next;
} elsif ($tag eq 'node') {
$in_top = 0;
warn "$ERROR Bad node line: $_" unless $_ =~ /^\s*\@node\s$NODESRE$/o;
$_ = &protect_html($_); # if node contains '&' for instance
s/^\s*\@node\s+//;
($node) = split(/,/);
&normalise_node($node);
if ($split_node) {
($doc_node_name[$doc_num + 1] = $node) =~ s|[ /]|_|g;
$doc_node_name_links[$doc_num + 1] = $current_chapter_link;
&next_doc;
push(@lines, $SPLITTAG) if $split_num++;
push(@sections, $node);
}
next;
} elsif ($tag eq 'include') {
if (/^\s*\@include\s+($FILERE)\s*$/o) {
$file = $1;
unless (-e $file) {
foreach $dir (@include_dirs) {
$file = "$dir/$1";
last if -e $file;
}
}
if (-e $file) {
&open($file);
print "# including $file\n" if $verbose;
} else {
warn "$ERROR Can't find $file, skipping";
}
} else {
warn "$ERROR Bad include line: $_";
}
next;
} elsif ($tag eq 'ifclear') {
if (/^\s*\@ifclear\s+($VARRE)\s*$/o) {
next unless defined($value{$1});
&skip_until($tag);
} else {
warn "$ERROR Bad ifclear line: $_";
}
next;
} elsif ($tag eq 'ifset') {
if (/^\s*\@ifset\s+($VARRE)\s*$/o) {
next if defined($value{$1});
&skip_until($tag);
} else {
warn "$ERROR Bad ifset line: $_";
}
next;
} elsif ($tag eq 'menu') {
unless ($show_menu) {
&skip_until($tag);
next;
}
&html_push_if($tag);
push(@lines, &html_debug("\n", __LINE__));
} elsif ($format_map{$tag}) {
$in_pre = 1 if $format_map{$tag} eq 'PRE';
&html_push_if($format_map{$tag});
push(@lines, &html_debug("\n", __LINE__));
$in_list++ if $format_map{$tag} eq 'UL' || $format_map{$tag} eq 'OL' ;
push(@lines, &debug("<$format_map{$tag}>\n", __LINE__));
next;
} elsif ($tag eq 'table') {
if (/^\s*\@[fv]?table\s+\@(\w+)\s*$/) {
$in_table = $1;
unshift(@tables, join($;, $table_type, $in_table));
push(@lines, &debug("<DL COMPACT>\n", __LINE__));
&html_push_if('DL');
push(@lines, &html_debug("\n", __LINE__));
} else {
warn "$ERROR Bad table line: $_";
}
next;
} elsif ($tag eq 'multitable') {
if (/^\s*\@multitable\s*\@columnfractions\s+([\.\d\s]+)\s*$/ ||
/^\s*\@multitable\s*({[^{}]+})+\s*$/)
{
$in_multitable = 1;
html_push('TABLE');
my($col_list) = $1;
$multitable_cols = ($col_list =~ /\@columnfractions/ ? s/[\d.]+\s+//g :
s/{[^{}]+}//g);
print "# Multitable with $multitable_cols columns\n"
if $debug and $DEBUG_USER;
push(@lines, &debug("<TABLE BORDER>\n", __LINE__));
} else {
warn "$ERROR Bad table line: $_";
}
next;
} elsif ($tag eq 'synindex' || $tag eq 'syncodeindex') {
if (/^\s*\@$tag\s+(\w)\w\s+(\w)\w\s*$/) {
eval("*${1}index = *${2}index");
} else {
warn "$ERROR Bad syn*index line: $_";
}
next;
} elsif ($tag eq 'sp') {
push(@lines, &debug("<P>\n", __LINE__));
next;
} elsif ($tag eq 'setref') {
&protect_html; # if setref contains '&' for instance
if (/^\s*\@$tag\s*{($NODERE)}\s*$/) {
$setref = $1;
$setref =~ s/\s+/ /g; # normalize
$setref =~ s/ $//;
$node2sec{$setref} = $name;
$node2href{$setref} = "$link_doc#$docid";
push(@maybe_wrong_links, $setref);
} else {
warn "$ERROR Bad setref line: $_";
}
next;
} elsif ($tag eq 'defindex' || $tag eq 'defcodeindex') {
if (/^\s*\@$tag\s+(\w\w)\s*$/) {
$valid_index{$1} = 1;
} else {
warn "$ERROR Bad defindex line: $_";
}
next;
} elsif (defined($def_map{$tag})) {
if ($def_map{$tag}) {
s/^\s*\@$tag\s+//;
$tag = $def_map{$tag};
$_ = "\@$tag $_";
$tag =~ s/\s.*//;
}
} elsif (defined($user_sub{$tag})) {
s/^\s*\@$tag\s+//;
$sub = $user_sub{$tag};
print "# user $tag = $sub, arg: $_" if $debug & $DEBUG_USER;
if (defined(&$sub)) {
chop($_);
&$sub($_);
} else {
warn "$ERROR Bad user sub for $tag: $sub\n";
}
next;
}
if (defined($def_map{$tag})) {
s/^\s*\@$tag\s+//;
if ($tag =~ /x$/) {
# extra definition line
$tag = $`;
$is_extra = 1;
} else {
$is_extra = 0;
}
while (/\{([^\{\}]*)\}/) {
# this is a {} construct
($before, $contents, $after) = ($`, $1, $');
# protect spaces
$contents =~ s/\s+/$;9/g;
# restore $_ protecting {}
$_ = "$before$;7$contents$;8$after";
}
@args = split(/\s+/, &protect_html($_));
foreach (@args) {
s/$;9/ /g; # unprotect spaces
s/$;7/\{/g; # ... {
s/$;8/\}/g; # ... }
}
$type = shift(@args);
$type =~ s/^\{(.*)\}$/$1/;
print "# def ($tag): {$type} ", join(', ', @args), "\n"
if $debug & $DEBUG_DEF;
$type .= ':'; # it's nicer like this
$name = shift(@args);
$name =~ s/^\{(.*)\}$/$1/;
if ($is_extra) {
$_ = &debug("<DT>", __LINE__);
} else {
$_ = &debug("<DL>\n<DT>", __LINE__);
}
if ($tag eq 'deffn' || $tag eq 'defvr' || $tag eq 'deftp') {
$_ .= "<U>$type</U> <B>$name</B>";
$_ .= " <I>@args</I>" if @args;
} elsif ($tag eq 'deftypefn' || $tag eq 'deftypevr'
|| $tag eq 'defcv' || $tag eq 'defop') {
$ftype = $name;
$name = shift(@args);
$name =~ s/^\{(.*)\}$/$1/;
$_ .= "<U>$type</U> $ftype <B>$name</B>";
$_ .= " <I>@args</I>" if @args;
} else {
warn "$ERROR Unknown definition type: $tag\n";
$_ .= "<U>$type</U> <B>$name</B>";
$_ .= " <I>@args</I>" if @args;
}
$_ .= &debug("\n<DD>", __LINE__);
$name = &unprotect_html($name);
if ($tag eq 'deffn' || $tag eq 'deftypefn') {
unshift(@input_spool, "\@findex $name\n");
} elsif ($tag eq 'defop') {
unshift(@input_spool, "\@findex $name on $ftype\n");
} elsif ($tag eq 'defvr' || $tag eq 'deftypevr' || $tag eq 'defcv') {
unshift(@input_spool, "\@vindex $name\n");
} else {
unshift(@input_spool, "\@tindex $name\n");
}
$dont_html = 1;
}
} elsif ($end_tag) {
if ($format_map{$end_tag}) {
$in_pre = 0 if $format_map{$end_tag} eq 'PRE';
$in_list-- if $format_map{$end_tag} eq 'UL' || $format_map{$end_tag} eq 'OL' ;
&html_pop_if('LI', 'P');
&html_pop_if();
push(@lines, &debug("</$format_map{$end_tag}>\n", __LINE__));
push(@lines, &html_debug("\n", __LINE__));
} elsif ($end_tag eq 'table' ||
$end_tag eq 'ftable' ||
$end_tag eq 'vtable') {
shift(@tables);
if (@tables) {
($table_type, $in_table) = split($;, $tables[0]);
} else {
$in_table = 0;
$table_type = '';
}
push(@lines, "</DL>\n");
&html_pop_if('DD');
&html_pop_if();
} elsif ($end_tag eq 'multitable') {
print "# end of multitable with $multitable_cols columns\n"
if $debug and $DEBUG_USER;
$in_multitable = 0;
push(@lines, "</TD></TR>\n");
&html_pop_if('TR');
push(@lines, "</TABLE>\n");
&html_pop_if('TABLE');
} elsif (defined($def_map{$end_tag})) {
push(@lines, &debug("</DL>\n", __LINE__));
} elsif ($end_tag eq 'menu') {
&html_pop_if();
push(@lines, $_); # must keep it for pass 2
}
next;
}
#
# misc things
#
# protect texi and HTML things
&protect_texi;
$_ = &protect_html($_) unless $dont_html;
$dont_html = 0;
# substitution (unsupported things)
s/^\s*\@center\s+//g;
s/^\s*\@exdent\s+//g;
s/\@noindent\s+//g;
s/\@refill\s+//g;
# other substitutions
&simple_substitutions;
s/\@value{($VARRE)}/$value{$1}/eg;
s/\@footnote\{/\@footnote$docu_doc\{/g; # mark footnotes, cf. pass 4
s/(^|\s+)\@tab\s*/ <\/TD><TD> /g if ($in_multitable);
#
# analyze the tag again
#
if ($tag) {
if (defined($sec2level{$tag}) && $sec2level{$tag} > 0) {
if (/^\s*\@$tag\s+(.+)$/) {
$name = $1;
$name =~ s/\s+$//;
$level = $sec2level{$tag};
$name = &update_sec_num($tag, $level) . " $name"
if $number_sections && $tag !~ /^unnumbered/ && $tag ne 'subsubheading';
if ($tag =~ /heading$/) {
push(@lines, &html_debug("\n", __LINE__));
if ($html_element ne 'body') {
# We are in a nice pickle here. We are trying to get a H? heading
# even though we are not in the body level. So, we convert
# it to a nice, bold, line by itself.
$_ = &debug("\n\n<P><STRONG>$name</STRONG></P>\n\n", __LINE__);
} else {
$_ = &debug("<H$level>$name</H$level>\n", __LINE__);
&html_push_if('body');
}
print "# heading, section $name, level $level\n"
if $debug & $DEBUG_TOC;
} else {
if ($split_chapter) {
unless ($toplevel) {
# first time we see a "section"
unless ($level == 1) {
warn "$ERROR The first section found is not of level 1: $_";
warn "$ERROR I'll split on sections of level $level...\n";
}
$toplevel = $level;
};
if ($level == $toplevel) {
print "# Splitting at section $name\n"
if $debug & $DEBUG_TOC;
($doc_node_name[$doc_num + 1] = $node) =~ s|[ /]|_|g;
&next_doc;
push(@lines, $SPLITTAG) if $split_num++;
push(@sections, $name);
}
} elsif ($split_node && $opt_special_links) {
$toplevel = $level unless $toplevel;
if ($level == $toplevel) {
($current_chapter_link = $node) =~ s|[ /]|_|g;
# Set this again to the right value.
$doc_node_name_links[$doc_num] = $current_chapter_link;
($docu_doc, $link_doc) = &doc_name($doc_num);
}
}
$sec_num++;
# Was "SEC$sec_num"
($docid = "$node") =~ s|[ /]|_|g;
($tocid = "$node") =~ s|[ /]|_|g;
$docid = "SEC$sec_num" unless $docid;
$tocid = "SEC$sec_num" unless $tocid;
# check biblio and glossary
$in_bibliography =
($name =~ /^([A-Z]|\d+)?(\.\d+)*\s*bibliography$/i);
$in_glossary = ($name =~ /^([A-Z]|\d+)?(\.\d+)*\s*glossary$/i);
# check node
if ($node) {
if ($node2sec{$node}) {
warn "$ERROR Duplicate node found: $node\n";
} else {
$node2sec{$node} = $name;
$node2href{$node} = "$link_doc#$docid";
push(@maybe_wrong_links, $node);
print "# node $node, section $name, level $level\n"
if $debug & $DEBUG_TOC;
}
$node = '';
} else {
print "# no node, section $name, level $level\n"
if $debug & $DEBUG_TOC;
}
# update TOC
while ($level > $curlevel) {
$curlevel++;
push(@toc_lines, "<UL>\n");
}
while ($level < $curlevel) {
$curlevel--;
push(@toc_lines, "</UL>\n");
}
$_ = "<LI>" . &anchor($tocid, "$link_doc#$docid", $name, 1);
push(@toc_lines, &substitute_style($_));
# update DOC
push(@lines, &html_debug("\n", __LINE__));
&html_reset;
$_ = "<H$level>".&anchor($docid, $opt_empty_headers ? "" : "$docu_toc#$tocid",
$name)."</H$level>\n";
$_ = &debug($_, __LINE__);
push(@lines, &html_debug("\n", __LINE__));
}
# update DOC
foreach $line (split(/\n+/, $_)) {
push(@lines, "$line\n");
}
next;
} else {
warn "$ERROR Bad section line: $_";
}
} else {
# track variables
$value{$1} = $2, next if /^\s*\@set\s+($VARRE)\s+(.*)$/o;
delete $value{$1}, next if /^\s*\@clear\s+($VARRE)\s*$/o;
# store things
$value{'_setfilename'} = $1, next if /^\s*\@setfilename\s+(.*)$/;
$value{'_settitle'} = $1, next if /^\s*\@settitle\s+(.*)$/;
$value{'_author'} .= "$1\n", next if /^\s*\@author\s+(.*)$/;
$value{'_subtitle'} .= "$1\n", next if /^\s*\@subtitle\s+(.*)$/;
$value{'_title'} .= "$1\n", next if /^\s*\@title\s+(.*)$/;
# index
if (/^\s*\@(..?)index\s+/) {
unless ($valid_index{$1}) {
warn "$ERROR Undefined index command: $_";
next;
}
$id = 'IDX' . ++$idx_num;
$index = $1 . 'index';
$what = &substitute_style($');
$what =~ s/\s+$//;
print "# found $index for '$what' id $id\n"
if $debug & $DEBUG_INDEX;
eval(<<EOC);
if (defined(\$$index\{\$what\})) {
\$$index\{\$what\} .= "$;$link_doc#$id";
} else {
\$$index\{\$what\} = "$link_doc#$id";
}
EOC
#
# dirty hack to see if I can put an invisible anchor...
#
if ($html_element eq 'P' ||
$html_element eq 'LI' ||
$html_element eq 'DT' ||
$html_element eq 'DD' ||
$html_element eq 'ADDRESS' ||
$html_element eq 'B' ||
$html_element eq 'BLOCKQUOTE' ||
$html_element eq 'PRE' ||
$html_element eq 'SAMP') {
push(@lines, &anchor($id, '', $invisible_mark, !$in_pre));
} elsif ($html_element eq 'body') {
push(@lines, &debug("<P>\n", __LINE__));
push(@lines, &anchor($id, '', $invisible_mark, !$in_pre));
&html_push('P');
} elsif ($html_element eq 'DL' ||
$html_element eq 'UL' ||
$html_element eq 'OL' ||
$html_element eq 'TR') {
$deferred_ref .=
&anchor($id, '', $invisible_mark, !$in_pre) . " ";
}
next;
}
# list item
if (/^\s*\@itemx?\s+/)
{
$what = $';
$what =~ s/\s+$//;
# add an index before the item if applicable
if ($table_type ne '' && !$in_multitable) {
print "# Adding table index (type $table_type) for $what\n"
if $debug & $DEBUG_INDEX;
# This is realy ugly. We should do a pass before this to
# add index entrys before instead.
if ($global_added_this_index) {
$global_added_this_index = 0;
} else {
unshift(@input_spool, "\@${table_type}index $what\n", $_);
$global_added_this_index = 1;
next READ_LINE;
}
}
if ($in_bibliography && $use_bibliography) {
if ($what =~ /^$BIBRE$/o) {
$id = 'BIB' . ++$bib_num;
$bib2href{$what} = "$link_doc#$id";
print "# found bibliography for '$what' id $id\n"
if $debug & $DEBUG_BIB;
$what = &anchor($id, '', $what);
}
} elsif ($in_glossary && $use_glossary) {
$id = 'GLOSS' . ++$gloss_num;
$entry = $what;
$entry =~ tr/A-Z/a-z/ unless $entry =~ /^[A-Z\s]+$/;
$gloss2href{$entry} = "$link_doc#$id";
print "# found glossary for '$entry' id $id\n"
if $debug & $DEBUG_GLOSS;
$what = &anchor($id, '', $what);
}
if ($in_multitable)
{
# All this is a **HACK**.
# It does only work for a FEW SIMPLE CASES !!!
push(@lines, &debug("</TD></TR>\n", __LINE__))
unless $html_element eq 'TABLE';
&html_pop_if('TR');
$what =~ s/(^|\s+)\@tab\s*/ <\/TD><TD> /g;
push(@lines, &debug("<TR><TD>$what\n", __LINE__));
&html_push('TR');
if ($deferred_ref)
{
push(@lines, &debug("$deferred_ref\n", __LINE__));
$deferred_ref = '';
}
next;
}
else
{
&html_pop_if('P');
if ($html_element eq 'DL' || $html_element eq 'DD') {
if ($things_map{$in_table} && !$what) {
# special case to allow @table @bullet for instance
push(@lines, &debug("<DT>$things_map{$in_table}\n", __LINE__));
} else {
push(@lines, &debug("<DT>\@$in_table\{$what\}\n", __LINE__));
}
push(@lines, "<DD>");
&html_push('DD') unless $html_element eq 'DD';
# Old index add was here
} else {
push(@lines, &debug("<LI>$what\n", __LINE__));
&html_push('LI') unless $html_element eq 'LI';
}
push(@lines, &html_debug("\n", __LINE__));
if ($deferred_ref) {
push(@lines, &debug("$deferred_ref\n", __LINE__));
$deferred_ref = '';
}
next;
}
}
}
}
# paragraph separator
if ($_ eq "\n") {
next if $#lines >= 0 && $lines[$#lines] eq "\n";
if ($html_element eq 'P') {
push(@lines, "\n");
$_ = &debug("</P>\n", __LINE__);
&html_pop;
}
} elsif ($html_element eq 'body' || $html_element eq 'BLOCKQUOTE') {
push(@lines, "<P>\n");
&html_push('P');
$_ = &debug($_, __LINE__);
}
# otherwise
push(@lines, $_);
}
# finish TOC
$level = 0;
while ($level < $curlevel)
{
$curlevel--;
push(@toc_lines, "</UL>\n");
}
print "# end of pass 1\n" if $verbose;
#+++############################################################################
# #
# Pass 2/3: handle style, menu, index, cross-reference #
# #
#---############################################################################
@lines2 = (); # whole document (2nd pass)
@lines3 = (); # whole document (3rd pass)
$in_menu = 0; # am I inside a menu
while (@lines)
{
$_ = shift(@lines);
#
# special case (protected sections)
#
if (/^$PROTECTTAG/o) {
push(@lines2, $_);
next;
}
#
# menu
#
$in_menu = 1, push(@lines2, &debug("<UL>\n", __LINE__)), next if /^\s*\@menu\b/;
$in_menu = 0, push(@lines2, &debug("</UL>\n", __LINE__)), next if /^\s*\@end\s+menu\b/;
if ($in_menu) {
if (/^\*\s+($NODERE)::/o) {
$descr = $';
chop($descr);
&menu_entry($1, $1, $descr);
} elsif (/^\*\s+(.+):\s+([^\t,\.\n]+)[\t,\.\n]/) {
$descr = $';
chop($descr);
&menu_entry($1, $2, $descr);
} elsif (/^\*/) {
warn "$ERROR Bad menu line: $_";
} else { # description continued?
push(@lines2, $_);
}
next;
}
#
# printindex
#
if (/^\s*\@printindex\s+(\w\w)\b/) {
local($index, *ary, @keys, $key, $letter, $last_letter, @refs);
if ($predefined_index{$1}) {
$index = $predefined_index{$1} . 'index';
} else {
$index = $1 . 'index';
}
eval("*ary = *$index");
@keys = keys(%ary);
foreach $key (@keys) {
$_ = $key;
1 while s/<(\w+)>\`(.*)\'<\/\1>/$2/; # remove HTML tags with quotes
1 while s/<(\w+)>(.*)<\/\1>/$2/; # remove HTML tags
$_ = &unprotect_html($_);
&unprotect_texi;
tr/A-Z/a-z/; # lowercase
$key2alpha{$key} = $_;
print "# index $key sorted as $_\n"
if $key ne $_ && $debug & $DEBUG_INDEX;
}
$last_letter = undef;
foreach $key (sort byalpha @keys) {
$letter = substr($key2alpha{$key}, 0, 1);
$letter = substr($key2alpha{$key}, 0, 2) if $letter eq $;;
$letter = " " unless $letter =~ /[a-zA-Z]/;
if (!defined($last_letter) || $letter ne $last_letter) {
push(@lines2, "</DIR>\n") if defined($last_letter);
push(@lines2, "<H2>" . &protect_html(uc($letter)) . "</H2>\n");
push(@lines2, "<DIR>\n");
$last_letter = $letter;
}
@refs = ();
foreach (split(/$;/, $ary{$key})) {
push(@refs, &anchor('', $_, $key, 0));
}
push(@lines2, "<LI>" . join(", ", @refs) . "\n");
}
push(@lines2, "</DIR>\n") if defined($last_letter);
next;
}
#
# simple style substitutions
#
$_ = &substitute_style($_);
#
# xref
#
while (/\@(x|px|info|)ref{($XREFRE)(}?)/o) {
# note: Texinfo may accept other characters
($type, $nodes, $full) = ($1, $2, $3);
($before, $after) = ($`, $');
if (! $full && $after) {
warn "$ERROR Bad xref (no ending } on line): $_";
$_ = "$before$;0${type}ref\{$nodes$after";
next; # while xref
}
if ($type eq 'x') {
$type = 'See ';
} elsif ($type eq 'px') {
$type = 'see ';
} elsif ($type eq 'info') {
$type = 'See Info';
} elsif ($type eq 'u') {
$type = 'See ';
} else {
$type = '';
}
unless ($full) {
$next = shift(@lines);
$next = &substitute_style($next);
chop($nodes); # remove final newline
if ($next =~ /\}/) { # split on 2 lines
$nodes .= " $`";
$after = $';
} else {
$nodes .= " $next";
$next = shift(@lines);
$next = &substitute_style($next);
chop($nodes);
if ($next =~ /\}/) { # split on 3 lines
$nodes .= " $`";
$after = $';
} else {
warn "$ERROR Bad xref (no ending }): $_";
$_ = "$before$;0xref\{$nodes$after";
unshift(@lines, $next);
next; # while xref
}
}
}
$nodes =~ s/\s+/ /g; # remove useless spaces
@args = split(/\s*,\s*/, $nodes);
$node = $args[0]; # the node is always the first arg
&normalise_node($node);
$sec = $node2sec{$node};
if (@args == 5) { # reference to another manual
$sec = $args[2] || $node;
$man = $args[4] || $args[3];
$_ = "${before}${type}section `$sec' in \@cite{$man}$after";
} elsif ($type =~ /Info/) { # inforef
warn "$ERROR Wrong number of arguments: $_" unless @args == 3;
($nn, $_, $in) = @args;
$_ = "${before}${type} file `$in', node `$nn'$after";
} elsif ($sec) {
$href = $node2href{$node};
$_ = "${before}${type}section " . &anchor('', $href, $sec) . $after;
} else {
warn "$ERROR Undefined node ($node): $_";
$_ = "$before$;0xref{$nodes}$after";
}
}
#
# try to guess bibliography references or glossary terms
#
# This checked for NAME="SEC\d". The current version is probably broken.
unless (/^<H\d><A NAME=\"/) {
if ($use_bibliography) {
$done = '';
while (/$BIBRE/o) {
($pre, $what, $post) = ($`, $&, $');
$href = $bib2href{$what};
if (defined($href) && $post !~ /^[^<]*<\/A>/) {
$done .= $pre . &anchor('', $href, $what);
} else {
$done .= "$pre$what";
}
$_ = $post;
}
$_ = $done . $_;
}
if ($use_glossary) {
$done = '';
while (/\b\w+\b/) {
($pre, $what, $post) = ($`, $&, $');
$entry = $what;
$entry =~ tr/A-Z/a-z/ unless $entry =~ /^[A-Z\s]+$/;
$href = $gloss2href{$entry};
if (defined($href) && $post !~ /^[^<]*<\/A>/) {
$done .= $pre . &anchor('', $href, $what);
} else {
$done .= "$pre$what";
}
$_ = $post;
}
$_ = $done . $_;
}
}
# otherwise
push(@lines2, $_);
}
print "# end of pass 2\n" if $verbose;
#
# split style substitutions
#
while (@lines2)
{
$_ = shift(@lines2);
#
# special case (protected sections)
#
if (/^$PROTECTTAG/o) {
push(@lines3, $_);
next;
}
#
# split style substitutions
#
$old = '';
while ($old ne $_) {
$old = $_;
if (/\@(\w+)\{/) {
($before, $style, $after) = ($`, $1, $');
if (defined($style_map{$style})) {
$_ = $after;
$text = '';
$after = '';
$failed = 1;
while (@lines2) {
if (/\}/) {
$text .= $`;
$after = $';
$failed = 0;
last;
} else {
$text .= $_;
$_ = shift(@lines2);
}
}
if ($failed) {
die "* Bad syntax (\@$style) after: $before\n";
} else {
$text = &apply_style($style, $text);
$_ = "$before$text$after";
}
}
}
}
# otherwise
push(@lines3, $_);
}
print "# end of pass 3\n" if $verbose;
#+++############################################################################
# #
# Pass 4: foot notes, final cleanup #
# #
#---############################################################################
@foot_lines = (); # footnotes
@doc_lines = (); # final document
$end_of_para = 0; # true if last line is <P>
while (@lines3)
{
$_ = shift(@lines3);
#
# special case (protected sections)
#
if (/^$PROTECTTAG/o) {
push(@doc_lines, $_);
$end_of_para = 0;
next;
}
#
# footnotes
#
while (/\@footnote([^\{\s]+)\{/) {
($before, $d, $after) = ($`, $1, $');
$_ = $after;
$text = '';
$after = '';
$failed = 1;
while (@lines3) {
if (/\}/) {
$text .= $`;
$after = $';
$failed = 0;
last;
} else {
$text .= $_;
$_ = shift(@lines3);
}
}
if ($failed) {
die "* Bad syntax (\@footnote) after: $before\n";
} else {
$foot_num++;
$docid = "DOCF$foot_num";
$footid = "FOOT$foot_num";
$foot = "($foot_num)";
push(@foot_lines, "<H3>" . &anchor($footid, "$d#$docid", $foot) . "</H3>\n");
$text = "<P>$text" unless $text =~ /^\s*<P>/;
push(@foot_lines, "$text\n");
$_ = $before . &anchor($docid, "$docu_foot#$footid", $foot) . $after;
}
}
#
# remove unnecessary <P>
#
if (/^\s*<P>\s*$/) {
next if $end_of_para++;
} else {
$end_of_para = 0;
}
# otherwise
push(@doc_lines, $_);
}
print "# end of pass 4\n" if $verbose;
#+++############################################################################
# #
# Pass 5: print things #
# #
#---############################################################################
$header = '';
$full_title = $value{'_title'} || $value{'_settitle'} || "Untitled Document";
$title = $value{'_settitle'} || $full_title;
$_ = &substitute_style($full_title);
&unprotect_texi;
s/\n$//; # rmv last \n (if any)
$full_title = "<H1>" . join("</H1>\n<H1>", split(/\n/, $_)) . "</H1>\n";
#
# print ToC
#
if (!$monolithic && @toc_lines)
{
if (open(FILE, "> $docu_toc")) {
print "# creating $docu_toc...\n" if $verbose;
&print_toplevel_header("$title - Table of Contents");
&print_ruler;
&print(*toc_lines, FILE);
&print_toplevel_footer;
close(FILE);
} else {
warn "$ERROR Can't write (toc) to $docu_toc: $!\n";
}
}
#
# print footnotes
#
if (!$monolithic && @foot_lines)
{
if (open(FILE, "> $docu_foot")) {
print "# creating $docu_foot...\n" if $verbose;
&print_toplevel_header("$title - Footnotes");
&print_ruler;
&print(*foot_lines, FILE);
&print_toplevel_footer;
close(FILE);
} else {
warn "$ERROR Can't write (foot) to $docu_foot: $!\n";
}
}
#
# print document
#
if ($split_chapter || $split_node)
{ # split
$doc_num = 0;
$last_num = scalar(@sections);
$first_doc = &doc_name(1);
$last_doc = &doc_name($last_num);
while (@sections) {
$section = shift(@sections);
&next_doc;
# Remove added links part
if (open(FILE, ">$docu_doc")) {
print "# creating $docu_doc... ($section)\n" if $verbose;
&print_header("$title - $section") unless $opt_empty_headers;
$prev_doc = ($doc_num == 1 ? undef : &doc_name($doc_num - 1));
$next_doc = ($doc_num == $last_num ? undef : &doc_name($doc_num + 1));
$navigation = "Go to the ";
$navigation .= ($prev_doc ? &anchor('', $first_doc, "first") : "first");
$navigation .= ", ";
$navigation .= ($prev_doc ? &anchor('', $prev_doc, "previous") : "previous");
$navigation .= ", ";
$navigation .= ($next_doc ? &anchor('', $next_doc, "next") : "next");
$navigation .= ", ";
$navigation .= ($next_doc ? &anchor('', $last_doc, "last") : "last");
$navigation .= " section, " . &anchor('', $docu_toc, "table of contents") . ".\n";
print FILE $navigation unless $opt_empty_headers;
&print_ruler unless $opt_empty_headers;
# find corresponding lines
@tmp_lines = ();
while (@doc_lines) {
$_ = shift(@doc_lines);
last if ($_ eq $SPLITTAG);
push(@tmp_lines, $_);
}
&print(*tmp_lines, FILE);
&print_ruler unless $opt_empty_headers;
print FILE $navigation unless $opt_empty_headers;
&print_footer unless $opt_empty_headers;
close(FILE);
} else {
warn "$ERROR Can't write (doc) to $docu_doc: $!\n";
}
}
}
else
{ # not split
if (open(FILE, ">$docu_doc")) {
print "# creating $docu_doc...\n" if $verbose;
if ($monolithic || !@toc_lines) {
&print_toplevel_header($title);
} else {
&print_header($title);
print FILE $full_title;
}
if ($monolithic && @toc_lines) {
&print_ruler;
print FILE "<H1>Table of Contents</H1>\n";
&print(*toc_lines, FILE);
}
&print_ruler;
&print(*doc_lines, FILE);
if ($monolithic && @foot_lines) {
&print_ruler;
print FILE "<H1>Footnotes</H1>\n";
&print(*foot_lines, FILE);
}
if ($monolithic || !@toc_lines) {
&print_toplevel_footer;
} else {
&print_footer;
}
close(FILE);
} else {
warn "$ERROR Can't write (doc2) to $docu_doc: $!\n";
}
}
print "# that's all folks\n" if $verbose;
#+++############################################################################
# #
# Low level functions #
# #
#---############################################################################
sub update_sec_num
{
local($name, $level) = @_;
$level--; # here we start at 0
if ($name =~ /^appendix/) {
# appendix style
if (defined(@appendix_sec_num)) {
&incr_sec_num($level, @appendix_sec_num);
} else {
@appendix_sec_num = ('A', 0, 0, 0);
}
return(join('.', @appendix_sec_num[0..$level]));
} else {
# normal style
if (defined(@normal_sec_num)) {
&incr_sec_num($level, @normal_sec_num);
} else {
@normal_sec_num = (1, 0, 0, 0);
}
return(join('.', @normal_sec_num[0..$level]));
}
}
sub incr_sec_num
{
local($level, $l);
$level = shift(@_);
$_[$level]++;
foreach $l ($level+1 .. 3) {
$_[$l] = 0;
}
}
sub check
{
local($_, %seen, %context, $before, $match, $after);
while (<>) {
if (/\@(\*|\.|\:|\@|\{|\})/) {
$seen{$&}++;
$context{$&} .= "> $_" if $verbose;
$_ = "$`XX$'";
redo;
}
if (/\@(\w+)/) {
($before, $match, $after) = ($`, $&, $');
if ($before =~ /\b[\w-]+$/ && $after =~ /^[\w-.]*\b/) { # e-mail address
$seen{'e-mail address'}++;
$context{'e-mail address'} .= "> $_" if $verbose;
} else {
$seen{$match}++;
$context{$match} .= "> $_" if $verbose;
}
$match =~ s/^\s*\@/X/;
$_ = "$before$match$after";
redo;
}
}
foreach (sort(keys(%seen))) {
if ($verbose) {
print "$_\n";
print $context{$_};
} else {
print "$_ ($seen{$_})\n";
}
}
}
sub open
{
local($name) = @_;
++$fh_name;
if (open($fh_name, $name)) {
unshift(@fhs, $fh_name);
} else {
warn "$ERROR Can't read file $name: $!\n";
}
}
sub init_input
{
@fhs = (); # hold the file handles to read
@input_spool = (); # spooled lines to read
$fh_name = 'FH000';
&open($docu);
}
sub next_line
{
local($fh, $line);
if (@input_spool) {
$line = shift(@input_spool);
return($line);
}
while (@fhs) {
$fh = $fhs[0];
$line = <$fh>;
return($line) if $line;
close($fh);
shift(@fhs);
}
return(undef);
}
# used in pass 1, use &next_line
sub skip_until
{
local($tag) = @_;
local($_);
while ($_ = &next_line) {
return if /^\s*\@end\s+$tag\s*$/;
}
die "* Failed to find '$tag' after: " . $lines[$#lines];
}
#
# HTML stacking to have a better HTML output
#
sub html_reset
{
@html_stack = ('html');
$html_element = 'body';
}
sub html_push
{
local($what) = @_;
push(@html_stack, $html_element);
$html_element = $what;
}
sub html_push_if
{
local($what) = @_;
push(@html_stack, $html_element)
if ($html_element && $html_element ne 'P');
$html_element = $what;
}
sub html_pop
{
$html_element = pop(@html_stack);
}
sub html_pop_if
{
local($elt);
if (@_) {
foreach $elt (@_) {
if ($elt eq $html_element) {
$html_element = pop(@html_stack) if @html_stack;
last;
}
}
} else {
$html_element = pop(@html_stack) if @html_stack;
}
}
sub html_debug
{
local($what, $line) = @_;
return("<!-- $line @html_stack, $html_element -->$what")
if $debug & $DEBUG_HTML;
return($what);
}
# to debug the output...
sub debug
{
local($what, $line) = @_;
return("<!-- $line -->$what")
if $debug & $DEBUG_HTML;
return($what);
}
sub normalise_node
{
$_[0] =~ s/\s+/ /g;
$_[0] =~ s/ $//;
$_[0] =~ s/^ //;
}
sub menu_entry
{
local($entry, $node, $descr) = @_;
local($href);
&normalise_node($node);
$href = $node2href{$node};
if ($href) {
$descr =~ s/^\s+//;
$descr = ": $descr" if $descr;
push(@lines2, "<LI>" . &anchor('', $href, $entry) . "$descr\n");
} else {
warn "$ERROR Undefined node ($node): $_";
}
}
sub do_ctrl { "^$_[0]" }
sub do_sc { "\U$_[0]\E" }
sub fix_image
{
my($text) = @_;
my($arg1, $ext);
$text =~ /^([^,]*)/;
die "error in image: '$text'" unless defined($1);
$arg1 = $1;
$arg1 =~ s/@@/@/g;
foreach (@include_dirs) {
$ext = "jpg" if -f "$_/$arg1.jpg";
$ext = "gif" if -f "$_/$arg1.gif";
}
if (defined($ext))
{
"<IMG SRC=\"$arg1.$ext\">";
}
else
{
warn "Image $arg1 not found";
"";
}
}
sub fix_url
{
my($text) = @_;
$text =~ s/@@/@/g;
$text;
}
sub fix_uref
{
my($text) = @_;
my($arg1, $arg2);
$text =~ /^([^,]*),?([^,]*)?$/;
die "error in uref: '$text'" unless defined($1);
$arg1 = $1;
$arg2 = (defined($2) && $2) ? $2 : $arg1;
$arg1 =~ s/@@/@/g;
$arg2 =~ s/@@/@/g;
"<a HREF=\"$arg1\">$arg2</a>";
}
sub fix_email
{
my($text) = @_;
my($arg1, $arg2);
$text =~ /^([^,]*)(,[^,]*)?$/;
die "error in email: '$text'" unless defined($1);
$arg1 = $1;
$arg2 = defined($2) ? $2 : $arg1;
$arg1 =~ s/@@/@/g;
$arg2 =~ s/@@/@/g;
"<a HREF=\"mailto:$arg1\">$arg2</a>";
}
sub apply_style
{
local($texi_style, $text) = @_;
local($style);
$style = $style_map{$texi_style};
if (defined($style)) { # known style
if ($style =~ /^\"/) { # add quotes
$style = $';
$text = "\`$text\'";
}
if ($style =~ /^\&/) { # custom
$style = $';
$text = &$style($text);
} elsif ($style) { # good style
$text = "<$style>$text</$style>";
} else { # no style
}
} else { # unknown style
$text = undef;
}
return($text);
}
# remove Texinfo styles
sub remove_style
{
local($_) = @_;
s/\@\w+{([^\{\}]+)}/$1/g;
return($_);
}
sub substitute_style
{
local($_) = @_;
local($changed, $done, $style, $text);
$changed = 1;
while ($changed) {
$changed = 0;
$done = '';
while (/\@(\w+){([^\{\}]+)}/) {
$text = &apply_style($1, $2);
if ($text) {
$_ = "$`$text$'";
$changed = 1;
} else {
$done .= "$`\@$1";
$_ = "{$2}$'";
}
}
$_ = $done . $_;
}
return($_);
}
sub anchor
{
local($name, $href, $text, $newline) = @_;
local($result);
$result = "<A";
$result .= " NAME=\"$name\"" if $name;
$result .= " HREF=\"$href\"" if $href;
$result .= ">$text</A>";
$result .= "\n" if $newline;
return($result);
}
sub pretty_date
{
local(@MoY, $sec, $min, $hour, $mday, $mon, $year, $wday, $yday, $isdst);
@MoY = ('January', 'Febuary', 'March', 'April', 'May', 'June',
'July', 'August', 'September', 'October', 'November', 'December');
($sec, $min, $hour, $mday, $mon, $year, $wday, $yday, $isdst) = localtime(time);
$year += ($year < 70) ? 2000 : 1900;
return("$mday $MoY[$mon] $year");
}
sub doc_name
{
local($num) = @_;
my($real_name, $link_name);
$real_name = ($opt_use_numbers) ? $num : $doc_node_name[$num];
$link_name = ($opt_special_links) ?
$doc_node_name_links[$num] : $real_name;
# print "# num $num osl $opt_special_links link $link_name\n";
return("${docu_name}_$real_name.html",
"$opt_special_links${docu_name}_$link_name.html");
}
sub next_doc
{
($docu_doc, $link_doc) = &doc_name(++$doc_num);
}
sub print
{
local(*lines, $fh) = @_;
local($_);
while (@lines) {
$_ = shift(@lines);
if (/^$PROTECTTAG/o) {
$_ = $tag2pro{$_};
} else {
&unprotect_texi;
}
print $fh $_;
}
}
sub print_ruler
{
print FILE "<P><HR><P>\n";
}
sub print_header
{
local($_);
# clean the title
$_ = &remove_style($_[0]);
&unprotect_texi;
# print the header
if ($doctype eq 'html2') {
print FILE $html2_doctype;
} elsif ($doctype) {
print FILE $doctype;
}
my($tags) = defined($value{"_body_tags"}) ? " " . $value{"_body_tags"} : "";
my($et) = defined($value{"_extra_head"}) ? " " . $value{"_extra_head"} : "";
$et = &unprotect_html($et);
print FILE <<EOT;
<HTML>
<HEAD>
$header
<TITLE>$_</TITLE>
$et
</HEAD>
<BODY$tags>
EOT
}
sub print_toplevel_header
{
local($_);
&print_header unless $opt_empty_headers; # pass given arg...
print FILE $full_title;
if ($value{'_subtitle'}) {
$value{'_subtitle'} =~ s/\n+$//;
foreach (split(/\n/, $value{'_subtitle'})) {
$_ = &substitute_style($_);
&unprotect_texi;
print FILE "<H2>$_</H2>\n";
}
}
if ($value{'_author'}) {
$value{'_author'} =~ s/\n+$//;
foreach (split(/\n/, $value{'_author'})) {
$_ = &substitute_style($_);
&unprotect_texi;
s/[\w.-]+\@[\w.-]+/<A HREF="mailto:$&">$&<\/A>/g;
print FILE "<ADDRESS>$_</ADDRESS>\n";
}
}
print FILE "<P>\n";
}
sub print_footer
{
print FILE <<EOT;
</BODY>
</HTML>
EOT
}
sub print_toplevel_footer
{
&print_footer unless $opt_empty_headers;
}
sub protect_texi
{
# protect @ { } ` '
s/\@\@/$;0/go;
s/\@\{/$;1/go;
s/\@\}/$;2/go;
s/\@\`/$;3/go;
s/\@\'/$;4/go;
}
sub protect_html
{
local($what) = @_;
# protect & < >
# hack for the two entity-like variable reference in existing examples
$what =~ s/\&(length|ts);/\&\#38;$1;/g;
# this leaves alone entities, but encodes standalone ampersands
$what =~ s/\&(?!([a-z0-9]+|#\d+);)/\&\#38;/ig;
$what =~ s/\</\&\#60;/g;
$what =~ s/\>/\&\#62;/g;
# but recognize some HTML things
$what =~ s/\&\#60;\/A\&\#62;/<\/A>/g; # </A>
$what =~ s/\&\#60;A ([^\&]+)\&\#62;/<A $1>/g; # <A [^&]+>
$what =~ s/\&\#60;IMG ([^\&]+)\&\#62;/<IMG $1>/g; # <IMG [^&]+>
return($what);
}
sub unprotect_texi
{
s/$;0/\@/go;
s/$;1/\{/go;
s/$;2/\}/go;
s/$;3/\`/go;
s/$;4/\'/go;
}
sub unprotect_html
{
local($what) = @_;
$what =~ s/\&\#38;/\&/g;
$what =~ s/\&\#60;/\</g;
$what =~ s/\&\#62;/\>/g;
return($what);
}
sub byalpha
{
$key2alpha{$a} cmp $key2alpha{$b};
}
##############################################################################
# These next few lines are legal in both Perl and nroff.
.00 ; # finish .ig
'di \" finish diversion--previous line must be blank
.nr nl 0-1 \" fake up transition to first page again
.nr % 0 \" start at page 1
'; __END__ ############# From here on it's a standard manual page ############
.TH TEXI2HTML 1 "09/10/96"
.AT 3
.SH NAME
texi2html \- a Texinfo to HTML converter
.SH SYNOPSIS
.B texi2html [options] file
.PP
.B texi2html -check [-verbose] files
.SH DESCRIPTION
.I Texi2html
converts the given Texinfo file to a set of HTML files. It tries to handle
most of the Texinfo commands. It creates hypertext links for cross-references,
footnotes...
.PP
It also tries to add links from a reference to its corresponding entry in the
bibliography (if any). It may also handle a glossary (see the
.B \-glossary
option).
.PP
.I Texi2html
creates several files depending on the contents of the Texinfo file and on
the chosen options (see FILES).
.PP
The HTML files created by
.I texi2html
are closer to TeX than to Info, that's why
.I texi2html
converts @iftex sections and not @ifinfo ones by default. You can reverse
this with the \-expandinfo option.
.SH OPTIONS
.TP 12
.B \-check
Check the given file and give the list of all things that may be Texinfo commands.
This may be used to check the output of
.I texi2html
to find the Texinfo commands that have been left in the HTML file.
.TP
.B \-expandinfo
Expand @ifinfo sections, not @iftex ones.
.TP
.B \-glossary
Use the section named 'Glossary' to build a list of terms and put links in the HTML
document from each term toward its definition.
.TP
.B \-invisible \fIname\fP
Use \fIname\fP to create invisible destination anchors for index links. This is a workaround
for a known bug of many WWW browsers, including xmosaic.
.TP
.B \-I \fIdir\fP
Look also in \fIdir\fP to find included files.
.TP
.B \-menu
Show the Texinfo menus; by default they are ignored.
.TP
.B \-monolithic
Output only one file, including the table of contents and footnotes.
.TP
.B \-number
Number the sections.
.TP
.B \-split_chapter
Split the output into several HTML files (one per main section:
chapter, appendix...).
.TP
.B \-split_node
Split the output into several HTML files (one per node).
.TP
.B \-usage
Print usage instructions, listing the current available command-line options.
.TP
.B \-verbose
Give a verbose output. Can be used with the
.B \-check
option.
.PP
.SH FILES
By default
.I texi2html
creates the following files (foo being the name of the Texinfo file):
.TP 16
.B foo_toc.html
The table of contents.
.TP
.B foo.html
The document's contents.
.TP
.B foo_foot.html
The footnotes (if any).
.PP
When used with the
.B \-split
option, it creates several files (one per chapter or node), named
.B foo_n.html
(n being the indice of the chapter or node), instead of the single
.B foo.html
file.
.PP
When used with the
.B \-monolithic
option, it creates only one file:
.B foo.html
.SH VARIABLES
.I texi2html
predefines the following variables: \fBhtml\fP, \fBtexi2html\fP.
.SH ADDITIONAL COMMANDS
.I texi2html
implements the following non-Texinfo commands:
.TP 16
.B @ifhtml
This indicates the start of an HTML section, this section will passed through
without any modofication.
.TP
.B @end ifhtml
This indcates the end of an HTML section.
.SH VERSION
This is \fItexi2html\fP version 1.52, 09/10/96.
.PP
The latest version of \fItexi2html\fP can be found in WWW, cf. URL
http://wwwcn.cern.ch/dci/texi2html/
.SH AUTHOR
The main author is Lionel Cons, CERN CN/DCI/UWS, Lionel.Cons@cern.ch.
Many other people around the net contributed to this program.
.SH COPYRIGHT
This program is the intellectual property of the European
Laboratory for Particle Physics (known as CERN). No guarantee whatsoever is
provided by CERN. No liability whatsoever is accepted for any loss or damage
of any kind resulting from any defect or inaccuracy in this information or
code.
.PP
CERN, 1211 Geneva 23, Switzerland
.SH "SEE ALSO"
GNU Texinfo Documentation Format,
HyperText Markup Language (HTML),
World Wide Web (WWW).
.SH BUGS
This program does not understand all Texinfo commands (yet).
.PP
TeX specific commands (normally enclosed in @iftex) will be
passed unmodified.
.ex
This source diff could not be displayed because it is too large. You can view the blob instead.
#!/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;
};
===============================================================================
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
@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és do programa @strong{MyODBC}.
@node Quais ODBC OS, ODBC Problemas, ODBC, ODBC
@section Sistemas Operacionais suportados por MyODBC
@strong{MyODBC} é um driver 32-bit ODBC (2.50) nível 0 para Windows95
e Windows NT. Nós esperamos que algué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ê souber de algum outro aplicativo que funcione com @strong{MyODBC}, por favor
nos escreva sobre isso atravé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ções de
usuários que confirmaram o seu funcionamento.
@table @asis
@item @strong{Program}
@strong{Comment}
@item Access
Como fazer Accces funcionar:
@itemize @bullet
@item
Você deverá ter uma chave primária na tabela.
@item
Você deve ter um campo timestamp em todas as tabelas em que você quer controlar a
atualização.
@item
Somente use campos doubles float. Access falha quando faz comparações com campos float
simples.
@item
Configure a opção `Return matching rows' quando conectar com o @strong{MySQL}.
@item
O Access no NT acusará colunas @code{BLOB} como @code{OLE OBJECTS}.
Se ao invés disso você quer colunas @code{MEMO}, deve trocar a coluna para
@code{TEXT} usando @code{ALTER TABLE}.
@item
Access às vezes não lida adequadamente com colunas do tipo @code{DATE}.
Se você tiver problemas com essas colunas, mude as colunas para @code{DATETIME}.
@item
Em certas situações, o Access cria consultas SQL ilegais que o
@strong{MySQL} não pode processar. Você pode resolver isso selecionando o tipo de
consulta @code{"Query|SQLSpecific|Pass-Through"} no menu do Access.
@end itemize
@item DataJunction
Você tem que trocar para mandar @code{VARCHAR} ao invés de @code{ENUM}, porque
o mesmo exporta o último de uma maneira que causa fadiga ao @strong{MySQL}.
@item Excel
Funciona. Algumas dicas:
@itemize @bullet
@item
Se você tem problemas com datas, tente selecioná-las como strings usando a
funçã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ósito de @code{CONCAT()} é enganar o ODBC, fazendo-o pensar
que a coluna é do 'tipo string'. Sem o @code{CONCAT()}, ODBC sabe que a coluna
é do tipo time e o Excel não entenderá isso.
Note que isso é um bug no Excel, porque o mesmo converte automaticamente a
string para time. Isto é muito bom quando o fonte é um arquivo
texto, mas não se pode dizer o mesmo quando o fonte é uma conexão
ODBC que informa o tipo exato para cada coluna.
@end itemize
@item odbcadmin
Programa Teste para ODBC.
@item Delphi
Você deverá usar DBE 3.2 ou mais atualizado. Configure o campo de opção
`Don't optimize column width' quando conectando com @strong{MySQL}.
Também, há aqui um código muito útil que configura tanto a
inserção ODBC e a inserção BDE para MyODBC (a inserção BDE requer um BDE
Alias Editor que pode ser obtido de graça numa Delphi Super Page
perto de você.): (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 único problema conhecido é que quando o esquema da tabela
muda, os campos da consulta não são atualizados. BDE entretanto, parece não
reconhecer chaves primárias, somente Índice PRIMARY, não entanto isto não
tem sido um problema.
@item Visual basic
Para atualizar uma tabela, você deverá definir uma chave primá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ês possibilidades para especificar o nome do servidor em
Windows95:
@itemize @bullet
@item
Usando o endereço IP do servidor.
@item
Adicionar um arquivo @file{lmhosts} com a seguinte informaçã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 é 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} é qualquer nome que seja único
em seu Windows ODBC setup.
Você 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ê o faz, esses valores devem ser usados como padrão para fazer
uma conexão. Você tem a opção de trocar os valores nesse instante.
Se o número da porta não for especificado, o valor padrão da porta (@value{default_port})
é usado.
Se você especificar a opçã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ê pode usar todas as opçõ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 é gerada automaticamente. Com ODBC, você pode
fazer uma coisa como esta (assumindo que @code{auto} é um campo @code{AUTO_INCREMENT}):
@example
INSERT INTO foo (auto,text) VALUES(NULL,'text');
SELECT LAST_INSERT_ID();
@end example
Ou se você somente quer adicionar o valor noutra tabela, faç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ício de algumas aplicaçõ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ê encontra dificuldades com MyODBC, deve começar por fazer
um arquivo log no Administrador ODBC (o log você tem quando
solicita logs do ODBCADMIN) e um log @strong{MyODBC}. Para gerar um log @strong{MyODBC},
clique a opção `Trace MyODBC' na tela de configuração da conexão
@strong{MyODBC}.
O log será escrito no arquivo @file{C:\myodbc.log}.
Note que você deve usar a @code{MYSQL.DLL} e não a
@code{MYSQL2.DLL} para que esta opção funcione!
Verifique as consultas que MyODBC envia para o servidor @strong{MySQL};
Você deverá ser capaz de encontrar isto através da pesquisa da
string @code{>mysql_real_query} no arquivo @file{myodbc.log}.
Você deve também tentar duplicar as consultas no monitor @code{mysql}
ou @code{admndemo} para encontrar se o erro é do MyODBC ou do @strong{MySQL}.
Se você 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ê não encontra o quê está errado, a última opção
é 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ê o manda para @uref{ftp://www.mysql.com/pub/mysql/secret}. Somente nós da TCX
devemos ter acesso a esses arquivos que você manda e nós seremos muito discretos com
os dados !
Se você pode fazer um programa que também mostre o mesmo problema, favor mandá-lo
também!
Se o programa funciona com outro servidor SQL, você pode fazer um
arquivo log que faça exatamente a mesma coisa com o outro servidor
SQL.
Lembre que quanto mais informação você nos fornece, o resultado é
que nós podemos resolver o problema!
@cindex Licensing terms
@cindex Support terms
@node Licensing and Support, Installing, Questions, Top
@chapter MySQL licensing and support
@menu
* Licensing policy:: Política de licenciamento do @strong{MySQL}
* Copyright:: Direitos autorais usados por @strong{MySQL}
* Commercial use:: Distribuindo comercialmente @strong{MySQL}
* Licensing examples:: Exemplos de situações de licenciamento
* Cost:: Preços de licenciamento e suporte @strong{MySQL}
* Support:: Tipos de suporte comercial
@end menu
Este capítulo descreve os tipos de licenciamento e suporte do @strong{MySQL}, incluindo:
@itemize @bullet
@item
Nossa política de licenciamento para sistemas operacionais não Microsoft e Microsoft
@item
Os direitos autorais sob os quais o @strong{MySQL} é distribuído
(@pxref{Copyright})
@item
Exemplo de situações quando uma licença é necessária
(@pxref{Licensing examples})
@item
Preços de licenciamento e suporte (@pxref{Cost}), e
benefí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ítica de
licenciamento é como segue:
@itemize @bullet
@item
Para uso interno normal, o @strong{MySQL} geralmente não custa nada. Você não precisa
nos pagar se não o quiser.
@item
Uma licença é requerida se:
@itemize @minus
@item
Você vende o servidor @strong{MySQL} diretamente ou como parte de outro produto ou serviço.
@item
Você cobra para instalar e manter um servidor @strong{MySQL} no local do cliente
@item
Você incluie o @strong{MySQL} numa distribuição que não é redistribuída
e você cobra por alguma parte dessa distribuição
@end itemize
@item
Para circunstâncias sob as quais uma licença do @strong{MySQL} é requerida,
você necessita uma licenç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çã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ê não necessita uma licença para incluir código de programas clientes
comerciais. O acesso de parte de clientes para o @strong{MySQL} é de
domínio público. O código do cliente @code{mysql} de linha de comando
incluie código da livraria @code{readline} que está sob a licença pública
GNU.
@item
@cindex @code{myisampack}
Para clientes que tem comprado 1 licença ou suporte MySQL, nós fornecemos
funcionalidade adicional. Atualmente, isso significa o fornecimento do
utilitário @code{myisampack} para banco de dados somente de leitura,
rá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ça do servidor @strong{MySQL}.
@item
Se seu uso do @strong{MySQL} não requer uma licença, porém você gosta
do @strong{MySQL} e deseja encorajar um maior desenvolvimento, você é
certamente bem-vindo a adquirir uma licença de qualquer forma.
@item
Se usa o @strong{MySQL} num contexto comercial de tal forma
que obtêm benefícios no seu uso, nós lhe solicitamos que apoie
o desenvolvimento do @strong{MySQL} através da compra de algum
nível de suporte. Nós achamos que se o @strong{MySQL} o ajuda
em seu negócio, é razoável que solicitemos sua ajuda para o @strong{MySQL}.
Por outro lado, se você nós faz perguntas de suporte, não somente está
usando de graça algo no qual nós colocamos um enorme trabalho, você
também está pedindo suporte de graça.
@end itemize
Para uso em sistemas operacionais Microsoft (Win95/Win98/WinNT),
você precisa de uma licença @strong{MySQL} depois de 30 dias
de experiência, com a exceção que licenças podem ser requeridas
sem nenhum custo para uso educacional ou para suportar pesquisas
de governo ou universidades. @xref{Winlicense}.
Uma versão shareware do @strong{MySQL}-Win32 que você pode experimentar
antes de comprar está disponível em @uref{http://www.mysql.com/mysql_w32.htmy}.
Depois que você tenha pago, você terá uma senha que permite seu acesso a uma
nova versão @strong{MySQL}-Win32.
Se você tem uma pergunta se for o caso ou não de requerer uma licença para
seu caso em particular do @strong{MySQL}, favor entrar em contato com nós.
@xref{Contact information}.
Se você requer uma licença @strong{MySQL}, a forma mais fácil para pagar
a mesma é usar o formulá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ível futura mudança no direito autoral
@end menu
Existem vários direitos autorais diferentes na distribuição @strong{MySQL}:
@enumerate
@item
O fonte específico @strong{MySQL}necessário para construir o @code{mysqlclient}
livrarias e programas no diretório @file{client} está em domínio público.
Cada arquivo que está em domínio público tem um cabeçalho que claramente notifica
este estado. Isto incluie tudo no diretó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ã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ão cobertas pela
``GNU GENERAL PUBLIC LICENSE''. Ver o arquivo @file{readline/COPYING}.
@item
Algumas partes do fonte (a @code{regexp} livraria) está coberta pelo estilo de
direito autoral Berkeley.
@item
O outro fonte necessário para o servidor @strong{MySQL} em plataformas não Microsoft
está coberta pela ``MySQL FREE PUBLIC LICENSE'', a qual é baseada na
``Aladdin FREE PUBLIC LICENSE.'' @xref{Public license}. Quando o @strong{MySQL}
está rodando em qualquer sistema operacional Microsoft, outro licenciamento é aplicado.
@end enumerate
Os seguintes pontos direcionam a filosofia sob nossa política de direito autoral:
@itemize @bullet
@item
A livraria cliente SQL deve ser totalmente livre tal que a mesma pode ser incluída
em produtos comerciais sem nenhuma limitaçã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ção e para benefício.
@item
Pessoas que querem manter o direito da propriedade de seu programa, porém também
querem o valor de nosso trabalho, podem pagar pelo previlégio.
@item
O uso normal em casa é de GRAÇA. Mas se você usa o @strong{MySQL} para algo
importante para você, você pode ajudar o desenvolvimento futuro pela
compra de uma licença ou contrato de suporte.@xref{Support}.
@end itemize
@node Copyright changes, , Copyright, Copyright
@subsection Possible future copyright changes
Nós poderemos optar para distribuir versões antigas do @strong{MySQL}
com a GPL no futuro. Entretanto, essas versões devem ser identificadas
como @strong{GNU MySQL}. També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ção é um esclarecimento dos termos de licenç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ção ou uso interno sem suporte.
Entretanto, @strong{distribuição} para propósitos comerciais
do @strong{MySQL}, ou qualquer coisa contendo ou derivando do @strong{MySQL}
no seu todo ou parte, requer uma licença comercial escrita da TcX AB,
a única entidade autorizada para garantir tais licenças.
Você não pode incluir o @strong{MySQL} ``de graça'' num pacote contendo
qualquer coisa pela qual um pagamento está sendo feito, exceto como
notado abaixo:
A intenção da exceção providenciada na segunda claúsula da licença é
para permitir que organizações comerciais operando um servidor FTP ou
uma agência de notícias possam distribuir livremente o @strong{MySQL},
desde que:
@enumerate
@item
A organização complace com as outras provisões da FPL, a qual
incluie entre outras coisas um requerimento para distribuir o
código fonte inteiro do @strong{MySQL} e qualquer outro trabalho
derivado, e para distribuir a FPL em si junto com @strong{MySQL};
@item
A única cobrança para abaixar o @strong{MySQL} é a cobrança baseada
na distribuição do serviço e não numa baseada no contexto da
informação sendo recebida (ex: a cobrança deverá ser a mesma para
o recebimento de uma coleção qualquer de bits do mesmo tamanho);
@item
O servidor ou BBS é acessível para o público em geral, ex. o número de
telefone ou enedereço IP não é guardado em secreto, e qualquer um pode
obter acesso para a informação (possivelmente pagando uma inscrição ou
acesso cobrado que não é dependente ou relacionado para comprar qualquer
outra coisa).
@end enumerate
Se você quer para distribuir programas em um contexto comercial que
incorpora @strong{MySQL} e você @strong{não} quer encontrar essas
condições, você deve contatar TcX AB para encontrar um licenciamento
comercial, o qual envolve um pagamento. O único meio legal que
você pode distribuir @strong{MySQL} ou qualquer coisa contendo @strong{MySQL}
são pela distribuição do @strong{MySQL} sob os requerimentos da FPL, ou pela
obtenção de uma licenç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ços relacionados ao @strong{MySQL}
* ISP:: Serviços de ISP com @strong{MySQL}
* Web server:: Rodando um servidor web usando o @strong{MySQL}.
@end menu
Esta seção descreve algumas situações ilustrando se é o caso ou não que
você deve licençar o servidor @strong{MySQL}. Geralmente esses exemplos
envolvem o fornecimento do @strong{MySQL} como parte de um produto ou
serviço que você está vendendo para um cliente, ou requer que o @strong{MySQL}
seja usado em conjunto com seu produto. Em tais casos, é sua responsabilidade
para obter uma licença para o cliente se uma é necessária (Este requerimento
pode ser deixado de lado se seu cliente já tem uma licença @strong{MySQL}.
Porém, o vendedor deve enviar informação do cliente e o número da licença
para TcX, e a licença deverá ser completa, não uma licença OEM).
Note que uma simples licença do @strong{MySQL} cobre qualquer número de
CPUs/usuá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ário ou não uma licença @strong{MySQL}
quando vendendo a sua aplicação, você deve perguntar caso seja necessário
para o funcionamento adequado de sua aplicação a contingência no uso do
@strong{MySQL} e seja necessário você incluir o @strong{MySQL} com seu
produto. Existem vários casos a considerar:
@itemize @bullet
@item
Sua aplicação precisa do @strong{MySQL} para funcionar adequadamente ?
Se o seu produto precisa do @strong{MySQL}, você necessita uma licença
para cada mâquina que roda o servidor @code{mysqld}. Por exemplo,
se você projeta uma aplicação sobre o @strong{MySQL}, então você tem
feito realmente um produto comercial que necessita do servidor, tal que
necessita de uma licença.
Se sua aplicação não requer o @strong{MySQL}, você não necessita obter uma
licença. Por exemplo, se o @strong{MySQL} apenas adiciona uma nova característica
a seu produto (tal como adicionando loggin a um banco de dados e se o @strong{MySQL}
é usado no lugar de um arquivo texto), o mesmo entra como um uso normal, e uma
licença não precisa ser requerida.
Em outras palavras, você necessita de uma licença se você vende um produto
projetado para uso com o @strong{MySQL} ou que precisa do servidor @strong{MySQL}
para um funcionamento completo. Isto é verdadeiro caso haja necessidade ou não de fornecer
o @strong{MySQL} para seu cliente como parte da distribuição de seu produto.
Isso também depende no que você está fazendo para o cliente. Você planeja fornecer
a seu cliente com instruções e detalhes na instalação do @strong{MySQL} com seu
programa ?. Então seu produto contencialmente precisa do @strong{MySQL};
Sim é tal, você necessita comprar uma licença. Se você simplesmente usa um banco de
dados que espera já estiver instalado no instante en seu programa é comprado, então
provavelmente não necessita de uma licença.
@item
Você incluie o @strong{MySQL} numa distribuição e cobra pela mesma ?
Se você incluie @strong{MySQL} com a distribuição que vende para os clientes,
você necessita uma licença para cada mâquina que roda o servidor @code{mysqld},
porque neste caso você está vendendo um sistema que incluie @strong{MySQL}.
Isto é verdadeiro no caso que o @strong{MySQL} com seu produto seja requerido
ou opcional.
@item
Você 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 é, seu produto não requer @strong{MySQL},
mas pode suportar qualquer banco de dados com o nível base de funcionalidade
e você não depende de qualquer coisa que somente @strong{MySQL} suporta.
Nenhum de vocês paga para nós se o seu cliente realmente seleciona para
usar @strong{MySQL}?
Neste caso, se você não fornece, obtêm ou configura o @strong{MySQL} para
o cliente e decide o cliente para usá-lo, nenhum de vocês precisa de uma
licença. Se você faz um serviço, vide @ref{MySQL services, ,
@strong{MySQL} serviços}.
@end itemize
@node MySQL services, ISP, Products that use MySQL, Licensing examples
@subsection Selling MySQL-related services
Se você faz uma instalação numa mâquina de um cliente do @strong{MySQL}
e há cobrança pelo serviço (direta ou indiretamente), então você comprar
uma licença @strong{MySQL}.
Se você vende uma aplicação para a qual o @strong{MySQL} não é estritamente
requerido, porém pode ser usado, uma licença deve indicada, dependendo
como o @strong{MySQL} é configurado. Suponha que seu produto não requera e
não incluia o @strong{MySQL} na sua distribuição, poré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êm e instala o @strong{MySQL}, nenhuma licença é necessária.
Entretanto, se você faz o serviço para seu cliente, então é necessário uma
licença, porque você está vendendo um serviço que incluie o @strong{MySQL}.
@node ISP, Web server, MySQL services, Licensing examples
@subsection ISP MySQL services
Provedores de Serviço Internet (ISPs) às vezes hospedam servidores @strong{MySQL}
para seus cliente.
Se você é um ISP que permite a seus clientes instalar e administrar o
@strong{MySQL} por si próprios na sua mâquina sem nenhuma assistência
de sua parte, nem você nem o cliente precisa de uma licença @strong{MySQL}.
Se você cobra para instalar e administrar o @strong{MySQL} como parte de seu
serviço para o cliente, então você precisa de uma licença, porque está vendendo
um serviço que incluie o @strong{MySQL}.
@node Web server, , ISP, Licensing examples
@subsection Running a web server using MySQL
Se você usa o @strong{MySQL} em conjunto com um servidor web, você não tem
que pagar uma licença.
Isto é verdadeiro se você roda um servidor web comercial que usa @strong{MySQL},
desde que você não esteja vendendo o @strong{MySQL}. Entretanto, neste caso
nós gostariamos que você compre suporte @strong{MySQL}, porque @strong{MySQL}
está 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ção de Pagamento
* Contact information:: Informação de contato
@end menu
Nossos preços atuais de licença são mostrados abaixo. Todos os preços são
em US Dólar. Se você paga com cartão de crédito, a moeda é o EURO (European Union Euro),
tais preços diferem levemente.
@multitable @columnfractions .25 .2 .3
@item @strong{Número de licenças} @tab @strong{Preç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ços são aplicados:
@multitable @columnfractions .25 .2 .3 .25
@item @strong{Número de licenças} @tab @strong{Preç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ê deve atuar como o intermediário para eventuais
problemas ou solicitações de seus usuários. Nós também requeremos que
clientes OEM tenham ao menos um contrato de suporte extended email.
Se você tem uma margem baixa em alto volume de produtos, você pode falar
com nós sobre outros termos (por exemplo, a porcentagem dos preços de
venda). Se você faz, por favor seja informativo sobre seu produto, preço,
mercado e qualquer outra informação que seja relevante.
@cindex @code{myisampack}
Depois de comprar 1 licença @strong{MySQL}, você terá uma cópia pessoal
do utilitário @code{myisampack}. Você não está permitido em distribuir
esse utilitário porém você pode distribuir tabelas compactadas com ele.
Um preço completo de uma licença não é um acordo de suporte e incluie um
mínimo suporte. Isto significa que nós tentamos responder qualquer pergunta
relevante. Se a resposta está na documentação, nós direcionamos você à
apropriada seção. Se você não tem comprado uma licença ou suporte, nós
provavelmente não responderemos ao tudo.
Se você descobre o que consideramos um real bug, nós estamos prontificados
a solucionar o erro em qualquer caso. Porém se você paga por suporte nós
o notificaremos sobre o andamento da solução ao invés de soluncioná-lo
nos próximos lançamentos.
Suporte mais amplo é vendido separadamente. Descrições do que incluie cada
ní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ços de suporte
estão em EURO (European Union Euro). Um EURO é 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ê pode atualizar um nível mais baixo sw suporte para um de maior
nível, pela diferença entre os preç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ões de crédito.
O pagamento poderá ser feito a:
@example
Postgirot Bank AB
105 06 STOCKHOLM, SWEDEN
TCX DataKonsult AB
BOX 6434
11382 STOCKHOLM, SWEDEN
SWIFT address: PGSI SESS
Número da Conta: 96 77 06 - 3
@end example
Especificar: licença e/ou suporte, seu nome e endereço de e-mail.
Em europa e Japão você pode usar EuroGiro (que pode ser menos caro) para a mesma
conta.
Se você quer pagar através de cheque, faça-o nominal a ``Monty Program KB'' e mande
um e-mail para o endereço abaixo:
@example
TCX DataKonsult AB
BOX 6434, Torsgatan 21
11382 STOCKHOLM, SWEDEN
@end example
Se você quer pagar com cartão de crédito usando a Internet, você pode
usar o seguro formulário de licença da TcX:
@uref{https://www.mysql.com/license.htmy.
Você pode também imprimir uma cópia do formulário de licença, prenché-lo e mandá-lo
via fax para:
+46-8-729 69 05
Se você quer que nós uma cobrança para você, você pode usar o formulário de
licença e escrever ``bill us'' no campo de comentários. Você pode também
mandar uma mensagem via e-mail para @email{sales@@mysql.com} (@strong{not}
@email{mysql@@lists.mysql.com}!) com a informação de sua companhia e pedir
para nós para efetuar a cobrança.
@cindex Contact information
@node Contact information, , Payment information, Cost
@subsection Contact information
Para licenciamento comercial, ou se você têm qualquer pergunta sobre
informação desta seção, por favor contatar a equipe de licenciamento
do @strong{MySQL}. O mais preferido método é o e-mail para
@email{mysql-licensing@@mysql.com}. Fax é também possível porém sua
manipulaçã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é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 é a opção mais barata de suporte e deverá ser vista
como uma forma de suportar nosso desenvolvimento do @strong{MySQL} que
uma real opção de suporte.
Neste nível de suporte, a lista de e-mail do @strong{MySQL} é o preferido
meio de comunicaçã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
às perguntas para o @strong{MySQL} Windows, tal que qualquer pessoa pode já ter
experimentado e resolvido o problema que você tem. @xref{Asking questions}.
Entretanto, comprando o suporte basic email support, você também tem acesso
ao e-mail @email{mysql-support@@mysql.com}, o qual não é disponível
como parte do suporte mínimo que se tem quando se adquire uma licença @strong{MySQL}.
Isto significa que para perguntas críticas, você pode mandar sua mensagem para
@email{mysql-support@@mysql.com}. (Se a mensagem tem dados privados, você 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érmino quando mandar uma mensagem para
@email{mysql-support@@mysql.com}.
Basic email support incluie os seguintes tipos de serviços:
@itemize @bullet
@item
Se sua pergunta já está respondida no manual, nós o informamos da correta
seção na qual pode encontrar a resposta. Se a resposta não está no manual,
nós o colocamos na direção certa para resolver seu problema.
@item
Nós garantimos em tempo apropriado a resposta das mensagem de seu e-mail.
Nós não podemos garantir que podemos resolver qualquer problema, porém ao
menos você receve uma resposta se podemos contatá-lo por e-mail.
@item
Nós podemos ajudá-lo com problemas inesperados quando instala @strong{MySQL}
a partir de uma distribuição binária em plataformas suportadas. Este nível de
suporte não cobre instalação do @strong{MySQL} a partir de uma distribuição
fonte. Plataformas ``Suportadas'' são aquelas plataformas nas quais o @strong{MySQL}
é conhecido que funciona.
@xref{Which OS}.
@item
Nós ajudaremos você com bugs e problemas de características. Qualquer
bug que for encontrado nós o solucionamos no próximo lançamento do @strong{MySQL}.
Se o bug é crítico para você, nós enviamos um e-mail com o patch
tão logo como o bug é resolvido. Bugs críticos têm sempre para nós a maior
prioridade, para assegurar que sejam solucionados tão pronto como possível.
@item
Suas sugestões para desenvolvimento posterior do @strong{MySQL} são tomadas
em consideração. Obtendo o email support, você já ajuda o desenvolvimento
posterior do @strong{MySQL}. Se você quer pôr mais, faça a atualização
para um nível mais alto de suporte.
@item
Se você quer nós ajudar a otimizar seu sistema, você deve atualizar
para um nível maior de suporte.
@item
@cindex @code{myisampack}
Nós incluimos uma versão binária da ferramenta de compactaçã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ções:
@itemize @bullet
@item
Seu e-mail será tratado antes dos e-amil dos usuários do basic email support
e dos usuários não registrados.
@item
Suas sugestões para o próximo desenvolvimento do @strong{MySQL} receberá
uma forte consideração. Simples extensões que fazem os gols do @strong{MySQL}
são a implementação em questão de dias. adquirindo o extended email support
você 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ós respondemos e (dentro do razoável) resolvemos as perguntas relacionadas
a possí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ós auxiliamos com inesperados problemas quando você instala o @strong{MySQL}
a partir do fonte ou distribuição binária nas plataformas suportadas.
@item
Nós responderemos perguntas sobre características perdidad e ofereceremos
dicas como trabalhar e contornar elas.
@item
Nós forneceremos dicas na otimização do @code{mysqld}para sua situação.
@end itemize
@item
Você está permitido a influenciar a prioridade de itens do TODO do @strong{MySQL}.
Isso assegura que as características que você 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ções:
@itemize @bullet
@item
Seu e-mail terá prioridade sobre os usuários do suporte extended email.
@item
Suas sugestões para o próximo desenvolvimento do @strong{MySQL} será tomado
com uma alta consideração. Extensões reais que podem ser implementadas num
par de horas e que fazem os gols do @strong{MySQL} serão implementadas
tão logo como possível.
@item
Se você tem um problema muito especí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ém se o pior acontece
nós poderemos a recuperar tanto quanto seja possível. O @strong{MySQL}tem provado
ser muito seguro, porém qualquer é possível devido a circuntâncias fora de nosso
controle (por exemplo, se seu sistema crash ou alguém kill o servidor executando
um comando @code{kill -9}).
@item
Nós providenciaremos dicas na otimização de seu sistema e consultas.
@item
Você está 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ções:
@itemize @bullet
@item
Seu e-mail tem a mais alta prioridade possível.
@item
Nós ativamente examinamos seu sistema e ajudamos a otimizá-lo assim como suas
consultas. Nós também podemos otimizar e/ou extender o @strong{MySQL}
para suprir melhor suas necessidades.
@item
Você também pode solicitar extensões es peciais apenas para você. Por exemplo:
@example
mysql> select MY_CALCULATION(col_name1,col_name2) from tbl_name;
@end example
@item
Nós podemos fornecer uma distribuição binária para todas as atualizaçõ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ção binária.
@item
Se você pode providenciar acomodações e pagar os custos de viagem para um
desenvolvedor @strong{MySQL} para vistá-lo e oferecer ajuda com seus problemas.
O suporte Extended login support entitula você para um encontro pessoal por
ano, porém nós sempre somos muito flexíveis para levar para frente nossos
clientes!.
@end itemize
@node Installing, Compatibility, Licensing and Support, Top
\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
\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
<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>
@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 [Tvund] @@
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 Tcnico] @@
WWW (@uref{http://darkstar.ist.utl.pt/mysql/})
FTP (@uref{ftp://darkstar.ist.utl.pt/pub/mysql/})
@item
@image{Flags/portugal} Portugal [Netviso] @@
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
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
/* 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_DROP_USER 1268
"Can't drop one or more 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",
@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.
...@@ -5,7 +5,7 @@ AC_INIT(sql/mysqld.cc) ...@@ -5,7 +5,7 @@ AC_INIT(sql/mysqld.cc)
AC_CANONICAL_SYSTEM AC_CANONICAL_SYSTEM
# The Docs Makefile.am parses this line! # The Docs Makefile.am parses this line!
# remember to also change ndb version below and update version.c in ndb # remember to also change ndb version below and update version.c in ndb
AM_INIT_AUTOMAKE(mysql, 4.1.11) AM_INIT_AUTOMAKE(mysql, 4.1.12)
AM_CONFIG_HEADER(config.h) AM_CONFIG_HEADER(config.h)
PROTOCOL_VERSION=10 PROTOCOL_VERSION=10
...@@ -16,7 +16,7 @@ SHARED_LIB_VERSION=14:0:0 ...@@ -16,7 +16,7 @@ SHARED_LIB_VERSION=14:0:0
# ndb version # ndb version
NDB_VERSION_MAJOR=4 NDB_VERSION_MAJOR=4
NDB_VERSION_MINOR=1 NDB_VERSION_MINOR=1
NDB_VERSION_BUILD=11 NDB_VERSION_BUILD=12
NDB_VERSION_STATUS="" NDB_VERSION_STATUS=""
# Set all version vars based on $VERSION. How do we do this more elegant ? # Set all version vars based on $VERSION. How do we do this more elegant ?
...@@ -3227,7 +3227,7 @@ AC_CONFIG_FILES(Makefile extra/Makefile mysys/Makefile dnl ...@@ -3227,7 +3227,7 @@ AC_CONFIG_FILES(Makefile extra/Makefile mysys/Makefile dnl
sql-common/Makefile SSL/Makefile dnl sql-common/Makefile SSL/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
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
......
...@@ -59,7 +59,6 @@ EXTRA_SCRIPTS = make_binary_distribution.sh \ ...@@ -59,7 +59,6 @@ EXTRA_SCRIPTS = make_binary_distribution.sh \
mysqld_multi.sh \ mysqld_multi.sh \
mysql_tableinfo.sh \ mysql_tableinfo.sh \
mysqld_safe.sh \ mysqld_safe.sh \
fill_help_tables.sh \
mysql_create_system_tables.sh mysql_create_system_tables.sh
EXTRA_DIST = $(EXTRA_SCRIPTS) \ EXTRA_DIST = $(EXTRA_SCRIPTS) \
...@@ -87,7 +86,6 @@ CLEANFILES = @server_scripts@ \ ...@@ -87,7 +86,6 @@ CLEANFILES = @server_scripts@ \
mysqldumpslow \ mysqldumpslow \
mysqld_multi \ mysqld_multi \
make_win_src_distribution \ make_win_src_distribution \
fill_help_tables \
mysql_create_system_tables mysql_create_system_tables
SUPERCLEANFILES = mysqlbug SUPERCLEANFILES = mysqlbug
...@@ -151,7 +149,4 @@ SUFFIXES = .sh ...@@ -151,7 +149,4 @@ SUFFIXES = .sh
# Don't update the files from bitkeeper # Don't update the files from bitkeeper
%::SCCS/s.% %::SCCS/s.%
all: fill_help_tables.sql make_win_src_distribution make_binary_distribution make_sharedlib_distribution all: make_win_src_distribution make_binary_distribution make_sharedlib_distribution
fill_help_tables.sql: fill_help_tables ../Docs/manual.texi
./fill_help_tables < ../Docs/manual.texi > fill_help_tables.sql
-- fill_help_tables.sql - this file is a placeholder to satisfy build dependencies -
-- it will be replaced with the appropriate content by the Boostrap script that
-- creates the official source distribution.
...@@ -289,9 +289,7 @@ cd $SOURCE ...@@ -289,9 +289,7 @@ cd $SOURCE
for i in COPYING ChangeLog README EXCEPTIONS-CLIENT\ for i in COPYING ChangeLog README EXCEPTIONS-CLIENT\
INSTALL-SOURCE INSTALL-WIN \ INSTALL-SOURCE INSTALL-WIN \
INSTALL-WIN-SOURCE \ INSTALL-WIN-SOURCE \
Docs/manual_toc.html Docs/manual.html \ Docs/INSTALL-BINARY
Docs/manual.txt Docs/mysqld_error.txt \
Docs/INSTALL-BINARY Docs/internals.texi
do do
print_debug "Copying file '$i'" print_debug "Copying file '$i'"
if [ -f $i ] if [ -f $i ]
......
...@@ -363,11 +363,6 @@ fi ...@@ -363,11 +363,6 @@ fi
(cd libmysql/.libs; tar cf $RBR/shared-libs.tar *.so*) (cd libmysql/.libs; tar cf $RBR/shared-libs.tar *.so*)
(cd libmysql_r/.libs; tar rf $RBR/shared-libs.tar *.so*) (cd libmysql_r/.libs; tar rf $RBR/shared-libs.tar *.so*)
# Save manual to avoid rebuilding
mv Docs/manual.ps Docs/manual.ps.save
make clean
mv Docs/manual.ps.save Docs/manual.ps
# #
# Only link statically on our i386 build host (which has a specially # Only link statically on our i386 build host (which has a specially
# patched static glibc installed) - ia64 and x86_64 run glibc-2.3 (unpatched) # patched static glibc installed) - ia64 and x86_64 run glibc-2.3 (unpatched)
...@@ -533,8 +528,6 @@ fi ...@@ -533,8 +528,6 @@ fi
%defattr(-,root,root,0755) %defattr(-,root,root,0755)
%doc COPYING README %doc COPYING README
%doc Docs/manual.{html,ps,texi,txt}
%doc Docs/manual_toc.html
%doc support-files/my-*.cnf %doc support-files/my-*.cnf
%doc support-files/ndb-*.ini %doc support-files/ndb-*.ini
...@@ -695,9 +688,14 @@ fi ...@@ -695,9 +688,14 @@ fi
# itself - note that they must be ordered by date (important when # itself - note that they must be ordered by date (important when
# merging BK trees) # merging BK trees)
%changelog %changelog
* Wed Apr 13 2005 Lenz Grimmer <lenz@mysql.com>
- removed the MySQL manual files (html/ps/texi) - they have been removed
from the MySQL sources and are now available seperately.
* Mon Feb 14 2005 Lenz Grimmer <lenz@mysql.com> * Mon Feb 14 2005 Lenz Grimmer <lenz@mysql.com>
* Fixed the compilation comments and moved them into the separate build sections - Fixed the compilation comments and moved them into the separate build sections
for Max and Standard for Max and Standard
* Mon Feb 7 2005 Tomas Ulin <tomas@mysql.com> * Mon Feb 7 2005 Tomas Ulin <tomas@mysql.com>
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment