SET
Syntax
1170
statement. If you upgrade the shared library first and then use
DROP
FUNCTION
, the server may crash.
13.7.3.2.
DROP FUNCTION
Syntax
DROP FUNCTION
function_name
This statement drops the user-defined function (UDF) named
function_name
.
To drop a function, you must have the
DELETE
[577]
privilege for the
mysql
database. This is because
DROP FUNCTION
removes a row from the
mysql.func
system table that records the function's name,
type, and shared library name.
Note
To upgrade the shared library associated with a UDF, issue a
DROP FUNCTION
statement, upgrade the shared library, and then issue a
CREATE FUNCTION
statement. If you upgrade the shared library first and then use
DROP
FUNCTION
, the server may crash.
DROP FUNCTION
is also used to drop stored functions (see
Section 13.1.16, “
DROP PROCEDURE
and
DROP FUNCTION
Syntax”
).
13.7.4.
SET
Syntax
SET
variable_assignment
[,
variable_assignment
] ...
variable_assignment
:
user_var_name
=
expr
| [GLOBAL | SESSION]
system_var_name
=
expr
| [@@global. | @@session. | @@]
system_var_name
=
expr
The
SET
statement assigns values to different types of variables that affect the operation of the server
or your client. Older versions of MySQL employed
SET OPTION
, but this syntax is deprecated in favor
of
SET
without
OPTION
.
This section describes use of
SET
for assigning values to variables. The
SET
statement can be used to
assign values to these types of variables:
• System variables. See
Section 5.1.4, “Server System Variables”
. System variables also can be set at
server startup, as described in
Section 5.1.5, “Using System Variables”
.
User-defined variables. See
Section 9.4, “User-Defined Variables”
.
• Stored procedure and function parameters, and stored program local variables. See
Section 13.6.4,
“Variables in Stored Programs”
.
Some variants of
SET
syntax are used in other contexts:
•
SET CHARACTER SET
and
SET NAMES
assign values to character set and collation variables
associated with the connection to the server.
SET ONE_SHOT
is used for replication. These variants
are described later in this section.
•
SET PASSWORD
assigns account passwords. See
Section 13.7.1.6, “
SET PASSWORD
Syntax”
.
•
SET TRANSACTION ISOLATION LEVEL
sets the isolation level for transaction processing. See
Section 13.3.6, “
SET TRANSACTION
Syntax”
.
The following discussion shows the different
SET
syntaxes that you can use to set variables. The
examples use the
=
[882]
assignment operator, but you can also use the
:=
[881]
assignment operator
for this purpose.
A user variable is written as
@var_name
and can be set as follows:
Summary of Contents for 5.0
Page 1: ...MySQL 5 0 Reference Manual ...
Page 18: ...xviii ...
Page 60: ...40 ...
Page 396: ...376 ...
Page 578: ...558 ...
Page 636: ...616 ...
Page 844: ...824 ...
Page 1234: ...1214 ...
Page 1427: ...MySQL Proxy Scripting 1407 ...
Page 1734: ...1714 ...
Page 1752: ...1732 ...
Page 1783: ...Configuring Connector ODBC 1763 ...
Page 1793: ...Connector ODBC Examples 1773 ...
Page 1839: ...Connector Net Installation 1819 2 You must choose the type of installation to perform ...
Page 2850: ...2830 ...
Page 2854: ...2834 ...
Page 2928: ...2908 ...
Page 3000: ...2980 ...
Page 3122: ...3102 ...
Page 3126: ...3106 ...
Page 3174: ...3154 ...
Page 3232: ...3212 ...