/docs/MyDocs

To get this branch, use:
bzr branch http://darksoft.org/webbzr/docs/MyDocs

« back to all changes in this revision

Viewing changes to DataBase/MySQL/sql/system.htm

  • Committer: Suren A. Chilingaryan
  • Date: 2009-04-09 03:21:08 UTC
  • Revision ID: csa@dside.dyndns.org-20090409032108-w4edamdh4adrgdu3
import

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
<P>
 
2
<B>DATABASE()</B> current database name or empty string<BR>
 
3
<B>USER(),SYSTEM_USER(),SESSION_USER</B> current user name<BR>
 
4
<B>VERSION()</B> MySQL version<BR>
 
5
<B>CONNECTION_ID()</B> connection_id for connection<BR>
 
6
</P><P>
 
7
<B>PASSORD(str)</B> encryptes plain text password <BR>
 
8
<B>ENCRYPT(str[,salt])</B> unix <I>crypt</I>. if crypt not available, returns NULL<BR>
 
9
<B>ENCODE/DECODE(str,pass_str)</B><BR>
 
10
<B>MD5(str)</B> MD5 checksum, returns 32bit long hex<BR>
 
11
</P><P>
 
12
<B>GET_LOCK(str,timeout), RELEASE_LOCK(str)</B> tries to obtain a lock with
 
13
given name. Returns 1 if the lock obtained successfully, 0 if the attempt 
 
14
timed out, NULL if error occured. It blocks requests by other clients for
 
15
locks with the same name.<BR>
 
16
</P><P>
 
17
<B>LAST_INSERT_ID([expr])</B> returns the last automatically generated value that
 
18
was inserted into an AUTO_INCREMENT column. It's mantained on a per-connection
 
19
basis. It willn't be changed by another client. If inserted many rows the 
 
20
sometime with an insert statment, it will return the value for first inserted 
 
21
row. If <I>expr</I> specified, it <B> will be used as next AUTO_INCREMENT</B>
 
22
value.<BR>
 
23
</P><P>
 
24
<B>MASTER_POS_WAIT(log_name,log_pos)</B> Blocks until the slave reaches the specified
 
25
position in the master log. If master information is not intitialised returns
 
26
NULL. Return value s the number of log events it had to wait or NULL in the case
 
27
of error.<BR>
 
28
</P><P>
 
29
<B>BENCHMARK(count,expr)</B> executes expression <I>expr count</I> times.
 
30
</P><P>
 
31
<B>INET_ATON(expr)</B> Converts IP to 4 or 8(IPV6) byte number
 
32
<B>INET_NTOA(expr)</B> and back
 
33
</P>