Miscellaneous Functions
967
of log events the slave had to wait for to advance to the specified position. The function returns
NULL
if the slave SQL thread is not started, the slave's master information is not initialized, the arguments
are incorrect, or an error occurs. It returns
-1
if the timeout has been exceeded. If the slave SQL
thread stops while
MASTER_POS_WAIT()
[966]
is waiting, the function returns
NULL
. If the slave is
past the specified position, the function returns immediately.
If a
timeout
value is specified,
MASTER_POS_WAIT()
[966]
stops waiting when
timeout
seconds have elapsed.
timeout
must be greater than 0; a zero or negative
timeout
means no
timeout.
•
NAME_CONST(name,value)
[967]
Returns the given value. When used to produce a result set column,
NAME_CONST()
[967]
causes
the column to have the given name. The arguments should be constants.
mysql>
SELECT NAME_CONST('myname', 14);
+--------+
| myname |
+--------+
| 14 |
+--------+
This function was added in MySQL 5.0.12. It is for internal use only. The server uses it when writing
statements from stored programs that contain references to local program variables, as described
in
Section 18.6, “Binary Logging of Stored Programs”
, You might see this function in the output from
mysqlbinlog
.
•
RELEASE_LOCK(str)
[967]
Releases the lock named by the string
str
that was obtained with
GET_LOCK()
[965]
. Returns
1
if the lock was released,
0
if the lock was not established by this thread (in which case the lock is not
released), and
NULL
if the named lock did not exist. The lock does not exist if it was never obtained
by a call to
GET_LOCK()
[965]
or if it has previously been released.
The
DO
statement is convenient to use with
RELEASE_LOCK()
[967]
. See
Section 13.2.3, “
DO
Syntax”
.
•
SLEEP(duration)
[967]
Sleeps (pauses) for the number of seconds given by the
duration
argument, then returns 0. If
SLEEP()
[967]
is interrupted, it returns 1. The duration may have a fractional part. This function
was added in MySQL 5.0.12.
•
UUID()
[967]
Returns a Universal Unique Identifier (UUID) generated according to “DCE 1.1: Remote Procedure
Call” (Appendix A) CAE (Common Applications Environment) Specifications published by The Open
Group in October 1997 (Document Number C706,
http://www.opengroup.org/public/pubs/catalog/
c706.htm
).
A UUID is designed as a number that is globally unique in space and time. Two calls to
UUID()
[967]
are expected to generate two different values, even if these calls are performed on
two separate computers that are not connected to each other.
A UUID is a 128-bit number represented by a
utf8
string of five hexadecimal numbers in
aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee
format:
• The first three numbers are generated from a timestamp.
• The fourth number preserves temporal uniqueness in case the timestamp value loses monotonicity
(for example, due to daylight saving time).
Содержание 5.0
Страница 1: ...MySQL 5 0 Reference Manual ...
Страница 18: ...xviii ...
Страница 60: ...40 ...
Страница 396: ...376 ...
Страница 578: ...558 ...
Страница 636: ...616 ...
Страница 844: ...824 ...
Страница 1234: ...1214 ...
Страница 1426: ...MySQL Proxy Scripting 1406 The following diagram shows an overview of the classes exposed by MySQL Proxy ...
Страница 1427: ...MySQL Proxy Scripting 1407 ...
Страница 1734: ...1714 ...
Страница 1752: ...1732 ...
Страница 1783: ...Configuring Connector ODBC 1763 ...
Страница 1793: ...Connector ODBC Examples 1773 ...
Страница 1839: ...Connector Net Installation 1819 2 You must choose the type of installation to perform ...
Страница 1842: ...Connector Net Installation 1822 5 Once the installation has been completed click Finish to exit the installer ...
Страница 1864: ...Connector Net Visual Studio Integration 1844 Figure 20 24 Debug Stepping Figure 20 25 Function Stepping 1 of 2 ...
Страница 2850: ...2830 ...
Страница 2854: ...2834 ...
Страница 2928: ...2908 ...
Страница 3000: ...2980 ...
Страница 3122: ...3102 ...
Страница 3126: ...3106 ...
Страница 3174: ...3154 ...
Страница 3232: ...3212 ...