summaryrefslogtreecommitdiff
path: root/Docs
diff options
context:
space:
mode:
authorunknown <monty@mashka.mysql.fi>2003-01-03 00:04:33 +0200
committerunknown <monty@mashka.mysql.fi>2003-01-03 00:04:33 +0200
commiteebc67f6f8df9e0bdcde7770e383992ff6cad451 (patch)
tree461fafebcf70ffd880e85f8342601eaade292e1b /Docs
parent5265a1656ea58d9534ebadfbd45c662080f89bb0 (diff)
parent62b38d20ddcf4fb0f519e8b647916d7b367e894c (diff)
downloadmariadb-git-eebc67f6f8df9e0bdcde7770e383992ff6cad451.tar.gz
Merge with 4.0.8
BitKeeper/etc/logging_ok: auto-union VC++Files/sql/mysqld.dsp: Auto merged acinclude.m4: Auto merged include/my_base.h: Auto merged include/myisam.h: Auto merged include/myisammrg.h: Auto merged libmysql/libmysql.c: Auto merged myisam/mi_check.c: Auto merged myisam/mi_write.c: Auto merged myisam/myisamdef.h: Auto merged mysql-test/mysql-test-run.sh: Auto merged mysql-test/r/case.result: Auto merged mysql-test/r/distinct.result: Auto merged mysql-test/r/fulltext.result: Auto merged mysql-test/r/key_diff.result: Auto merged mysql-test/r/multi_update.result: Auto merged mysql-test/r/order_by.result: Auto merged mysql-test/r/select.result: Auto merged mysql-test/r/show_check.result: Auto merged mysql-test/t/multi_update.test: Auto merged mysql-test/t/rpl_log_pos.test: Auto merged mysys/Makefile.am: Auto merged scripts/Makefile.am: Auto merged sql/field.cc: Auto merged sql/ha_innodb.cc: Auto merged sql/ha_myisam.cc: Auto merged sql/ha_myisammrg.cc: Auto merged sql/ha_myisammrg.h: Auto merged sql/item_cmpfunc.cc: Auto merged sql/item_create.h: Auto merged sql/item_func.cc: Auto merged sql/item_func.h: Auto merged sql/lex.h: Auto merged sql/log.cc: Auto merged sql/net_serv.cc: Auto merged sql/repl_failsafe.cc: Auto merged sql/set_var.h: Auto merged sql/slave.cc: Auto merged sql/slave.h: Auto merged sql/sql_acl.cc: Auto merged sql/sql_insert.cc: Auto merged sql/sql_load.cc: Auto merged sql/sql_select.cc: Auto merged sql/sql_udf.cc: Auto merged sql/sql_update.cc: Auto merged sql-bench/crash-me.sh: Auto merged sql-bench/server-cfg.sh: Auto merged sql/share/english/errmsg.txt: Auto merged sql/structs.h: Auto merged
Diffstat (limited to 'Docs')
-rw-r--r--Docs/internals.texi99
-rw-r--r--Docs/mysqld_error.txt26
2 files changed, 79 insertions, 46 deletions
diff --git a/Docs/internals.texi b/Docs/internals.texi
index 7e364774e39..6719bd4a6fa 100644
--- a/Docs/internals.texi
+++ b/Docs/internals.texi
@@ -1585,7 +1585,7 @@ fe 00 . .
@node 4.1 protocol changes,,,
@section Changes to 4.0 protocol in 4.1
-All basic package handling is identical to 4.0. When communication
+All basic packet handling is identical to 4.0. When communication
with an old 4.0 or 3.x client we will use the old protocol.
The new things that we support with 4.1 are:
@@ -1596,7 +1596,7 @@ Warnings
@item
Prepared statements
@item
-Binary protocol (will be much faster than the current protocol that
+Binary protocol (will be faster than the current protocol that
converts everything to strings)
@end itemize
@@ -1617,15 +1617,15 @@ results will sent as binary (low-byte-first).
@end itemize
-@node 4.1 field package,,,
-@section 4.1 field description package
+@node 4.1 field packet,,,
+@section 4.1 field description packet
-The field description package is sent as a response to a query that
-contains a result set. It can be distinguished from a ok package by
-the fact that the first byte can't be 0 for a field package.
-@xref {4.1 ok package}.
+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
+the fact that the first byte can't be 0 for a field packet.
+@xref {4.1 ok packet}.
-The header package has the following structure:
+The header packet has the following structure:
@multitable @columnfractions .10 .90
@item Size @tab Comment
@@ -1634,7 +1634,7 @@ The header package has the following structure:
uses this to send the number of rows in the table)
@end multitable
-This package is always followed by a field description set.
+This packet is always followed by a field description set.
@xref{4.1 field desc}.
@node 4.1 field desc,,,
@@ -1655,17 +1655,17 @@ The field description result set contains the meta info for a result set.
@end multitable
-@node 4.1 ok package,,,
-@section 4.1 ok package
+@node 4.1 ok packet,,,
+@section 4.1 ok packet
-The ok package is the first that is sent as an response for a query
+The ok packet is the first that is sent as an response for a query
that didn't return a result set.
-The ok package has the following structure:
+The ok packet has the following structure:
@multitable @columnfractions .10 .90
@item Size @tab Comment
-@item 1 @tab 0 ; Marker for ok package
+@item 1 @tab 0 ; Marker for ok packet
@item 1-9 @tab Affected rows
@item 1-9 @tab Last insert id (0 if one wasn't used)
@item 2 @tab Server status; Can be used by client to check if we are inside an transaction
@@ -1681,10 +1681,10 @@ The message is optional. For example for multi line INSERT it
contains a string for how many rows was inserted / deleted.
-@node 4.1 end package,,,
-@section 4.1 end package
+@node 4.1 end packet,,,
+@section 4.1 end packet
-The end package is sent as the last package for
+The end packet is sent as the last packet for
@itemize @bullet
@item
@@ -1695,41 +1695,42 @@ End of parameter type information
End of result set
@end itemize
-The end package has the following structure:
+The end packet has the following structure:
@multitable @columnfractions .10 .90
@item Size @tab Comment
-@item 1 @tab 254 ; Marker for EOF package
+@item 1 @tab 254 ; Marker for EOF packet
@item 2 @tab Warning count
@item 2 @tab Status flags (For flags like SERVER_STATUS_MORE_RESULTS)
@end multitable
-Note that a normal package may start with byte 254, which means
+Note that a normal packet may start with byte 254, which means
'length stored in 9 bytes'. One can different between these cases
by checking the packet length < 9 bytes (in which case it's and end
packet).
-@node 4.1 error package
-@section 4.1 error package.
+@node 4.1 error packet
+@section 4.1 error packet.
-The error package is sent when something goes wrong.
-The error package has the following structure:
+The error packet is sent when something goes wrong.
+The error packet has the following structure:
@multitable @columnfractions .10 .90
@item Size @tab Comment
-@item 1 @tab 255 Error package marker
+@item 1 @tab 255 Error packet marker
+@item 2 @tab Error code
@item 1-255 @tab Null terminated error message
@end multitable
-The client/server protocol is designed in such a way that a package
-can only start with 255 if it's an error package.
+The client/server protocol is designed in such a way that a packet
+can only start with 255 if it's an error packet.
@node 4.1 prep init,,,
-@section 4.1 prepared statement init package
+@section 4.1 prepared statement init packet
-This is the return package when one sends a query with the COM_PREPARE
+This is the return packet when one sends a query with the COM_PREPARE
command.
@multitable @columnfractions .10 .90
@@ -1755,8 +1756,8 @@ Note that the above is not yet in 4.1 but will be added this month.
As MySQL can have a parameter 'anywhere' it will in many cases not be
able to provide the optimal information for all parameters.
-If number of columns, in the header package, is not 0 then the
-prepared statement will contain a result set. In this case the package
+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
is followed by a field description result set. @xref{4.1 field descr}.
@@ -1768,22 +1769,22 @@ value. One can call mysql_send_long_data() multiple times for the
same parameter; The server will concatenate the results to a one big
string.
-The server will not require an end package for the string.
+The server will not require an end packet for the string.
mysql_send_long_data() is responsible updating a flag that all data
has been sent. (Ie; That the last call to mysql_send_long_data() has
the 'last_data' flag set).
-This package is sent from client -> server:
+This packet is sent from client -> server:
@multitable @columnfractions .10 .90
@item Size @tab Comment
@item 4 @tab Statement handler
@item 2 @tab Parameter number
@item 2 @tab Type of parameter (not used at this point)
-@item # @tab data (Rest of package)
+@item # @tab data (Rest of packet)
@end itemize
-The server will NOT send an @code{ok} or @code{error} package 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
will get the error when calling execute.
@@ -1791,13 +1792,13 @@ will get the error when calling execute.
@section 4.1 execute
On execute we send all parameters to the server in a COM_EXECUTE
-package.
+packet.
-The package contains the following information:
+The packet contains the following information:
@multitable @columnfractions .30 .70
@item Size @tab Comment
-@item (param_count+7)/8 @tab Null bit map
+@item (param_count+9)/8 @tab Null bit map (2 bits reserved for protocol)
@item 1 @tab new_parameter_bound flag. Is set to 1 for first
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)
@@ -1813,7 +1814,7 @@ The parameters are stored the following ways:
@multitable @columnfractions .20 .10 .70
@item Type @tab Size @tab Comment
-@item tynyint @tab 1 @tab One byte integer
+@item tinyint @tab 1 @tab One byte integer
@item short @tab 2 @tab
@item int @tab 4 @tab
@item longlong @tab 8 @tab
@@ -1822,7 +1823,7 @@ The parameters are stored the following ways:
@item string @tab 1-9 + # @tab Packed string length + string
@end multitable
-The result for this will be either an ok package or a binary result
+The result for this will be either an ok packet or a binary result
set.
@node 4.1 binary result,,,
@@ -1836,11 +1837,11 @@ For each result row:
@item
null bit map with first two bits set to 01 (bit 0,1 value 1)
@item
-parameter data, repeated for each not null parameter.
+parameter data, repeated for each not null result column.
@end itemize
The idea with the reserving two bits in the null map is that we can
-use standard error (first byte 255) and ok packages (first byte 0)
+use standard error (first byte 255) and ok packets (first byte 0)
to end a result sets.
Except that the null-bit-map is shifted two steps, the server is
@@ -1849,6 +1850,18 @@ bound parameters to the client. The server is always sending the data
as type given for 'column type' for respective column. It's up to the
client to convert the parameter to the requested type.
+DATETIME, DATE and TIME are sent to the server in a binary format as follows:
+
+@multitable @columnfractions .20 .10 .70
+@item Type @tab Size @tab Comment
+@item date @tab 1 + 0-11 @tab Length + 2 byte year, 1 byte MMDDHHMMSS, 4 byte billionth of a second
+@item datetime @tab 1 + 0-11 @tab Length + 2 byte year, 1 byte MMDDHHMMSS, 4 byte billionth of a second
+@item time @tab 1 + 0-14 @tab Length + sign (0 = pos, 1= neg), 4 byte days, 1 byte HHMMDD, 4 byte billionth of a second
+@end multitable
+
+The first byte is a length byte and then comes all parameters that are
+not 0. (Always counted from the beginning).
+
@node Fulltext Search, , protocol, Top
@chapter Fulltext Search in MySQL
diff --git a/Docs/mysqld_error.txt b/Docs/mysqld_error.txt
index db663e3d1f5..aeb3a12c263 100644
--- a/Docs/mysqld_error.txt
+++ b/Docs/mysqld_error.txt
@@ -300,7 +300,7 @@
#define ER_NOT_ALLOWED_COMMAND 1148
"The used command is not allowed with this MySQL version",
#define ER_SYNTAX_ERROR 1149
-"You have an error in your SQL syntax",
+"You have an error in your SQL syntax. Check the manual that corresponds to your MySQL server version for the right syntax to use",
#define ER_DELAYED_CANT_CHANGE_LOCK 1150
"Delayed insert thread couldn't get requested lock for table %-.64s",
#define ER_TOO_MANY_DELAYED_THREADS 1151
@@ -358,7 +358,7 @@
#define ER_CHECK_NO_SUCH_TABLE 1177
"Can't open table",
#define ER_CHECK_NOT_IMPLEMENTED 1178
-"The handler for the table doesn't support check/repair",
+"The handler for the table doesn't support %s",
#define ER_CANT_DO_THIS_DURING_AN_TRANSACTION 1179
"You are not allowed to execute this command in a transaction",
#define ER_ERROR_DURING_COMMIT 1180
@@ -454,4 +454,24 @@
#define ER_DUP_ARGUMENT 1225
"Option '%s' used twice in statement",
#define ER_USER_LIMIT_REACHED 1226
-"User '%-64s' has exceeded the '%s' resource (current value: %ld)",
+"User '%-.64s' has exceeded the '%s' resource (current value: %ld)",
+#define ER_SPECIFIC_ACCESS_DENIED_ERROR 1227
+"Access denied. You need the %-.128s privilege for this operation",
+#define ER_LOCAL_VARIABLE 1228
+"Variable '%-.64s' is a LOCAL variable and can't be used with SET GLOBAL",
+#define ER_GLOBAL_VARIABLE 1229
+"Variable '%-.64s' is a GLOBAL variable and should be set with SET GLOBAL",
+#define ER_NO_DEFAULT 1230
+"Variable '%-.64s' doesn't have a default value",
+#define ER_WRONG_VALUE_FOR_VAR 1231
+"Variable '%-.64s' can't be set to the value of '%-.64s'",
+#define ER_WRONG_TYPE_FOR_VAR 1232
+"Wrong argument type to variable '%-.64s'",
+#define ER_VAR_CANT_BE_READ 1233
+"Variable '%-.64s' can only be set, not read",
+#define ER_CANT_USE_OPTION_HERE 1234
+"Wrong usage/placement of '%s'",
+#define 1235
+"This version of MySQL doesn't yet support '%s'",
+#define ER_MASTER_FATAL_ERROR_READING_BINLOG 1236
+"Got fatal error %d: '%-.128s' from master when reading data from binary log",