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
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
nexedi
MariaDB
Commits
c1648114
Commit
c1648114
authored
Mar 17, 2002
by
unknown
Browse files
Options
Browse Files
Download
Plain Diff
Merge jcole@work.mysql.com:/home/bk/mysql-4.0
into mugatu.spaceapes.com:/home/jcole/bk/mysql-4.0
parents
2ef8d458
0224a6da
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
139 additions
and
76 deletions
+139
-76
Docs/Makefile.am
Docs/Makefile.am
+47
-0
Docs/internals.texi
Docs/internals.texi
+92
-76
No files found.
Docs/Makefile.am
View file @
c1648114
...
@@ -157,6 +157,53 @@ manual_letter.de.ps: manual.de.texi include.texi
...
@@ -157,6 +157,53 @@ manual_letter.de.ps: manual.de.texi include.texi
touch
$@
touch
$@
#
# Internals Manual
#
# GNU Info
internals.info
:
internals.texi include.texi
cd
$(srcdir)
&&
$(MAKEINFO)
--no-split
-I
$(srcdir)
$<
# Plain Text
internals.txt
:
internals.texi include.texi
cd
$(srcdir)
&&
\
$(MAKEINFO)
-I
$(srcdir)
--no-headers
--no-split
--output
$@
$<
# HTML, all in one file
internals.html
:
internals.texi include.texi $(srcdir)/Support/texi2html
cd
$(srcdir)
&&
@PERL@
$(srcdir)
/Support/texi2html
$(TEXI2HTML_FLAGS)
$<
internals_toc.html
:
internals.html
# PDF, Portable Document Format
internals.pdf
:
internals.texi
sed
-e
's|@image{[^}]*} *||g'
<
$<
>
internals-tmp.texi
pdftex
--interaction
=
nonstopmode internals-tmp.texi
texindex internals-tmp.??
pdftex
--interaction
=
nonstopmode internals-tmp.texi
texindex internals-tmp.??
pdftex
--interaction
=
nonstopmode internals-tmp.texi
mv
internals-tmp.pdf
$@
rm
-f
internals-tmp.
*
touch
$@
# Postscript, A4 Paper
internals_a4.ps
:
internals.texi include.texi
TEXINPUTS
=
$(srcdir)
:
$$
TEXINPUTS
\
MAKEINFO
=
'
$(MAKEINFO)
-I
$(srcdir)
'
\
$(TEXI2DVI)
--batch
--texinfo
--quiet
'@afourpaper'
$<
$(DVIPS)
-t
a4 internals.dvi
-o
$@
touch
$@
# Postscript, US Letter Paper
internals_letter.ps
:
internals.texi include.texi
TEXINPUTS
=
$(srcdir)
:
$$
TEXINPUTS
\
MAKEINFO
=
'
$(MAKEINFO)
-I
$(srcdir)
'
\
$(TEXI2DVI)
--batch
$<
$(DVIPS)
-t
letter internals.dvi
-o
$@
touch
$@
#
#
# Miscellaneous
# Miscellaneous
#
#
...
...
Docs/internals.texi
View file @
c1648114
...
@@ -184,7 +184,7 @@ Now the code in @file{sql/records.cc} will be used to read through them
...
@@ -184,7 +184,7 @@ Now the code in @file{sql/records.cc} will be used to read through them
in sorted order by using the row pointers in the result file.
in sorted order by using the row pointers in the result file.
To optimize this, we read in a big block of row pointers, sort these
To optimize this, we read in a big block of row pointers, sort these
and then we read the rows in the sorted order into a row buffer
and then we read the rows in the sorted order into a row buffer
(@code
{
record
_
buffer
}
)
.
(@code
{
record
_
buffer
}
).
@end itemize
@end itemize
...
@@ -287,7 +287,7 @@ Put the @samp{@{} after a @code{switch} on the same line, as this gives
...
@@ -287,7 +287,7 @@ Put the @samp{@{} after a @code{switch} on the same line, as this gives
better overall indentation for the switch statement:
better overall indentation for the switch statement:
@example
@example
switch (arg)
{
switch (arg)
@
{
@end example
@end example
@item
@item
...
@@ -489,6 +489,8 @@ Remember to lock databases for optimal caching.
...
@@ -489,6 +489,8 @@ Remember to lock databases for optimal caching.
@item void end
_
key
_
cache
_
A((void));
@item void end
_
key
_
cache
_
A((void));
End key caching.
End key caching.
@end table
@node DBUG, protocol, mysys functions, Top
@node DBUG, protocol, mysys functions, Top
...
@@ -548,48 +550,57 @@ Print query.
...
@@ -548,48 +550,57 @@ Print query.
@section Raw Packet Without Compression
@section Raw Packet Without Compression
@example
@example
-------------------------------------------------
+-----------------------------------------------+
| Packet Length
| Packet no | Data
|
| Packet Length
| Packet no | Data
|
| 3 Bytes
| 1 Byte | n Bytes
|
| 3 Bytes
| 1 Byte | n Bytes
|
-------------------------------------------------
+-----------------------------------------------+
@end example
@end example
3 Byte packet length
@table @asis
The length is calculated with int3store
@item 3 Byte packet length
See include/global.h for details.
The length is calculated with int3store
The max packetsize can be 16 MB
.
See include/global.h for details
.
1 Byte packet no
The max packetsize can be 16 MB.
If no compression is used the first 4 bytes of each paket
@item 1 Byte packet no
is the header of the paket.
If no compression is used the first 4 bytes of each packet is the header
The packet number is incremented for each sent packet. The first
of the packet. The packet number is incremented for each sent packet.
packet starts with 0
The first packet starts with 0.
@item n Byte data
n Byte data
@end table
The packet length can be recalculated with:
The packet length can be recalculated with:
@example
length = byte1 + (256 * byte2) + (256 * 256 * byte3)
length = byte1 + (256 * byte2) + (256 * 256 * byte3)
@end example
@node raw packet with compression, basic packets, raw packet without compression, protocol
@node raw packet with compression, basic packets, raw packet without compression, protocol
@section Raw Packet With Compression
@section Raw Packet With Compression
@example
@example
-----------------------------------------------------
+---------------------------------------------------+
| Packet Length
| Packet no | Uncomp. Packet Length |
| Packet Length
| Packet no | Uncomp. Packet Length |
| 3 Bytes
| 1 Byte | 3 Bytes
|
| 3 Bytes
| 1 Byte | 3 Bytes
|
-----------------------------------------------------
+---------------------------------------------------+
@end example
@end example
3 Byte packet length
@table @asis
The length is calculated with int3store
@item 3 Byte packet length
See include/global.h for details.
The length is calculated with int3store
The max packetsize can be 16 MB.
See include/global.h for details.
1 Byte packet no
The max packetsize can be 16 MB.
3 Byte uncompressed packet length
@item 1 Byte packet no
@item 3 Byte uncompressed packet length
@end table
If compression is used the first 7 bytes of each packet
If compression is used the first 7 bytes of each packet
is the header of the packet.
is the header of the packet.
@node basic packets, communication, raw packet with compression, protocol
@node basic packets, communication, raw packet with compression, protocol
@section Basic Packets
@section Basic Packets
...
@@ -598,52 +609,57 @@ is the header of the packet.
...
@@ -598,52 +609,57 @@ is the header of the packet.
* error packet::
* error packet::
@end menu
@end menu
@node ok packet, error packet, basic packets, basic packets
@node ok packet, error packet, basic packets, basic packets
@subsection OK Packet
@subsection OK Packet
For details see sql/net
_
pkg.cc
For details, see @file
{
sql/net
_
pkg.cc::send
_
ok()
}
.
function send
_
ok
@example
@example
-------------------------------------------------
+-----------------------------------------------+
| Header | No of Rows
| Affected Rows |
| Header | No of Rows
| Affected Rows |
| | 1 Byte | 1-8 Byte
|
| | 1 Byte | 1-8 Byte
|
-------------------------------------------------
|-----------------------------------------------|
| ID (last
_
insert
_
id) | Status | Length
|
| ID (last
_
insert
_
id) | Status | Length
|
| 1-8 Byte | 2 Byte | 1-8 Byte
|
| 1-8 Byte | 2 Byte | 1-8 Byte
|
-------------------------------------------------
|-----------------------------------------------|
| Messagetext
|
| Messagetext
|
| n Byte
|
| n Byte
|
-------------------------------------------------
+-----------------------------------------------+
@end example
@end example
Header
@table @asis
1 byte number of rows ? (always 0 ?)
@item Header
1-8 bytes affected rows
@item 1 byte number of rows ? (always 0 ?)
1-8 byte id (last
_
insert
_
id)
@item 1-8 bytes affected rows
2 byte Status (usually 0)
@item 1-8 byte id (last
_
insert
_
id)
If the OK-packege includes a message:
@item 2 byte Status (usually 0)
1-8 bytes length of message
@item If the OK-packege includes a message:
n bytes messagetext
@item 1-8 bytes length of message
@item n bytes messagetext
@end table
@node error packet, , ok packet, basic packets
@node error packet, , ok packet, basic packets
@subsection Error Packet
@subsection Error Packet
@example
@example
-------------------------------------------------
+-----------------------------------------------+
| Header | Statuscode | Error no
|
| Header | Status code | Error no
|
| | 1 Byte | 2 Byte
|
| | 1 Byte | 2 Byte
|
-------------------------------------------------
|-----------------------------------------------|
| Messagetext | 0x00
|
| Messagetext | 0x00
|
| n Byte
| 1 Byte |
| n Byte
| 1 Byte |
-------------------------------------------------
+-----------------------------------------------+
@end example
@end example
Header
@table @asis
1 byte status code (0xFF = ERROR)
@item Header
2 byte error number (is only sent to new 3.23 clients.
@item 1 byte status code (0xFF = ERROR)
n byte errortext
@item 2 byte error number (is only sent to new 3.23 clients.
1 byte 0x00
@item n byte errortext
@item 1 byte 0x00
@end table
@node communication, fieldtype codes, basic packets, protocol
@node communication, fieldtype codes, basic packets, protocol
...
@@ -742,24 +758,24 @@ is the header of the packet.
...
@@ -742,24 +758,24 @@ is the header of the packet.
@section Fieldtype Codes
@section Fieldtype Codes
@example
@example
display
_
length |enum
_
field
_
type
|flags
display
_
length |enum
_
field
_
type
|flags
----------------------------------------------------
----------------------------------------------------
Blob
03 FF FF 00 |01 FC
|03 90 00 00
Blob
03 FF FF 00 |01 FC
|03 90 00 00
Mediumblob
03 FF FF FF |01 FC
|03 90 00 00
Mediumblob
03 FF FF FF |01 FC
|03 90 00 00
Tinyblob
03 FF 00 00 |01 FC
|03 90 00 00
Tinyblob
03 FF 00 00 |01 FC
|03 90 00 00
Text
03 FF FF 00 |01 FC
|03 10 00 00
Text
03 FF FF 00 |01 FC
|03 10 00 00
Mediumtext
03 FF FF FF |01 FC
|03 10 00 00
Mediumtext
03 FF FF FF |01 FC
|03 10 00 00
Tinytext
03 FF 00 00 |01 FC
|03 10 00 00
Tinytext
03 FF 00 00 |01 FC
|03 10 00 00
Integer
03 0B 00 00 |01 03
|03 03 42 00
Integer
03 0B 00 00 |01 03
|03 03 42 00
Mediumint
03 09 00 00 |01 09
|03 00 00 00
Mediumint
03 09 00 00 |01 09
|03 00 00 00
Smallint
03 06 00 00 |01 02
|03 00 00 00
Smallint
03 06 00 00 |01 02
|03 00 00 00
Tinyint
03 04 00 00 |01 01
|03 00 00 00
Tinyint
03 04 00 00 |01 01
|03 00 00 00
Varchar
03 XX 00 00 |01 FD
|03 00 00 00
Varchar
03 XX 00 00 |01 FD
|03 00 00 00
Enum
03 05 00 00 |01 FE
|03 00 01 00
Enum
03 05 00 00 |01 FE
|03 00 01 00
Datetime
03 13 00 00 |01 0C
|03 00 00 00
Datetime
03 13 00 00 |01 0C
|03 00 00 00
Timestamp
03 0E 00 00 |01 07
|03 61 04 00
Timestamp
03 0E 00 00 |01 07
|03 61 04 00
Time
03 08 00 00 |01 0B
|03 00 00 00
Time
03 08 00 00 |01 0B
|03 00 00 00
Date
03 0A 00 00 |01 0A
|03 00 00 00
Date
03 0A 00 00 |01 0A
|03 00 00 00
@end example
@end example
@c The Index was empty, and ugly, so I removed it. (jcole, Sep 7, 2000)
@c The Index was empty, and ugly, so I removed it. (jcole, Sep 7, 2000)
...
...
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