Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
M
mariadb
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
mariadb
Commits
ec07cbdf
Commit
ec07cbdf
authored
Apr 26, 2002
by
paul@teton.kitebird.com
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
manual.texi More SQL keyword capping + misc example format fixups.
parent
1d56eb7a
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
39 additions
and
36 deletions
+39
-36
Docs/manual.texi
Docs/manual.texi
+39
-36
No files found.
Docs/manual.texi
View file @
ec07cbdf
...
@@ -3171,7 +3171,7 @@ found and @code{row_flag} wasn't already 1 in the original row.
...
@@ -3171,7 +3171,7 @@ found and @code{row_flag} wasn't already 1 in the original row.
You can think of it as MySQL Server changed the above query to:
You can think of it as MySQL Server changed the above query to:
@example
@example
UPDATE tbl_name SET row_flag=1 WHERE id=ID
and
row_flag <> 1;
UPDATE tbl_name SET row_flag=1 WHERE id=ID
AND
row_flag <> 1;
@end example
@end example
@end itemize
@end itemize
...
@@ -3213,7 +3213,7 @@ you want to get results from multiple tables from a @code{SELECT}
...
@@ -3213,7 +3213,7 @@ you want to get results from multiple tables from a @code{SELECT}
statement, you do this by joining tables:
statement, you do this by joining tables:
@example
@example
SELECT *
from table1,table2 where
table1.id = table2.id;
SELECT *
FROM table1,table2 WHERE
table1.id = table2.id;
@end example
@end example
@xref{JOIN, , @code{JOIN}}. @xref{example-Foreign keys}.
@xref{JOIN, , @code{JOIN}}. @xref{example-Foreign keys}.
...
@@ -15023,7 +15023,7 @@ the @code{mysqld} daemon! To make this a bit safer, all files generated with
...
@@ -15023,7 +15023,7 @@ the @code{mysqld} daemon! To make this a bit safer, all files generated with
@code{SELECT ... INTO OUTFILE} are readable to everyone, and you cannot
@code{SELECT ... INTO OUTFILE} are readable to everyone, and you cannot
overwrite existing files.
overwrite existing files.
@tindex
/etc/passwd
@tindex
@file{/etc/passwd}
The @strong{file} privilege may also be used to read any file accessible
The @strong{file} privilege may also be used to read any file accessible
to the Unix user that the server runs as. This could be abused, for example,
to the Unix user that the server runs as. This could be abused, for example,
by using @code{LOAD DATA} to load @file{/etc/passwd} into a table, which
by using @code{LOAD DATA} to load @file{/etc/passwd} into a table, which
...
@@ -15065,7 +15065,7 @@ new users with those privileges that the user has right to grant, you should
...
@@ -15065,7 +15065,7 @@ new users with those privileges that the user has right to grant, you should
give the user the following privilege:
give the user the following privilege:
@example
@example
GRANT INSERT(user) on mysql.user to
'user'@@'hostname';
mysql> GRANT INSERT(user) ON mysql.user TO
'user'@@'hostname';
@end example
@end example
This will ensure that the user can't change any privilege columns directly,
This will ensure that the user can't change any privilege columns directly,
...
@@ -15655,7 +15655,8 @@ IP numbers, you can specify a netmask indicating how many address bits to
...
@@ -15655,7 +15655,8 @@ IP numbers, you can specify a netmask indicating how many address bits to
use for the network number. For example:
use for the network number. For example:
@example
@example
GRANT ALL PRIVILEGES on db.* to david@@'192.58.197.0/255.255.255.0';
mysql> GRANT ALL PRIVILEGES ON db.*
-> TO david@@'192.58.197.0/255.255.255.0';
@end example
@end example
This will allow everyone to connect from an IP where the following is true:
This will allow everyone to connect from an IP where the following is true:
...
@@ -16418,7 +16419,7 @@ To revoke the @strong{grant} privilege from a user, use a @code{priv_type}
...
@@ -16418,7 +16419,7 @@ To revoke the @strong{grant} privilege from a user, use a @code{priv_type}
value of @code{GRANT OPTION}:
value of @code{GRANT OPTION}:
@example
@example
REVOKE GRANT OPTION ON ... FROM ...;
mysql>
REVOKE GRANT OPTION ON ... FROM ...;
@end example
@end example
The only @code{priv_type} values you can specify for a table are @code{SELECT},
The only @code{priv_type} values you can specify for a table are @code{SELECT},
...
@@ -17278,8 +17279,8 @@ encrypted connections. Note that this option can be omitted
...
@@ -17278,8 +17279,8 @@ encrypted connections. Note that this option can be omitted
if there are any ACL records which allow non-SSL connections.
if there are any ACL records which allow non-SSL connections.
@example
@example
GRANT ALL PRIVILEGES ON test.* TO root@@localhost
mysql>
GRANT ALL PRIVILEGES ON test.* TO root@@localhost
IDENTIFIED BY "goodsecret" REQUIRE SSL
-> IDENTIFIED BY "goodsecret" REQUIRE SSL;
@end example
@end example
@item
@item
...
@@ -17289,8 +17290,8 @@ The only restriction is that it should be possible to verify its
...
@@ -17289,8 +17290,8 @@ The only restriction is that it should be possible to verify its
signature with one of the CA certificates.
signature with one of the CA certificates.
@example
@example
GRANT ALL PRIVILEGES ON test.* TO root@@localhost
mysql>
GRANT ALL PRIVILEGES ON test.* TO root@@localhost
IDENTIFIED BY "goodsecret" REQUIRE X509
-> IDENTIFIED BY "goodsecret" REQUIRE X509;
@end example
@end example
@item
@item
...
@@ -17300,10 +17301,10 @@ Using X509 certificates always implies encryption, so the option "SSL"
...
@@ -17300,10 +17301,10 @@ Using X509 certificates always implies encryption, so the option "SSL"
is not neccessary anymore.
is not neccessary anymore.
@example
@example
GRANT ALL PRIVILEGES ON test.* TO root@@localhost
mysql>
GRANT ALL PRIVILEGES ON test.* TO root@@localhost
IDENTIFIED BY "goodsecret"
->
IDENTIFIED BY "goodsecret"
REQUIRE ISSUER "C=FI, ST=Some-State, L=Helsinki,
->
REQUIRE ISSUER "C=FI, ST=Some-State, L=Helsinki,
O=MySQL Finland AB, CN=Tonu Samuel/Email=tonu@@mysql.com"
"> O=MySQL Finland AB, CN=Tonu Samuel/Email=tonu@@mysql.com";
@end example
@end example
@item
@item
...
@@ -17313,10 +17314,11 @@ certificate but having different "subject" then the connection is
...
@@ -17313,10 +17314,11 @@ certificate but having different "subject" then the connection is
still not allowed.
still not allowed.
@example
@example
GRANT ALL PRIVILEGES ON test.* TO root@@localhost
mysql> GRANT ALL PRIVILEGES ON test.* TO root@@localhost
IDENTIFIED BY "goodsecret"
-> IDENTIFIED BY "goodsecret"
REQUIRE SUBJECT "C=EE, ST=Some-State, L=Tallinn,
-> REQUIRE SUBJECT "C=EE, ST=Some-State, L=Tallinn,
O=MySQL demo client certificate, CN=Tonu Samuel/Email=tonu@@mysql.com"
"> O=MySQL demo client certificate,
"> CN=Tonu Samuel/Email=tonu@@mysql.com";
@end example
@end example
@item
@item
...
@@ -17326,24 +17328,25 @@ with short encryption keys are used. Using this option, we can ask for
...
@@ -17326,24 +17328,25 @@ with short encryption keys are used. Using this option, we can ask for
some exact cipher method to allow a connection.
some exact cipher method to allow a connection.
@example
@example
GRANT ALL PRIVILEGES ON test.* TO root@@localhost
mysql>
GRANT ALL PRIVILEGES ON test.* TO root@@localhost
IDENTIFIED BY "goodsecret"
->
IDENTIFIED BY "goodsecret"
REQUIRE CIPHER "EDH-RSA-DES-CBC3-SHA"
-> REQUIRE CIPHER "EDH-RSA-DES-CBC3-SHA";
@end example
@end example
Also it is allowed to combine these options with each other like this:
Also it is allowed to combine these options with each other like this:
@example
@example
GRANT ALL PRIVILEGES ON test.* TO root@@localhost
mysql> GRANT ALL PRIVILEGES ON test.* TO root@@localhost
IDENTIFIED BY "goodsecret"
-> IDENTIFIED BY "goodsecret"
REQUIRE SUBJECT "C=EE, ST=Some-State, L=Tallinn,
-> REQUIRE SUBJECT "C=EE, ST=Some-State, L=Tallinn,
O=MySQL demo client certificate, CN=Tonu Samuel/Email=tonu@@mysql.com"
"> O=MySQL demo client certificate,
AND ISSUER "C=FI, ST=Some-State, L=Helsinki,
"> CN=Tonu Samuel/Email=tonu@@mysql.com"
O=MySQL Finland AB, CN=Tonu Samuel/Email=tonu@@mysql.com"
-> AND ISSUER "C=FI, ST=Some-State, L=Helsinki,
AND CIPHER "EDH-RSA-DES-CBC3-SHA"
"> O=MySQL Finland AB, CN=Tonu Samuel/Email=tonu@@mysql.com"
-> AND CIPHER "EDH-RSA-DES-CBC3-SHA";
@end example
@end example
But it is not allowed to use any o
f options
twice. Only different
But it is not allowed to use any o
ption
twice. Only different
options can be mixed.
options can be mixed.
@end itemize
@end itemize
...
@@ -23309,7 +23312,7 @@ For example, to create a user named @code{repl} which can access your
...
@@ -23309,7 +23312,7 @@ For example, to create a user named @code{repl} which can access your
master from any host, you might use this command:
master from any host, you might use this command:
@example
@example
GRANT FILE ON *.* TO repl@@"%" IDENTIFIED BY '<password>';
mysql>
GRANT FILE ON *.* TO repl@@"%" IDENTIFIED BY '<password>';
@end example
@end example
@item
@item
...
@@ -28112,7 +28115,7 @@ However, in this case the assignment operator is @code{:=} rather than
...
@@ -28112,7 +28115,7 @@ However, in this case the assignment operator is @code{:=} rather than
statements:
statements:
@example
@example
select
@@t1:=(@@t2:=1)+@@t3:=4,@@t1,@@t2,@@t3;
mysql> SELECT
@@t1:=(@@t2:=1)+@@t3:=4,@@t1,@@t2,@@t3;
+----------------------+------+------+------+
+----------------------+------+------+------+
| @@t1:=(@@t2:=1)+@@t3:=4 | @@t1 | @@t2 | @@t3 |
| @@t1:=(@@t2:=1)+@@t3:=4 | @@t1 | @@t2 | @@t3 |
+----------------------+------+------+------+
+----------------------+------+------+------+
...
@@ -28132,7 +28135,7 @@ that involves variables that are set in the @code{SELECT} part. For example,
...
@@ -28132,7 +28135,7 @@ that involves variables that are set in the @code{SELECT} part. For example,
the following statement will NOT work as expected:
the following statement will NOT work as expected:
@example
@example
SELECT (@@aa:=id) AS a, (@@aa+3) AS b FROM table_name HAVING b=5;
mysql>
SELECT (@@aa:=id) AS a, (@@aa+3) AS b FROM table_name HAVING b=5;
@end example
@end example
The reason is that @code{@@aa} will not contain the value of the current
The reason is that @code{@@aa} will not contain the value of the current
...
@@ -38597,7 +38600,7 @@ This is called multi-versioned concurrency control.
...
@@ -38597,7 +38600,7 @@ This is called multi-versioned concurrency control.
@example
@example
User A User B
User A User B
set autocommit=0; set autocommit
=0;
SET AUTOCOMMIT=0; SET AUTOCOMMIT
=0;
time
time
| SELECT * FROM t;
| SELECT * FROM t;
| empty set
| empty set
...
@@ -38678,18 +38681,18 @@ to @code{O_DSYNC}, though O_DSYNC seems to be slower on most systems.
...
@@ -38678,18 +38681,18 @@ to @code{O_DSYNC}, though O_DSYNC seems to be slower on most systems.
Put before your plain SQL import file line
Put before your plain SQL import file line
@example
@example
set autocommit
=0;
SET AUTOCOMMIT
=0;
@end example
@end example
and after it
and after it
@example
@example
commit
;
COMMIT
;
@end example
@end example
If you use the @file{mysqldump} option @code{--opt}, you will get dump
If you use the @file{mysqldump} option @code{--opt}, you will get dump
files which are fast to import also to an InnoDB table, even without wrapping
files which are fast to import also to an InnoDB table, even without wrapping
them to the above @code{
set autocommit=0; ... commit
;} wrappers.
them to the above @code{
SET AUTOCOMMIT=0; ... COMMIT
;} wrappers.
@strong{8.}
@strong{8.}
Beware of big rollbacks of mass inserts: InnoDB uses the insert buffer
Beware of big rollbacks of mass inserts: InnoDB uses the insert buffer
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment