Commit 4a1bcbe3 authored by jcole@mugatu.spaceapes.com's avatar jcole@mugatu.spaceapes.com
Browse files

Added Makefile.am targets for internals.texi.

Cleaned up internals.texi, changed tabs to spaces.
parent acc12328
Loading
Loading
Loading
Loading
+47 −0
Original line number Diff line number Diff line
@@ -157,6 +157,53 @@ manual_letter.de.ps: manual.de.texi include.texi
	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
#
+92 −76
Original line number Diff line number Diff line
@@ -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:

@example
switch (arg) {
switch (arg) @{
@end example

@item
@@ -489,6 +489,8 @@ Remember to lock databases for optimal caching.

@item void end_key_cache _A((void));
End key caching.
@end table 



@node DBUG, protocol, mysys functions, Top
@@ -548,48 +550,57 @@ Print query.
@section Raw Packet Without Compression

@example
-------------------------------------------------
+-----------------------------------------------+
| Packet Length | Packet no     | Data          |
| 3 Bytes       | 1 Byte        | n Bytes       |
-------------------------------------------------
+-----------------------------------------------+
@end example

3 Byte packet length
@table @asis
@item 3 Byte packet length
The length is calculated with int3store
See include/global.h for details.
The max packetsize can be 16 MB.
1 Byte packet no

If no compression is used the first 4 bytes of each paket
is the header of the paket.
The packet number is incremented for each sent packet. The first
packet starts with 0		
@item 1 Byte packet no
If no compression is used the first 4 bytes of each packet is the header 
of the packet. The packet number is incremented for each sent packet.
The first packet starts with 0.
@item n Byte data 

n Byte data 
@end table

The packet length can be recalculated with:

@example
length = byte1 + (256 * byte2) + (256 * 256 * byte3)
@end example


@node raw packet with compression, basic packets, raw packet without compression, protocol
@section Raw Packet With Compression

@example
-----------------------------------------------------
+---------------------------------------------------+
| Packet Length | Packet no | Uncomp. Packet Length |
| 3 Bytes       | 1 Byte    | 3 Bytes               |
-----------------------------------------------------
+---------------------------------------------------+
@end example

3 Byte packet length
@table @asis
@item 3 Byte packet length
The length is calculated with int3store
See include/global.h for details.
The max packetsize can be 16 MB.
1 Byte packet no
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
is the header of the packet.


@node basic packets, communication, raw packet with compression, protocol
@section Basic Packets

@@ -598,52 +609,57 @@ is the header of the packet.
* error packet::                
@end menu


@node ok packet, error packet, basic packets, basic packets
@subsection OK Packet

	For details see sql/net_pkg.cc
	function send_ok
For details, see @file{sql/net_pkg.cc::send_ok()}.

@example
	-------------------------------------------------
+-----------------------------------------------+
| Header        | No of Rows    | Affected Rows |
|               | 1 Byte        | 1-8 Byte      |
	-------------------------------------------------
|-----------------------------------------------|
| ID (last_insert_id)   | Status | Length       |
| 1-8 Byte              | 2 Byte | 1-8 Byte     |
	-------------------------------------------------
|-----------------------------------------------|
| Messagetext                                   |
| n Byte                                        |
	-------------------------------------------------
+-----------------------------------------------+
@end example

	Header
	1 byte number of rows ? (always 0 ?)
	1-8 bytes affected rows
	1-8 byte id (last_insert_id) 
	2 byte Status (usually 0)
	If the OK-packege includes a message:
	1-8 bytes length of message
	n bytes messagetext
@table @asis
@item Header
@item 1 byte number of rows ? (always 0 ?)
@item 1-8 bytes affected rows
@item 1-8 byte id (last_insert_id) 
@item 2 byte Status (usually 0)
@item If the OK-packege includes a message:
@item 1-8 bytes length of message
@item n bytes messagetext
@end table


@node error packet,  , ok packet, basic packets
@subsection Error Packet	

@example
	-------------------------------------------------
+-----------------------------------------------+
| Header        | Status code   | Error no      |
|               | 1 Byte        | 2 Byte        |
	-------------------------------------------------
|-----------------------------------------------|
| Messagetext                          | 0x00   |
| n Byte                               | 1 Byte |
	-------------------------------------------------
+-----------------------------------------------+
@end example

	Header
	1 byte status code (0xFF = ERROR)
	2 byte error number (is only sent to new 3.23 clients.
	n byte errortext
	1 byte 0x00
@table @asis
@item Header
@item 1 byte status code (0xFF = ERROR)
@item 2 byte error number (is only sent to new 3.23 clients.
@item n byte errortext
@item 1 byte 0x00
@end table


@node communication, fieldtype codes, basic packets, protocol