Deleted directories

  Docs/Books/
  Docs/MySQL-logos/
Deleted files
  Docs/Tutorial-MySQL-final.txt
  Docs/bk.txt
  Docs/Support/.cvsignore
  Docs/Support/colspec-fix.pl
  Docs/Support/docbook-fixup.pl
  Docs/Support/docbook-prefix.pl
  Docs/Support/docbook-split
  Docs/Support/make-docbook
  Docs/Support/make-makefile
  Docs/Support/test-make-manual
  Docs/Support/test-make-manual-de
  Docs/Support/trivial-makeinfo-4.0c.patch
  Docs/Support/xwf
Deleted file now in internals main text
  Docs/my_sys.txt
Deleted file now in internals svn tree
  Docs/net_doc.txt
Removed obsolete entries
  Docs/.cvsignore
Added note that info is obsolete
  Docs/linuxthreads.txt
parent 7c4385c4
COPYING
COPYING.LIB
INSTALL-SOURCE
INSTALL-BINARY
Makefile
Makefile.in
Manual-updates
before-gpl-changes-manual.texi
include.texi
manual-before-gpl.texi
manual-tmp.aux
manual-tmp.cp
manual-tmp.fn
manual-tmp.ky
manual-tmp.log
manual-tmp.pdf
manual-tmp.pg
manual-tmp.texi
manual-tmp.toc
manual-tmp.tp
manual-tmp.vr
manual.aux
manual.cp
manual.cps
manual.fn
manual.fns
manual.html
manual.ky
manual.log
manual.pdf
manual.pg
manual.toc
manual.tp
manual.txt
manual.vr
manual_a4.ps
manual_a4.ps.gz
manual_letter.ps
manual_letter.ps.gz
manual_toc.html
mysql.info
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
manual.html
manual_toc.html
#!/usr/bin/perl -w
#
# Script to rewrite colspecs from relative values to absolute values
#
# arjen 2002-03-14 append "cm" specifier to colwidth field.
use strict;
my $table_width = 12.75; # Specify the max width of the table in cm
my $gutter_width = 0.55; # Specify the width of the gutters in cm
my $str = join '', <>; # Push stdin (or file)
$str =~ s{([\t ]*(<colspec colwidth=\".+?\" />\s*)+)}
{&rel2abs($1)}ges;
print STDOUT $str;
exit;
#
# Definitions for helper sub-routines
#
sub msg {
print STDERR shift, "\n";
}
sub rel2abs {
my $str = shift;
my $colnum = 1;
my @widths = ();
my $total = 0;
my $output = '';
my $gutters;
my $content_width;
my $total_width;
my @num_cache;
$str =~ /^(\s+)/;
my $ws = $1;
while ($str =~ m/<colspec colwidth="(\d+)\*" \/>/g) {
$total += $1;
push @widths, $1;
}
msg("!!! WARNING: Total Percent > 100%: $total%") if $total > 100;
if (! $total) {
die 'Something bad has happened - the script believes that there are no columns';
}
$gutters = $#widths * $gutter_width;
$content_width = $table_width - $gutters;
# Don't forget that $#... is the last offset not the count
foreach (@widths) {
my $temp = sprintf ("%0.2f", $_/100 * $content_width);
$total_width += $temp;
if ($total_width > $content_width) {
$temp -= $total_width - $content_width;
msg("!!! WARNING: Column width reduced from " .
($temp + ($total_width - $content_width)) . " to $temp !!!");
$total_width -= $total_width - $content_width;
}
$output .= $ws . '<colspec colnum="'. $colnum .'" colwidth="'. $temp .'cm" />' . "\n";
++$colnum;
push @num_cache, $temp;
}
return $output . "\n$ws";
}
#!/usr/bin/perl -w
# Fix the output of `makeinfo --docbook` version 4.0c
# Convert the broken docbook output to well-formed XML that conforms to the O'Reilly idiom
# See code for detailed comments
# Authors: Arjen Lentz and Zak Greant (original code by Jeremy Cole)
use strict;
my $data = '';
my @apx = ();
my $apx = '';
my @nodes = ();
my $nodes = '';
msg ("-- Post-processing `makeinfo --docbook` output --");
msg ("** Written to work with makeinfo version 4.0c **\n");
msg ("Discarding DTD - not required by subsequent scripts");
# <> is a magic filehandle - either reading lines from stdin or from file(s) specified on the command line
<>;
msg ("Create an XML PI with ISO-8859-1 character encoding");
$data = "<?xml version='1.0' encoding='ISO-8859-1'?>";
msg ("Get the rest of the data");
$data = $data . join "", <>;
msg ("Add missing <bookinfo> and <abstract> opening tags");
# Note the absence of the g (global) pattern modified. This situation can only happen once.
# ...as soon as we find the first instance, we can stop looking.
$data =~ s/<book lang="en">/<book lang="en"><bookinfo><abstract>/;
# arjen 2002-05-01
msg ("Processing docbook-prefix special strings");
$data =~ s/FIXUPmdashFIXUP/\&mdash\;/g;
$data =~ s/FIXUPdoubledashFIXUP/--/g;
$data =~ s/FIXUPstrongFIXUP/<emphasis\ role\=\"bold\">/g;
$data =~ s/FIXUPendstrongFIXUP/<\/emphasis>/g;
$data =~ s/FIXUPemphFIXUP/<emphasis>/g;
$data =~ s/FIXUPendemphFIXUP/<\/emphasis>/g;
$data =~ s/FIXUPfileFIXUP/<filename>/g;
$data =~ s/FIXUPendfileFIXUP/<\/filename>/g;
$data =~ s/FIXUPsampFIXUP/<literal>/g;
$data =~ s/FIXUPendsampFIXUP/<\/literal>/g;
msg ("Removing mailto: from email addresses...");
$data =~ s/mailto://g;
msg ("Removing INFORMALFIGURE...");
$data =~ s{<informalfigure>.+?</informalfigure>}
{}gs;
msg ("Convert ampersand to XML escape sequence...");
$data =~ s/&(?!\w+;)/&amp;/g;
# arjen 2002-05-01
msg ("Changing (TM) to XML escape sequence...");
$data =~ s/MySQL \(TM\)/MySQL&trade;/g;
$data =~ s{<command>TM</command>}
{&trade;}g;
# arjen 2002-05-01
msg ("Changing ' -- ' to XML escape sequence...");
$data =~ s/ -- /&mdash;/g;
msg ("Changing @@ to @...");
$data =~ s/@@/@/g;
msg ("Rework references of the notation '<n>'");
# Need to talk to Arjen about what the <n> bits are for
$data =~ s/<(\d)>/[$1]/g;
msg ("Changing '_' to '-' in references...");
$data =~ s{((?:id|linkend)=\".+?\")}
{&underscore2hyphen($1)}gex;
msg ("Changing ULINK to SYSTEMITEM...");
$data =~ s{<ulink url=\"(.+?)\">\s*</ulink>}
{<systemitem role=\"url\">$1</systemitem>}gs;
msg ("Adding PARA inside ENTRY...");
$data =~ s{<entry>(.*?)</entry>}
{<entry><para>$1</para></entry>}gs;
msg ("Fixing spacing problem with titles...");
$data =~ s{(</\w+>)(\w{2,})}
{$1 $2}gs;
msg ("Adding closing / to XREF and COLSPEC tags...");
$data =~ s{<(xref|colspec) (.+?)>}
{<$1 $2 />}gs;
# arjen 2002-04-26
msg ("Removing separate target titles from LINKs and make them XREFs...");
$data =~ s{<link (linkend=.+?)>.+?</link>}
{<xref $1 />}gs;
# Probably need to strip these
msg ('Adding "See " to XREFs that used to be @xref...');
$data =~ s{([.'!)])\s*<xref }
{$1 See <xref }gs;
msg ('Adding "see " to (XREFs) that used to be (@pxref)...');
$data =~ s{([([,;])(\s*)<xref }
{$1$2see <xref }gs;
msg ("Making first row in table THEAD...");
$data =~ s{( *)<tbody>(\s*<row>.+?</row>)}
{$1<thead>$2\n$1</thead>\n$1<tbody>}gs;
msg ("Removing EMPHASIS inside THEAD...");
$data =~ s{<thead>(.+?)</thead>}
{"<thead>".&strip_tag($1, 'emphasis')."</thead>"}gsex;
msg ("Removing empty PARA...");
$data =~ s{<para>\s*</para>}
{}gs;
msg ("Removing lf before /PARA in ENTRY...");
$data =~ s{\n(</para></entry>)}
{$1}gs;
msg ("Removing whitespace before /PARA if not on separate line...");
$data =~ s{(\S+)[\t ]+</para>}
{$1</para>}g;
msg ("Removing PARA around INDEXTERM if no text in PARA...");
$data =~ s{<para>((?:<indexterm role=\"[^"]+\">(?:<(primary|secondary)>[^>]+</\2>)+?</indexterm>)+?)\s*</para>}
{$1}gs;
@apx = ("Users", "MySQL Testimonials", "News", "GPL-license", "LGPL-license");
foreach $apx (@apx) {
msg ("Removing appendix $apx...");
$data =~ s{<appendix id=\"$apx\">(.+?)</appendix>}
{}gs;
# Skip to next appendix regex if the regex did not match anything
next unless (defined $&);
msg ("...Building list of removed nodes...");
# Split the last bracketed regex match into an array
# Extract the node names from the tags and push them into an array
foreach (split "\n", $&) {
push @nodes, $1 if /<\w+ id=\"(.+?)\">/
}
}
# 2002-02-22 arjen@mysql.com (added fix " /" to end of regex, to make it match)
msg ("Fixing references to removed nodes...");
# Merge the list of node names into a set of regex alternations
$nodes = join "|", @nodes;
# Find all references to removed nodes and convert them to absolute URLs
$data =~ s{<\w+ linkend="($nodes)" />}
{&xref2link($1)}ges;
print STDOUT $data;
exit;
#
# Definitions for helper sub-routines
#
sub msg {
print STDERR "docbook-fixup:", shift, "\n";
}
sub strip_tag($$) {
(my $str, my $tag) = @_;
$str =~ s{<$tag>(.+?)</$tag>}{$1}gs;
return $str;
}
sub underscore2hyphen($) {
my $str = shift;
$str =~ tr/_/-/;
return $str;
}
sub xref2link {
my $ref = shift;
$ref =~ tr/ /_/;
$ref =~ s{^((.)(.).+)$}{$2/$3/$1.html};
return "http://www.mysql.com/doc/" . $ref;
}
# We might need to encode the high-bit characters to ensure proper representation
# msg ("Converting high-bit characters to entities");
# $data =~ s/([\200-\400])/&get_entity($1)>/gs;
# There is no get_entity function yet - no point writing it til we need it :)
#!/usr/bin/perl -w
# Preprocess the input of `makeinfo --docbook` version 4.0c
# Authors: Arjen Lentz and Zak Greant (started by arjen 2002-05-01)
use strict;
my $data = '';
msg ("-- Pre-processing `makeinfo --docbook` input --");
msg ("** Written to work with makeinfo version 4.0c **\n");
# <> is a magic filehandle - either reading lines from stdin or from file(s) specified on the command line
msg ("Get the data");
$data = join "", <>;
msg ("Replacing '\@-' with FIXUPmdashFIXUP");
$data =~ s/\@-/FIXUPmdashFIXUP/g;
msg ("Replacing '--' with FIXUPdoubledashFIXUP");
$data =~ s/--/FIXUPdoubledashFIXUP/g;
msg ("Turning \@strong{} into LITERAL blocks");
$data =~ s/\@strong\{(.*?)\}/FIXUPstrongFIXUP$1FIXUPendstrongFIXUP/gs;
msg ("Turning \@emph{} into LITERAL blocks");
$data =~ s/\@emph\{(.*?)\}/FIXUPemphFIXUP$1FIXUPendemphFIXUP/gs;
msg ("Turning \@file{} into LITERAL blocks");
$data =~ s/\@file\{(.*?)\}/FIXUPfileFIXUP$1FIXUPendfileFIXUP/gs;
msg ("Turning \@samp{} into LITERAL blocks");
$data =~ s/\@samp\{\@\{\}/FIXUPsampFIXUP\@\{FIXUPendsampFIXUP/g;
$data =~ s/\@samp\{\@\}\}/FIXUPsampFIXUP\@\}FIXUPendsampFIXUP/g;
$data =~ s/\@samp\{\@\{n\@\}\}/FIXUPsampFIXUP\@\{n\@\}FIXUPendsampFIXUP/g;
$data =~ s/\@samp\{(.*?)\}/FIXUPsampFIXUP$1FIXUPendsampFIXUP/gs;
msg ("Write the data");
print STDOUT $data;
exit;
#
# Definitions for helper sub-routines
#
sub msg {
print STDERR "docbook-prefix: ", shift, "\n";
}
#! /usr/bin/perl -w
# O'Reilly's Perl script to chop mysql.xml into separate ch/apps/index files.
# The indexes are actually not used, they're created straight from the xrefs.
# Breaks the MySQL reference manual into chapters, appendices, and indexes.
use strict;
my $app_letter = "a"; # Start appendix letters at "a"
my $chap_num = 1; # Start chapter numbers at one (there is no preface)
my $directory = "mysql_refman_" . time;
my $ext = ".xml";
my $line = "";
my $output_name = "";
my $start_text = "";
mkdir $directory unless -d $directory;
while (defined $line) {
if ($line =~ /(<chapter.+)/i ) {
$start_text = $1;
$output_name = sprintf("ch%02d%s", $chap_num, $ext);
++$chap_num;
&process_file("chapter");
}
elsif ($line =~ /(<appendix.+)/i ) {
$start_text = $1 ;
$output_name = "app$app_letter$ext";
++$app_letter;
&process_file("appendix");
}
elsif ($line =~ /(<index\s+id=")(.*?)(">.*)/i ) {
$start_text = $1 . $2 . $3;
$output_name = lc($2) . $ext;
&process_file("index");
}
else {
# Skip junk in between chapters, appendices and indexes.
$line = <>;
}
}
sub process_file {
my $marker = shift;
my $path = "$directory/$output_name";
open (OUTPUT_FILE, ">$path") or die "Cannot open $path";
print STDERR "Creating $path\n";
# Print out XML PI
print OUTPUT_FILE "<?xml version='1.0' encoding='ISO-8859-1'?>\n";
# Print whatever happened to appear at the end of the previous chapter.
print OUTPUT_FILE "$start_text\n" if $start_text;
while (defined $line) {
$line = <>;
# Note: Anything after the terminating marker is lost, just like
# lines in between chapters.
if ($line =~ /(.*<\/\s*$marker\s*>)/i ) {
print OUTPUT_FILE "$1\n" if $1;
close OUTPUT_FILE;
return;
}
print OUTPUT_FILE $line;
}
}
exit 0;
#!/bin/sh
# 2002-01-30 arjen@mysql.com
# Use this to create mysql.xml (the DocBook XML format output of manual.texi)
# Requires makeinfo 4.0c
#create include.texi with version/port #
echo "@c This file is autogenerated by the Makefile" > include.texi
echo -n "@set mysql_version " >> include.texi
# grep "AM_INIT_AUTOMAKE(mysql, " ../configure.in | \
# sed -e 's;AM_INIT_AUTOMAKE(mysql, ;;' -e 's;);;' >> include.texi
# 2002-04-26 arjen - the below just picks #.# instead of #.#.#-alpha
# (code by mwagner - tnx)
grep "AM_INIT_AUTOMAKE(mysql, " ../configure.in | \
perl -p -e 's/AM_INIT_AUTOMAKE\(mysql,\s(\d+\.\d+)\..+/$1/' >> include.texi
echo -n "@set default_port " >> include.texi
grep "MYSQL_TCP_PORT_DEFAULT=" ../configure.in | \
sed -e 's;MYSQL_TCP_PORT_DEFAULT=;;' >> include.texi
# produce DocBook XML
Support/docbook-prefix.pl < manual.texi |\
makeinfo --force --no-ifinfo --docbook -o - |\
Support/docbook-fixup.pl > mysql.xml
# See if the XML output is well-formed
xmlwf mysql.xml
# If all is well, keep processing
cat mysql.xml | Support/colspec-fix.pl | Support/docbook-split;
#!/bin/sh
# Use this when you have deleted Makefile and do not want to do a full
# build to get it back
cd ..
automake --gnu Docs/Makefile
CONFIG_FILES=Docs/Makefile CONFIG_HEADERS= sh ./config.status
#!/bin/sh
needed_flags=0
needed_texi2html=0
needed_texinfo_tex=0
needed_include_texi=0
if [ -z $BROWSER ]; then
BROWSER=netscape
echo "BROWSER not set, using $BROWSER"
fi
die ()
{
echo
echo $1
cleanup
exit 1
}
cleanup ()
{
echo "Cleaning up..."
if [ $needed_flags ]; then
bk clean Flags
fi
if [ $needed_texi2html ]; then
bk clean Support/texi2html
fi
if [ $needed_texinfo_tex ]; then
bk clean Support/texinfo.tex
fi
if [ $needed_include_texi ]; then
rm -f include.texi
fi
for file in \
manual.aux manual.cp manual.cps manual.dvi \
manual.fn manual.fns manual.ky manual.html \
manual.pg manual.toc manual.tp manual.vr \
mysql.info manual_toc.html ;
do
rm -f $file
done
}
if [ -e Flags/usa.txt ]; then
echo "Good, Flags are there."
else
echo -n "Checking out Flags..."
bk edit Flags >/dev/null 2>&1
echo " Done."
needed_flags=1
fi
if [ -e Support/texi2html ]; then
echo "Good, texi2html is there."
else
echo -n "Checking out texi2html..."
bk edit Support/texi2html >/dev/null 2>&1
echo " Done."
needed_texi2html=1
fi
if [ -e Support/texinfo.tex ]; then
echo "Good, texinfo.tex is there."
else
echo -n "Checking out texinfo.tex..."
bk edit Support/texinfo.tex >/dev/null 2>&1
echo " Done."
needed_texinfo_tex=1
fi
if [ -e include.texi ]; then
echo "Good, include.texi is there."
else
echo -n "Creating include.texi..."
bk edit ../configure.in >/dev/null 2>&1
echo "@c This file was generated by test-make-manual" > include.texi
echo -n "@set mysql_version " >> include.texi
grep "AM_INIT_AUTOMAKE(mysql, " ../configure.in | \
sed -e 's;AM_INIT_AUTOMAKE(mysql, ;;' -e 's;);;' >> include.texi
echo -n "@set default_port " >> include.texi
grep "MYSQL_TCP_PORT_DEFAULT=" ../configure.in | \
sed -e 's;MYSQL_TCP_PORT_DEFAULT=;;' >> include.texi
echo " Done."
needed_include_texi=1
fi
echo -n "Running makeinfo..."
makeinfo --no-split -I . manual.texi
if [ $? != 0 ]; then
die "Manual has errors - fix before you commit"
else
echo " Looks good."
fi
echo -n "Running texi2html..."
/usr/bin/perl ./Support/texi2html -iso -number manual.texi
if [ $? != 0 ]; then
die "Manual has errors - fix before you commit"
else
echo " Looks good."
fi
echo -n "Running texi2dvi..."
texi2dvi --batch manual.texi > texi2dvi.out
if [ $? != 0 ]; then
die "Manual has errors - fix before you commit (saved in texi2dvi.out)"
else
rm texi2dvi.out
echo " Looks good."
fi
echo
echo
echo "Please examine your modifications in \`manual.html'."
echo
echo "If you would like to use a different browser, set the 'BROWSER' environment"
echo "variable."
echo
$BROWSER file:`pwd`/manual_toc.html
echo "-- Press Enter to Continue --"
read junk
cleanup
#!/bin/sh
needed_flags=0
needed_texi2html=0
needed_texinfo_tex=0
needed_include_texi=0
if [ -z $BROWSER ]; then
BROWSER=netscape
echo "BROWSER not set, using $BROWSER"
fi
die ()
{
echo
echo $1
cleanup
exit 1
}
cleanup ()
{
echo "Cleaning up..."
if [ $needed_flags ]; then
bk clean Flags
fi
if [ $needed_texi2html ]; then
bk clean Support/texi2html
fi
if [ $needed_texinfo_tex ]; then
bk clean Support/texinfo.tex
fi
if [ $needed_include_texi ]; then
rm -f include.texi
fi
for file in \
manual.de.aux manual.de.cp manual.de.cps manual.de.dvi \
manual.de.fn manual.de.fns manual.de.ky manual.de.html \
manual.de.pg manual.de.toc manual.de.tp manual.de.vr \
mysql.de.info manual.de_toc.html ;
do
rm -f $file
done
}
if [ -e Flags/usa.txt ]; then
echo "Good, Flags are there."
else
echo -n "Checking out Flags..."
bk edit Flags >/dev/null 2>&1
echo " Done."
needed_flags=1
fi
if [ -e Support/texi2html ]; then
echo "Good, texi2html is there."
else
echo -n "Checking out texi2html..."
bk edit Support/texi2html >/dev/null 2>&1
echo " Done."
needed_texi2html=1
fi
if [ -e Support/texinfo.tex ]; then
echo "Good, texinfo.tex is there."
else
echo -n "Checking out texinfo.tex..."
bk edit Support/texinfo.tex >/dev/null 2>&1
echo " Done."
needed_texinfo_tex=1
fi
if [ -e include.texi ]; then
echo "Good, include.texi is there."
else
echo -n "Creating include.texi..."
bk edit ../configure.in >/dev/null 2>&1
echo "@c This file was generated by test-make-manual" > include.texi
echo -n "@set mysql_version " >> include.texi
grep "AM_INIT_AUTOMAKE(mysql, " ../configure.in | \
sed -e 's;AM_INIT_AUTOMAKE(mysql, ;;' -e 's;);;' >> include.texi
echo -n "@set default_port " >> include.texi
grep "MYSQL_TCP_PORT_DEFAULT=" ../configure.in | \
sed -e 's;MYSQL_TCP_PORT_DEFAULT=;;' >> include.texi
echo " Done."
needed_include_texi=1
fi
echo -n "Running makeinfo..."
makeinfo --no-split -I . manual.de.texi
if [ $? != 0 ]; then
die "Manual has errors - fix before you commit"
else
echo " Looks good."
fi
echo -n "Running texi2html..."
/usr/bin/perl ./Support/texi2html -iso -number manual.de.texi
if [ $? != 0 ]; then
die "Manual has errors - fix before you commit"
else
echo " Looks good."
fi
echo -n "Running texi2dvi..."
texi2dvi --batch manual.de.texi > texi2dvi.out
if [ $? != 0 ]; then
die "Manual has errors - fix before you commit (saved in texi2dvi.out)"
else
rm texi2dvi.out
echo " Looks good."
fi
echo
echo
echo "Please examine your modifications in \`manual.de.html'."
echo
echo "If you would like to use a different browser, set the 'BROWSER' environment"
echo "variable."
echo
$BROWSER file:`pwd`/manual.de_toc.html
echo "-- Press Enter to Continue --"
read junk
cleanup
--- alt-multi.c Sun Apr 14 10:03:19 2002
+++ multi.c Tue May 22 20:52:33 2001
@@ -287,7 +287,7 @@
&& *params != '\n' && *params != '@')
params++;
setup_output_environment (i,
- (int) ((columnfrac * 100.00) + 0.49));
+ (int) (columnfrac * (fill_column - current_indent) + .5));
}
}
#!/usr/bin/perl -w
#
# Parse document and report first syntax (well-formedness) error found.
#
use strict;
use XML::Parser;
use Getopt::Std;
my %opts;
getopts('e', \%opts);
my $ENTREFS = exists( $opts{'e'} ); # flag: check ent refs
my $parser = XML::Parser->new(
ErrorContext => 2, # output error context
);
# get input from files
if( @ARGV ) {
foreach( @ARGV ) {
my $file = $_;
unless( -r $file ) {
print STDERR "ERROR: Can't open '$file'.\n";
return;
}
my $input = '';
open( F, $file );
while( <F> ) { $input .= $_; }
close F;
# parse and report errors
if( &parse_string( $input )) {
print STDERR "ERROR in $file:\n$@\n";
} else {
print STDERR "'$file' is well-formed.\n";
}
}
print "All files checked.\n";
# get input from STDIN
} else {
my $input = "";
while( <STDIN> ) { $input .= $_; }
if( &parse_string( $input )) {
print STDERR "ERROR in stream:\n$@\n";
} else {
print STDERR "No syntax errors found in XML stream.\n";
}
}
# parse the string and return error message
#
# NOTE: By default, entity refs are not expanded. XML::Parser can be
# told not to expand entity refs, but will still try to find
# replacement text just in case, which we don't want. Therefore, we
# need to do a stupid regexp replacement, removing entities from input.
#
sub parse_string {
my $string = shift;
unless( $ENTREFS ) {
$string =~ s/\&[^\s;]+;//g; # remove entity references
}
eval { $parser->parse( $string ); };
$@ =~ s/at \/.*?$//s; # remove module line number
return $@;
}
This diff is collapsed.
Mail by sasha, should be rewritten as a HOWTO sometimes
vva added point C) for Windows-project
-----------
I have set up a repository with BitKeeper on work. There are still some things
about it that I would like to learn, but I have gotten far enough with it to
replace CVS functionality were are currently using, so let's just go ahead and
get started on it. Please follow the instructions below (make sure to save the
message for future reference):
a) http://www.bitmover.com/download
user: beta
password: get bitkeeper
get the version appropriate for your platform - download it to a temp
directory, chmod +x and then run it. You will have to tell it which directory
to install, for consistency, let's use /usr/local/bin
b) we will take advantage of bk capablity of working with master/slave
repositories. The master will be on work.mysql.com, the slaves will be our
individual machines. The master repository has already been set up on work, so
you will need just to set up a slave repository on your machine:
mkdir bk
cd bk
bk clone yourusername@work:/home/bk/mysql mysql
cd mysql
bk -r edit
Now you have the entire source tree in the current directory. Let's compile it:
BUILD/compile-pentium-debug
C) Windows project.
- Compile Linux-project (see points above)
- run VC++Files/prepare
- make repository accessible for Windows (using samba)
- open VC++Files/mysql.dsw in Microsoft Visual Stidio (5.0 or above)
After you edit a file, you need to check it in using bk citool or bk ci
filename. Note that ci is different than commit - you ci a file, but you commit
a change set. This is a very nice concept - instead of thinking of each
individual file as CVS does, bk groups the changes you are making and allows you
to document what you actually did between the commits as a whole, rather than
just commenting on every file. When you commit, bk will ask you to comment on
the change set.
Commit is done just to your local repository. To make your changes global, you
will need to run bk push. Be careful with that - it is a good idea to run bk
push -l -n first too see what you are just about to push to the master
repository.
When somebody does a push, you will be getting a email ( I will set this up to
day). You will then need to execute bk pull to update your sources. If there are
any conflicts, bk will force you to resolve them by asking you questions on what
to do with each conflict.
To learn more about bk, use bk helptool - I will be doing this a lot in the next
couple of days :-) If you find bugs or have questions/feature
suggestions/comments for developers, feel free to e-mail dev@bitmover.com .
Their developers, and especially the president of the company Larry McVoy really
like MySQL and are very anxious to help us. Make sure it is obvious that you
work for MySQL, of course. And, of course, do not bug them with little things
that you can figure out on your own or with my help - they were nice to offer us
support, but we should not abuse it.
\ No newline at end of file
[Note this information is obsolete]
Notes on compiling glibc for the standard MySQL binary:
- make sure you have gcc 2.95 and gmake 3.79 or newer
......
Functions i mysys: (For flags se my_sys.h)
int my_copy _A((const char *from,const char *to,myf MyFlags));
- Copy file
int my_delete _A((const char *name,myf MyFlags));
- Delete file
int my_getwd _A((string buf,uint size,myf MyFlags));
int my_setwd _A((const char *dir,myf MyFlags));
- Get and set working directory
string my_tempnam _A((const char *pfx,myf MyFlags));
- Make a uniq temp file name by using dir and adding something after
pfx to make name uniq. Name is made by adding a uniq 6 length-string
and TMP_EXT after pfx.
Returns pointer to malloced area for filename. Should be freed by
free().
File my_open _A((const char *FileName,int Flags,myf MyFlags));
File my_create _A((const char *FileName,int CreateFlags,
int AccsesFlags, myf MyFlags));
int my_close _A((File Filedes,myf MyFlags));
uint my_read _A((File Filedes,byte *Buffer,uint Count,myf MyFlags));
uint my_write _A((File Filedes,const byte *Buffer,uint Count,
myf MyFlags));
ulong my_seek _A((File fd,ulong pos,int whence,myf MyFlags));
ulong my_tell _A((File fd,myf MyFlags));
- Use instead of open,open-with-create-flag, close read and write
to get automatic error-messages (flag: MYF_WME) and only have
to test for != 0 if error (flag: MY_NABP).
int my_rename _A((const char *from,const char *to,myf MyFlags));
- Rename file
FILE *my_fopen _A((const char *FileName,int Flags,myf MyFlags));
FILE *my_fdopen _A((File Filedes,int Flags,myf MyFlags));
int my_fclose _A((FILE *fd,myf MyFlags));
uint my_fread _A((FILE *stream,byte *Buffer,uint Count,myf MyFlags));
uint my_fwrite _A((FILE *stream,const byte *Buffer,uint Count,
myf MyFlags));
ulong my_fseek _A((FILE *stream,ulong pos,int whence,myf MyFlags));
ulong my_ftell _A((FILE *stream,myf MyFlags));
- Same read-interface for streams as for files
gptr _mymalloc _A((uint uSize,const char *sFile,
uint uLine, myf MyFlag));
gptr _myrealloc _A((string pPtr,uint uSize,const char *sFile,
uint uLine, myf MyFlag));
void _myfree _A((gptr pPtr,const char *sFile,uint uLine));
int _sanity _A((const char *sFile,unsigned int uLine));
gptr _myget_copy_of_memory _A((const byte *from,uint length,
const char *sFile, uint uLine,
myf MyFlag));
- malloc(size,myflag) is mapped to this functions if not compiled
with -DSAFEMALLOC
void TERMINATE _A((void));
- Writes malloc-info on stdout if compiled with -DSAFEMALLOC.
int my_chsize _A((File fd,ulong newlength,myf MyFlags));
- Change size of file
void my_error _D((int nr,myf MyFlags, ...));
- Writes message using error number (se mysys/errors.h) on
stdout or curses if MYSYS_PROGRAM_USES_CURSES() is called.
void my_message _A((const char *str,myf MyFlags));
- Writes message-string on
stdout or curses if MYSYS_PROGRAM_USES_CURSES() is called.
void my_init _A((void ));
- Start each program (in main) with this.
void my_end _A((int infoflag));
- Gives info about program.
- If infoflag & MY_CHECK_ERROR prints if some files are left open
- If infoflag & MY_GIVE_INFO prints timing info and malloc info
about prog.
int my_redel _A((const char *from, const char *to, int MyFlags));
- Delete from before rename of to to from. Copyes state from old
file to new file. If MY_COPY_TIME is set sets old time.
int my_copystat _A((const char *from, const char *to, int MyFlags));
- Copye state from old file to new file.
If MY_COPY_TIME is set sets copy also time.
string my_filename _A((File fd));
- Give filename of open file.
int dirname _A((string to,const char *name));
- Copy name of directory from filename.
int test_if_hard_path _A((const char *dir_name));
- Test if dirname is a hard path (Starts from root)
void convert_dirname _A((string name));
- Convert dirname acording to system.
- In MSDOS changes all caracters to capitals and changes '/' to
'\'
string fn_ext _A((const char *name));
- Returns pointer to extension in filename
string fn_format _A((string to,const char *name,const char *dsk,
const char *form,int flag));
format a filename with replace of library and extension and
converts between different systems.
params to and name may be identicall
function dosn't change name if name != to
Flag may be: 1 force replace filnames library with 'dsk'
2 force replace extension with 'form' */
4 force Unpack filename (replace ~ with home)
8 Pack filename as short as possibly for output to
user.
All open requests should allways use at least:
"open(fn_format(temp_buffe,name,"","",4),...)" to unpack home and
convert filename to system-form.
string fn_same _A((string toname,const char *name,int flag));
- Copys directory and extension from name to toname if neaded.
copy can be forced by same flags that in fn_format.
int wild_compare _A((const char *str,const char *wildstr));
- Compare if str matches wildstr. Wildstr can contain "*" and "?"
as match-characters.
Returns 0 if match.
void get_date _A((string to,int timeflag));
- Get current date in a form ready for printing.
void soundex _A((string out_pntr, string in_pntr))
- Makes in_pntr to a 5 chars long string. All words that sounds
alike have the same string.
int init_key_cache _A((ulong use_mem,ulong leave_this_much_mem));
- Use cacheing of keys in MISAM, PISAM, and ISAM.
KEY_CACHE_SIZE is a good size.
- Remember to lock databases for optimal cacheing
void end_key_cache _A((void));
- End key-cacheing.
This diff is collapsed.
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