manual.texi - Clean up some privilege name references.

manual.texi	- Clean up DES function descriptions.
manual.texi	- Correct incorrect INET_NTOA() description.
manual.texi	- Break too-long lines in a few query examples.
parent 78b5e3a4
...@@ -19980,7 +19980,7 @@ Is ON if we only allow local (socket) connections. ...@@ -19980,7 +19980,7 @@ Is ON if we only allow local (socket) connections.
@item @code{skip_show_databases} @item @code{skip_show_databases}
This prevents people from doing @code{SHOW DATABASES} if they don't have This prevents people from doing @code{SHOW DATABASES} if they don't have
the @code{PROCESS_PRIV} privilege. This can improve security if you're the @code{Process_priv} privilege. This can improve security if you're
concerned about people being able to see what databases other users concerned about people being able to see what databases other users
have. See also @code{safe_show_databases}. have. See also @code{safe_show_databases}.
...@@ -30424,11 +30424,12 @@ value, then the result after @code{ELSE} is returned. If there is no ...@@ -30424,11 +30424,12 @@ value, then the result after @code{ELSE} is returned. If there is no
@code{ELSE} part then @code{NULL} is returned: @code{ELSE} part then @code{NULL} is returned:
@example @example
mysql> SELECT CASE 1 WHEN 1 THEN "one" WHEN 2 THEN "two" ELSE "more" END; mysql> SELECT CASE 1 WHEN 1 THEN "one"
WHEN 2 THEN "two" ELSE "more" END;
-> "one" -> "one"
mysql> SELECT CASE WHEN 1>0 THEN "true" ELSE "false" END; mysql> SELECT CASE WHEN 1>0 THEN "true" ELSE "false" END;
-> "true" -> "true"
mysql> SELECT CASE BINARY "B" when "a" then 1 when "b" then 2 END; mysql> SELECT CASE BINARY "B" WHEN "a" THEN 1 WHEN "b" THEN 2 END;
-> NULL -> NULL
@end example @end example
@end table @end table
...@@ -30471,12 +30472,12 @@ See also the @code{ORD()} function. ...@@ -30471,12 +30472,12 @@ See also the @code{ORD()} function.
@findex ORD() @findex ORD()
@item ORD(str) @item ORD(str)
If the leftmost character of the string str is a multi-byte character, If the leftmost character of the string @code{str} is a multi-byte character,
returns the code of multi-byte character by returning the ASCII code value returns the code for that character, calculated from the ASCII code values
of the character in the format of: of its constituent characters using this formula:
@code{((first byte ASCII code)*256+(second byte ASCII code))[*256+third byte ASCII code...]}. @code{((first byte ASCII code)*256+(second byte ASCII code))[*256+third byte ASCII code...]}.
If the leftmost character is not a multi-byte character, returns the same If the leftmost character is not a multi-byte character, returns the same
value as the like @code{ASCII()} function does: value that the @code{ASCII()} function does:
@example @example
mysql> select ORD('2'); mysql> select ORD('2');
...@@ -32553,12 +32554,12 @@ The given @code{key_string} will be used to crypt @code{string_to_encrypt}. ...@@ -32553,12 +32554,12 @@ The given @code{key_string} will be used to crypt @code{string_to_encrypt}.
@end multitable @end multitable
The return string will be a binary string where the first character The return string will be a binary string where the first character
will be @code{CHAR(128 | key-number)}. will be @code{CHAR(128 | key_number)}.
The 128 is added to make it easier to recognize an encrypted key. The 128 is added to make it easier to recognize an encrypted key.
If one uses a string key, @code{key-number} will be 127. If you use a string key, @code{key_number} will be 127.
On error, this function returns NULL. On error, this function returns @code{NULL}.
The string length for the result will be The string length for the result will be
@code{new_length= org_length + (8-(org_length % 8))+1}. @code{new_length= org_length + (8-(org_length % 8))+1}.
...@@ -32566,26 +32567,27 @@ The string length for the result will be ...@@ -32566,26 +32567,27 @@ The string length for the result will be
The @code{des-key-file} has the following format: The @code{des-key-file} has the following format:
@example @example
key-number key-string key_number des_key_string
key-number key-string key_number des_key_string
@end example @end example
The @code{key-number} must be a number between 0-9. The numbers may be Each @code{key_number} must be a number in the range from 0 to 9. Lines in
in any order. @code{des-key-string} is string that will be used to the file may be in any order. @code{des_key_string} is string that will be
encrypt the message. Between the number and the key there should be at used to encrypt the message. Between the number and the key there should be at
least one space. The first key is the default key that will be used least one space. The first key is the default key that will be used
if you don't specify a key to @code{DES_ENCRYPT()} if you don't specify any key argument to @code{DES_ENCRYPT()}
You can tell MySQL to read new key values from the key file with the You can tell MySQL to read new key values from the key file with the
@code{FLUSH DES_KEY_FILE} command. @code{FLUSH DES_KEY_FILE} command. This requires the @code{Reload_priv}
privilege.
One benefit with having a set of default keys on can use is that it One benefit of having a set of default keys is that it gives applications
gives applications a way to check for existence of encrypted column, a way to check for existence of encrypted column values, without giving
without giving the end user the right to decrypt the data. the end user the right to decrypt those values.
@example @example
SELECT customer_address FROM customer_table WHERE mysql> SELECT customer_address FROM customer_table WHERE
crypted_credit_card = DES_ENCRYPT("credit_card_number"); crypted_credit_card = DES_ENCRYPT("credit_card_number");
@end example @end example
@findex DES_DECRYPT() @findex DES_DECRYPT()
...@@ -32596,17 +32598,19 @@ Decrypts a string encrypted with @code{DES_ENCRYPT()}. ...@@ -32596,17 +32598,19 @@ Decrypts a string encrypted with @code{DES_ENCRYPT()}.
Note that this function only works if you have configured MySQL with Note that this function only works if you have configured MySQL with
SSL support. @xref{Secure connections}. SSL support. @xref{Secure connections}.
If one only gives this a string argument, then it will use the right key If no @code{key_string} argument is given, @code{DES_DECRYPT()} examines
the first byte of the encrypted string to determine the DES key number
that was used to encrypt the original string, then reads the key
from the @code{des-key-file} to decrypt the message. For this to work from the @code{des-key-file} to decrypt the message. For this to work
the user must have the @code{PROCESS_PRIV} privilege. the user must have the @code{Process_priv} privilege.
If one calls this function with 2 arguments, the second argument is If one calls this function with a @code{key_string} argument, that string
used to decrypt the message. is used as the key for decrypting the message.
If the @code{string_to_decrypt} doesn't look like an encrypted string, MySQL If the @code{string_to_decrypt} doesn't look like an encrypted string, MySQL
will return the given @code{string_to_decrypt}. will return the given @code{string_to_decrypt}.
On error, this function returns NULL. On error, this function returns @code{NULL}.
@findex LAST_INSERT_ID([expr]) @findex LAST_INSERT_ID([expr])
@item LAST_INSERT_ID([expr]) @item LAST_INSERT_ID([expr])
...@@ -32764,7 +32768,8 @@ server machine is. ...@@ -32764,7 +32768,8 @@ server machine is.
@findex INET_NTOA() @findex INET_NTOA()
@item INET_NTOA(expr) @item INET_NTOA(expr)
Returns the network address (4 or 8 byte) for the numeric expression: Given a numeric network address (4 or 8 byte), returns the dotted-quad
representation of the address as a string:
@example @example
mysql> select INET_NTOA(3520061480); mysql> select INET_NTOA(3520061480);
...@@ -32773,7 +32778,8 @@ mysql> select INET_NTOA(3520061480); ...@@ -32773,7 +32778,8 @@ mysql> select INET_NTOA(3520061480);
@findex INET_ATON() @findex INET_ATON()
@item INET_ATON(expr) @item INET_ATON(expr)
Returns an integer that represents the numeric value for a network address. Given the dotted-quad representation of a network address as a string,
returns an integer that represents the numeric value of the address.
Addresses may be 4 or 8 byte addresses: Addresses may be 4 or 8 byte addresses:
@example @example
...@@ -32786,15 +32792,15 @@ above number is calculated as @code{209*256^3 + 207*256^2 + 224*256 +40}. ...@@ -32786,15 +32792,15 @@ above number is calculated as @code{209*256^3 + 207*256^2 + 224*256 +40}.
@findex MASTER_POS_WAIT() @findex MASTER_POS_WAIT()
@item MASTER_POS_WAIT(log_name, log_pos) @item MASTER_POS_WAIT(log_name, log_pos)
Blocks until the slave reaches the specified position in the master log during Blocks until the slave reaches the specified position in the master
replication. If master information is not initialised, returns NULL. If the log during replication. If master information is not initialised,
slave is not running, will block and wait until it is started and goes to or returns @code{NULL}. If the slave is not running, will block and wait
past until it is started and goes to or past the specified position. If the
the specified position. If the slave is already past the specified position, slave is already past the specified position, returns immediately. The
returns immediately. The return value is the number of log events it had to return value is the number of log events it had to wait to get to the
wait to get to the specified position, or NULL in case of error. Useful for specified position, or @code{NULL} in case of error. Useful for control
control of master-slave synchronisation, but was originally written to of master-slave synchronisation, but was originally written to facilitate
facilitate replication testing. replication testing.
@findex FOUND_ROWS() @findex FOUND_ROWS()
@findex LIMIT @findex LIMIT
...@@ -32803,16 +32809,18 @@ Returns the number of rows that the last @code{SELECT SQL_CALC_FOUND_ROWS ...} ...@@ -32803,16 +32809,18 @@ Returns the number of rows that the last @code{SELECT SQL_CALC_FOUND_ROWS ...}
command would have returned, if wasn't restricted with @code{LIMIT}. command would have returned, if wasn't restricted with @code{LIMIT}.
@example @example
SELECT SQL_CALC_FOUND_ROWS * FROM table_name WHERE id > 100 LIMIT 10; mysql> SELECT SQL_CALC_FOUND_ROWS * FROM table_name
SELECT FOUND_ROWS(); WHERE id > 100 LIMIT 10;
mysql> SELECT FOUND_ROWS();
@end example @end example
The second select will return how many rows the SELECT should have The second @code{SELECT} will return a number indicating how many rows the
returned if we would remove the @code{LIMIT} clause. first @code{SELECT} would have returned had it been written without the
@code{LIMIT} clause.
Note that if you are using @code{SELECT SQL_CALC_FOUND_ROWS ...} MySQL has Note that if you are using @code{SELECT SQL_CALC_FOUND_ROWS ...} MySQL has
to calculate all rows in the result set. This is however faster than to calculate all rows in the result set. However, this is faster than
if you would not use @code{LIMIT} as the result set doesn't have to be sent if you would not use @code{LIMIT}, as the result set doesn't have to be sent
to the client. to the client.
@end table @end table
...@@ -52831,7 +52839,7 @@ Changed optimiser to make it better at deciding when to do a full join ...@@ -52831,7 +52839,7 @@ Changed optimiser to make it better at deciding when to do a full join
and when using keys. and when using keys.
@item @item
You can now use @code{mysqladmin proc} to display information about your own You can now use @code{mysqladmin proc} to display information about your own
threads. Only users with the @strong{Process_priv} privilege can get threads. Only users with the @code{Process_priv} privilege can get
information about all threads. information about all threads.
@item @item
Added handling of formats @code{YYMMDD}, @code{YYYYMMDD}, Added handling of formats @code{YYMMDD}, @code{YYYYMMDD},
...@@ -54779,9 +54787,9 @@ New commands: @code{ALTER TABLE}, @code{SELECT ... INTO OUTFILE} and ...@@ -54779,9 +54787,9 @@ New commands: @code{ALTER TABLE}, @code{SELECT ... INTO OUTFILE} and
@item @item
New function: @code{NOW()}. New function: @code{NOW()}.
@item @item
Added new field @strong{file_priv} to @code{mysql/user} table. Added new field @code{File_priv} to @code{mysql/user} table.
@item @item
New script @code{add_file_priv} which adds the new field @strong{file_priv} New script @code{add_file_priv} which adds the new field @code{File_priv}
to the @code{user} table. This script must be executed if you want to to the @code{user} table. This script must be executed if you want to
use the new @code{SELECT ... INTO} and @code{LOAD DATA INFILE ...} commands use the new @code{SELECT ... INTO} and @code{LOAD DATA INFILE ...} commands
with a version of MySQL earlier than 3.20.7. with a version of MySQL earlier than 3.20.7.
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