Commit 779695c1 authored by monty@hundin.mysql.fi's avatar monty@hundin.mysql.fi

Merge work:/home/bk/mysql-4.0 into hundin.mysql.fi:/my/bk/mysql-4.0

parents 0bfec316 2eee3e98
......@@ -34,6 +34,7 @@ BitKeeper/tmp/bkr3sAHD
BitKeeper/tmp/gone
COPYING
COPYING.LIB
Docs/#manual.texi#
Docs/INSTALL-BINARY
Docs/include.texi
Docs/manual.aux
......@@ -56,6 +57,7 @@ Docs/manual_letter.ps
Docs/manual_toc.html
Docs/my_sys.doc
Docs/mysql.info
Docs/texi2dvi.out
INSTALL-SOURCE
Logs/*
MIRRORS
......@@ -180,6 +182,7 @@ gmon.out
heap/hp_test1
heap/hp_test2
include/my_config.h
include/my_global.h
include/mysql_version.h
include/widec.h
innobase/conftest.s1
......@@ -419,4 +422,3 @@ vio/test-ssl
vio/test-sslclient
vio/test-sslserver
vio/viotest-ssl
Docs/#manual.texi#
......@@ -4,6 +4,7 @@
TO=dev-public@mysql.com
FROM=$USER@mysql.com
INTERNALS=internals@lists.mysql.com
DOCS=docs@mysql.com
LIMIT=10000
if [ "$REAL_EMAIL" = "" ]
......@@ -17,10 +18,14 @@ BK_STATUS=$BK_STATUS$BK_COMMIT
if [ "$BK_STATUS" = OK ]
then
#++
# dev-public@
#--
echo "Commit successful, notifying developers at $TO"
(
cat <<EOF
List-ID: <bk.mysql>
List-ID: <bk.mysql-4.0>
From: $FROM
To: $TO
Subject: bk commit - 4.0 tree
......@@ -29,10 +34,14 @@ EOF
bk changes -v -r+
bk cset -r+ -d
) | head -n $LIMIT | /usr/sbin/sendmail -t
#++
# internals@ mail
#--
echo "Notifying internals list at $INTERNALS"
(
cat <<EOF
List-ID: <bk.mysql>
List-ID: <bk.mysql-4.0>
From: $FROM
To: $INTERNALS
Subject: bk commit into 4.0 tree
......@@ -47,6 +56,27 @@ EOF
bk changes -v -r+
bk cset -r+ -d
) | head -n $LIMIT | /usr/sbin/sendmail -t
#++
# docs@ mail
#--
bk changes -v -r+ | grep -q Docs/manual.texi
if [ $? == 0 ]
then
echo "Notifying docs list at $DOCS"
(
cat <<EOF
List-ID: <bk.mysql-4.0>
From: $FROM
To: $DOCS
Subject: bk commit - 4.0 tree (Manual)
EOF
bk changes -v -r+
bk cset -r+ -d
) | head -n $LIMIT | /usr/sbin/sendmail -t
fi
else
echo "commit failed because '$BK_STATUS', sorry life is hard..."
fi
%!PS-Adobe-3.0 EPSF-3.0
%%Creator: Adobe Photoshop Version 5.5
%%Title: norway.eps
%%CreationDate: Tue Oct 09 2001 21:06:06
%%BoundingBox: 0 0 32 22
%%HiResBoundingBox: 0 0 32 22
%%SuppressDotGainCompensation
%%EndComments
%%BeginProlog
%%EndProlog
%%BeginSetup
%%EndSetup
%ImageData: 32 22 8 3 1 32 2 "beginimage"
%BeginPhotoshop: 1312
% 3842494D03ED000000000010004800000001000200480000000100023842494D
% 040D000000000004000000783842494D03F30000000000080000000000000000
% 3842494D040A00000000000100003842494D271000000000000A000100000000
% 000000023842494D03F5000000000048002F66660001006C6666000600000000
% 0001002F6666000100A1999A0006000000000001003200000001005A00000006
% 000000000001003500000001002D000000060000000000013842494D03F80000
% 000000700000FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF03E80000
% 0000FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF03E800000000FFFF
% FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF03E800000000FFFFFFFFFFFF
% FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF03E800003842494D0408000000000010
% 000000010000024000000240000000003842494D041400000000000400000001
% 3842494D040C0000000003A10000000100000020000000160000006000000840
% 0000038500180001FFD8FFE000104A46494600010201004800480000FFEE000E
% 41646F626500648000000001FFDB0084000C08080809080C09090C110B0A0B11
% 150F0C0C0F1518131315131318110C0C0C0C0C0C110C0C0C0C0C0C0C0C0C0C0C
% 0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C010D0B0B0D0E0D100E0E10140E0E0E
% 14140E0E0E0E14110C0C0C0C0C11110C0C0C0C0C0C110C0C0C0C0C0C0C0C0C0C
% 0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0CFFC0001108001600200301220002
% 1101031101FFDD00040002FFC4013F0000010501010101010100000000000000
% 030001020405060708090A0B0100010501010101010100000000000000010002
% 030405060708090A0B1000010401030204020507060805030C33010002110304
% 211231054151611322718132061491A1B14223241552C16233347282D1430725
% 9253F0E1F163733516A2B283264493546445C2A3743617D255E265F2B384C3D3
% 75E3F3462794A485B495C4D4E4F4A5B5C5D5E5F55666768696A6B6C6D6E6F637
% 475767778797A7B7C7D7E7F71100020201020404030405060707060535010002
% 1103213112044151617122130532819114A1B14223C152D1F0332462E1728292
% 435315637334F1250616A2B283072635C2D2449354A317644555367465E2F2B3
% 84C3D375E3F34694A485B495C4D4E4F4A5B5C5D5E5F55666768696A6B6C6D6E6
% F62737475767778797A7B7C7FFDA000C03010002110311003F00E231B1B1DD8F
% 51353092C6924B44CC2D5CBC0C16B7376E354367D836431BA6FC77BEDDBA7F84
% 7FBECFDF4B03298DC1C66FDB76454C1B7EC18EF8F68F6FAAF7EFB3FE31FF004D
% 1C0CAAB2FA85B7750F67EA9B9DF64AACDFEA54EB31BF56B1C29A3D0A7F47FA35
% 272FCBE3F6F9AFE958CDE31D32FEA7F5B8FD52FD5FF81E876F366919729FD125
% 1E197F53F5FE8D838FF65C5FF42CFF00347F721E4E363B71ED22A60218E20868
% 9985B9F6C67FDCFF00FE17637FE9440CFCA63B0725BF6DDF353C6DFB063B27DA
% 7DBEAB1FBEBFF8C67D055872D8C6BF7DC47C2B3EBFF8D36F273123090FB84E3E
% 93EAAC7E9F17FFD0E231AD78C7A80A5E406375059074F3B16AE5E4DC5B9B38B6
% B777D8264D5A6DC77B5BBA2EFF000BF4EBDBFF005DF4D718928B96FE6F9CAFF3
% 42EBFDB63F9B8BFEE1E933F1F1721F3FCE2AFDAFF37FA1FF00AF1E8BD6B3FD03
% FEF67FE9443C9B5E71ED06978058ED49640D3CAC58292A71AB1F2EFF00D66F66
% F73DB9FF003BF2CBFCC767FFD9003842494D03FD000000000006000000000000
%EndPhotoshop
gsave % EPS gsave
/hascolor
/deviceinfo where
{pop deviceinfo /Colors known
{deviceinfo /Colors get exec 1 gt}
{false} ifelse}
{/statusdict where
{pop statusdict /processcolors known
{statusdict /processcolors get exec 1 gt}
{false} ifelse}
{false} ifelse}
ifelse
def
40 dict begin
/_image systemdict /image get def
/_setgray systemdict /setgray get def
/_currentgray systemdict /currentgray get def
/_settransfer systemdict /settransfer get def
/_currenttransfer systemdict /currenttransfer get def
/blank 0 _currenttransfer exec
1 _currenttransfer exec eq def
/negative blank
{0 _currenttransfer exec 0.5 lt}
{0 _currenttransfer exec 1 _currenttransfer exec gt}
ifelse def
/inverted? negative def
/level2 systemdict /languagelevel known
{languagelevel 2 ge} {false} ifelse def
/level3 systemdict /languagelevel known
{languagelevel 3 ge} {false} ifelse def
/foureq {4 index eq 8 1 roll
4 index eq 8 1 roll
4 index eq 8 1 roll
4 index eq 8 1 roll
pop pop pop pop and and and} def
hascolor {/band 0 def} {/band 5 def} ifelse
/setcmykcolor where {pop
1 0 0 0 setcmykcolor _currentgray 1 exch sub
0 1 0 0 setcmykcolor _currentgray 1 exch sub
0 0 1 0 setcmykcolor _currentgray 1 exch sub
0 0 0 1 setcmykcolor _currentgray 1 exch sub
4 {4 copy} repeat
1 0 0 0 foureq {/band 1 store} if
0 1 0 0 foureq {/band 2 store} if
0 0 1 0 foureq {/band 3 store} if
0 0 0 1 foureq {/band 4 store} if
0 0 0 0 foureq {/band 6 store} if} if
blank {/band 6 store} if
gsave % Image Header gsave
/rows 22 def
/cols 32 def
32 22 scale
level2 {
band 0 eq {
/DeviceRGB
} {/DeviceGray} ifelse
setcolorspace currentdict /PhotoshopDuotoneColorSpace undef currentdict /PhotoshopDuotoneAltColorSpace undef } if
/picstr1 32 string def
/picstr2 32 string def
/picstr3 32 string def
/picstr4 32 string def
/readdata {currentfile exch readhexstring pop} def
/image2 level2 {/image load def} {{begin
Width Height BitsPerComponent ImageMatrix
Decode length 2 eq
{/DataSource load image} if
Decode length 6 eq
{DataSource 0 get DataSource 1 get DataSource 2 get
true 3 colorimage} if
Decode length 8 eq
{DataSource 0 get DataSource 1 get
DataSource 2 get DataSource 3 get
true 4 colorimage} if
end} def} ifelse
/_image2 level2 {/_image load def} {{begin
Width Height BitsPerComponent ImageMatrix
/DataSource load _image end} def} ifelse
/beginimage {
band 0 eq band 4 eq or band 5 eq or
{image2}
{negative {{pop 0}} {{pop 1}} ifelse
_settransfer _image2} ifelse
} def
12 dict begin
/ImageType 1 def
/Width cols def
/Height rows def
/ImageMatrix [cols 0 0 rows neg 0 rows] def
/BitsPerComponent 8 def
band 0 eq
{/Decode [0 1 0 1 0 1] def
/MultipleDataSources true def
/DataSource [
{picstr1 readdata}
{picstr2 readdata}
{picstr3 readdata picstr4 readdata pop}
] def}
{/Decode [0 1] def
/DataSource {
picstr1 readdata pop
picstr2 readdata pop
picstr3 readdata pop
picstr4 readdata
} def}
ifelse
currentdict end
%%BeginBinary: 5821
beginimage
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
00C6C6C6C6C6C6C5D1C40B08BDD2C5C6C6C6C6C6C6C6C6C6C6C6C6C6C6C6C600
000000000000000018B50604AC17000000000000000000000000000000000000
000000000000000011DBBABAD611000000000000000000000000000000000000
003B3B3B3B3B3B3B4FBE1B19B64E3B3B3B3B3B3B3B3B3B3B3B3B3B3B3B3B3B00
00C6C6C6C6C6C6C5D1C40B08BDD2C5C6C6C6C6C6C6C6C6C6C6C6C6C6C6C6C600
000000000000000018B50604AC17000000000000000000000000000000000000
000000000000000011DBBABAD611000000000000000000000000000000000000
003B3B3B3B3B3B3B4FBE1B19B64E3B3B3B3B3B3B3B3B3B3B3B3B3B3B3B3B3B00
00C6C6C6C6C6C6C5D1C40B08BDD2C5C6C6C6C6C6C6C6C6C6C6C6C6C6C6C6C600
000000000000000018B50604AC17000000000000000000000000000000000000
000000000000000011DBBABAD611000000000000000000000000000000000000
003B3B3B3B3B3B3B4FBE1B19B64E3B3B3B3B3B3B3B3B3B3B3B3B3B3B3B3B3B00
00C6C6C6C6C6C6C5D1C40B08BDD2C5C6C6C6C6C6C6C6C6C6C6C6C6C6C6C6C600
000000000000000018B50604AC17000000000000000000000000000000000000
000000000000000011DBBABAD611000000000000000000000000000000000000
003B3B3B3B3B3B3B4FBE1B19B64E3B3B3B3B3B3B3B3B3B3B3B3B3B3B3B3B3B00
00C6C6C6C6C6C6C5D1C40B08BDD2C5C6C6C6C6C6C6C6C6C6C6C6C6C6C6C6C600
000000000000000018B50604AC17000000000000000000000000000000000000
000000000000000011DBBABAD611000000000000000000000000000000000000
003B3B3B3B3B3B3B4FBE1B19B64E3B3B3B3B3B3B3B3B3B3B3B3B3B3B3B3B3B00
00C6C6C6C6C6C6C5D1C40B08BDD2C5C6C6C6C6C6C6C6C6C6C6C6C6C6C6C6C600
000000000000000018B50604AC17000000000000000000000000000000000000
000000000000000011DBBABAD611000000000000000000000000000000000000
003B3B3B3B3B3B3B4FBE1B19B64E3B3B3B3B3B3B3B3B3B3B3B3B3B3B3B3B3B00
00C5C5C5C5C5C5C4D0C40B08BDD1C4C5C5C5C5C5C5C5C5C5C5C5C5C5C5C5C500
000000000000000014B50604AC13000000000000000000000000000000000000
00000000000000000DDBBABAD60D000000000000000000000000000000000000
003B3B3B3B3B3B3B4CBE1B19B64B3B3B3B3B3B3B3B3B3B3B3B3B3B3B3B3B3B00
00D1D1D1D1D1D1D0DCCB0B08C4DDD0D1D1D1D1D1D1D1D1D1D1D1D1D1D1D1D100
00171717171717172EBD0604B42D171717171717171717171717171717171700
001010101010101021DEBABAD921101010101010101010101010101010101000
004E4E4E4E4E4E4E61C51B19BD604E4E4E4E4E4E4E4E4E4E4E4E4E4E4E4E4E00
00C3C3C3C3C3C3C3CAA00A089ACAC3C3C3C3C3C3C3C3C3C3C3C3C3C3C3C3C300
00B2B2B2B2B2B2B2BA9B020096BAB2B2B2B2B2B2B2B2B2B2B2B2B2B2B2B2B200
00D8D8D8D8D8D8D8DBDEB6B5DCDBD8D8D8D8D8D8D8D8D8D8D8D8D8D8D8D8D800
00BBBBBBBBBBBBBBC2A418169FC2BBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBB00
000B0B0B0B0B0B0B0B090808090B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B00
0006060606060606060200000206060606060606060606060606060606060600
00BABABABABABABABAB6B5B5B6BABABABABABABABABABABABABABABABABABA00
001B1B1B1B1B1B1B1B181616181B1B1B1B1B1B1B1B1B1B1B1B1B1B1B1B1B1B00
0009090909090909090808080809090909090909090909090909090909090900
0005050505050505040100000104050505050505050505050505050505050500
00B9B9B9B9B9B9B9B9B5B5B5B5B9B9B9B9B9B9B9B9B9B9B9B9B9B9B9B9B9B900
001A1A1A1A1A1A1A1917161617191A1A1A1A1A1A1A1A1A1A1A1A1A1A1A1A1A00
00C0C0C0C0C0C0C0C69D0A0898C6C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C000
00B2B2B2B2B2B2B2B998020093B9B2B2B2B2B2B2B2B2B2B2B2B2B2B2B2B2B200
00DADADADADADADADCDEB6B5DCDCDADADADADADADADADADADADADADADADADA00
00BBBBBBBBBBBBBBC1A118169DC1BBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBB00
00D2D2D2D2D2D2D1DDCB0B08C4DED1D2D2D2D2D2D2D2D2D2D2D2D2D2D2D2D200
00181818181818182FBD0604B42E181818181818181818181818181818181800
001111111111111122DEBABAD922111111111111111111111111111111111100
004F4F4F4F4F4F4F62C51B19BD614F4F4F4F4F4F4F4F4F4F4F4F4F4F4F4F4F00
00C5C5C5C5C5C5C4D0C40B08BDD1C4C5C5C5C5C5C5C5C5C5C5C5C5C5C5C5C500
000000000000000014B50604AC13000000000000000000000000000000000000
00000000000000000DDBBABAD60D000000000000000000000000000000000000
003B3B3B3B3B3B3B4CBE1B19B64B3B3B3B3B3B3B3B3B3B3B3B3B3B3B3B3B3B00
00C6C6C6C6C6C6C5D1C40B08BDD2C5C6C6C6C6C6C6C6C6C6C6C6C6C6C6C6C600
000000000000000018B50604AC17000000000000000000000000000000000000
000000000000000011DBBABAD611000000000000000000000000000000000000
003B3B3B3B3B3B3B4FBE1B19B64E3B3B3B3B3B3B3B3B3B3B3B3B3B3B3B3B3B00
00C6C6C6C6C6C6C5D1C40B08BDD2C5C6C6C6C6C6C6C6C6C6C6C6C6C6C6C6C600
000000000000000018B50604AC17000000000000000000000000000000000000
000000000000000011DBBABAD611000000000000000000000000000000000000
003B3B3B3B3B3B3B4FBE1B19B64E3B3B3B3B3B3B3B3B3B3B3B3B3B3B3B3B3B00
00C6C6C6C6C6C6C5D1C40B08BDD2C5C6C6C6C6C6C6C6C6C6C6C6C6C6C6C6C600
000000000000000018B50604AC17000000000000000000000000000000000000
000000000000000011DBBABAD611000000000000000000000000000000000000
003B3B3B3B3B3B3B4FBE1B19B64E3B3B3B3B3B3B3B3B3B3B3B3B3B3B3B3B3B00
00C6C6C6C6C6C6C5D1C40B08BDD2C5C6C6C6C6C6C6C6C6C6C6C6C6C6C6C6C600
000000000000000018B50604AC17000000000000000000000000000000000000
000000000000000011DBBABAD611000000000000000000000000000000000000
003B3B3B3B3B3B3B4FBE1B19B64E3B3B3B3B3B3B3B3B3B3B3B3B3B3B3B3B3B00
00C6C6C6C6C6C6C5D1C40B08BDD2C5C6C6C6C6C6C6C6C6C6C6C6C6C6C6C6C600
000000000000000018B50604AC17000000000000000000000000000000000000
000000000000000011DBBABAD611000000000000000000000000000000000000
003B3B3B3B3B3B3B4FBE1B19B64E3B3B3B3B3B3B3B3B3B3B3B3B3B3B3B3B3B00
00C6C6C6C6C6C6C5D1C40B08BDD2C5C6C6C6C6C6C6C6C6C6C6C6C6C6C6C6C600
000000000000000018B50604AC17000000000000000000000000000000000000
000000000000000011DBBABAD611000000000000000000000000000000000000
003B3B3B3B3B3B3B4FBE1B19B64E3B3B3B3B3B3B3B3B3B3B3B3B3B3B3B3B3B00
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
%%EndBinary
grestore end % Image Trailer grestore
grestore % EPS grestore
......@@ -55,5 +55,4 @@ 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.
support, but we should not abuse it.
\ No newline at end of file
......@@ -123,7 +123,6 @@ distribution for that version.
* Regexp:: Description of MySQL regular expression syntax
* GPL license:: GNU General Public License
* LGPL license:: GNU Library General Public License
* Placeholder:: Pieces of the manual in transit
* Function Index:: SQL command, type and function index
* Concept Index:: Concept Index
@end menu
......@@ -230,15 +229,19 @@ MySQL, see @ref{MySQL-Books}.
@menu
* MySQL and MySQL AB:: MySQL, MySQL AB, and Open Source
* MySQL AB Logos and Trademarks::
* MySQL 4.0 In A Nutshell::
* MySQL Information Sources:: MySQL Information Sources
* Licensing and Support:: MySQL Support and Licensing
* MySQL AB business model and services::
* MySQL server licenses::
* Compatibility:: How Standards-compatible Is MySQL?
* Comparisons:: How MySQL Compares to Other Databases
* TODO:: MySQL and the future (The TODO)
@end menu
@node MySQL and MySQL AB, MySQL Information Sources, Introduction, Introduction
@node MySQL and MySQL AB, MySQL AB Logos and Trademarks, Introduction, Introduction
@section MySQL, MySQL AB, and Open Source
@menu
......@@ -260,7 +263,7 @@ MySQL, see @ref{MySQL-Books}.
@cindex MySQL, defined
@cindex MySQL, introduction
MySQL, the most popular Open Source SQL database, is provided
MySQL, the most popular Open Source SQL database, is developed and provided
by MySQL AB. MySQL AB is a commercial company that
builds its business providing services around the MySQL database.
@xref{What is MySQL AB}.
......@@ -343,8 +346,8 @@ language already supports MySQL.
@cindex MySQL, pronunciation
@cindex goals of MySQL
The official way to pronounce MySQL is ``My Ess Que Ell'' (not
MY-SEQUEL). But we try to avoid correcting people who say MY-SEQUEL.
MY-SEQUEL), but we don't mind you pronounce it like MY-SEQUEL
or in some other localized way.
@node What is MySQL AB, Manual-info, What-is, MySQL and MySQL AB
@subsection What Is MySQL AB
......@@ -355,24 +358,22 @@ MySQL AB is the Swedish company owned and run by the MySQL
founders and main developers. We are dedicated to developing MySQL
and spreading our database to new users. MySQL AB owns the copyright
to the MySQL server source code and the MySQL trademark.
A significant amount of revenues from our services goes to developing
MySQL. @xref{What-is}.
@xref{What-is}.
@menu
* Contact information:: Contact information
@end menu
MySQL AB has been profitable from the start with providing MySQL. Though
initially working without any outside funding, in October MySQL AB has
received seed round financing from ABN Amro / Alfred Berg Industrifinans,
Holtron, Scope Capital, Servisen Holding and a number of business angels.
MySQL AB currently has 30+ employees worldwide (situation in October 2001).
We are always on the look-out for new partners who would like to support us,
so that we can further accelerate the pace of MySQL development. If you are
interested in doing this, please e-mail @email{partner@@mysql.com}!
We make money on support, services, commercial licenses and royalties,
and we use the revenues to fund product development and to expand the MySQL
business. The company has been profitable since its inception. In October
2001, we accepted venture financing from leading Scandinavian investors and
a handful of business angels. This investment is used to solidify our
business model and build a basis for sustainable growth.
We have a number of partners worldwide that provide value-added products
and services around MySQL. If you are interested in working with us, please
e-mail us at @email{partner@@mysql.com}.
Our main sources of income are:
......@@ -415,8 +416,8 @@ of MySQL AB please visit
@email{partner@@mysql.com}.
@item
We provide MySQL training through our partner programs. For more
information, please e-mail @email{info@@mysql.com}.
We provide MySQL training classes for developers and database administrators.
For more information, please e-mail us at @email{training@@mysql.com}.
@item
The MySQL brand has, since 1995, been associated with speed and
......@@ -486,6 +487,8 @@ you should order one of our
@uref{https://order.mysql.com/, support contracts}.
MySQL support is provided by the MySQL developers so the
standard is extremely high.
If you have restricted access to the Internet, please contact our sales staff
at @email{sales@@mysql.com}.
If you are interested in placing a banner advertisement on our Web site,
please send e-mail to @email{advertising@@mysql.com}.
......@@ -746,8 +749,8 @@ Very fast B-tree disk tables with index compression.
@item
Up to 32 indexes per table are allowed. Each index may consist of 1 to 16
columns or parts of columns. The maximum index length is 500 bytes (this
may be changed when compiling MySQL). An index may use a prefix
columns or parts of columns. The maximum index width is 500 bytes
(this may be changed when compiling MySQL). An index may use a prefix
of a @code{CHAR} or @code{VARCHAR} field.
@item
......@@ -1158,7 +1161,331 @@ for dealing with ambiguous date input data (data containing 2-digit year
values).
@node MySQL Information Sources, Licensing and Support, MySQL and MySQL AB, Introduction
@c FIX: Start new by AGL - Erik's text on logos and trademarks
@node MySQL AB Logos and Trademarks, MySQL 4.0 In A Nutshell, MySQL and MySQL AB, Introduction
@section MySQL AB Logos and Trademarks
Many users of the MySQL database want to display the MySQL AB dolphin logo
on their websites, on their books or boxed products. We welcome and
encourage this although it should be noted that the word @code{MySQL} and the
MySQL dolphin logo are trademarks of MySQL AB and may only be used as
stated in our trademark policy at
@uref{http://www.mysql.com/company/trademark.html}.
@menu
* The Original MySQL logo:: The Original MySQL logo
* MySQL logos that may be used without written permission:: MySQL logos that may be used without written permission
* When need MySQL logo permission:: When do you need a written permission to use MySQL logos?
* MySQL AB partnership logos:: MySQL AB partnership logos
* Using MySQL word in presentations:: Using the word @code{MySQL} in printed text or presentations
* Using MySQL word in company and product names:: Using the word @code{MySQL} in company and product names
@end menu
@node The Original MySQL logo, MySQL logos that may be used without written permission, MySQL AB Logos and Trademarks, MySQL AB Logos and Trademarks
@subsection The Original MySQL logo
@c FIX: picture: MySQL logo
The MySQL dolphin logo was designed by the Finnish advertising agency
Priority in 2001. The dolphin was chosen as a suitable symbol for the
MySQL database since it is a smart, fast and lean animal, effortlessly
navigating oceans of data. We also happen to like dolphins.
The original MySQL logo may only be used by representatives of MySQL AB
and by those having a written agreement allowing them to do so.
@node MySQL logos that may be used without written permission, When need MySQL logo permission, The Original MySQL logo, MySQL AB Logos and Trademarks
@subsection MySQL logos that may be used without written permission
@c FIX: pictures: powered by, works with, included - logos
We have designed a set of special @emph{Conditional Use} logos that may be
downloaded from our website at
@uref{http://www.mysql.com/downloads/logos.html}
and used on third party websites without written permission from MySQL AB.
The use of these logos is not entirely unrestricted but as the name
implies subject to our trademark policy that is also available on our
website. You should read through the trademark policy if you plan to use
them. The requirements are basically:
@itemize @bullet
@item
Use the logo you need as displayed on the @uref{http://www.mysql.com/}
site. You may scale it to fit your needs, but not change colours or design,
or alter the graphics in any way.
@item
Make it evident that you, and not MySQL AB, are the creator and owner of
the site that displays the MySQL trademark.
@item
Don't use the trademark in a way that is detrimental to MySQL AB or to the
value of MySQL AB trademarks. We reserve the right to revoke the right to
use the MySQL AB trademark.
@item
If you use the trademark on a website, make it clickable, leading directly
to @uref{http://www.mysql.com/}
@item
If you are using the MySQL database under GPL in an application, your
application must (i) be Open Source, (ii) be able to connect to a MySQL
server.
@end itemize
Contact us at @email{trademark@@mysql.com} to inquire about special
arrangements to fit your needs.
@node When need MySQL logo permission, MySQL AB partnership logos, MySQL logos that may be used without written permission, MySQL AB Logos and Trademarks
@subsection When do you need a written permission to use MySQL logos?
In the following cases you need a written permission from MySQL AB before
using MySQL logos:
@itemize @bullet
@item
When displaying any MySQL AB logo anywhere except on your website.
@item
When displaying any MySQL AB logo except the @emph{Conditional Use} logos
above on websites or elsewhere.
@end itemize
Out of legal and commercial reasons we have to monitor the use of MySQL
trademarks on products, books etc. We will usually require a fee for
displaying MySQL AB logos on commercial products, since we think it is
reasonable that some of the revenue is returned to fund further
development of the MySQL database.
@node MySQL AB partnership logos, Using MySQL word in presentations, When need MySQL logo permission, MySQL AB Logos and Trademarks
@subsection MySQL AB partnership logos
@c FIX: pictures: partnership logos - Bertrand?
MySQL partnership logos may only be used by companies and persons having
a written partnership agreement with MySQL AB. Partnerships include
certification as a MySQL trainer or consultant. If you are interested in
entering our partnership programmes, please visit our website for details
or mail to @email{partner@@mysql.com}.
@node Using MySQL word in presentations, Using MySQL word in company and product names, MySQL AB partnership logos, MySQL AB Logos and Trademarks
@subsection Using the word @code{MySQL} in printed text or presentations
MySQL AB welcomes references to the MySQL database, but note that the
word @code{MySQL} is a trademark of MySQL AB. Because of this, you should
append the trademark symbol @code{TM} to the first or most prominent use
of the word MySQL in a text and where appropriate use a statement that
@code{MySQL} is a trademark of MySQL AB. Please refer to our trademark
policy at @uref{http://www.mysql.com/company/trademark.html} for
details.
@node Using MySQL word in company and product names, , Using MySQL word in presentations, MySQL AB Logos and Trademarks
@subsection Using the word @code{MySQL} in company and product names
Use of the word @code{MySQL} in product or company names or in Internet
domain names is not allowed without written permission from MySQL AB.
@c FIX: End new by AGL - Erik's text on logos and trademarks
@c FIX: Start new by AGL - Kaj's text MySQL 4.0 in a Nutshell
@node MySQL 4.0 In A Nutshell, MySQL Information Sources, MySQL AB Logos and Trademarks, Introduction
@section MySQL 4.0 In A Nutshell
Dateline 16 October 2001, Uppsala, Sweden
Long promised by MySQL AB and long awaited by our users,
MySQL 4.0 is now available in alpha version for download from
@uref{http://www.mysql.com/} and our mirrors.
Main new features of MySQL 4.0 are geared towards our existing
business and community users, enhancing MySQL (TM) as the
solution for mission-critical, heavy load database systems.
Other new features target the users of embedded databases.
@menu
* 4.0 NutShell Stepwise Rollout:: Stepwise Rollout
* 4.0 Nutshell Development use possible immediately:: Development use possible immediately
* 4.0 Nutshell Embedded MySQL:: Embedded MySQL
* 4.0 Nutshell Other features:: Other features available from MySQL 4.0.0
* 4.0 Nutshell Future features:: Future MySQL 4.0 features
* 4.0 Nutshell 4.1 development release:: MySQL 4.1, the following development release
@end menu
@node 4.0 NutShell Stepwise Rollout, 4.0 Nutshell Development use possible immediately, MySQL 4.0 In A Nutshell, MySQL 4.0 In A Nutshell
@subsection Stepwise Rollout
The rollout of MySQL 4.0 will come in several steps, with
the first version labelled 4.0.0 already containing most of the
new features. Additional features will be incorporated into
MySQL 4.0.1, 4.0.2 onwards; very probably within two months,
MySQL 4.0 will be labelled beta. Further new features will then
be added in MySQL 4.1, which is targetted for alpha release
in December/January.
@node 4.0 Nutshell Development use possible immediately, 4.0 Nutshell Embedded MySQL, 4.0 NutShell Stepwise Rollout, MySQL 4.0 In A Nutshell
@subsection Development use possible immediately
Users are not recommended to switch their production systems
to MySQL 4.0 until it is released in beta version later Q4/2001.
However, even the initial release has passed our extensive
test suite without any errors on any of the platforms we test on.
Due to the large number of new features, we thus recommend
MySQL 4.0 even in alpha form for development use, with
the release schedule of MySQL 4.0 being such that it will
reach stable state before the deployment of user applications
now under development.
@node 4.0 Nutshell Embedded MySQL, 4.0 Nutshell Other features, 4.0 Nutshell Development use possible immediately, MySQL 4.0 In A Nutshell
@subsection Embedded MySQL
With @code{libmysqld}, the realm of applications suitable for MySQL
expands vastly. Using the embedded MySQL server library, one can
embed MySQL into various applications and electronics devices, where
the end user has no knowledge of there actually being an underlying
database. Embedded MySQL is ideal for use behind
the scenes in internet appliances, public kiosks, turn-key
hardware/ software combination units, high performance internet
servers, self-contained databases distributed on CD-ROM etc.
Many embedded MySQL users will benefit from the
@emph{dual licensing scheme} of MySQL, where besides the GPL license
also commercial licensing is available for those not wishing to be bound
by the GPL. The embedded MySQL library uses the same interface as the normal
client library, so it is convenient and easy to use.
@node 4.0 Nutshell Other features, 4.0 Nutshell Future features, 4.0 Nutshell Embedded MySQL, MySQL 4.0 In A Nutshell
@subsection Other features available from MySQL 4.0.0
@itemize @bullet
@item
MySQL 4.0 further increases @emph{the speed of MySQL} in a number of areas,
such as bulk @code{INSERT}s, searching on packed indices, creation of
@code{FULLTEXT} indices as well as @code{COUNT(DISTINCT)}.
@item
The table handler @code{InnoDB} is now offered as a feature of the
standard MySQL server, including full support for @code{transactions}
and @code{row-level locking}.
@item
MySQL 4.0 will support secure traffic between the client and the server,
greatly increasing security against malicious intrusion and unauthorised
access. Web applications being a cornerstone of MySQL use, web developers
have been able to use SSL to secure the traffic between the
the end user browser and the Web application, be it written in
PHP, Perl, ASP or using any other web development tool. However,
the traffic between the development tool and the mysqld server
process has been protected only by virtue of them being processes
residing on computers within the same firewall. In MySQL 4.0,
the @emph{mysqld} server daemon process can itself use
@code{Secure Sockets Layer} (@code{SSL}),
thus enabling secure traffic to MySQL databases from, say, a Windows
application residing outside the firewall.
@item
Our German, Austrian and Swiss users will note that we have a new character
set latin_de which corrects the @emph{German sorting order}, placing German
Umlauts in the same order as German telephone books.
@item
Features to simplify @code{migration} from other database systems to MySQL
include @code{TRUNCATE TABLE} (like in Oracle) and @code{IDENTITY} as a
synonym for automatically incremented keys (like in Sybase). Many users will
also be happy to learn that MySQL now supports the @code{UNION} statement,
a long awaited standard SQL feature.
@item
In the process of building features for new users, we have not forgotten
requests by the community of loyal users.
We have multi-table @code{DELETE} statements.
By adding support for @code{symbolic linking} to @code{MyISAM} on the table
level (and not just database level as before), as well as by enabling symlink
handling by default on Windows, we hope to show that we take enhancement
requests seriously.
Functions like @code{SQL_CALC_FOUND_ROWS} and @code{FOUND_ROWS()} makes it
possible to know how many rows a query would have returned without a
@code{LIMIT} clause.
@end itemize
@node 4.0 Nutshell Future features, 4.0 Nutshell 4.1 development release, 4.0 Nutshell Other features, MySQL 4.0 In A Nutshell
@subsection Future MySQL 4.0 features
For the upcoming MySQL 4.0 releases (4.0.1, 4.0.2 and onwards), expect
the following features now still under development:
@itemize @bullet
@item
Mission-critical, heavy-load users of MySQL will appreciate
the additions to our replication system and our online hot backup.
Later versions of 4.0 will include @code{fail-safe replication};
already in existing 4.0.0, the @code{LOAD DATA FROM MASTER} command
will soon automate slave setup. The @code{online backup} will make
it easy to add a new replication slave without taking down
the master, and have a very low performance penalty on
update-heavy systems.
@item
A convenience feature for Database Administrators is that
mysqld parameters (startup options) can soon be set without
taking down the servers.
@item
The new @code{FULLTEXT} search properties of MySQL 4.0 enables the use
of @code{FULLTEXT} indexing of large text masses with both binary and
natural language searching logic. Users can customise minimal word
length and define their own stop word lists in any human language,
enabling a new set of applications to be built on MySQL.
@item
Many read-heavy applications will benefit from
further increased speed through the rewritten @code{key cache}.
@item
Many developers will also be happy to see the @code{MySQL command help}
in the client.
@end itemize
@node 4.0 Nutshell 4.1 development release, , 4.0 Nutshell Future features, MySQL 4.0 In A Nutshell
@subsection MySQL 4.1, the following development release
Internally, through a new .frm file format for table definitions,
MySQL 4.0 lays the foundation for the new features of MySQL 4.1,
such as @code{nested subqueries}, @code{stored procedures}, and
@code{foreign key integrity rules}, which form the top of the
wish list for many of our customers. Along with those, we will
also include simpler additions, such as
multi-table @code{UPDATE} statements.
After those additions, critics of MySQL have to be more imaginative
than ever in pointing out deficiencies in the MySQL Database
Management System. For long already known for its stability,
speed, and ease of use, MySQL will then match the requirement
checklist of very demanding buyers.
@c FIX: End new by AGL - Kaj's text MySQL 4.0 in a Nutshell
@node MySQL Information Sources, Licensing and Support, MySQL 4.0 In A Nutshell, Introduction
@section MySQL Information Sources
@cindex manuals, about MySQL
......@@ -2582,7 +2909,7 @@ Please don't post mail messages from your browser with HTML mode turned on!
Many users don't read mail with a browser!
@node Licensing and Support, Compatibility, MySQL Information Sources, Introduction
@node Licensing and Support, MySQL AB business model and services, MySQL Information Sources, Introduction
@section MySQL Support and Licensing
@cindex licensing terms
......@@ -2900,7 +3227,194 @@ version yourself. However, in this case we would like you to purchase
MySQL support, because MySQL is helping your enterprise.
@node Compatibility, Comparisons, Licensing and Support, Introduction
@c FIX: Start new by AGL - Erik's text on business model and services
@node MySQL AB business model and services, MySQL server licenses, Licensing and Support, Introduction
@section The business model and services of MySQL AB
MySQL AB is the company of the MySQL founders and main developers behind
the MySQL database and this manual. One of the most common questions we
encounter is:
@emph{How can you make a living from something you give away for free?}
This is how.
@menu
* Business Services Support:: Support
* Business Services Training:: Training
* Business Services Consulting:: Consulting
* Business Services Commercial licenses:: Commercial licenses
* Business Services Royalties:: Royalties
@end menu
@node Business Services Support, Business Services Training, MySQL AB business model and services, MySQL AB business model and services
@subsection Support
MySQL AB is run and owned by the founders and main developers of the MySQL
database. The developers are committed to giving support to customers and
other users in order to stay in touch with their needs and problems. All
our support is given by qualified developers, not through call centers or
dedicated support staff. Really tricky questions are even answered by
Michael @code{Monty} Widenius himself, the author of the MySQL server.
To order support at different levels, please visit the order section at
@uref{http://www.mysql.com/support/}. If you have restricted access to the
Internet, please contact our sales staff at @email{sales@@mysql.com}.
@node Business Services Training, Business Services Consulting, Business Services Support, MySQL AB business model and services
@subsection Training
MySQL AB offers training on different levels all over the world.
The trainers are backed by the development team to guarantee quality and
continous development and also that no questions raised during the courses
remain unanswered.
If you're interested in participating in our courses, please visit the
training section at @uref{http://www.mysql.com/training/}. If you have
restricted access to the Internet, please contact our sales staff at
@email{training@@mysql.com}.
@node Business Services Consulting, Business Services Commercial licenses, Business Services Training, MySQL AB business model and services
@subsection Consulting
MySQL AB offers consulting all over the world on different levels.
Consulting covers all questions affecting database performance such as
database design, table design, query constructions, parameter tuning,
hardware tuning, migration issues, replication, transactions etc.
Our consultants are backed by the development team to guarantee quality
work.
If you're interested in consulting, please visit the consulting section
at @uref{http://www.mysql.com/consulting/}. If you have restricted access
to the Internet, please contact our sales staff at
@email{consulting@@mysql.com}.
@node Business Services Commercial licenses, Business Services Royalties, Business Services Consulting, MySQL AB business model and services
@subsection Commercial licenses
The MySQL database is released under the GNU General Public License (GPL).
This means that anybody can use it for free under the GPL rules. However
if a company wishes to embed the database in a product, they have to buy
commercial licenses of MySQL or else release their product under GPL too.
Since MySQL AB owns the copyright of the MySQL server, we are able to sell
commercial licenses. This does not in any way affect the Open Source
commitment of MySQL AB. We also aim to offer commercial license packages
covering both the MySQL database and closely connected third party
software. Currently we have such an arrangement with the author of the
InnoDB transaction handler.
To buy commercial licenses, please visit the order section of
@uref{https://order.mysql.com/}.
@node Business Services Royalties, , Business Services Commercial licenses, MySQL AB business model and services
@subsection Royalties
The word @code{MySQL} and the MySQL dolphin logo are trademarks of
MySQL AB. These trademarks represent a significant value that the MySQL
founders have built over the years. We think it's fair that companies
wanting to get the benefit of these trademarks in their marketing
contributes to the development of the MySQL database by paying some
royalty. Also special versions of the trademarks are used as proofs
of certification in our partner programmes.
If you are interested in becoming a MySQL AB partner, please mail to
@email{partner@@mysql.com}.
@c FIX: End new by AGL - Erik's text on business model and services
@c FIX: Start new by AGL - Erik's text on MySQL server licenses
@node MySQL server licenses, Compatibility, MySQL AB business model and services, Introduction
@section MySQL server licenses
The MySQL server is released under the GNU General Public License (GPL),
which probably is the best known Open Source license. Please visit
@uref{http://www.gnu.org} to read the terms of this license.
Since the MySQL server is released under the GPL, it may often be used
for free, but for certain uses you need to buy commercial licenses from
MySQL AB at @uref{http://www.mysql.com/}.
@menu
* Using the MySQL server under a commercial license::
* Using the MySQL server for free under GPL::
@end menu
@node Using the MySQL server under a commercial license, Using the MySQL server for free under GPL, MySQL server licenses, MySQL server licenses
@subsection Using the MySQL server under a commercial license
The GPL license is contagious in the sense that when a program is linked
to a GPL program the resulting product must also be released under GPL
lest you break the license terms and forfeit your right to use the GPL
program altogether.
You need a commercial license:
@itemize @bullet
@item
When you link a program with code from the MySQL server or from GPL
released clients and don't want the resulting product to be GPL, maybe
because you want to build a commercial product or keep the added non-GPL
code closed source for other reasons. When purchasing commercial licenses,
you are not using the MySQL server under GPL even though it's the same
code. You need one license per installation of the MySQL server.
@item
When you distribute a non-GPL application that ONLY works with the MySQL
server and ships it with MySQL. This type of solution is actually
considered to be linking even if it's done over a network.
@item
When you distribute copies of the MySQL server without providing the
source code as required under the GPL license.
@item
When you want to support the further development of the MySQL database
even if you don't formally need a commercial license. Another good way
of contributing to the MySQL development while getting something useful
in return, is to purchase support directly from MySQL AB.
@end itemize
For examples of situations when a commercial license is needed, please
visit the online manual at @uref{http://www.mysql.com/doc/}.
For buying commercial licenses and support, please visit the order section
at @uref{https://order.mysql.com/}.
@node Using the MySQL server for free under GPL, , Using the MySQL server under a commercial license, MySQL server licenses
@subsection Using the MySQL server for free under GPL
You can use the MySQL server for free under GPL:
@itemize @bullet
@item
When you link a program with code from the MYSQL server and releases the
resulting product under GPL
@item
When you distribute the MySQL server source code bundled with other
programs that are not linked to or dependant on MySQL for their
functionality even if you sell the distribution commercially
@item
When using the MySQL server internally in your company.
@end itemize
Please note that use of the MySQL server under commercial license or GPL
does not automatically give you the right to use MySQL AB trademarks.
@c FIX: End new by AGL - Erik's text on MySQL server licenses
@node Compatibility, Comparisons, MySQL server licenses, Introduction
@section How Standards-compatible Is MySQL?
@cindex compatibility, with ANSI SQL
......@@ -5708,6 +6222,7 @@ Nothing; In the long run we plan to be fully ANSI 92 / ANSI 99 compliant.
* Post-installation:: Post-installation setup and testing
* Upgrade:: Upgrading/Downgrading MySQL
* Operating System Specific Notes:: Operating System Specific Notes
* Perl support::
@end menu
This chapter describes how to obtain and install MySQL:
......@@ -5917,6 +6432,7 @@ options that must be specified in your @file{my.ini} file! @xref{InnoDB start}.
* Installation layouts:: Installation Layouts
* Many versions:: How and When Updates Are Released
* MySQL binaries:: MySQL Binaries Compiled by MySQL AB
* Installing binary::
@end menu
......@@ -6011,7 +6527,7 @@ Please report bad or out-of-date mirrors to @email{webmaster@@mysql.com}.
@c Statistics at http://mirror.borsen.dk/
@c EMAIL: guru@borsen.dk (Jesper Angelo)
@image{Flags/denmark} Denmark [Borsen] @
@uref{ http://mysql.borsen.dk/, WWW}
@uref{http://mysql.borsen.dk/, WWW}
@item
@c EMAIL: mirror@sunsite.dk (Mirror Admin Team)
......@@ -6082,7 +6598,7 @@ Please report bad or out-of-date mirrors to @email{webmaster@@mysql.com}.
@c EMAIL: noel@uni-bonn.de (Noel Koethe)
@image{Flags/germany} Germany [Kernelnotes.de, Bonn] @
@uref{http://www.kernelnotes.de/mysql/, WWW}
@uref{ftp://ftp.kernelnotes.de/pub/mirror/mysql.org/, FTP}
@uref{ftp://ftp.kernelnotes.de/mysql.com/, FTP}
@item
@c EMAIL: th@rz.fh-wolfenbuettel.de (Thorsten Ludewig)
......@@ -6090,6 +6606,12 @@ Please report bad or out-of-date mirrors to @email{webmaster@@mysql.com}.
@uref{http://www.fh-wolfenbuettel.de/ftp/pub/database/mysql/, WWW}
@uref{ftp://ftp.fh-wolfenbuettel.de/pub/database/mysql/, FTP}
@item
@c EMAIL: emoenke@gwdg.de (Eberhard Moenkeberg)
@image{Flags/germany} Germany [GWDG] @
@uref{http://ftp.gwdg.de/pub/misc/mysql/, WWW}
@uref{ftp://ftp.gwdg.de/pub/misc/mysql/, FTP}
@c @item
@c Ok 980114. Removed 981208 (down > 3 days) ok 981214
@c Not ok 20000919; Non-existent (Matt)
......@@ -7224,7 +7746,7 @@ add small things that ``almost surely will not affect anything that's
already working.''
@node MySQL binaries, , Many versions, General Installation Issues
@node MySQL binaries, Installing binary, Many versions, General Installation Issues
@subsection MySQL Binaries Compiled by MySQL AB
@cindex binary distributions
......@@ -7284,6 +7806,223 @@ If you want to compile a debug version of MySQL, you should add
and remove any @code{-fomit-frame-pointer} options.
@node Installing binary, , MySQL binaries, General Installation Issues
@subsection Installing a MySQL Binary Distribution
@cindex installing, binary distribution
@cindex binary distributions, installing
@menu
* Linux-RPM:: Linux RPM files
* Building clients:: Building client programs
@end menu
You need the following tools to install a MySQL binary distribution:
@itemize @bullet
@item
GNU @code{gunzip} to uncompress the distribution.
@item
A reasonable @code{tar} to unpack the distribution. GNU @code{tar} is
known to work. Sun @code{tar} is known to have problems.
@end itemize
@cindex RPM, defined
@cindex RedHat Package Manager
An alternative installation method under Linux is to use RPM (RedHat Package
Manager) distributions. @xref{Linux-RPM}.
@c texi2html fails to split chapters if I use strong for all of this.
If you run into problems, @strong{PLEASE ALWAYS USE} @code{mysqlbug} when
posting questions to @email{mysql@@lists.mysql.com}. Even if the problem
isn't a bug, @code{mysqlbug} gathers system information that will help others
solve your problem. By not using @code{mysqlbug}, you lessen the likelihood
of getting a solution to your problem! You will find @code{mysqlbug} in the
@file{bin} directory after you unpack the distribution. @xref{Bug reports}.
@cindex commands, for binary distribution
The basic commands you must execute to install and use a MySQL
binary distribution are:
@example
shell> groupadd mysql
shell> useradd -g mysql mysql
shell> cd /usr/local
shell> gunzip < /path/to/mysql-VERSION-OS.tar.gz | tar xvf -
shell> ln -s mysql-VERSION-OS mysql
shell> cd mysql
shell> scripts/mysql_install_db
shell> chown -R root /usr/local/mysql
shell> chown -R mysql /usr/local/mysql/data
shell> chgrp -R mysql /usr/local/mysql
shell> chown -R root /usr/local/mysql/bin
shell> bin/safe_mysqld --user=mysql &
@end example
@cindex adding, new users
@cindex new users, adding
@cindex users, adding
You can add new users using the @code{bin/mysql_setpermission} script if
you install the @code{DBI} and @code{Msql-Mysql-modules} Perl modules.
A more detailed description follows.
To install a binary distribution, follow the steps below, then proceed
to @ref{Post-installation}, for post-installation setup and testing:
@enumerate
@item
Pick the directory under which you want to unpack the distribution, and move
into it. In the example below, we unpack the distribution under
@file{/usr/local} and create a directory @file{/usr/local/mysql} into which
MySQL is installed. (The following instructions therefore assume
you have permission to create files in @file{/usr/local}. If that directory
is protected, you will need to perform the installation as @code{root}.)
@item
Obtain a distribution file from one of the sites listed in
@ref{Getting MySQL, , Getting MySQL}.
MySQL binary distributions are provided as compressed @code{tar}
archives and have names like @file{mysql-VERSION-OS.tar.gz}, where
@code{VERSION} is a number (for example, @code{3.21.15}), and @code{OS}
indicates the type of operating system for which the distribution is intended
(for example, @code{pc-linux-gnu-i586}).
@item
If you see a binary distribution marked with the @code{-max} prefix, this
means that the binary has support for transaction-safe tables and other
features. @xref{mysqld-max, , @code{mysqld-max}}. Note that all binaries
are built from the same MySQL source distribution.
@item
Add a user and group for @code{mysqld} to run as:
@example
shell> groupadd mysql
shell> useradd -g mysql mysql
@end example
These commands add the @code{mysql} group and the @code{mysql} user. The
syntax for @code{useradd} and @code{groupadd} may differ slightly on different
versions of Unix. They may also be called @code{adduser} and @code{addgroup}.
You may wish to call the user and group something else instead of @code{mysql}.
@item
Change into the intended installation directory:
@example
shell> cd /usr/local
@end example
@item
Unpack the distribution and create the installation directory:
@example
shell> gunzip < /path/to/mysql-VERSION-OS.tar.gz | tar xvf -
shell> ln -s mysql-VERSION-OS mysql
@end example
The first command creates a directory named @file{mysql-VERSION-OS}. The
second command makes a symbolic link to that directory. This lets you refer
more easily to the installation directory as @file{/usr/local/mysql}.
@item
Change into the installation directory:
@example
shell> cd mysql
@end example
You will find several files and subdirectories in the @code{mysql} directory.
The most important for installation purposes are the @file{bin} and
@file{scripts} subdirectories.
@table @file
@item bin
@tindex PATH environment variable
@tindex environment variable, PATH
This directory contains client programs and the server
You should add the full pathname of this directory to your
@code{PATH} environment variable so that your shell finds the MySQL
programs properly. @xref{Environment variables}.
@item scripts
This directory contains the @code{mysql_install_db} script used to initialize
the @code{mysql} database containing the grant tables that store the server
access permissions.
@end table
@item
If you would like to use @code{mysqlaccess} and have the MySQL
distribution in some non-standard place, you must change the location where
@code{mysqlaccess} expects to find the @code{mysql} client. Edit the
@file{bin/mysqlaccess} script at approximately line 18. Search for a line
that looks like this:
@example
$MYSQL = '/usr/local/bin/mysql'; # path to mysql executable
@end example
Change the path to reflect the location where @code{mysql} actually is
stored on your system. If you do not do this, you will get a @code{Broken
pipe} error when you run @code{mysqlaccess}.
@item
Create the MySQL grant tables (necessary only if you haven't
installed MySQL before):
@example
shell> scripts/mysql_install_db
@end example
Note that MySQL versions older than Version 3.22.10 started the
MySQL server when you run @code{mysql_install_db}. This is no
longer true!
@item
Change ownership of binaries to @code{root} and ownership of the data
directory to the user that you will run @code{mysqld} as:
@example
shell> chown -R root /usr/local/mysql
shell> chown -R mysql /usr/local/mysql/data
shell> chgrp -R mysql /usr/local/mysql
@end example
The first command changes the @code{owner} attribute of the files to the
@code{root} user, the second one changes the @code{owner} attribute of the
data directory to the @code{mysql} user, and the third one changes the
@code{group} attribute to the @code{mysql} group.
@item
If you want to install support for the Perl @code{DBI}/@code{DBD} interface,
see @ref{Perl support}.
@item
If you would like MySQL to start automatically when you boot your
machine, you can copy @code{support-files/mysql.server} to the location where
your system has its startup files. More information can be found in the
@code{support-files/mysql.server} script itself and in
@ref{Automatic start}.
@end enumerate
After everything has been unpacked and installed, you should initialize
and test your distribution.
You can start the MySQL server with the following command:
@example
shell> bin/safe_mysqld --user=mysql &
@end example
@xref{safe_mysqld, , @code{safe_mysqld}}.
@xref{Post-installation}.
@node Installing source, Post-installation, General Installation Issues, Installing
@section Installing a MySQL Source Distribution
......@@ -9277,7 +10016,7 @@ After you import the @code{mysql} database on the new machine, execute
information.
@node Operating System Specific Notes, , Upgrade, Installing
@node Operating System Specific Notes, Perl support, Upgrade, Installing
@section Operating System Specific Notes
@menu
......@@ -11797,6 +12536,301 @@ with any technical questions they may have while doing the port.
@node Perl support, , Operating System Specific Notes, Installing
@section Perl Installation Comments
@cindex Perl, installing
@cindex installing, Perl
@menu
* Perl installation:: Installing Perl on Unix
* ActiveState Perl:: Installing ActiveState Perl on Windows
* Windows Perl:: Installing the MySQL Perl distribution on Windows
* Perl support problems:: Problems using the Perl @code{DBI}/@code{DBD} interface
@end menu
@node Perl installation, ActiveState Perl, Perl support, Perl support
@subsection Installing Perl on Unix
Perl support for MySQL is provided by means of the
@code{DBI}/@code{DBD} client interface. @xref{Perl}. The Perl
@code{DBD}/@code{DBI} client code requires Perl Version 5.004 or later. The
interface @strong{will not work} if you have an older version of Perl.
MySQL Perl support also requires that you've installed
MySQL client programming support. If you installed MySQL
from RPM files, client programs are in the client RPM, but client programming
support is in the developer RPM. Make sure you've installed the latter RPM.
As of Version 3.22.8, Perl support is distributed separately from the main
MySQL distribution. If you want to install Perl support, the files
you will need can be obtained from
@uref{http://www.mysql.com/Downloads/Contrib/}.
The Perl distributions are provided as compressed @code{tar} archives and
have names like @file{MODULE-VERSION.tar.gz}, where @code{MODULE} is the
module name and @code{VERSION} is the version number. You should get the
@code{Data-Dumper}, @code{DBI}, and @code{Msql-Mysql-modules} distributions
and install them in that order. The installation procedure is shown below.
The example shown is for the @code{Data-Dumper} module, but the procedure is
the same for all three distributions:
@enumerate
@item
Unpack the distribution into the current directory:
@example
shell> gunzip < Data-Dumper-VERSION.tar.gz | tar xvf -
@end example
This command creates a directory named @file{Data-Dumper-VERSION}.
@item
Change into the top-level directory of the unpacked distribution:
@example
shell> cd Data-Dumper-VERSION
@end example
@item
Build the distribution and compile everything:
@example
shell> perl Makefile.PL
shell> make
shell> make test
shell> make install
@end example
@end enumerate
The @code{make test} command is important because it verifies that the
module is working. Note that when you run that command during the
@code{Msql-Mysql-modules} installation to exercise the interface code, the
MySQL server must be running or the test will fail.
It is a good idea to rebuild and reinstall the @code{Msql-Mysql-modules}
distribution whenever you install a new release of MySQL,
particularly if you notice symptoms such as all your @code{DBI} scripts
dumping core after you upgrade MySQL.
If you don't have the right to install Perl modules in the system directory
or if you to install local Perl modules, the following reference may help
you:
@example
@uref{http://www.iserver.com/support/contrib/perl5/modules.html}
@end example
Look under the heading
@code{Installing New Modules that Require Locally Installed Modules}.
@node ActiveState Perl, Windows Perl, Perl installation, Perl support
@subsection Installing ActiveState Perl on Windows
@cindex installing, Perl on Windows
@cindex Perl, installing on Windows
@cindex ActiveState Perl
To install the MySQL @code{DBD} module with ActiveState Perl on
Windows, you should do the following:
@itemize @bullet
@item
Get ActiveState Perl from
@uref{http://www.activestate.com/Products/ActivePerl/index.html}
and install it.
@item
Open a DOS shell.
@item
If required, set the HTTP_proxy variable. For example, you might try:
@example
set HTTP_proxy=my.proxy.com:3128
@end example
@item
Start the PPM program:
@example
C:\> c:\perl\bin\ppm.pl
@end example
@item
If you have not already done so, install @code{DBI}:
@example
ppm> install DBI
@end example
@item
If this succeeds, run the following command:
@example
install ftp://ftp.de.uu.net/pub/CPAN/authors/id/JWIED/DBD-mysql-1.2212.x86.ppd
@end example
@end itemize
The above should work at least with ActiveState Perl Version 5.6.
If you can't get the above to work, you should instead install the
@strong{MyODBC} driver and connect to MySQL server through
ODBC:
@example
use DBI;
$dbh= DBI->connect("DBI:ODBC:$dsn","$user","$password") ||
die "Got error $DBI::errstr when connecting to $dsn\n";
@end example
@node Windows Perl, Perl support problems, ActiveState Perl, Perl support
@subsection Installing the MySQL Perl Distribution on Windows
The MySQL Perl distribution contains @code{DBI},
@code{DBD:MySQL} and @code{DBD:ODBC}.
@itemize @bullet
@item
Get the Perl distribution for Windows from
@uref{http://www.mysql.com/download.html}.
@item
Unzip the distribution in @code{C:} so that you get a @file{C:\PERL} directory.
@item
Add the directory @file{C:\PERL\BIN} to your path.
@item
Add the directory @file{C:\PERL\BIN\MSWIN32-x86-thread} or
@file{C:\PERL\BIN\MSWIN32-x86} to your path.
@item
Test that @code{perl} works by executing @code{perl -v} in a DOS shell.
@end itemize
@node Perl support problems, , Windows Perl, Perl support
@subsection Problems Using the Perl @code{DBI}/@code{DBD} Interface
@cindex problems, installing Perl
@cindex Perl DBI/DBD, installation problems
If Perl reports that it can't find the @file{../mysql/mysql.so} module,
then the problem is probably that Perl can't locate the shared library
@file{libmysqlclient.so}.
You can fix this by any of the following methods:
@itemize @bullet
@item
Compile the @code{Msql-Mysql-modules} distribution with @code{perl
Makefile.PL -static -config} rather than @code{perl Makefile.PL}.
@item
Copy @code{libmysqlclient.so} to the directory where your other shared
libraries are located (probably @file{/usr/lib} or @file{/lib}).
@item
On Linux you can add the pathname of the directory where
@file{libmysqlclient.so} is located to the @file{/etc/ld.so.conf} file.
@tindex LD_RUN_PATH environment variable
@tindex Environment variable, LD_RUN_PATH
@item
Add the pathname of the directory where @file{libmysqlclient.so} is located
to the @code{LD_RUN_PATH} environment variable.
@end itemize
If you get the following errors from @code{DBD-mysql},
you are probably using @code{gcc} (or using an old binary compiled with
@code{gcc}):
@example
/usr/bin/perl: can't resolve symbol '__moddi3'
/usr/bin/perl: can't resolve symbol '__divdi3'
@end example
Add @code{-L/usr/lib/gcc-lib/... -lgcc} to the link command when the
@file{mysql.so} library gets built (check the output from @code{make} for
@file{mysql.so} when you compile the Perl client). The @code{-L} option
should specify the pathname of the directory where @file{libgcc.a} is located
on your system.
Another cause of this problem may be that Perl and MySQL aren't both
compiled with @code{gcc}. In this case, you can solve the mismatch by
compiling both with @code{gcc}.
If you get the following error from @code{Msql-Mysql-modules}
when you run the tests:
@example
t/00base............install_driver(mysql) failed: Can't load '../blib/arch/auto/DBD/mysql/mysql.so' for module DBD::mysql: ../blib/arch/auto/DBD/mysql/mysql.so: undefined symbol: uncompress at /usr/lib/perl5/5.00503/i586-linux/DynaLoader.pm line 169.
@end example
it means that you need to include the compression library, -lz, to the
link line. This can be doing the following change in the file
@file{lib/DBD/mysql/Install.pm}:
@example
$sysliblist .= " -lm";
to
$sysliblist .= " -lm -lz";
@end example
After this, you MUST run 'make realclean' and then proceed with the
installation from the beginning.
If you want to use the Perl module on a system that doesn't support dynamic
linking (like SCO) you can generate a static version of Perl that includes
@code{DBI} and @code{DBD-mysql}. The way this works is that you generate a
version of Perl with the @code{DBI} code linked in and install it on top of
your current Perl. Then you use that to build a version of Perl that
additionally has the @code{DBD} code linked in, and install that.
On SCO, you must have the following environment variables set:
@example
shell> LD_LIBRARY_PATH=/lib:/usr/lib:/usr/local/lib:/usr/progressive/lib
or
shell> LD_LIBRARY_PATH=/usr/lib:/lib:/usr/local/lib:/usr/ccs/lib:/usr/progressive/lib:/usr/skunk/lib
shell> LIBPATH=/usr/lib:/lib:/usr/local/lib:/usr/ccs/lib:/usr/progressive/lib:/usr/skunk/lib
shell> MANPATH=scohelp:/usr/man:/usr/local1/man:/usr/local/man:/usr/skunk/man:
@end example
First, create a Perl that includes a statically linked @code{DBI} by running
these commands in the directory where your @code{DBI} distribution is
located:
@example
shell> perl Makefile.PL -static -config
shell> make
shell> make install
shell> make perl
@end example
Then you must install the new Perl. The output of @code{make perl} will
indicate the exact @code{make} command you will need to execute to perform
the installation. On SCO, this is @code{make -f Makefile.aperl inst_perl
MAP_TARGET=perl}.
Next, use the just-created Perl to create another Perl that also includes a
statically-linked @code{DBD::mysql} by running these commands in the
directory where your @code{Msql-Mysql-modules} distribution is located:
@example
shell> perl Makefile.PL -static -config
shell> make
shell> make install
shell> make perl
@end example
Finally, you should install this new Perl. Again, the output of @code{make
perl} indicates the command to use.
@node Tutorial, MySQL Database Administration, Installing, Top
@chapter Introduction to MySQL: A MySQL Tutorial
......@@ -24220,7 +25254,7 @@ optimize this is to spread the data on more than one disk.
@item Disk reading/writing.
When the disk is at the correct position we need to read the data. With
modern disks in 1999, one disk delivers something like 10-20Mb/s. This
modern disks in 1999, one disk delivers something like 10-20MB/s. This
is easier to optimize than seeks because you can read in parallel from
multiple disks.
......@@ -29429,6 +30463,7 @@ mysql> select MOD(29,9);
* Numeric Functions:: Numeric Functions
* Date and time functions:: Date and time functions
* Other Functions:: Other Functions
* Group by functions::
@end menu
......@@ -31667,7 +32702,7 @@ mysql> select TIME_TO_SEC('00:39:38');
@end table
@node Other Functions, , Date and time functions, Functions
@node Other Functions, Group by functions, Date and time functions, Functions
@subsection Other Functions
@menu
......@@ -32031,6 +33066,164 @@ facilitate replication testing.
@end table
@node Group by functions, , Other Functions, Functions
@subsection Functions for Use with @code{GROUP BY} Clauses
@findex GROUP BY functions
@findex functions, GROUP BY
If you use a group function in a statement containing no @code{GROUP BY}
clause, it is equivalent to grouping on all rows.
@table @code
@findex COUNT()
@item COUNT(expr)
Returns a count of the number of non-@code{NULL} values in the rows
retrieved by a @code{SELECT} statement:
@example
mysql> select student.student_name,COUNT(*)
from student,course
where student.student_id=course.student_id
GROUP BY student_name;
@end example
@code{COUNT(*)} is somewhat different in that it returns a count of
the number of rows retrieved, whether or not they contain @code{NULL}
values.
@code{COUNT(*)} is optimized to
return very quickly if the @code{SELECT} retrieves from one table, no
other columns are retrieved, and there is no @code{WHERE} clause.
For example:
@example
mysql> select COUNT(*) from student;
@end example
@findex COUNT(DISTINCT)
@findex DISTINCT
@item COUNT(DISTINCT expr,[expr...])
Returns a count of the number of different non-@code{NULL} values:
@example
mysql> select COUNT(DISTINCT results) from student;
@end example
In MySQL you can get the number of distinct expression
combinations that don't contain NULL by giving a list of expressions.
In ANSI SQL you would have to do a concatenation of all expressions
inside @code{CODE(DISTINCT ..)}.
@findex AVG()
@item AVG(expr)
Returns the average value of @code{expr}:
@example
mysql> select student_name, AVG(test_score)
from student
GROUP BY student_name;
@end example
@findex MIN()
@findex MAX()
@item MIN(expr)
@itemx MAX(expr)
Returns the minimum or maximum value of @code{expr}. @code{MIN()} and
@code{MAX()} may take a string argument; in such cases they return the
minimum or maximum string value. @xref{MySQL indexes}.
@example
mysql> select student_name, MIN(test_score), MAX(test_score)
from student
GROUP BY student_name;
@end example
@findex SUM()
@item SUM(expr)
Returns the sum of @code{expr}. Note that if the return set has no rows,
it returns NULL!
@findex STD()
@findex STDDEV()
@cindex Oracle compatibility
@cindex compatibility, with Oracle
@item STD(expr)
@itemx STDDEV(expr)
Returns the standard deviation of @code{expr}. This is an extension to
ANSI SQL. The @code{STDDEV()} form of this function is provided for Oracle
compatibility.
@findex BIT_OR()
@item BIT_OR(expr)
Returns the bitwise @code{OR} of all bits in @code{expr}. The calculation is
performed with 64-bit (@code{BIGINT}) precision.
@findex BIT_AND()
@item BIT_AND(expr)
Returns the bitwise @code{AND} of all bits in @code{expr}. The calculation is
performed with 64-bit (@code{BIGINT}) precision.
@end table
@cindex @code{GROUP BY}, extensions to ANSI SQL
MySQL has extended the use of @code{GROUP BY}. You can use columns or
calculations in the @code{SELECT} expressions that don't appear in
the @code{GROUP BY} part. This stands for @emph{any possible value for this
group}. You can use this to get better performance by avoiding sorting and
grouping on unnecessary items. For example, you don't need to group on
@code{customer.name} in the following query:
@example
mysql> select order.custid,customer.name,max(payments)
from order,customer
where order.custid = customer.custid
GROUP BY order.custid;
@end example
In ANSI SQL, you would have to add @code{customer.name} to the @code{GROUP
BY} clause. In MySQL, the name is redundant if you don't run in
ANSI mode.
@strong{Don't use this feature} if the columns you omit from the
@code{GROUP BY} part aren't unique in the group! You will get
unpredictable results.
In some cases, you can use @code{MIN()} and @code{MAX()} to obtain a specific
column value even if it isn't unique. The following gives the value of
@code{column} from the row containing the smallest value in the @code{sort}
column:
@example
substr(MIN(concat(rpad(sort,6,' '),column)),7)
@end example
@xref{example-Maximum-column-group-row}.
@cindex @code{ORDER BY}, aliases in
@cindex aliases, in @code{ORDER BY} clauses
@cindex @code{GROUP BY}, aliases in
@cindex aliases, in @code{GROUP BY} clauses
@cindex expression aliases
@cindex aliases, for expressions
Note that if you are using MySQL Version 3.22 (or earlier) or if
you are trying to follow ANSI SQL, you can't use expressions in @code{GROUP
BY} or @code{ORDER BY} clauses. You can work around this limitation by
using an alias for the expression:
@example
mysql> SELECT id,FLOOR(value/100) AS val FROM tbl_name
GROUP BY id,val ORDER BY val;
@end example
In MySQL Version 3.23 you can do:
@example
mysql> SELECT id,FLOOR(value/100) FROM tbl_name ORDER BY RAND();
@end example
@node Data Manipulation, Data Definition, Functions, Reference
@section Data Manipulation: @code{SELECT}, @code{INSERT}, @code{UPDATE}, @code{DELETE}
......@@ -47457,7 +48650,7 @@ Changed @code{WEEK(#,0)} to match the calender in the USA.
@item
Speed up all internal list handling.
@item
Speed up @code{IS NULL()} and some other internal primitives.
Speed up @code{IS NULL}, @code{ISNULL()} and some other internal primitives.
@item
Creating full text indexes are now much faster.
@item
......@@ -54545,7 +55738,7 @@ Public License instead of this License.
@node LGPL license, Placeholder, GPL license, Top
@node LGPL license, Function Index, GPL license, Top
@appendix GNU LESSER GENERAL PUBLIC LICENSE
@cindex LGPL, Lesser General Public License
......@@ -55116,690 +56309,7 @@ That's all there is to it!
@node Placeholder, Function Index, LGPL license, Top
@appendix Pieces of the manual in transit
@menu
* Installing binary:: Installing a MySQL Binary Distribution
* Perl support:: Perl Installation Comments
* Group by functions:: Functions for Use with @code{GROUP BY} Clauses
@end menu
@node Installing binary, Perl support, Placeholder, Placeholder
@appendixsec Installing a MySQL Binary Distribution
@cindex installing, binary distribution
@cindex binary distributions, installing
@menu
* Linux-RPM:: Linux RPM files
* Building clients:: Building client programs
@end menu
You need the following tools to install a MySQL binary distribution:
@itemize @bullet
@item
GNU @code{gunzip} to uncompress the distribution.
@item
A reasonable @code{tar} to unpack the distribution. GNU @code{tar} is
known to work. Sun @code{tar} is known to have problems.
@end itemize
@cindex RPM, defined
@cindex RedHat Package Manager
An alternative installation method under Linux is to use RPM (RedHat Package
Manager) distributions. @xref{Linux-RPM}.
@c texi2html fails to split chapters if I use strong for all of this.
If you run into problems, @strong{PLEASE ALWAYS USE} @code{mysqlbug} when
posting questions to @email{mysql@@lists.mysql.com}. Even if the problem
isn't a bug, @code{mysqlbug} gathers system information that will help others
solve your problem. By not using @code{mysqlbug}, you lessen the likelihood
of getting a solution to your problem! You will find @code{mysqlbug} in the
@file{bin} directory after you unpack the distribution. @xref{Bug reports}.
@cindex commands, for binary distribution
The basic commands you must execute to install and use a MySQL
binary distribution are:
@example
shell> groupadd mysql
shell> useradd -g mysql mysql
shell> cd /usr/local
shell> gunzip < /path/to/mysql-VERSION-OS.tar.gz | tar xvf -
shell> ln -s mysql-VERSION-OS mysql
shell> cd mysql
shell> scripts/mysql_install_db
shell> chown -R root /usr/local/mysql
shell> chown -R mysql /usr/local/mysql/data
shell> chgrp -R mysql /usr/local/mysql
shell> chown -R root /usr/local/mysql/bin
shell> bin/safe_mysqld --user=mysql &
@end example
@cindex adding, new users
@cindex new users, adding
@cindex users, adding
You can add new users using the @code{bin/mysql_setpermission} script if
you install the @code{DBI} and @code{Msql-Mysql-modules} Perl modules.
A more detailed description follows.
To install a binary distribution, follow the steps below, then proceed
to @ref{Post-installation}, for post-installation setup and testing:
@enumerate
@item
Pick the directory under which you want to unpack the distribution, and move
into it. In the example below, we unpack the distribution under
@file{/usr/local} and create a directory @file{/usr/local/mysql} into which
MySQL is installed. (The following instructions therefore assume
you have permission to create files in @file{/usr/local}. If that directory
is protected, you will need to perform the installation as @code{root}.)
@item
Obtain a distribution file from one of the sites listed in
@ref{Getting MySQL, , Getting MySQL}.
MySQL binary distributions are provided as compressed @code{tar}
archives and have names like @file{mysql-VERSION-OS.tar.gz}, where
@code{VERSION} is a number (for example, @code{3.21.15}), and @code{OS}
indicates the type of operating system for which the distribution is intended
(for example, @code{pc-linux-gnu-i586}).
@item
If you see a binary distribution marked with the @code{-max} prefix, this
means that the binary has support for transaction-safe tables and other
features. @xref{mysqld-max, , @code{mysqld-max}}. Note that all binaries
are built from the same MySQL source distribution.
@item
Add a user and group for @code{mysqld} to run as:
@example
shell> groupadd mysql
shell> useradd -g mysql mysql
@end example
These commands add the @code{mysql} group and the @code{mysql} user. The
syntax for @code{useradd} and @code{groupadd} may differ slightly on different
versions of Unix. They may also be called @code{adduser} and @code{addgroup}.
You may wish to call the user and group something else instead of @code{mysql}.
@item
Change into the intended installation directory:
@example
shell> cd /usr/local
@end example
@item
Unpack the distribution and create the installation directory:
@example
shell> gunzip < /path/to/mysql-VERSION-OS.tar.gz | tar xvf -
shell> ln -s mysql-VERSION-OS mysql
@end example
The first command creates a directory named @file{mysql-VERSION-OS}. The
second command makes a symbolic link to that directory. This lets you refer
more easily to the installation directory as @file{/usr/local/mysql}.
@item
Change into the installation directory:
@example
shell> cd mysql
@end example
You will find several files and subdirectories in the @code{mysql} directory.
The most important for installation purposes are the @file{bin} and
@file{scripts} subdirectories.
@table @file
@item bin
@tindex PATH environment variable
@tindex environment variable, PATH
This directory contains client programs and the server
You should add the full pathname of this directory to your
@code{PATH} environment variable so that your shell finds the MySQL
programs properly. @xref{Environment variables}.
@item scripts
This directory contains the @code{mysql_install_db} script used to initialize
the @code{mysql} database containing the grant tables that store the server
access permissions.
@end table
@item
If you would like to use @code{mysqlaccess} and have the MySQL
distribution in some non-standard place, you must change the location where
@code{mysqlaccess} expects to find the @code{mysql} client. Edit the
@file{bin/mysqlaccess} script at approximately line 18. Search for a line
that looks like this:
@example
$MYSQL = '/usr/local/bin/mysql'; # path to mysql executable
@end example
Change the path to reflect the location where @code{mysql} actually is
stored on your system. If you do not do this, you will get a @code{Broken
pipe} error when you run @code{mysqlaccess}.
@item
Create the MySQL grant tables (necessary only if you haven't
installed MySQL before):
@example
shell> scripts/mysql_install_db
@end example
Note that MySQL versions older than Version 3.22.10 started the
MySQL server when you run @code{mysql_install_db}. This is no
longer true!
@item
Change ownership of binaries to @code{root} and ownership of the data
directory to the user that you will run @code{mysqld} as:
@example
shell> chown -R root /usr/local/mysql
shell> chown -R mysql /usr/local/mysql/data
shell> chgrp -R mysql /usr/local/mysql
@end example
The first command changes the @code{owner} attribute of the files to the
@code{root} user, the second one changes the @code{owner} attribute of the
data directory to the @code{mysql} user, and the third one changes the
@code{group} attribute to the @code{mysql} group.
@item
If you want to install support for the Perl @code{DBI}/@code{DBD} interface,
see @ref{Perl support}.
@item
If you would like MySQL to start automatically when you boot your
machine, you can copy @code{support-files/mysql.server} to the location where
your system has its startup files. More information can be found in the
@code{support-files/mysql.server} script itself and in
@ref{Automatic start}.
@end enumerate
After everything has been unpacked and installed, you should initialize
and test your distribution.
You can start the MySQL server with the following command:
@example
shell> bin/safe_mysqld --user=mysql &
@end example
@xref{safe_mysqld, , @code{safe_mysqld}}.
@xref{Post-installation}.
@node Perl support, Group by functions, Installing binary, Placeholder
@appendixsec Perl Installation Comments
@cindex Perl, installing
@cindex installing, Perl
@menu
* Perl installation:: Installing Perl on Unix
* ActiveState Perl:: Installing ActiveState Perl on Windows
* Windows Perl:: Installing the MySQL Perl distribution on Windows
* Perl support problems:: Problems using the Perl @code{DBI}/@code{DBD} interface
@end menu
@node Perl installation, ActiveState Perl, Perl support, Perl support
@appendixsubsec Installing Perl on Unix
Perl support for MySQL is provided by means of the
@code{DBI}/@code{DBD} client interface. @xref{Perl}. The Perl
@code{DBD}/@code{DBI} client code requires Perl Version 5.004 or later. The
interface @strong{will not work} if you have an older version of Perl.
MySQL Perl support also requires that you've installed
MySQL client programming support. If you installed MySQL
from RPM files, client programs are in the client RPM, but client programming
support is in the developer RPM. Make sure you've installed the latter RPM.
As of Version 3.22.8, Perl support is distributed separately from the main
MySQL distribution. If you want to install Perl support, the files
you will need can be obtained from
@uref{http://www.mysql.com/Downloads/Contrib/}.
The Perl distributions are provided as compressed @code{tar} archives and
have names like @file{MODULE-VERSION.tar.gz}, where @code{MODULE} is the
module name and @code{VERSION} is the version number. You should get the
@code{Data-Dumper}, @code{DBI}, and @code{Msql-Mysql-modules} distributions
and install them in that order. The installation procedure is shown below.
The example shown is for the @code{Data-Dumper} module, but the procedure is
the same for all three distributions:
@enumerate
@item
Unpack the distribution into the current directory:
@example
shell> gunzip < Data-Dumper-VERSION.tar.gz | tar xvf -
@end example
This command creates a directory named @file{Data-Dumper-VERSION}.
@item
Change into the top-level directory of the unpacked distribution:
@example
shell> cd Data-Dumper-VERSION
@end example
@item
Build the distribution and compile everything:
@example
shell> perl Makefile.PL
shell> make
shell> make test
shell> make install
@end example
@end enumerate
The @code{make test} command is important because it verifies that the
module is working. Note that when you run that command during the
@code{Msql-Mysql-modules} installation to exercise the interface code, the
MySQL server must be running or the test will fail.
It is a good idea to rebuild and reinstall the @code{Msql-Mysql-modules}
distribution whenever you install a new release of MySQL,
particularly if you notice symptoms such as all your @code{DBI} scripts
dumping core after you upgrade MySQL.
If you don't have the right to install Perl modules in the system directory
or if you to install local Perl modules, the following reference may help
you:
@example
@uref{http://www.iserver.com/support/contrib/perl5/modules.html}
@end example
Look under the heading
@code{Installing New Modules that Require Locally Installed Modules}.
@node ActiveState Perl, Windows Perl, Perl installation, Perl support
@appendixsubsec Installing ActiveState Perl on Windows
@cindex installing, Perl on Windows
@cindex Perl, installing on Windows
@cindex ActiveState Perl
To install the MySQL @code{DBD} module with ActiveState Perl on
Windows, you should do the following:
@itemize @bullet
@item
Get ActiveState Perl from
@uref{http://www.activestate.com/Products/ActivePerl/index.html}
and install it.
@item
Open a DOS shell.
@item
If required, set the HTTP_proxy variable. For example, you might try:
@example
set HTTP_proxy=my.proxy.com:3128
@end example
@item
Start the PPM program:
@example
C:\> c:\perl\bin\ppm.pl
@end example
@item
If you have not already done so, install @code{DBI}:
@example
ppm> install DBI
@end example
@item
If this succeeds, run the following command:
@example
install ftp://ftp.de.uu.net/pub/CPAN/authors/id/JWIED/DBD-mysql-1.2212.x86.ppd
@end example
@end itemize
The above should work at least with ActiveState Perl Version 5.6.
If you can't get the above to work, you should instead install the
@strong{MyODBC} driver and connect to MySQL server through
ODBC:
@example
use DBI;
$dbh= DBI->connect("DBI:ODBC:$dsn","$user","$password") ||
die "Got error $DBI::errstr when connecting to $dsn\n";
@end example
@node Windows Perl, Perl support problems, ActiveState Perl, Perl support
@appendixsubsec Installing the MySQL Perl Distribution on Windows
The MySQL Perl distribution contains @code{DBI},
@code{DBD:MySQL} and @code{DBD:ODBC}.
@itemize @bullet
@item
Get the Perl distribution for Windows from
@uref{http://www.mysql.com/download.html}.
@item
Unzip the distribution in @code{C:} so that you get a @file{C:\PERL} directory.
@item
Add the directory @file{C:\PERL\BIN} to your path.
@item
Add the directory @file{C:\PERL\BIN\MSWIN32-x86-thread} or
@file{C:\PERL\BIN\MSWIN32-x86} to your path.
@item
Test that @code{perl} works by executing @code{perl -v} in a DOS shell.
@end itemize
@node Perl support problems, , Windows Perl, Perl support
@appendixsubsec Problems Using the Perl @code{DBI}/@code{DBD} Interface
@cindex problems, installing Perl
@cindex Perl DBI/DBD, installation problems
If Perl reports that it can't find the @file{../mysql/mysql.so} module,
then the problem is probably that Perl can't locate the shared library
@file{libmysqlclient.so}.
You can fix this by any of the following methods:
@itemize @bullet
@item
Compile the @code{Msql-Mysql-modules} distribution with @code{perl
Makefile.PL -static -config} rather than @code{perl Makefile.PL}.
@item
Copy @code{libmysqlclient.so} to the directory where your other shared
libraries are located (probably @file{/usr/lib} or @file{/lib}).
@item
On Linux you can add the pathname of the directory where
@file{libmysqlclient.so} is located to the @file{/etc/ld.so.conf} file.
@tindex LD_RUN_PATH environment variable
@tindex Environment variable, LD_RUN_PATH
@item
Add the pathname of the directory where @file{libmysqlclient.so} is located
to the @code{LD_RUN_PATH} environment variable.
@end itemize
If you get the following errors from @code{DBD-mysql},
you are probably using @code{gcc} (or using an old binary compiled with
@code{gcc}):
@example
/usr/bin/perl: can't resolve symbol '__moddi3'
/usr/bin/perl: can't resolve symbol '__divdi3'
@end example
Add @code{-L/usr/lib/gcc-lib/... -lgcc} to the link command when the
@file{mysql.so} library gets built (check the output from @code{make} for
@file{mysql.so} when you compile the Perl client). The @code{-L} option
should specify the pathname of the directory where @file{libgcc.a} is located
on your system.
Another cause of this problem may be that Perl and MySQL aren't both
compiled with @code{gcc}. In this case, you can solve the mismatch by
compiling both with @code{gcc}.
If you get the following error from @code{Msql-Mysql-modules}
when you run the tests:
@example
t/00base............install_driver(mysql) failed: Can't load '../blib/arch/auto/DBD/mysql/mysql.so' for module DBD::mysql: ../blib/arch/auto/DBD/mysql/mysql.so: undefined symbol: uncompress at /usr/lib/perl5/5.00503/i586-linux/DynaLoader.pm line 169.
@end example
it means that you need to include the compression library, -lz, to the
link line. This can be doing the following change in the file
@file{lib/DBD/mysql/Install.pm}:
@example
$sysliblist .= " -lm";
to
$sysliblist .= " -lm -lz";
@end example
After this, you MUST run 'make realclean' and then proceed with the
installation from the beginning.
If you want to use the Perl module on a system that doesn't support dynamic
linking (like SCO) you can generate a static version of Perl that includes
@code{DBI} and @code{DBD-mysql}. The way this works is that you generate a
version of Perl with the @code{DBI} code linked in and install it on top of
your current Perl. Then you use that to build a version of Perl that
additionally has the @code{DBD} code linked in, and install that.
On SCO, you must have the following environment variables set:
@example
shell> LD_LIBRARY_PATH=/lib:/usr/lib:/usr/local/lib:/usr/progressive/lib
or
shell> LD_LIBRARY_PATH=/usr/lib:/lib:/usr/local/lib:/usr/ccs/lib:/usr/progressive/lib:/usr/skunk/lib
shell> LIBPATH=/usr/lib:/lib:/usr/local/lib:/usr/ccs/lib:/usr/progressive/lib:/usr/skunk/lib
shell> MANPATH=scohelp:/usr/man:/usr/local1/man:/usr/local/man:/usr/skunk/man:
@end example
First, create a Perl that includes a statically linked @code{DBI} by running
these commands in the directory where your @code{DBI} distribution is
located:
@example
shell> perl Makefile.PL -static -config
shell> make
shell> make install
shell> make perl
@end example
Then you must install the new Perl. The output of @code{make perl} will
indicate the exact @code{make} command you will need to execute to perform
the installation. On SCO, this is @code{make -f Makefile.aperl inst_perl
MAP_TARGET=perl}.
Next, use the just-created Perl to create another Perl that also includes a
statically-linked @code{DBD::mysql} by running these commands in the
directory where your @code{Msql-Mysql-modules} distribution is located:
@example
shell> perl Makefile.PL -static -config
shell> make
shell> make install
shell> make perl
@end example
Finally, you should install this new Perl. Again, the output of @code{make
perl} indicates the command to use.
@node Group by functions, , Perl support, Placeholder
@appendixsec Functions for Use with @code{GROUP BY} Clauses
@findex GROUP BY functions
@findex functions, GROUP BY
If you use a group function in a statement containing no @code{GROUP BY}
clause, it is equivalent to grouping on all rows.
@table @code
@findex COUNT()
@item COUNT(expr)
Returns a count of the number of non-@code{NULL} values in the rows
retrieved by a @code{SELECT} statement:
@example
mysql> select student.student_name,COUNT(*)
from student,course
where student.student_id=course.student_id
GROUP BY student_name;
@end example
@code{COUNT(*)} is somewhat different in that it returns a count of
the number of rows retrieved, whether or not they contain @code{NULL}
values.
@code{COUNT(*)} is optimized to
return very quickly if the @code{SELECT} retrieves from one table, no
other columns are retrieved, and there is no @code{WHERE} clause.
For example:
@example
mysql> select COUNT(*) from student;
@end example
@findex COUNT(DISTINCT)
@findex DISTINCT
@item COUNT(DISTINCT expr,[expr...])
Returns a count of the number of different non-@code{NULL} values:
@example
mysql> select COUNT(DISTINCT results) from student;
@end example
In MySQL you can get the number of distinct expression
combinations that don't contain NULL by giving a list of expressions.
In ANSI SQL you would have to do a concatenation of all expressions
inside @code{CODE(DISTINCT ..)}.
@findex AVG()
@item AVG(expr)
Returns the average value of @code{expr}:
@example
mysql> select student_name, AVG(test_score)
from student
GROUP BY student_name;
@end example
@findex MIN()
@findex MAX()
@item MIN(expr)
@itemx MAX(expr)
Returns the minimum or maximum value of @code{expr}. @code{MIN()} and
@code{MAX()} may take a string argument; in such cases they return the
minimum or maximum string value. @xref{MySQL indexes}.
@example
mysql> select student_name, MIN(test_score), MAX(test_score)
from student
GROUP BY student_name;
@end example
@findex SUM()
@item SUM(expr)
Returns the sum of @code{expr}. Note that if the return set has no rows,
it returns NULL!
@findex STD()
@findex STDDEV()
@cindex Oracle compatibility
@cindex compatibility, with Oracle
@item STD(expr)
@itemx STDDEV(expr)
Returns the standard deviation of @code{expr}. This is an extension to
ANSI SQL. The @code{STDDEV()} form of this function is provided for Oracle
compatibility.
@findex BIT_OR()
@item BIT_OR(expr)
Returns the bitwise @code{OR} of all bits in @code{expr}. The calculation is
performed with 64-bit (@code{BIGINT}) precision.
@findex BIT_AND()
@item BIT_AND(expr)
Returns the bitwise @code{AND} of all bits in @code{expr}. The calculation is
performed with 64-bit (@code{BIGINT}) precision.
@end table
@cindex @code{GROUP BY}, extensions to ANSI SQL
MySQL has extended the use of @code{GROUP BY}. You can use columns or
calculations in the @code{SELECT} expressions that don't appear in
the @code{GROUP BY} part. This stands for @emph{any possible value for this
group}. You can use this to get better performance by avoiding sorting and
grouping on unnecessary items. For example, you don't need to group on
@code{customer.name} in the following query:
@example
mysql> select order.custid,customer.name,max(payments)
from order,customer
where order.custid = customer.custid
GROUP BY order.custid;
@end example
In ANSI SQL, you would have to add @code{customer.name} to the @code{GROUP
BY} clause. In MySQL, the name is redundant if you don't run in
ANSI mode.
@strong{Don't use this feature} if the columns you omit from the
@code{GROUP BY} part aren't unique in the group! You will get
unpredictable results.
In some cases, you can use @code{MIN()} and @code{MAX()} to obtain a specific
column value even if it isn't unique. The following gives the value of
@code{column} from the row containing the smallest value in the @code{sort}
column:
@example
substr(MIN(concat(rpad(sort,6,' '),column)),7)
@end example
@xref{example-Maximum-column-group-row}.
@cindex @code{ORDER BY}, aliases in
@cindex aliases, in @code{ORDER BY} clauses
@cindex @code{GROUP BY}, aliases in
@cindex aliases, in @code{GROUP BY} clauses
@cindex expression aliases
@cindex aliases, for expressions
Note that if you are using MySQL Version 3.22 (or earlier) or if
you are trying to follow ANSI SQL, you can't use expressions in @code{GROUP
BY} or @code{ORDER BY} clauses. You can work around this limitation by
using an alias for the expression:
@example
mysql> SELECT id,FLOOR(value/100) AS val FROM tbl_name
GROUP BY id,val ORDER BY val;
@end example
In MySQL Version 3.23 you can do:
@example
mysql> SELECT id,FLOOR(value/100) FROM tbl_name ORDER BY RAND();
@end example
@node Function Index, Concept Index, Placeholder, Top
@node Function Index, Concept Index, LGPL license, Top
@unnumbered SQL command, type and function index
@printindex fn
......@@ -22,7 +22,7 @@
* Andi Gutmans <andi@zend.com>
* Zeev Suraski <zeev@zend.com>
* Jani Tolonen <jani@mysql.com>
* Matt Wagner <mwagner@mysql.com>
* Matt Wagner <matt@mysql.com>
* Jeremy Cole <jcole@mysql.com>
* Tonu Samuel <tonu@mysql.com>
*
......
......@@ -123,7 +123,7 @@ void _ftb_parse_query(FTB *ftb, byte **start, byte *end,
ftbe->up=up;
ftbe->ythresh=0;
ftbe->docid=HA_POS_ERROR;
if (ftbw->yesno > 0) up->ythresh++;
if (ftbe->yesno > 0) up->ythresh++;
_ftb_parse_query(ftb, start, end, ftbe, depth+1,
(param.yesno<0 ? depth+1 : ndepth));
break;
......
......@@ -45,6 +45,9 @@ select * from t1 where MATCH(a,b) AGAINST("+search +(support vector)" IN BOOLEAN
a b
MySQL has now support for full-text search
Full-text search in MySQL implements vector space model
select * from t1 where MATCH(a,b) AGAINST("+search -(support vector)" IN BOOLEAN MODE);
a b
Function MATCH ... AGAINST() is used to do a search
delete from t1 where a like "MySQL%";
drop table t1;
CREATE TABLE t1 (
......
......@@ -20,6 +20,7 @@ select * from t1 where MATCH(a,b) AGAINST("sear*" IN BOOLEAN MODE);
select * from t1 where MATCH(a,b) AGAINST("+support +collections" IN BOOLEAN MODE);
select * from t1 where MATCH(a,b) AGAINST("+search" IN BOOLEAN MODE);
select * from t1 where MATCH(a,b) AGAINST("+search +(support vector)" IN BOOLEAN MODE);
select * from t1 where MATCH(a,b) AGAINST("+search -(support vector)" IN BOOLEAN MODE);
delete from t1 where a like "MySQL%";
drop table t1;
......
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