Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
M
mariadb
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
mariadb
Commits
a4aaac02
Commit
a4aaac02
authored
Mar 13, 2003
by
unknown
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
texinfo syntax cleanup. 4.1 protocol sections are still too broken for this file to be compiled :(
parent
d367d5dd
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
87 additions
and
22 deletions
+87
-22
Docs/internals.texi
Docs/internals.texi
+87
-22
No files found.
Docs/internals.texi
View file @
a4aaac02
...
@@ -51,6 +51,7 @@ This is a manual about @strong{MySQL} internals.
...
@@ -51,6 +51,7 @@ This is a manual about @strong{MySQL} internals.
@menu
@menu
* caching:: How MySQL Handles Caching
* caching:: How MySQL Handles Caching
* join
_
buffer
_
size::
* flush tables:: How MySQL Handles @code
{
FLUSH TABLES
}
* flush tables:: How MySQL Handles @code
{
FLUSH TABLES
}
* filesort:: How MySQL Does Sorting (@code
{
filesort
}
)
* filesort:: How MySQL Does Sorting (@code
{
filesort
}
)
* coding guidelines:: Coding Guidelines
* coding guidelines:: Coding Guidelines
...
@@ -61,12 +62,12 @@ This is a manual about @strong{MySQL} internals.
...
@@ -61,12 +62,12 @@ This is a manual about @strong{MySQL} internals.
* MyISAM Record Structure:: MyISAM Record Structure
* MyISAM Record Structure:: MyISAM Record Structure
* InnoDB Record Structure:: InnoDB Record Structure
* InnoDB Record Structure:: InnoDB Record Structure
* InnoDB Page Structure:: InnoDB Page Structure
* InnoDB Page Structure:: InnoDB Page Structure
*
Annotated List Of Files in the MySQL Source Code Distribution:: MySQL Source
*
Files in MySQL Sources:: Annotated List Of Files in the MySQL Source Code Distribution
*
Annotated List Of Files in the InnoDB Source Code Distribution:: InnoDB Source
*
Files in InnoDB Sources:: Annotated List Of Files in the InnoDB Source Code Distribution
@end menu
@end menu
@node caching,
flush tables
, Top, Top
@node caching,
join
_
buffer
_
size
, Top, Top
@chapter How MySQL Handles Caching
@chapter How MySQL Handles Caching
@strong
{
MySQL
}
has the following caches:
@strong
{
MySQL
}
has the following caches:
...
@@ -109,7 +110,7 @@ use many join caches in the worst case.
...
@@ -109,7 +110,7 @@ use many join caches in the worst case.
@end table
@end table
@node join
_
buffer
_
size, flush tables, caching, Top
@node join
_
buffer
_
size, flush tables, caching, Top
@
sub
chapter How MySQL uses the join
_
buffer cache
@chapter How MySQL uses the join
_
buffer cache
Basic information about @code
{
join
_
buffer
_
size
}
:
Basic information about @code
{
join
_
buffer
_
size
}
:
...
@@ -180,7 +181,7 @@ same algorithm described above to handle it. (In other words, we store
...
@@ -180,7 +181,7 @@ same algorithm described above to handle it. (In other words, we store
the same row combination several times into different buffers)
the same row combination several times into different buffers)
@end itemize
@end itemize
@node flush tables, filesort,
caching
, Top
@node flush tables, filesort,
join
_
buffer
_
size
, Top
@chapter How MySQL Handles @code
{
FLUSH TABLES
}
@chapter How MySQL Handles @code
{
FLUSH TABLES
}
@itemize @bullet
@itemize @bullet
...
@@ -1655,8 +1656,8 @@ fe 00 . .
...
@@ -1655,8 +1656,8 @@ fe 00 . .
@c @printindex fn
@c @printindex fn
@node 4.1 protocol,,,
@
c @
node 4.1 protocol,,,
@
sub
chapter MySQL 4.1 protocol
@
c @
chapter MySQL 4.1 protocol
@node 4.1 protocol changes,,,
@node 4.1 protocol changes,,,
@section Changes to 4.0 protocol in 4.1
@section Changes to 4.0 protocol in 4.1
...
@@ -1699,7 +1700,7 @@ results will sent as binary (low-byte-first).
...
@@ -1699,7 +1700,7 @@ results will sent as binary (low-byte-first).
The field description packet is sent as a response to a query that
The field description packet is sent as a response to a query that
contains a result set. It can be distinguished from a ok packet by
contains a result set. It can be distinguished from a ok packet by
the fact that the first byte can't be 0 for a field packet.
the fact that the first byte can't be 0 for a field packet.
@xref
{
4.1 ok packet
}
.
@xref
{
4.1 ok packet
}
.
The header packet has the following structure:
The header packet has the following structure:
...
@@ -1825,7 +1826,7 @@ parameter in the query:
...
@@ -1825,7 +1826,7 @@ parameter in the query:
@item 2 @tab 2 byte column flags (NOT
_
NULL
_
FLAG etc)
@item 2 @tab 2 byte column flags (NOT
_
NULL
_
FLAG etc)
@item 1 @tab Number of decimals
@item 1 @tab Number of decimals
@item 4 @tab Max column length.
@item 4 @tab Max column length.
@end
itemiz
e
@end
multitabl
e
Note that the above is not yet in 4.1 but will be added this month.
Note that the above is not yet in 4.1 but will be added this month.
...
@@ -1834,7 +1835,7 @@ able to provide the optimal information for all parameters.
...
@@ -1834,7 +1835,7 @@ able to provide the optimal information for all parameters.
If number of columns, in the header packet, is not 0 then the
If number of columns, in the header packet, is not 0 then the
prepared statement will contain a result set. In this case the packet
prepared statement will contain a result set. In this case the packet
is followed by a field description result set. @xref
{
4.1 field desc
r
}
.
is followed by a field description result set. @xref
{
4.1 field desc
}
.
@node 4.1 long data,,,
@node 4.1 long data,,,
...
@@ -1858,7 +1859,7 @@ This packet is sent from client -> server:
...
@@ -1858,7 +1859,7 @@ This packet is sent from client -> server:
@item 2 @tab Parameter number
@item 2 @tab Parameter number
@item 2 @tab Type of parameter (not used at this point)
@item 2 @tab Type of parameter (not used at this point)
@item # @tab data (Rest of packet)
@item # @tab data (Rest of packet)
@end
itemiz
e
@end
multitabl
e
The server will NOT send an @code
{
ok
}
or @code
{
error
}
packet in
The server will NOT send an @code
{
ok
}
or @code
{
error
}
packet in
responce for this. If there is any errors (like to big string), one
responce for this. If there is any errors (like to big string), one
...
@@ -1880,7 +1881,7 @@ execute or if one has rebound the parameters.
...
@@ -1880,7 +1881,7 @@ execute or if one has rebound the parameters.
@item 2*param
_
count @tab Type of parameters (only given if new
_
parameter
_
bound flag is 1)
@item 2*param
_
count @tab Type of parameters (only given if new
_
parameter
_
bound flag is 1)
@item # @tab Parameter data, repeated for each parameter that are
@item # @tab Parameter data, repeated for each parameter that are
NOT NULL and not used with mysql
_
send
_
long
_
data().
NOT NULL and not used with mysql
_
send
_
long
_
data().
@end
itemiz
e
@end
multitabl
e
The null-bit-map is for all parameters (including parameters sent with
The null-bit-map is for all parameters (including parameters sent with
'mysql
_
send
_
long
_
data). If parameter 0 is NULL, then bit 0 in the
'mysql
_
send
_
long
_
data). If parameter 0 is NULL, then bit 0 in the
...
@@ -1938,7 +1939,7 @@ DATETIME, DATE and TIME are sent to the server in a binary format as follows:
...
@@ -1938,7 +1939,7 @@ DATETIME, DATE and TIME are sent to the server in a binary format as follows:
The first byte is a length byte and then comes all parameters that are
The first byte is a length byte and then comes all parameters that are
not 0. (Always counted from the beginning).
not 0. (Always counted from the beginning).
@node Fulltext Search,
, protocol, Top
@node Fulltext Search,
MyISAM Record Structure
, protocol, Top
@chapter Fulltext Search in MySQL
@chapter Fulltext Search in MySQL
Hopefully, sometime there will be complete description of
Hopefully, sometime there will be complete description of
...
@@ -1981,6 +1982,7 @@ higher weights to individual B's. Also the first expression in
...
@@ -1981,6 +1982,7 @@ higher weights to individual B's. Also the first expression in
much simplier. So it is the first one, that is implemented in MySQL.
much simplier. So it is the first one, that is implemented in MySQL.
@node MyISAM Record Structure, InnoDB Record Structure, Fulltext Search, Top
@chapter MyISAM Record Structure
@chapter MyISAM Record Structure
@section Introduction
@section Introduction
...
@@ -2365,6 +2367,7 @@ Most of the formatting work for MyISAM columns is visible
...
@@ -2365,6 +2367,7 @@ Most of the formatting work for MyISAM columns is visible
in the program /sql/field.cc in the source code directory.
in the program /sql/field.cc in the source code directory.
@*
@*
@node InnoDB Record Structure,InnoDB Page Structure,MyISAM Record Structure,Top
@chapter InnoDB Record Structure
@chapter InnoDB Record Structure
This page contains:
This page contains:
...
@@ -2516,7 +2519,7 @@ Bytes is 1byte_offs_flag -- you need to know if 1byte_offs_flag is 1
...
@@ -2516,7 +2519,7 @@ Bytes is 1byte_offs_flag -- you need to know if 1byte_offs_flag is 1
@*
@*
Given a pointer to the Origin, InnoDB finds the start of the record as follows:
Given a pointer to the Origin, InnoDB finds the start of the record as follows:
@
enumerat
e @bullet
@
itemiz
e @bullet
@item
@item
Let X = n
_
fields (the number of fields is by definition equal to the
Let X = n
_
fields (the number of fields is by definition equal to the
number of entries in the Field Start Offsets Table).
number of entries in the Field Start Offsets Table).
...
@@ -2527,7 +2530,7 @@ two bytes for each entry instead of just one.
...
@@ -2527,7 +2530,7 @@ two bytes for each entry instead of just one.
Let X = X + 6, because the fixed size of Extra Bytes is 6.
Let X = X + 6, because the fixed size of Extra Bytes is 6.
@item
@item
The start of the record is at (pointer value minus X).
The start of the record is at (pointer value minus X).
@end
enumerat
e
@end
itemiz
e
@subsection FIELD CONTENTS
@subsection FIELD CONTENTS
...
@@ -2540,7 +2543,7 @@ at the end of a record.
...
@@ -2540,7 +2543,7 @@ at the end of a record.
@*
@*
Here's an example.
Here's an example.
@
enumerat
e @bullet
@
itemiz
e @bullet
@item
@item
I made a table with this definition:
I made a table with this definition:
@*@*
@*@*
...
@@ -2575,7 +2578,7 @@ I put some rows in the table. My last three INSERTs were:
...
@@ -2575,7 +2578,7 @@ I put some rows in the table. My last three INSERTs were:
I ran Borland's TDUMP to get a hexadecimal dump of
I ran Borland's TDUMP to get a hexadecimal dump of
the contents of
\mysql\data\ibdata
1, which (in my case) is the
the contents of
\mysql\data\ibdata
1, which (in my case) is the
MySQL/InnoDB data file (on Windows).
MySQL/InnoDB data file (on Windows).
@end
enumerat
e
@end
itemiz
e
Here is an extract of the dump:
Here is an extract of the dump:
...
@@ -2670,6 +2673,7 @@ shorter because the NULLs take no space.
...
@@ -2670,6 +2673,7 @@ shorter because the NULLs take no space.
The most relevant InnoDB source-code files are rem0rec.c, rem0rec.ic,
The most relevant InnoDB source-code files are rem0rec.c, rem0rec.ic,
and rem0rec.h in the rem ("Record Manager") directory.
and rem0rec.h in the rem ("Record Manager") directory.
@node InnoDB Page Structure,Files in MySQL Sources,InnoDB Record Structure,Top
@chapter InnoDB Page Structure
@chapter InnoDB Page Structure
InnoDB stores all records inside a fixed-size unit which is commonly called a
InnoDB stores all records inside a fixed-size unit which is commonly called a
...
@@ -2751,6 +2755,7 @@ The Fil Header has eight parts, as follows:
...
@@ -2751,6 +2755,7 @@ The Fil Header has eight parts, as follows:
@tab the latest archived log file number at the time that FIL
_
PAGE
_
FILE
_
FLUSH
_
LSN was written (in the log)
@tab the latest archived log file number at the time that FIL
_
PAGE
_
FILE
_
FLUSH
_
LSN was written (in the log)
@end multitable
@end multitable
@itemize
@item
@item
FIL
_
PAGE
_
SPACE is a necessary identifier because different pages might belong to
FIL
_
PAGE
_
SPACE is a necessary identifier because different pages might belong to
different (table) spaces within the same file. The word
different (table) spaces within the same file. The word
...
@@ -2796,6 +2801,7 @@ Work With MySQL And InnoDB" on devarticles.com.
...
@@ -2796,6 +2801,7 @@ Work With MySQL And InnoDB" on devarticles.com.
@item
@item
FIL
_
PAGE
_
FILE
_
FLUSH
_
LSN and FIL
_
PAGE
_
ARCH
_
LOG
_
NO are only valid for
FIL
_
PAGE
_
FILE
_
FLUSH
_
LSN and FIL
_
PAGE
_
ARCH
_
LOG
_
NO are only valid for
the first page of a data file.
the first page of a data file.
@end itemize
@subsection Page Header
@subsection Page Header
...
@@ -3098,6 +3104,7 @@ header.
...
@@ -3098,6 +3104,7 @@ header.
The most relevant InnoDB source-code files are page0page.c,
The most relevant InnoDB source-code files are page0page.c,
page0page.ic, and page0page.h in
\page
directory.
page0page.ic, and page0page.h in
\page
directory.
@node Files in MySQL Sources,Files in InnoDB Sources,InnoDB Page Structure,Top
@chapter Annotated List Of Files in the MySQL Source Code Distribution
@chapter Annotated List Of Files in the MySQL Source Code Distribution
This is a description of the files that you get when you download the
This is a description of the files that you get when you download the
...
@@ -3153,7 +3160,8 @@ libmysqld -- The MySQL Library
...
@@ -3153,7 +3160,8 @@ libmysqld -- The MySQL Library
man -- Manual pages
man -- Manual pages
@item
@item
merge -- The MERGE table handler (see Reference Manual section 7.2)
merge -- The MERGE table handler (see Reference Manual section 7.2)
* myisam -- The MyISAM table handler
@item
myisam -- The MyISAM table handler
@item
@item
myisammrg -- The MyISAM Merge table handler
myisammrg -- The MyISAM Merge table handler
@item
@item
...
@@ -3269,6 +3277,7 @@ server.
...
@@ -3269,6 +3277,7 @@ server.
@*@*
@*@*
The C program files in the directory are:
The C program files in the directory are:
@itemize @bullet
@item
@item
connect
_
test.c -- test that a connect is possible
connect
_
test.c -- test that a connect is possible
@item
@item
...
@@ -3306,6 +3315,7 @@ showdb_test.c -- test that a show-databases is possible
...
@@ -3306,6 +3315,7 @@ showdb_test.c -- test that a show-databases is possible
ssl
_
test.c -- test that SSL is possible
ssl
_
test.c -- test that SSL is possible
@item
@item
thread
_
test.c -- test that threading is possible
thread
_
test.c -- test that threading is possible
@end itemize
@*@*
@*@*
@subsection cmd-line-utils
@subsection cmd-line-utils
...
@@ -3330,6 +3340,7 @@ Software Foundation.
...
@@ -3330,6 +3340,7 @@ Software Foundation.
The
\libedit
(library of edit functions) subdirectory has files
The
\libedit
(library of edit functions) subdirectory has files
written by Christos Zoulas. They are for editing the line contents.
written by Christos Zoulas. They are for editing the line contents.
These are the program files in the
\libedit
subdirectory:
These are the program files in the
\libedit
subdirectory:
@itemize @bullet
@item
@item
chared.c -- character editor
chared.c -- character editor
@item
@item
...
@@ -3372,6 +3383,7 @@ tokenizer.c -- Bourne shell line tokenizer
...
@@ -3372,6 +3383,7 @@ tokenizer.c -- Bourne shell line tokenizer
tty.c -- for a tty interface
tty.c -- for a tty interface
@item
@item
vi.c -- commands used when in the vi (editor) mode
vi.c -- commands used when in the vi (editor) mode
@end itemize
@*@*
@*@*
@subsection dbug
@subsection dbug
...
@@ -3394,6 +3406,7 @@ Features of the dbug library include profiling and state pushing.
...
@@ -3394,6 +3406,7 @@ Features of the dbug library include profiling and state pushing.
@*@*
@*@*
The C programs in this directory are:
The C programs in this directory are:
@itemize @bullet
@item
@item
dbug.c -- The main module
dbug.c -- The main module
@item
@item
...
@@ -3410,6 +3423,7 @@ factorial.c -- A tiny example
...
@@ -3410,6 +3423,7 @@ factorial.c -- A tiny example
main.c -- A tiny example
main.c -- A tiny example
@item
@item
sanity.c -- Declaration of a variable
sanity.c -- Declaration of a variable
@end itemize
@*@*
@*@*
@subsection div
@subsection div
...
@@ -3432,6 +3446,7 @@ documentation from developers themselves, will be placed here.
...
@@ -3432,6 +3446,7 @@ documentation from developers themselves, will be placed here.
@*@*
@*@*
These sub-directories are part of this directory:
These sub-directories are part of this directory:
@itemize @bullet
@item
@item
books -- .gif images and empty .txt files; no real information
books -- .gif images and empty .txt files; no real information
@item
@item
...
@@ -3449,6 +3464,7 @@ documentation
...
@@ -3449,6 +3464,7 @@ documentation
to-be-included... -- an empty subdirectory
to-be-included... -- an empty subdirectory
@item
@item
translations -- some Portuguese myodbc documentation
translations -- some Portuguese myodbc documentation
@end itemize
@*@*
@*@*
In the main directory, you'll find some .txt files related to the
In the main directory, you'll find some .txt files related to the
...
@@ -3474,6 +3490,7 @@ These eight programs are all standalone utilities, that is, they have
...
@@ -3474,6 +3490,7 @@ These eight programs are all standalone utilities, that is, they have
a main() function and their main role is to show information that the
a main() function and their main role is to show information that the
MySQL server needs or produces. Most are unimportant. They are as
MySQL server needs or produces. Most are unimportant. They are as
follows:
follows:
@itemize @bullet
@item
@item
my
_
print
_
defaults.c -- print all parameters in a default file
my
_
print
_
defaults.c -- print all parameters in a default file
@item
@item
...
@@ -3488,6 +3505,7 @@ replace.c -- replace strings in text files
...
@@ -3488,6 +3505,7 @@ replace.c -- replace strings in text files
resolve
_
stack
_
dump.c -- show symbolic info from a stack dump
resolve
_
stack
_
dump.c -- show symbolic info from a stack dump
@item
@item
resolveip.c -- convert an IP address to a hostname, or vice versa
resolveip.c -- convert an IP address to a hostname, or vice versa
@end itemize
@*@*
@*@*
@subsection fs
@subsection fs
...
@@ -3512,6 +3530,7 @@ The descriptions imply that this is a development project.
...
@@ -3512,6 +3530,7 @@ The descriptions imply that this is a development project.
@*@*
@*@*
There are four program files in the directory:
There are four program files in the directory:
@itemize @bullet
@item
@item
database.c -- "emulate filesystem behaviour on top of SQL database"
database.c -- "emulate filesystem behaviour on top of SQL database"
@item
@item
...
@@ -3587,6 +3606,7 @@ hp_test2.c -- * testing database and storing results
...
@@ -3587,6 +3606,7 @@ hp_test2.c -- * testing database and storing results
hp
_
update.c -- * update an existing row
hp
_
update.c -- * update an existing row
@item
@item
hp
_
write.c -- * insert a new row
hp
_
write.c -- * insert a new row
@end itemize
@*@*
@*@*
There are fewer files in the heap directory than in the myisam
There are fewer files in the heap directory than in the myisam
...
@@ -3638,6 +3658,7 @@ The ISAM table handler.
...
@@ -3638,6 +3658,7 @@ The ISAM table handler.
@*@*
@*@*
The C files in this directory are:
The C files in this directory are:
@itemize @bullet
@item
@item
_
cache.c -- for reading records from a cache
_
cache.c -- for reading records from a cache
@item
@item
...
@@ -3709,6 +3730,7 @@ write.c -- insert a new row
...
@@ -3709,6 +3730,7 @@ write.c -- insert a new row
@item
@item
pack
_
isam.c -- pack isam file (NOTE TO SELF ?? equivalent to
pack
_
isam.c -- pack isam file (NOTE TO SELF ?? equivalent to
\myisam\myisampack
.c)
\myisam\myisampack
.c)
@end itemize
@*@*
@*@*
Except for one minor C file (pack
_
isam.c) every program in the ISAM
Except for one minor C file (pack
_
isam.c) every program in the ISAM
...
@@ -3743,6 +3765,7 @@ directory would hold the "server part" files.
...
@@ -3743,6 +3765,7 @@ directory would hold the "server part" files.
@*@*
@*@*
The program files on this directory are:
The program files on this directory are:
@itemize @bullet
@item
@item
conf
_
to
_
src.c -- has to do with charsets
conf
_
to
_
src.c -- has to do with charsets
@item
@item
...
@@ -3755,6 +3778,7 @@ get_password.c -- get password
...
@@ -3755,6 +3778,7 @@ get_password.c -- get password
libmysql.c -- the main "packet-sending emulation" program
libmysql.c -- the main "packet-sending emulation" program
@item
@item
manager.c -- initialize/connect/fetch with MySQL manager
manager.c -- initialize/connect/fetch with MySQL manager
@end itemize
@*@*
@*@*
@subsection libmysql
_
r
@subsection libmysql
_
r
...
@@ -3764,8 +3788,10 @@ The MySQL Library, Part 2.
...
@@ -3764,8 +3788,10 @@ The MySQL Library, Part 2.
This is a continuation of the libmysql directory. There is only one
This is a continuation of the libmysql directory. There is only one
file here:
file here:
@itemize @bullet
@item
@item
makefile.am
makefile.am
@end itemize
@*@*
@*@*
@subsection libmysqld
@subsection libmysqld
...
@@ -3775,10 +3801,12 @@ The MySQL library, Part 3.
...
@@ -3775,10 +3801,12 @@ The MySQL library, Part 3.
This is a continuation of the libmysql directory. The program files on
This is a continuation of the libmysql directory. The program files on
this directory are:
this directory are:
@itemize @bullet
@item
@item
libmysqld.c -- The called side, compare the mysqld.exe source
libmysqld.c -- The called side, compare the mysqld.exe source
@item
@item
lib
_
vio.c -- Emulate the vio directory's communication buffer
lib
_
vio.c -- Emulate the vio directory's communication buffer
@end itemize
@*@*
@*@*
@subsection man
@subsection man
...
@@ -3805,6 +3833,7 @@ table handlers are all quite similar.
...
@@ -3805,6 +3833,7 @@ table handlers are all quite similar.
@*@*
@*@*
The related directories are:
The related directories are:
@itemize @bullet
@item
@item
\isam
-- for ISAM
\isam
-- for ISAM
@item
@item
...
@@ -3814,12 +3843,14 @@ The related directories are:
...
@@ -3814,12 +3843,14 @@ The related directories are:
@item
@item
\myisammrg
-- for MyISAM MERGE (mostly call functions in
\myisam
\myisammrg
-- for MyISAM MERGE (mostly call functions in
\myisam
programs)
programs)
@end itemize
@*@*
@*@*
To avoid duplication, only the
\myisam
program versions are discussed.
To avoid duplication, only the
\myisam
program versions are discussed.
@*@*
@*@*
The C programs in this (merge) directory are:
The C programs in this (merge) directory are:
@itemize @bullet
@item
@item
mrg
_
close.c -- compare
\isam
's close.c
mrg
_
close.c -- compare
\isam
's close.c
@item
@item
...
@@ -3844,6 +3875,7 @@ mrg_rsame.c -- "" rsame.c
...
@@ -3844,6 +3875,7 @@ mrg_rsame.c -- "" rsame.c
mrg
_
static.c -- "" static.c
mrg
_
static.c -- "" static.c
@item
@item
mrg
_
update.c -- "" update.c
mrg
_
update.c -- "" update.c
@end itemize
@*@*
@*@*
@subsection myisam
@subsection myisam
...
@@ -3852,6 +3884,7 @@ The MyISAM table handler.
...
@@ -3852,6 +3884,7 @@ The MyISAM table handler.
@*@*
@*@*
The C files in this subdirectory come in six main groups:
The C files in this subdirectory come in six main groups:
@itemize @bullet
@item
@item
ft*.c files -- ft stands for "Full Text", code contributed by Sergei
ft*.c files -- ft stands for "Full Text", code contributed by Sergei
Golubchik
Golubchik
...
@@ -3870,11 +3903,13 @@ Ramil Kalimullin
...
@@ -3870,11 +3903,13 @@ Ramil Kalimullin
@item
@item
sort.c -- this is a single file that sorts keys for index-create
sort.c -- this is a single file that sorts keys for index-create
purposes
purposes
@end itemize
@*@*
@*@*
The "full text" and "rtree" and "spatial" program sets are for special
The "full text" and "rtree" and "spatial" program sets are for special
purposes, so this document focuses only on the mi*.c "myisam" C
purposes, so this document focuses only on the mi*.c "myisam" C
programs. They are:
programs. They are:
@itemize @bullet
@item
@item
mi
_
cache.c -- for reading records from a cache
mi
_
cache.c -- for reading records from a cache
@item
@item
...
@@ -3962,6 +3997,7 @@ mi_unique.c -- functions to check if a row is unique
...
@@ -3962,6 +3997,7 @@ mi_unique.c -- functions to check if a row is unique
mi
_
update.c -- update an existing row
mi
_
update.c -- update an existing row
@item
@item
mi
_
write.c -- insert a new row
mi
_
write.c -- insert a new row
@end itemize
@*@*
@*@*
@subsection myisammrg
@subsection myisammrg
...
@@ -3980,6 +4016,7 @@ myisam function, the myisammrg function returns.
...
@@ -3980,6 +4016,7 @@ myisam function, the myisammrg function returns.
These are the 21 files in the myisammrg directory, with notes about
These are the 21 files in the myisammrg directory, with notes about
the myisam functions or programs they're connected with:
the myisam functions or programs they're connected with:
@itemize @bullet
@item
@item
myrg
_
close.c -- mi
_
close.c
myrg
_
close.c -- mi
_
close.c
@item
@item
...
@@ -4028,6 +4065,7 @@ myrg_update.c -- mi_update.c / call mi_update function, see
...
@@ -4028,6 +4065,7 @@ myrg_update.c -- mi_update.c / call mi_update function, see
@item
@item
myrg
_
write.c -- mi
_
write.c / call mi
_
write function, see
myrg
_
write.c -- mi
_
write.c / call mi
_
write function, see
\myisam\mi
_
write.c
\myisam\mi
_
write.c
@end itemize
@*@*
@*@*
@subsection mysql-test
@subsection mysql-test
...
@@ -4041,6 +4079,7 @@ and how to report errors.
...
@@ -4041,6 +4079,7 @@ and how to report errors.
@*@*
@*@*
There are four subdirectories:
There are four subdirectories:
@itemize @bullet
@item
@item
\misc
-- contains one minor Perl program
\misc
-- contains one minor Perl program
@item
@item
...
@@ -4050,6 +4089,7 @@ There are four subdirectories:
...
@@ -4050,6 +4089,7 @@ There are four subdirectories:
\std
_
data -- contains standard data for input to tests
\std
_
data -- contains standard data for input to tests
@item
@item
\t
-- contains tests
\t
-- contains tests
@end itemize
@*@*
@*@*
There are 186 *.test files in the
\t
subdirectory. Primarily these are
There are 186 *.test files in the
\t
subdirectory. Primarily these are
...
@@ -4075,6 +4115,7 @@ MySQL system library (Low level routines for file access etc.).
...
@@ -4075,6 +4115,7 @@ MySQL system library (Low level routines for file access etc.).
@*@*
@*@*
There are 115 *.c programs in this directory:
There are 115 *.c programs in this directory:
@itemize @bullet
@item
@item
array.c -- Dynamic array handling
array.c -- Dynamic array handling
@item
@item
...
@@ -4334,6 +4375,7 @@ writer's lock
...
@@ -4334,6 +4375,7 @@ writer's lock
tree.c -- Initialize/search/free binary trees
tree.c -- Initialize/search/free binary trees
@item
@item
typelib.c -- Determine what type a field has
typelib.c -- Determine what type a field has
@end itemize
@*@*
@*@*
You can find documentation for the main functions in these files
You can find documentation for the main functions in these files
...
@@ -4380,9 +4422,11 @@ mysqld_safe.c -- Compare \scripts\mysqld_safe.sh
...
@@ -4380,9 +4422,11 @@ mysqld_safe.c -- Compare \scripts\mysqld_safe.sh
@end itemize
@end itemize
Perhaps the most important file is:
Perhaps the most important file is:
@itemize @bullet
@item
@item
netware.patch -- NetWare-specific build instructions and switches
netware.patch -- NetWare-specific build instructions and switches
(compare
\mysql
-4.1
\ltmain
.sh)
(compare
\mysql
-4.1
\ltmain
.sh)
@end itemize
@*@*
@*@*
For instructions about basic installation, see "Deployment Guide For
For instructions about basic installation, see "Deployment Guide For
...
@@ -4411,6 +4455,7 @@ Alfredsson. There are no .C program files in this directory.
...
@@ -4411,6 +4455,7 @@ Alfredsson. There are no .C program files in this directory.
@*@*
@*@*
The contents of
\os
2 are:
The contents of
\os
2 are:
@itemize @bullet
@item
@item
A Readme.Txt file
A Readme.Txt file
@item
@item
...
@@ -4418,6 +4463,7 @@ An \include subdirectory containing .h files which are for OS/2 only
...
@@ -4418,6 +4463,7 @@ An \include subdirectory containing .h files which are for OS/2 only
@item
@item
Files used in the build process (configuration, switches, and one
Files used in the build process (configuration, switches, and one
.obj)
.obj)
@end itemize
@*@*
@*@*
The README file refers to MySQL version 3.23, which suggests that
The README file refers to MySQL version 3.23, which suggests that
...
@@ -4474,6 +4520,7 @@ Test cases for replication.
...
@@ -4474,6 +4520,7 @@ Test cases for replication.
@*@*
@*@*
There are six short and trivial-looking tests in these subdirectories:
There are six short and trivial-looking tests in these subdirectories:
@itemize @bullet
@item
@item
\test
-auto-inc -- Do auto-Increment columns work?
\test
-auto-inc -- Do auto-Increment columns work?
@item
@item
...
@@ -4486,6 +4533,7 @@ There are six short and trivial-looking tests in these subdirectories:
...
@@ -4486,6 +4533,7 @@ There are six short and trivial-looking tests in these subdirectories:
\test
-repl-alter -- Does ALTER TABLE work?
\test
-repl-alter -- Does ALTER TABLE work?
@item
@item
\test
-repl-ts -- Does TIMESTAMP column work?
\test
-repl-ts -- Does TIMESTAMP column work?
@end itemize
@*@*
@*@*
@subsection SCCS
@subsection SCCS
...
@@ -4509,6 +4557,7 @@ Linux programmers use it where Windows programmers would use a *.bat
...
@@ -4509,6 +4557,7 @@ Linux programmers use it where Windows programmers would use a *.bat
@*@*
@*@*
The *.sh files on this directory are:
The *.sh files on this directory are:
@itemize @bullet
@item
@item
fill
_
help
_
tables.sh -- Create help-information tables and insert
fill
_
help
_
tables.sh -- Create help-information tables and insert
@item
@item
...
@@ -4556,6 +4605,7 @@ privileges
...
@@ -4556,6 +4605,7 @@ privileges
mysql
_
tableinfo.sh -- Puts info re MySQL tables into a MySQL table
mysql
_
tableinfo.sh -- Puts info re MySQL tables into a MySQL table
@item
@item
mysql
_
zap.sh -- Kill processes which match pattern
mysql
_
zap.sh -- Kill processes which match pattern
@end itemize
@*@*
@*@*
@subsection sql
@subsection sql
...
@@ -4564,6 +4614,7 @@ Programs for handling SQL commands. The "core" of MySQL.
...
@@ -4564,6 +4614,7 @@ Programs for handling SQL commands. The "core" of MySQL.
@*@*
@*@*
These are the .c and .cc files in the sql directory:
These are the .c and .cc files in the sql directory:
@itemize @bullet
@item
@item
cache
_
manager.cc -- manages a number of blocks
cache
_
manager.cc -- manages a number of blocks
@item
@item
...
@@ -4755,8 +4806,8 @@ udf_example.cc -- Example file of user-defined functions
...
@@ -4755,8 +4806,8 @@ udf_example.cc -- Example file of user-defined functions
@item
@item
uniques.cc -- Function to handle quick removal of duplicates
uniques.cc -- Function to handle quick removal of duplicates
@item
@item
unireg.cc -- Create a unireg form file from a FIELD and field-info
unireg.cc -- Create a unireg form file from a FIELD and field-info
struct
struct
@end itemize
@*@*
@*@*
@subsection sql-bench
@subsection sql-bench
...
@@ -4771,6 +4822,7 @@ available all the material necessary to reproduce all the tests.
...
@@ -4771,6 +4822,7 @@ available all the material necessary to reproduce all the tests.
@*@*
@*@*
There are five subdirectories and sub-subdirectories:
There are five subdirectories and sub-subdirectories:
@itemize @bullet
@item
@item
\Comments
-- Comments about results from tests of Access, Adabas,
\Comments
-- Comments about results from tests of Access, Adabas,
etc.
etc.
...
@@ -4783,6 +4835,7 @@ etc.
...
@@ -4783,6 +4835,7 @@ etc.
\Results
-- old test results
\Results
-- old test results
@item
@item
\Results
-win32 -- old test results from Windows 32-bit tests
\Results
-win32 -- old test results from Windows 32-bit tests
@end itemize
@*@*
@*@*
There are twenty-four *.sh (shell script) files, which involve Perl
There are twenty-four *.sh (shell script) files, which involve Perl
...
@@ -4824,6 +4877,7 @@ recent Pentium class processors, though.
...
@@ -4824,6 +4877,7 @@ recent Pentium class processors, though.
@*@*
@*@*
The .C files are:
The .C files are:
@itemize @bullet
@item
@item
atof.c -- ascii-to-float, MySQL version
atof.c -- ascii-to-float, MySQL version
@item
@item
...
@@ -4925,6 +4979,7 @@ str_test.c -- test of all the string functions encoded in assembler
...
@@ -4925,6 +4979,7 @@ str_test.c -- test of all the string functions encoded in assembler
udiv.c -- unsigned long divide
udiv.c -- unsigned long divide
@item
@item
xml.c -- read and parse XML strings
xml.c -- read and parse XML strings
@end itemize
@*@*
@*@*
There are also four .ASM files -- macros.asm, ptr
_
cmp.asm,
There are also four .ASM files -- macros.asm, ptr
_
cmp.asm,
...
@@ -4958,8 +5013,10 @@ Tools -- well, actually, one tool.
...
@@ -4958,8 +5013,10 @@ Tools -- well, actually, one tool.
@*@*
@*@*
The only file is:
The only file is:
@itemize @bullet
@item
@item
mysqlmanager.c -- A "server management daemon" by Sasha Pachev
mysqlmanager.c -- A "server management daemon" by Sasha Pachev
@end itemize
@*@*
@*@*
@subsection VC++Files
@subsection VC++Files
...
@@ -4983,6 +5040,7 @@ Windows environments.
...
@@ -4983,6 +5040,7 @@ Windows environments.
In addition to the "subdirectories which are duplicates of
In addition to the "subdirectories which are duplicates of
directories", VC++Files contains these subdirectories, which are not
directories", VC++Files contains these subdirectories, which are not
duplicates:
duplicates:
@itemize @bullet
@item
@item
comp
_
err -- (nearly empty)
comp
_
err -- (nearly empty)
@item
@item
...
@@ -5029,6 +5087,7 @@ thr_insert_test -- (nearly empty)
...
@@ -5029,6 +5087,7 @@ thr_insert_test -- (nearly empty)
thr
_
test -- one short program used to test for memory-allocation bug
thr
_
test -- one short program used to test for memory-allocation bug
@item
@item
winmysqladmin -- the winmysqladmin.exe source. machine-generated?
winmysqladmin -- the winmysqladmin.exe source. machine-generated?
@end itemize
@*@*
@*@*
@subsection vio
@subsection vio
...
@@ -5048,6 +5107,7 @@ WindowsNT), Shared Memory, and Secure Sockets (SSL).
...
@@ -5048,6 +5107,7 @@ WindowsNT), Shared Memory, and Secure Sockets (SSL).
@*@*
@*@*
The C programs are:
The C programs are:
@itemize @bullet
@item
@item
test-ssl.c -- Short standalone test program: SSL
test-ssl.c -- Short standalone test program: SSL
@item
@item
...
@@ -5068,6 +5128,7 @@ viotest.cc -- Short standalone test program: general
...
@@ -5068,6 +5128,7 @@ viotest.cc -- Short standalone test program: general
viotest-ssl.c -- Short standalone test program: SSL
viotest-ssl.c -- Short standalone test program: SSL
@item
@item
viotest-sslconnect.cc -- Short standalone test program: SSL connect
viotest-sslconnect.cc -- Short standalone test program: SSL connect
@end itemize
@*@*
@*@*
The older functions -- raw
_
net
_
read, raw
_
net
_
write -- are now
The older functions -- raw
_
net
_
read, raw
_
net
_
write -- are now
...
@@ -5103,6 +5164,7 @@ The MySQL program that uses zlib is \mysys\my_compress.c. The use is
...
@@ -5103,6 +5164,7 @@ The MySQL program that uses zlib is \mysys\my_compress.c. The use is
for packet compression. The client sends messages to the server which
for packet compression. The client sends messages to the server which
are compressed by zlib. See also:
\sql\net
_
serv.cc.
are compressed by zlib. See also:
\sql\net
_
serv.cc.
@node Files in InnoDB Sources,,Files in MySQL Sources,Top
@chapter Annotated List Of Files in the InnoDB Source Code Distribution
@chapter Annotated List Of Files in the InnoDB Source Code Distribution
ERRATUM BY HEIKKI TUURI (START)
ERRATUM BY HEIKKI TUURI (START)
...
@@ -5207,6 +5269,7 @@ Now let's begin.
...
@@ -5207,6 +5269,7 @@ Now let's begin.
@*@*
@*@*
@example
@example
@strong
{
\ha
(HASHING)
}
@strong
{
\ha
(HASHING)
}
File Name What Name Stands For Size Comment Inside File
File Name What Name Stands For Size Comment Inside File
--------- -------------------- ------ -------------------
--------- -------------------- ------ -------------------
...
@@ -5529,6 +5592,7 @@ perhaps because they're not portable enough.
...
@@ -5529,6 +5592,7 @@ perhaps because they're not portable enough.
InnoDB's transaction management is supposedly "in the style of Oracle"
InnoDB's transaction management is supposedly "in the style of Oracle"
and that's close to true but can mislead you.
and that's close to true but can mislead you.
@itemize
@item
@item
First: InnoDB uses rollback segments like Oracle8i does -- but
First: InnoDB uses rollback segments like Oracle8i does -- but
Oracle9i uses a different name
Oracle9i uses a different name
...
@@ -5546,6 +5610,7 @@ Finally: InnoDB's documentation says it has to lock "the gaps before
...
@@ -5546,6 +5610,7 @@ Finally: InnoDB's documentation says it has to lock "the gaps before
index keys" to prevent phantoms -- but any Oracle user will tell you that
index keys" to prevent phantoms -- but any Oracle user will tell you that
phantoms are impossible anyway at the SERIALIZABLE isolation level, so
phantoms are impossible anyway at the SERIALIZABLE isolation level, so
key-locks are unnecessary.
key-locks are unnecessary.
@end itemize
The main idea, though, is that InnoDB has multi-versioning. So does
The main idea, though, is that InnoDB has multi-versioning. So does
Oracle. This is very different from the way that DB2 and SQL Server do
Oracle. This is very different from the way that DB2 and SQL Server do
...
@@ -5737,7 +5802,7 @@ creation dates were between 1994 and 1998.
...
@@ -5737,7 +5802,7 @@ creation dates were between 1994 and 1998.
Ryan Bannon, Alvin Chin, Faryaaz Kassam and Andrew Roszko @*
Ryan Bannon, Alvin Chin, Faryaaz Kassam and Andrew Roszko @*
"InnoDB Concrete Architecture" @*
"InnoDB Concrete Architecture" @*
@url
{
http://www.swen.uwaterloo.ca/~mrbannon/cs798/assignment
_
02/innodb.pdf
}
@url
{
http://www.swen.uwaterloo.ca/~mrbannon/cs798/assignment
_
02/innodb.pdf
}
@item
A student paper. It's an interesting attempt to figure out InnoDB's
A student paper. It's an interesting attempt to figure out InnoDB's
architecture using tools, but I didn't end up using it for the specific
architecture using tools, but I didn't end up using it for the specific
purposes of this article.
purposes of this article.
...
@@ -5752,7 +5817,7 @@ Heikki Tuuri @*
...
@@ -5752,7 +5817,7 @@ Heikki Tuuri @*
"InnoDB Engine in MySQL-Max-3.23.54 / MySQL-4.0.9: The Up-to-Date
"InnoDB Engine in MySQL-Max-3.23.54 / MySQL-4.0.9: The Up-to-Date
Reference Manual of InnoDB" @*
Reference Manual of InnoDB" @*
@url
{
http://www.innodb.com/ibman.html
}
@url
{
http://www.innodb.com/ibman.html
}
@item
This is the natural starting point for all InnoDB information. Mr
This is the natural starting point for all InnoDB information. Mr
Tuuri also appears frequently on MySQL forums.
Tuuri also appears frequently on MySQL forums.
@*@*
@*@*
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment