Merge sanja.is.com.ua:/home/bell/mysql/mysql-4.0
into sanja.is.com.ua:/home/bell/mysql/work-qc-4.0 sql/sql_parse.cc: Auto merged
This commit is contained in:
commit
ac11ab9ab0
@ -3,7 +3,8 @@
|
|||||||
path=`dirname $0`
|
path=`dirname $0`
|
||||||
. "$path/SETUP.sh"
|
. "$path/SETUP.sh"
|
||||||
|
|
||||||
extra_flags="$pentium_cflags -O2 -fprofile-arcs -ftest-coverage"
|
extra_flags="$pentium_cflags -fprofile-arcs -ftest-coverage"
|
||||||
extra_configs="$pentium_configs $debug_configs --disable-shared $static_link"
|
extra_configs="$pentium_configs $debug_configs --disable-shared $static_link"
|
||||||
|
extra_configs="$extra_configs --with-innodb --with-berkeley-db"
|
||||||
|
|
||||||
. "$path/FINISH.sh"
|
. "$path/FINISH.sh"
|
||||||
|
@ -4,6 +4,7 @@ Administrator@fred.
|
|||||||
Miguel@light.local
|
Miguel@light.local
|
||||||
Sinisa@sinisa.nasamreza.org
|
Sinisa@sinisa.nasamreza.org
|
||||||
ahlentz@co3064164-a.rochd1.qld.optusnet.com.au
|
ahlentz@co3064164-a.rochd1.qld.optusnet.com.au
|
||||||
|
akishkin@work.mysql.com
|
||||||
arjen@co3064164-a.bitbike.com
|
arjen@co3064164-a.bitbike.com
|
||||||
arjen@fred.bitbike.com
|
arjen@fred.bitbike.com
|
||||||
arjen@george.bitbike.com
|
arjen@george.bitbike.com
|
||||||
|
@ -1,4 +1,14 @@
|
|||||||
MySQL Manual style guidelines
|
OriginalAuthor: PaulDuBois
|
||||||
|
|
||||||
|
!!! ManualStyleGuidelines
|
||||||
|
|
||||||
|
''Version 1.0''
|
||||||
|
|
||||||
|
!! Revision History
|
||||||
|
|
||||||
|
* 2002-05-17 ArjenLentz - Version 1.0, Posted to Wiki
|
||||||
|
|
||||||
|
!! MySQL Manual Style Guidelines
|
||||||
|
|
||||||
Paul DuBois <paul@snake.net>
|
Paul DuBois <paul@snake.net>
|
||||||
|
|
||||||
@ -9,15 +19,16 @@ do reflect current working practice. Arjen asked me to post this
|
|||||||
on the list some time ago so that it can be discussed with a view
|
on the list some time ago so that it can be discussed with a view
|
||||||
to adding it (or something like it) to the source tree. So here it is!
|
to adding it (or something like it) to the source tree. So here it is!
|
||||||
|
|
||||||
MySQL Reference Manual Style Guidelines
|
Present in the mysql-4.0 source tree: Docs/ManualStyleGuidelines.wiki
|
||||||
|
|
||||||
|
|
||||||
The manual is written in UK English, not American English. This means:
|
The manual is written in UK English, not American English. This means:
|
||||||
|
|
||||||
colour, not color
|
colour, not color
|
||||||
behaviour, not behavior
|
behaviour, not behavior
|
||||||
authorise, not authorize
|
authorise, not authorize
|
||||||
optimise, not optimize
|
optimise, not optimize
|
||||||
etc.
|
etc.
|
||||||
|
|
||||||
Write MySQL, not @strong{MySQL} (the manual used to use the latter, but no
|
Write MySQL, not @strong{MySQL} (the manual used to use the latter, but no
|
||||||
more).
|
more).
|
||||||
@ -28,12 +39,12 @@ Use uppercase for SQL keywords, functions names, etc., when writing
|
|||||||
SQL statement examples.
|
SQL statement examples.
|
||||||
|
|
||||||
To write a list of items, add commas after all items preceding the last one:
|
To write a list of items, add commas after all items preceding the last one:
|
||||||
Correct: Features, products, and services
|
Correct: Features, products, and services
|
||||||
Incorrect: Features, products and services
|
Incorrect: Features, products and services
|
||||||
|
|
||||||
How to pluralize keywords that are enclosed in @code:
|
How to pluralize keywords that are enclosed in @code:
|
||||||
Correct: @code{SELECT}s
|
Correct: @code{SELECT}s
|
||||||
Incorrect: @code{SELECTs} or @code{SELECT}'s or @code{SELECT}:s
|
Incorrect: @code{SELECTs} or @code{SELECT}'s or @code{SELECT}:s
|
||||||
|
|
||||||
Use "its" and "it's" correctly. These words are exceptions to
|
Use "its" and "it's" correctly. These words are exceptions to
|
||||||
the normal use of "'s" to indicate possession:
|
the normal use of "'s" to indicate possession:
|
||||||
@ -44,7 +55,9 @@ its = possession (e.g., "MySQL is fast, which is one of its strengths")
|
|||||||
"a lot" is two words. "alot" is rebarbative.
|
"a lot" is two words. "alot" is rebarbative.
|
||||||
|
|
||||||
Write lowercase, not lower case
|
Write lowercase, not lower case
|
||||||
|
|
||||||
Write uppercase, not upper case
|
Write uppercase, not upper case
|
||||||
|
|
||||||
Write lettercase, not letter case
|
Write lettercase, not letter case
|
||||||
|
|
||||||
Write "web site" (two words), not "website", and "web page" rather
|
Write "web site" (two words), not "website", and "web page" rather
|
||||||
@ -64,12 +77,9 @@ typos. Don't "fix" it. (If the output is produced by a MySQL program, then
|
|||||||
fix the source for the program to write the output correctly without the
|
fix the source for the program to write the output correctly without the
|
||||||
typo, then update the manual to match.)
|
typo, then update the manual to match.)
|
||||||
|
|
||||||
Use "okay" rather than "ok" or "Ok" or "OK" in sentences.
|
Use "okay" rather than "ok" or "Ok" or "OK" in sentences. Exceptions:
|
||||||
Exceptions:
|
* When describing instructions for a GUI with buttons that say "OK", then use "OK". That is, use the label that the GUI uses.
|
||||||
- When describing instructions for a GUI with buttons that say
|
* When showing the output from a program, show the output exactly; don't change "ok" to "okay", etc.
|
||||||
"OK", then use "OK". That is, use the label that the GUI uses.
|
|
||||||
- When showing the output from a program, show the output exactly;
|
|
||||||
don't change "ok" to "okay", etc.
|
|
||||||
|
|
||||||
Write "Open Source" (inside @code{}), not "open source".
|
Write "Open Source" (inside @code{}), not "open source".
|
||||||
|
|
||||||
@ -87,14 +97,14 @@ For example, use "item" rather than "items", or "person" rather than
|
|||||||
"people". Sometimes you can add "_list" (as in "item_list") to make it
|
"people". Sometimes you can add "_list" (as in "item_list") to make it
|
||||||
more clear that the name refers to a collection of items.
|
more clear that the name refers to a collection of items.
|
||||||
|
|
||||||
Some commonly occurring misspelling:
|
Some commonly occurring misspelling:
|
||||||
|
|
||||||
Correct Incorrect
|
Correct Incorrect
|
||||||
---------------------------
|
---------------------------
|
||||||
publicly publically
|
publicly publically
|
||||||
statically staticly
|
statically staticly
|
||||||
dynamically dynamicly
|
dynamically dynamicly
|
||||||
automatically automaticly
|
automatically automaticly
|
||||||
|
|
||||||
There is no hyphen after "ly" words. Write statically linked, not
|
There is no hyphen after "ly" words. Write statically linked, not
|
||||||
statically-linked.
|
statically-linked.
|
||||||
@ -102,8 +112,8 @@ statically-linked.
|
|||||||
To refer to ASCII codes, use ASCII n, not ASCII(n), unless you're
|
To refer to ASCII codes, use ASCII n, not ASCII(n), unless you're
|
||||||
referring to the ASCII() function, which case you use @code{ASCII()}.
|
referring to the ASCII() function, which case you use @code{ASCII()}.
|
||||||
|
|
||||||
ASCII 13 indicates ASCII character code 13
|
ASCII 13 indicates ASCII character code 13
|
||||||
@code{ASCII(13)} indicates a function call
|
@code{ASCII(13)} indicates a function call
|
||||||
|
|
||||||
backup is a noun or adjective (as in "a backup file"), back up is a verb
|
backup is a noun or adjective (as in "a backup file"), back up is a verb
|
||||||
(as in "to back up a database")
|
(as in "to back up a database")
|
||||||
@ -118,11 +128,11 @@ Write character set names in @code{}, e.g., @code{latin1}, @code{win1251}.
|
|||||||
|
|
||||||
To prevent problems with various output formats, there should be no link
|
To prevent problems with various output formats, there should be no link
|
||||||
titles in a @uref{}. So @uref{url} is allowed, @uref{url,blabla} is not.
|
titles in a @uref{}. So @uref{url} is allowed, @uref{url,blabla} is not.
|
||||||
Use this format:
|
Use this format:
|
||||||
@uref{url} (WWW)
|
@uref{url} (WWW)
|
||||||
Not this format:
|
Not this format:
|
||||||
@uref{url, WWW}
|
@uref{url, WWW}
|
||||||
Similarly for FTP sites.
|
Similarly for FTP sites.
|
||||||
|
|
||||||
URLs ending in a domain name or directory should have a "/" at the end.
|
URLs ending in a domain name or directory should have a "/" at the end.
|
||||||
(For example, the URLs for all mirror sites should be written that way.)
|
(For example, the URLs for all mirror sites should be written that way.)
|
||||||
@ -188,7 +198,9 @@ Write low-volume <something> (when used as an adjective).
|
|||||||
Write platform-dependent, not platform dependent.
|
Write platform-dependent, not platform dependent.
|
||||||
|
|
||||||
Write something like "mentioned previously" instead of "above", and "later in this section" instead of "below" when making such relative references in your text.
|
Write something like "mentioned previously" instead of "above", and "later in this section" instead of "below" when making such relative references in your text.
|
||||||
|
|
||||||
Write "... shown here", not "... shown below".
|
Write "... shown here", not "... shown below".
|
||||||
|
|
||||||
Write "following some", not "something [shown] below".
|
Write "following some", not "something [shown] below".
|
||||||
|
|
||||||
Write high-priority <something> (when used as an adjective), not high priority.
|
Write high-priority <something> (when used as an adjective), not high priority.
|
||||||
@ -263,3 +275,5 @@ It's "full-text", not "fulltext".
|
|||||||
|
|
||||||
Logical NOT/OR/AND are operators, not functions, so they take operands, not arguments.
|
Logical NOT/OR/AND are operators, not functions, so they take operands, not arguments.
|
||||||
|
|
||||||
|
It's NetWare, not Netware (as per Novell's trademark guidelines).
|
||||||
|
|
@ -11573,10 +11573,10 @@ Weile nichts von ihnen geh
|
|||||||
|
|
||||||
@node Novell Netware, , BeOS, Operating System Specific Notes
|
@node Novell Netware, , BeOS, Operating System Specific Notes
|
||||||
@c German node Novell Netware
|
@c German node Novell Netware
|
||||||
@subsection Anmerkungen zu Novell Netware
|
@subsection Anmerkungen zu Novell NetWare
|
||||||
|
|
||||||
Wir sind sehr daran interessiert, MySQL auf Netware ans Laufen zu bringen,
|
Wir sind sehr daran interessiert, MySQL auf NetWare ans Laufen zu bringen,
|
||||||
aber leider kennen wir niemanden, der sich mit Netware auskennt oder Zeit hat,
|
aber leider kennen wir niemanden, der sich mit NetWare auskennt oder Zeit hat,
|
||||||
eine Portierung durchzuführen.
|
eine Portierung durchzuführen.
|
||||||
|
|
||||||
Wir sind daran interessiert, jemanden für eine Portierung zu finden, und
|
Wir sind daran interessiert, jemanden für eine Portierung zu finden, und
|
||||||
@ -16998,6 +16998,7 @@ neu starten, um @code{mysqldump} benutzen zu k
|
|||||||
* Privilege changes::
|
* Privilege changes::
|
||||||
* Default privileges::
|
* Default privileges::
|
||||||
* Adding users::
|
* Adding users::
|
||||||
|
* User resources::
|
||||||
* Passwords::
|
* Passwords::
|
||||||
* Password security::
|
* Password security::
|
||||||
@end menu
|
@end menu
|
||||||
@ -17653,7 +17654,7 @@ m
|
|||||||
@code{mysql_install_db} laufen lassen.
|
@code{mysql_install_db} laufen lassen.
|
||||||
|
|
||||||
|
|
||||||
@node Adding users, Passwords, Default privileges, User Account Management
|
@node Adding users, User resources, Default privileges, User Account Management
|
||||||
@c German node Benutzer hinzufügen
|
@c German node Benutzer hinzufügen
|
||||||
@subsection Neue MySQL-Benutzer hinzufügen
|
@subsection Neue MySQL-Benutzer hinzufügen
|
||||||
|
|
||||||
@ -17862,8 +17863,71 @@ einzuf
|
|||||||
@uref{http://www.mysql.com/downloads/contrib/,Contrib-Verzeichnis der
|
@uref{http://www.mysql.com/downloads/contrib/,Contrib-Verzeichnis der
|
||||||
MySQL-Website}.
|
MySQL-Website}.
|
||||||
|
|
||||||
|
@node User resources, Passwords, Adding users, User Account Management
|
||||||
|
@c New section added by arjen 2002-05-17 to keep en/de in sync
|
||||||
|
@subsection Limiting user resources
|
||||||
|
|
||||||
@node Passwords, Password security, Adding users, User Account Management
|
@c FIX Original section text - to be translated.
|
||||||
|
@c FIX Also check manual.texi for other mentions of MAX_..._PER_HOUR
|
||||||
|
|
||||||
|
Starting from MySQL 4.0.2 one can limit certain resources per user.
|
||||||
|
|
||||||
|
So far, the only available method of limiting user usage of MySQL
|
||||||
|
server resources has been setting the @code{max_user_connections}
|
||||||
|
startup variable to a non-zero value. But this method is strictly
|
||||||
|
global and does not allow for management of individual users, which
|
||||||
|
could be of paricular interest to Internet Service Providers.
|
||||||
|
|
||||||
|
Therefore, management of three resources is introduced on the
|
||||||
|
individual user level:
|
||||||
|
|
||||||
|
@itemize @bullet
|
||||||
|
@item Number of all queries per hour:
|
||||||
|
All commands that could be run by a user.
|
||||||
|
@item Number of all updates per hour:
|
||||||
|
Any command that changes any table or database.
|
||||||
|
@item Number of connections made per hour:
|
||||||
|
New connections opened per hour.
|
||||||
|
@end itemize
|
||||||
|
|
||||||
|
A user in the aforementioned context is a single entry in the
|
||||||
|
@code{user} table, which is uniquely identified by its @code{user}
|
||||||
|
and @code{host} columns.
|
||||||
|
|
||||||
|
All users are by default not limited in using the above resources,
|
||||||
|
unless the limits are granted to them. These limits can be granted
|
||||||
|
@strong{only} via global @code{GRANT (*.*)}, using this syntax:
|
||||||
|
|
||||||
|
@example
|
||||||
|
GRANT ... WITH MAX_QUERIES_PER_HOUR = N1
|
||||||
|
MAX_UPDATES_PER_HOUR = N2
|
||||||
|
MAX_CONNECTIONS_PER_HOUR = N3;
|
||||||
|
@end example
|
||||||
|
|
||||||
|
One can specify any combination of the above resources.
|
||||||
|
N1, N2 and N3 are integers and stands for count / hour.
|
||||||
|
|
||||||
|
If user reaches any of the above limits withing one hour, his
|
||||||
|
connection will be terminated or refused and the appropriate error
|
||||||
|
message shall be issued.
|
||||||
|
|
||||||
|
Current usage values for a particular user can be flushed (set to zero)
|
||||||
|
by issuing a @code{GRANT} statement with any of the above clauses,
|
||||||
|
including a @code{GRANT} statement with the current values.
|
||||||
|
|
||||||
|
Also, current values for all users will be flushed if privileges are
|
||||||
|
reloaded (in the server or using @code{mysqladmin reload})
|
||||||
|
or if the @code{FLUSH USER_RESOURCES} command is issued.
|
||||||
|
|
||||||
|
The feature is enabled as soon as a single user is granted with any
|
||||||
|
of the limiting @code{GRANT} clauses.
|
||||||
|
|
||||||
|
As a prerequisite for enabling this feature, the @code{user} table in
|
||||||
|
the @code{mysql} database must contain the additional columns, as
|
||||||
|
defined in the table creation scripts @code{mysql_install_db} and
|
||||||
|
@code{mysql_install_db.sh} in @file{scripts} subdirectory.
|
||||||
|
|
||||||
|
@node Passwords, Password security, User resources, User Account Management
|
||||||
@c German node Passwörter
|
@c German node Passwörter
|
||||||
@subsection Passwörter einrichten
|
@subsection Passwörter einrichten
|
||||||
|
|
||||||
|
145
Docs/manual.texi
145
Docs/manual.texi
@ -8571,7 +8571,7 @@ information.
|
|||||||
* Other Unix Notes:: Other Unix Notes
|
* Other Unix Notes:: Other Unix Notes
|
||||||
* OS/2:: OS/2 Notes
|
* OS/2:: OS/2 Notes
|
||||||
* BeOS:: BeOS Notes
|
* BeOS:: BeOS Notes
|
||||||
* Novell Netware:: Novell Netware Notes
|
* Novell Netware:: Novell NetWare Notes
|
||||||
@end menu
|
@end menu
|
||||||
|
|
||||||
|
|
||||||
@ -11164,10 +11164,10 @@ in a while.
|
|||||||
|
|
||||||
|
|
||||||
@node Novell Netware, , BeOS, Operating System Specific Notes
|
@node Novell Netware, , BeOS, Operating System Specific Notes
|
||||||
@subsection Novell Netware Notes
|
@subsection Novell NetWare Notes
|
||||||
|
|
||||||
We are really interested in getting MySQL to work on Netware, but
|
We are really interested in getting MySQL to work on NetWare, but
|
||||||
unfortunately we don't have any person who knows Netware or has time to do
|
unfortunately we don't have any person who knows NetWare or has time to do
|
||||||
a port.
|
a port.
|
||||||
|
|
||||||
We are interested in finding someone to do a port, and we will help them
|
We are interested in finding someone to do a port, and we will help them
|
||||||
@ -16423,8 +16423,9 @@ GRANT priv_type [(column_list)] [, priv_type [(column_list)] ...]
|
|||||||
[CIPHER cipher [AND]]
|
[CIPHER cipher [AND]]
|
||||||
[ISSUER issuer [AND]]
|
[ISSUER issuer [AND]]
|
||||||
[SUBJECT subject]]
|
[SUBJECT subject]]
|
||||||
[WITH [GRANT OPTION | MAX_QUERIES_PER_HOUR=# | MAX_UPDATES_PER_HOUR=#|
|
[WITH [GRANT OPTION | MAX_QUERIES_PER_HOUR=# |
|
||||||
MAX_CONNECTIONS_PER_HOUR=#]]
|
MAX_UPDATES_PER_HOUR=# |
|
||||||
|
MAX_CONNECTIONS_PER_HOUR=#]]
|
||||||
|
|
||||||
REVOKE priv_type [(column_list)] [, priv_type [(column_list)] ...]
|
REVOKE priv_type [(column_list)] [, priv_type [(column_list)] ...]
|
||||||
ON @{tbl_name | * | *.* | db_name.*@}
|
ON @{tbl_name | * | *.* | db_name.*@}
|
||||||
@ -16588,7 +16589,7 @@ You should be careful to whom you give the @strong{grant} privilege, as two
|
|||||||
users with different privileges may be able to join privileges!
|
users with different privileges may be able to join privileges!
|
||||||
|
|
||||||
@code{MAX_QUERIES_PER_HOUR=#}, @code{MAX_UPDATES_PER_HOUR=#} and
|
@code{MAX_QUERIES_PER_HOUR=#}, @code{MAX_UPDATES_PER_HOUR=#} and
|
||||||
@code{MAX_CONNECTIONS_PER_HOUR=#} limits the limits the number of
|
@code{MAX_CONNECTIONS_PER_HOUR=#} limit the number of
|
||||||
queries/updates and logins the user can do during one hour.
|
queries/updates and logins the user can do during one hour.
|
||||||
If @code{#} is 0 (default), then this means that there is no limitations
|
If @code{#} is 0 (default), then this means that there is no limitations
|
||||||
for the user. @xref{User resources}.
|
for the user. @xref{User resources}.
|
||||||
@ -17074,71 +17075,65 @@ You can also use @code{xmysqladmin}, @code{mysql_webadmin}, and even
|
|||||||
You can find these utilities in the Contrib directory of the
|
You can find these utilities in the Contrib directory of the
|
||||||
MySQL web site (@uref{http://www.mysql.com/Downloads/Contrib/}).
|
MySQL web site (@uref{http://www.mysql.com/Downloads/Contrib/}).
|
||||||
|
|
||||||
|
|
||||||
@node User resources, Passwords, Adding users, User Account Management
|
@node User resources, Passwords, Adding users, User Account Management
|
||||||
@subsection Limiting user resources
|
@subsection Limiting user resources
|
||||||
|
|
||||||
Starting from MySQL 4.0.2 one can limit certain resources per user.
|
Starting from MySQL 4.0.2 one can limit certain resources per user.
|
||||||
|
|
||||||
Before the only available method of limiting user usage of MySQL server
|
So far, the only available method of limiting usage of MySQL
|
||||||
resources has been setting @code{max_user_connections} startup variable
|
server resources has been setting the @code{max_user_connections}
|
||||||
to some non-zero value at MySQL startup. But this method is strictly a
|
startup variable to a non-zero value. But this method is strictly
|
||||||
global one and does not allow management of individual users, which
|
global and does not allow for management of individual users, which
|
||||||
could be of paricular interest to Interent Service Providers.
|
could be of particular interest to Internet Service Providers.
|
||||||
|
|
||||||
Therefore, management of three resources is introduced on the
|
Therefore, management of three resources is introduced on the
|
||||||
individual user level :
|
individual user level:
|
||||||
|
|
||||||
@itemize @bullet
|
@itemize @bullet
|
||||||
@item
|
@item Number of all queries per hour:
|
||||||
Number of all queries per hour
|
All commands that could be run by a user.
|
||||||
@item
|
@item Number of all updates per hour:
|
||||||
Number of all updates per hour. As updates is considered any command that
|
Any command that changes any table or database.
|
||||||
changes any table or database.
|
@item Number of connections made per hour:
|
||||||
@item
|
New connections opened per hour.
|
||||||
Number of connections made per hour
|
|
||||||
@end itemize
|
@end itemize
|
||||||
|
|
||||||
A user in the above context is single entry in user table, which is
|
A user in the aforementioned context is a single entry in the
|
||||||
uniquely identified by user and host columns.
|
@code{user} table, which is uniquely identified by its @code{user}
|
||||||
|
and @code{host} columns.
|
||||||
|
|
||||||
All users are by default not limited in using the above resources,
|
All users are by default not limited in using the above resources,
|
||||||
unless the limits are GRANTed to them. These limits can be granted
|
unless the limits are granted to them. These limits can be granted
|
||||||
ONLY by global GRANT (*.*) and with a following syntax :
|
@strong{only} via global @code{GRANT (*.*)}, using this syntax:
|
||||||
|
|
||||||
@example
|
@example
|
||||||
GRANT ... WITH MAX_QUERIES_PER_HOUR = N1 MAX_UPDATES_PER_HOUR = N2
|
GRANT ... WITH MAX_QUERIES_PER_HOUR = N1
|
||||||
MAX_CONNECTIONS_PER_HOUR = N3;
|
MAX_UPDATES_PER_HOUR = N2
|
||||||
|
MAX_CONNECTIONS_PER_HOUR = N3;
|
||||||
@end example
|
@end example
|
||||||
|
|
||||||
One can specify any combination of the above resources.
|
One can specify any combination of the above resources.
|
||||||
N1, N2 and N3 are integers and stands for count / hour.
|
N1, N2 and N3 are integers and stands for count / hour.
|
||||||
|
|
||||||
If user reaches any of the above limits withing one hour, his connection
|
If user reaches any of the above limits withing one hour, his
|
||||||
will be broken or refused and the appropriate error message shall be
|
connection will be terminated or refused and the appropriate error
|
||||||
issued.
|
message shall be issued.
|
||||||
|
|
||||||
Current values of particular user resources can be flushed (set to
|
Current usage values for a particular user can be flushed (set to zero)
|
||||||
zero) by issuing a grant statement with any of the above limiting
|
by issuing a @code{GRANT} statement with any of the above clauses,
|
||||||
clauses, including a GRANT statement with current value(s) of tha
|
including a @code{GRANT} statement with the current values.
|
||||||
resource(s).
|
|
||||||
|
|
||||||
Also, current values for all users will be flushed if privileges are
|
Also, current values for all users will be flushed if privileges are
|
||||||
reloaded or if the folloing new flush command is issuedd :
|
reloaded (in the server or using @code{mysqladmin reload})
|
||||||
|
or if the @code{FLUSH USER_RESOURCES} command is issued.
|
||||||
|
|
||||||
@example
|
The feature is enabled as soon as a single user is granted with any
|
||||||
FLUSH USER_RESOURCES
|
of the limiting @code{GRANT} clauses.
|
||||||
@end example
|
|
||||||
|
|
||||||
Also, current values for all users will be flushed with mysqladmin
|
As a prerequisite for enabling this feature, the @code{user} table in
|
||||||
reload command.
|
the @code{mysql} database must contain the additional columns, as
|
||||||
|
defined in the table creation scripts @code{mysql_install_db} and
|
||||||
This new feature is enabled as soon as single user is @code{GRANT}ed with
|
@code{mysql_install_db.sh} in @file{scripts} subdirectory.
|
||||||
some of the limiting @code{GRANT} clauses.
|
|
||||||
|
|
||||||
As a prerequisite for enabling this features, user table in mysql
|
|
||||||
database must have the additional columns, just as defined in table
|
|
||||||
creation scripts @code{mysql_install_db} in the @code{scripts} directory.
|
|
||||||
|
|
||||||
@node Passwords, Password security, User resources, User Account Management
|
@node Passwords, Password security, User resources, User Account Management
|
||||||
@subsection Setting Up Passwords
|
@subsection Setting Up Passwords
|
||||||
@ -19105,7 +19100,7 @@ memory. This command will not remove any queries from the cache, unlike
|
|||||||
|
|
||||||
@item @code{STATUS} @tab Resets most status variables to zero. This is something one should only use when debugging a query.
|
@item @code{STATUS} @tab Resets most status variables to zero. This is something one should only use when debugging a query.
|
||||||
|
|
||||||
@item @code{USER_RESOURCES} @tab Resets all user resources to zero. This will enalbe blocked users to login again. @xref{User resources}.
|
@item @code{USER_RESOURCES} @tab Resets all user resources to zero. This will enable blocked users to login again. @xref{User resources}.
|
||||||
@end multitable
|
@end multitable
|
||||||
|
|
||||||
You can also access each of the commands shown above with the @code{mysqladmin}
|
You can also access each of the commands shown above with the @code{mysqladmin}
|
||||||
@ -49493,62 +49488,14 @@ Added new columns @code{Null} and @code{Index_type} to @code{SHOW INDEX}
|
|||||||
output.
|
output.
|
||||||
@item
|
@item
|
||||||
Added @code{--no-beep} and @code{--prompt} options to @code{mysql} command-line client.
|
Added @code{--no-beep} and @code{--prompt} options to @code{mysql} command-line client.
|
||||||
@c FIX arjen 2002-05-16 below also needs to be added elsewhere in the manual.
|
@item
|
||||||
@item New feature: management of user resources
|
New feature: management of user resources.
|
||||||
|
|
||||||
So far, the only available method of limiting user usage of MySQL
|
|
||||||
server resources has been setting the @code{max_user_connections}
|
|
||||||
startup variable to a non-zero value. But this method is strictly
|
|
||||||
global and does not allow for management of individual users, which
|
|
||||||
could be of paricular interest to Internent Service Providers.
|
|
||||||
|
|
||||||
Therefore, management of three resources is introduced on the
|
|
||||||
individual user level :
|
|
||||||
|
|
||||||
@itemize @bullet
|
|
||||||
@item number of all queries per hour:
|
|
||||||
any command that cahnges any table or database.
|
|
||||||
@item number of all updates per hour:
|
|
||||||
all commands that could be run by a user.
|
|
||||||
@item number of connections made per hour:
|
|
||||||
a user is a single entry in the @code{user} table, which is uniquely
|
|
||||||
identified by its @code{user} and @code{host} columns.
|
|
||||||
@end itemize
|
|
||||||
|
|
||||||
All users are by default not limited in using the above resources,
|
|
||||||
unless the limits are granted to them. These limits can be granted
|
|
||||||
@strong{only} via global @code{GRANT (*.*)}, using this syntax:
|
|
||||||
|
|
||||||
@example
|
@example
|
||||||
GRANT ... WITH MAX_QUERIES_PER_HOUR = N1
|
GRANT ... WITH MAX_QUERIES_PER_HOUR = N1
|
||||||
MAX_UPDATES_PER_HOUR = N2
|
MAX_UPDATES_PER_HOUR = N2
|
||||||
MAX_CONNECTIONS_PER_HOUR = N3;
|
MAX_CONNECTIONS_PER_HOUR = N3;
|
||||||
@end example
|
@end example
|
||||||
|
@xref{User resources}.
|
||||||
It is not required that all three resources are specified.
|
|
||||||
N1, N2, and N3 are integers and limit the number of times that a user
|
|
||||||
can perform the corresponding type of command or number of logins,
|
|
||||||
per hour.
|
|
||||||
|
|
||||||
If user reaches any of the above limits withing one hour, his
|
|
||||||
connection will be terminated or refused and the appropriate error
|
|
||||||
message shall be issued.
|
|
||||||
|
|
||||||
Current usage values for a particular user can be flushed (set to zero)
|
|
||||||
by issuing a grant statement with any of the above clauses, including
|
|
||||||
a @code{GRANT} statement with current values.
|
|
||||||
|
|
||||||
Also, current values for all users will be flushed if privileges are
|
|
||||||
reloaded (in the server or using @code{mysqladmin reload})
|
|
||||||
or if the @code{FLUSH USER_RESOURCES} command is issued.
|
|
||||||
|
|
||||||
The feature is enabled as soon as single user is granted with some
|
|
||||||
some of the limiting @code{GRANT} clauses.
|
|
||||||
|
|
||||||
As a prerequisite for enabling this feature, the @code{user} table in
|
|
||||||
the @code{mysql} database must contain the additional columns, as
|
|
||||||
defined in the table creation scripts @code{mysql_install_db} and
|
|
||||||
@code{mysql_install_db.sh} in @file{scripts} subdirectory.
|
|
||||||
@end itemize
|
@end itemize
|
||||||
|
|
||||||
@node News-4.0.1, News-4.0.0, News-4.0.2, News-4.0.x
|
@node News-4.0.1, News-4.0.0, News-4.0.2, News-4.0.x
|
||||||
|
@ -2224,7 +2224,8 @@ mysql_execute_command(void)
|
|||||||
}
|
}
|
||||||
if (check_db_used(thd,tables) || end_active_trans(thd))
|
if (check_db_used(thd,tables) || end_active_trans(thd))
|
||||||
goto error;
|
goto error;
|
||||||
if (grant_option && check_grant(thd,SELECT_ACL | INSERT_ACL | UPDATE_ACL | DELETE_ACL,tables))
|
if (check_table_access(thd, SELECT_ACL | INSERT_ACL | UPDATE_ACL | DELETE_ACL , tables)
|
||||||
|
|| (grant_option && check_grant(thd,SELECT_ACL | INSERT_ACL | UPDATE_ACL | DELETE_ACL,tables)))
|
||||||
goto error;
|
goto error;
|
||||||
thd->in_lock_tables=1;
|
thd->in_lock_tables=1;
|
||||||
thd->options|= OPTION_TABLE_LOCK;
|
thd->options|= OPTION_TABLE_LOCK;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user