Commit 0224a6da authored by unknown's avatar unknown

Added Makefile.am targets for internals.texi.

Cleaned up internals.texi, changed tabs to spaces.


Docs/Makefile.am:
  Added Makefile.am targets for internals.texi.
Docs/internals.texi:
  Cleanups, replaced tabs with spaces.
parent ade0c207
...@@ -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
# #
......
...@@ -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
......
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