diff --git a/extra/update_pas_mysql_structures.php b/extra/update_pas_mysql_structures.php index 72fbd892..25c50ba9 100644 --- a/extra/update_pas_mysql_structures.php +++ b/extra/update_pas_mysql_structures.php @@ -1,137 +1,56 @@ ADDDATE()(v4.1.1) - $ver_cont = html_entity_decode($ver_cont); - $matches = array(); - preg_match_all( '#\]+\>\([^\(\s\<]+).*\<\/a\>\(v(.+)\)#', $ver_cont, $matches ); - $versions = array(); - for( $i=0; $i version - $versions[ $matches[1][$i] ] = $version; - } + +$mysqli = mysqli_connect('localhost', 'root'); +$query = mysqli_query($mysqli, "SELECT t.name, t.description, c.name AS categ + FROM mysql.help_topic t, mysql.help_category c + WHERE + t.help_category_id = c.help_category_id + ORDER BY c.name, t.name"); +if(mysqli_errno($mysqli)) { + die (mysqli_error($mysqli)); } -// Specify your own host, user, pass here. -// Do NOT commit passwords into SVN!! -mysql_connect( 'localhost', 'root' ); - +$fstruc = []; $nl = "\r\n"; -$fnames = array(); -$fstruc = array(); -$q = mysql_query('HELP "functions"'); -while( $row = mysql_fetch_object($q) ) -{ - if( $row->is_it_category == 'Y' ) - { - getfunctions($row->name); - } +while($row = mysqli_fetch_object($query)) { + $isFunc = preg_match('#^(Syntax\:\s*)?'.preg_quote($row->name).'(\([^\)]*\))([^\n]*\n)?(.*)$#is', $row->description, $matches); + if($isFunc) { + //var_dump($matches); + $declaration = $matches[2]; + $declaration = str_replace("'", "''", $declaration); + + $description = $matches[4]; + $description = preg_replace('#\bURL\:\s+\S+#s', ' ', $description); + $description = str_replace("'", "''", $description ); + //$description = preg_replace('#(\s+)#', ' ', $description); + //$description = wordwrap($description,72, " '".$nl." +'"); + $description = trim($description); + $description = preg_split('#\r?\n#', $description); + $description = implode("'+sLineBreak\r\n +'", $description); + $fstruc[$row->name] = sprintf(" (".$nl + ." Name: '%s';".$nl + ." Declaration: '%s';".$nl + ." Category: '%s';".$nl + ." Version: %s;".$nl + ." Description: '%s'".$nl + ." ),".$nl.$nl, + $row->name, + $declaration, + $row->categ, + 'SQL_VERSION_ANSI', + $description + ); + #break; + } } -getfunctions('Functions and Modifiers for Use with GROUP BY'); -getfunctions('Geographic Features'); - - -function getfunctions( $cat, $rootcat='' ) -{ - global $nl, $fstruc, $fnames, $versions; - $q = mysql_query('HELP "'.$cat.'"'); - while( $row = mysql_fetch_object($q) ) - { - if( $row->is_it_category == 'Y' ) - { - if( empty($rootcat) ) - { - $rootcat = $cat; - } - getfunctions( $row->name, $rootcat ); - } - else - { - $sql = "HELP '".$row->name."'"; - $qdetails = mysql_query($sql); - $rowdetails = mysql_fetch_object($qdetails); - - if( preg_match('#(\S+)#', $rowdetails->name, $m1) ) - { - $name = $m1[1]; - } - else - { - $name = $row->name; - } - - if( in_array($name,$fnames) ) - { - continue; - } - $fnames[] = $name; - - $declaration = ''; - $desc_cut = substr($rowdetails->description, 0, strpos($rowdetails->description,"\n\n")); - $df = preg_match('#(Syntax:)?[^\(]*(\([^\)]*\))#Us', $desc_cut, $m2); - if( $df ) - { - $declaration = $m2[2]; - $declaration = str_replace("'", "''", $declaration ); - } - - $description = ''; - $df = preg_match('#(Syntax:)?.*\n\n(.+)$#Uis', $rowdetails->description, $m3); - if( $df ) - { - $description = trim($m3[2]); - $description = preg_replace('#\bURL\:\s+\S+#s', ' ', $description ); - $description = preg_replace('#(\s+)#', ' ', $description ); - $description = str_replace(' o ', ' ', $description); - $description = str_replace("'", "''", $description ); - $description = trim($description ); - $description = wordwrap($description,70, " '".$nl." +'" ); - } - - $version = 'SQL_VERSION_ANSI'; - if( !empty($versions[$name]) ) - { - $version = $versions[$name]; - } - - $fstruc[$name] = sprintf(" (".$nl - ." Name: '%s';".$nl - ." Declaration: '%s';".$nl - ." Category: '%s';".$nl - ." Version: %s;".$nl - ." Description: '%s'".$nl - ." ),".$nl.$nl, - $name, - $declaration, - (!empty($rootcat) ? $rootcat : $cat), - $version, - $description - ); - } - } -} - +#die(); // Sort alphabetically by function name asort($fstruc); @@ -139,8 +58,6 @@ asort($fstruc); $counter = 0; foreach( $fstruc as $func ) { - print ' // Function nr. '.++$counter.$nl; - print $func; + echo ' // Function nr. '.++$counter.$nl; + echo $func; } - -?> diff --git a/source/dbstructures.pas b/source/dbstructures.pas index 5b8a8784..f65e0b94 100644 --- a/source/dbstructures.pas +++ b/source/dbstructures.pas @@ -1973,157 +1973,9 @@ var ) ); - MySqlFunctions: Array [0..300] of TMysqlFunction = + MySqlFunctions: Array [0..253] of TMysqlFunction = ( // Function nr. 1 - ( - Name: '!'; - Declaration: ''; - Category: 'Logical operators'; - Version: SQL_VERSION_ANSI; - Description: 'Logical NOT. Evaluates to 1 if the operand is 0, to 0 if the operand ' - +'is nonzero, and NOT NULL returns NULL.' - ), - - // Function nr. 2 - ( - Name: '!='; - Declaration: ''; - Category: 'Comparison operators'; - Version: SQL_VERSION_ANSI; - Description: 'Not equal:' - ), - - // Function nr. 3 - ( - Name: '&&'; - Declaration: ''; - Category: 'Logical operators'; - Version: SQL_VERSION_ANSI; - Description: 'Logical AND. Evaluates to 1 if all operands are nonzero and not NULL, ' - +'to 0 if one or more operands are 0, otherwise NULL is returned.' - ), - - // Function nr. 4 - ( - Name: '&'; - Declaration: ''; - Category: 'Bit Functions'; - Version: SQL_VERSION_ANSI; - Description: 'Bitwise AND:' - ), - - // Function nr. 5 - ( - Name: '*'; - Declaration: ''; - Category: 'Numeric Functions'; - Version: SQL_VERSION_ANSI; - Description: 'Multiplication:' - ), - - // Function nr. 6 - ( - Name: '+'; - Declaration: ''; - Category: 'Numeric Functions'; - Version: SQL_VERSION_ANSI; - Description: 'Addition:' - ), - - // Function nr. 7 - ( - Name: '-'; - Declaration: ''; - Category: 'Numeric Functions'; - Version: SQL_VERSION_ANSI; - Description: 'Subtraction:' - ), - - // Function nr. 8 - ( - Name: '/'; - Declaration: ''; - Category: 'Numeric Functions'; - Version: SQL_VERSION_ANSI; - Description: 'Division:' - ), - - // Function nr. 9 - ( - Name: '<'; - Declaration: ''; - Category: 'Comparison operators'; - Version: SQL_VERSION_ANSI; - Description: 'Less than:' - ), - - // Function nr. 10 - ( - Name: '<<'; - Declaration: ''; - Category: 'Bit Functions'; - Version: SQL_VERSION_ANSI; - Description: 'Shifts a longlong (BIGINT) number to the left.' - ), - - // Function nr. 11 - ( - Name: '<='; - Declaration: ''; - Category: 'Comparison operators'; - Version: SQL_VERSION_ANSI; - Description: 'Less than or equal:' - ), - - // Function nr. 12 - ( - Name: '<=>'; - Declaration: ''; - Category: 'Comparison operators'; - Version: SQL_VERSION_ANSI; - Description: 'NULL-safe equal. This operator performs an equality comparison like ' - +'the = operator, but returns 1 rather than NULL if both operands are ' - +'NULL, and 0 rather than NULL if one operand is NULL.' - ), - - // Function nr. 13 - ( - Name: '='; - Declaration: ''; - Category: 'Comparison operators'; - Version: SQL_VERSION_ANSI; - Description: 'Equal:' - ), - - // Function nr. 14 - ( - Name: '>'; - Declaration: ''; - Category: 'Comparison operators'; - Version: SQL_VERSION_ANSI; - Description: 'Greater than:' - ), - - // Function nr. 15 - ( - Name: '>='; - Declaration: ''; - Category: 'Comparison operators'; - Version: SQL_VERSION_ANSI; - Description: 'Greater than or equal:' - ), - - // Function nr. 16 - ( - Name: '>>'; - Declaration: ''; - Category: 'Bit Functions'; - Version: SQL_VERSION_ANSI; - Description: 'Shifts a longlong (BIGINT) number to the right.' - ), - - // Function nr. 17 ( Name: 'ABS'; Declaration: '(X)'; @@ -2132,130 +1984,141 @@ var Description: 'Returns the absolute value of X.' ), - // Function nr. 18 + // Function nr. 2 ( Name: 'ACOS'; Declaration: '(X)'; Category: 'Numeric Functions'; Version: SQL_VERSION_ANSI; - Description: 'Returns the arc cosine of X, that is, the value whose cosine is X. ' + Description: 'Returns the arc cosine of X, that is, the value whose cosine is X.'+sLineBreak +'Returns NULL if X is not in the range -1 to 1.' ), - // Function nr. 19 + // Function nr. 3 ( Name: 'ADDDATE'; Declaration: '(date,INTERVAL expr unit)'; Category: 'Date and Time Functions'; Version: SQL_VERSION_ANSI; - Description: 'When invoked with the INTERVAL form of the second argument, ADDDATE() ' - +'is a synonym for DATE_ADD(). The related function SUBDATE() is a ' - +'synonym for DATE_SUB(). For information on the INTERVAL unit argument, ' - +'see the discussion for DATE_ADD(). mysql> SELECT ' - +'DATE_ADD(''2008-01-02'', INTERVAL 31 DAY); -> ''2008-02-02'' mysql> ' - +'SELECT ADDDATE(''2008-01-02'', INTERVAL 31 DAY); -> ''2008-02-02'' ' - +'When invoked with the days form of the second argument, MySQL treats ' - +'it as an integer number of days to be added to expr.' + Description: 'When invoked with the INTERVAL form of the second argument, ADDDATE()'+sLineBreak + +'is a synonym for DATE_ADD(). The related function SUBDATE() is a'+sLineBreak + +'synonym for DATE_SUB(). For information on the INTERVAL unit argument,'+sLineBreak + +'see the discussion for DATE_ADD().'+sLineBreak + +''+sLineBreak + +'MariaDB> SELECT DATE_ADD(''2008-01-02'', INTERVAL 31 DAY);'+sLineBreak + +' -> ''2008-02-02'''+sLineBreak + +'MariaDB> SELECT ADDDATE(''2008-01-02'', INTERVAL 31 DAY);'+sLineBreak + +' -> ''2008-02-02'''+sLineBreak + +''+sLineBreak + +'When invoked with the days form of the second argument, MySQL treats it'+sLineBreak + +'as an integer number of days to be added to expr.' ), - // Function nr. 20 + // Function nr. 4 ( Name: 'ADDTIME'; Declaration: '(expr1,expr2)'; Category: 'Date and Time Functions'; Version: SQL_VERSION_ANSI; - Description: 'ADDTIME() adds expr2 to expr1 and returns the result. expr1 is a time ' + Description: 'ADDTIME() adds expr2 to expr1 and returns the result. expr1 is a time'+sLineBreak +'or datetime expression, and expr2 is a time expression.' ), - // Function nr. 21 + // Function nr. 5 ( Name: 'AES_DECRYPT'; Declaration: '(crypt_str,key_str)'; Category: 'Encryption Functions'; Version: SQL_VERSION_ANSI; - Description: 'This function allows decryption of data using the official AES ' - +'(Advanced Encryption Standard) algorithm. For more information, see ' - +'the description of AES_ENCRYPT().' + Description: 'This function decrypts data using the official AES (Advanced Encryption'+sLineBreak + +'Standard) algorithm. For more information, see the description of'+sLineBreak + +'AES_ENCRYPT().' ), - // Function nr. 22 + // Function nr. 6 ( Name: 'AES_ENCRYPT'; Declaration: '(str,key_str)'; Category: 'Encryption Functions'; Version: SQL_VERSION_ANSI; - Description: 'AES_ENCRYPT() and AES_DECRYPT() allow encryption and decryption of ' - +'data using the official AES (Advanced Encryption Standard) algorithm, ' - +'previously known as "Rijndael." Encoding with a 128-bit key length is ' - +'used, but you can extend it up to 256 bits by modifying the source. We ' - +'chose 128 bits because it is much faster and it is secure enough for ' - +'most purposes. AES_ENCRYPT() encrypts a string and returns a binary ' - +'string. AES_DECRYPT() decrypts the encrypted string and returns the ' - +'original string. The input arguments may be any length. If either ' - +'argument is NULL, the result of this function is also NULL. Because ' - +'AES is a block-level algorithm, padding is used to encode uneven ' - +'length strings and so the result string length may be calculated using ' - +'this formula: 16 x (trunc(string_length / 16) + 1) If AES_DECRYPT() ' - +'detects invalid data or incorrect padding, it returns NULL. However, ' - +'it is possible for AES_DECRYPT() to return a non-NULL value (possibly ' - +'garbage) if the input data or the key is invalid. You can use the AES ' - +'functions to store data in an encrypted form by modifying your ' - +'queries:' + Description: 'AES_ENCRYPT() and AES_DECRYPT() enable encryption and decryption of'+sLineBreak + +'data using the official AES (Advanced Encryption Standard) algorithm,'+sLineBreak + +'previously known as "Rijndael." Encoding with a 128-bit key length is'+sLineBreak + +'used, but you can extend it up to 256 bits by modifying the source. We'+sLineBreak + +'chose 128 bits because it is much faster and it is secure enough for'+sLineBreak + +'most purposes.'+sLineBreak + +''+sLineBreak + +'AES_ENCRYPT() encrypts a string and returns a binary string.'+sLineBreak + +'AES_DECRYPT() decrypts the encrypted string and returns the original'+sLineBreak + +'string. The input arguments may be any length. If either argument is'+sLineBreak + +'NULL, the result of this function is also NULL.'+sLineBreak + +''+sLineBreak + +'Because AES is a block-level algorithm, padding is used to encode'+sLineBreak + +'uneven length strings and so the result string length may be calculated'+sLineBreak + +'using this formula:'+sLineBreak + +''+sLineBreak + +'16 * (trunc(string_length / 16) + 1)'+sLineBreak + +''+sLineBreak + +'If AES_DECRYPT() detects invalid data or incorrect padding, it returns'+sLineBreak + +'NULL. However, it is possible for AES_DECRYPT() to return a non-NULL'+sLineBreak + +'value (possibly garbage) if the input data or the key is invalid.'+sLineBreak + +''+sLineBreak + +'You can use the AES functions to store data in an encrypted form by'+sLineBreak + +'modifying your queries:' ), - // Function nr. 23 + // Function nr. 7 ( Name: 'AREA'; Declaration: '(poly)'; - Category: 'Geographic Features'; + Category: 'Polygon properties'; Version: SQL_VERSION_ANSI; - Description: 'Returns as a double-precision number the area of the Polygon value ' + Description: 'Returns as a double-precision number the area of the Polygon value'+sLineBreak +'poly, as measured in its spatial reference system.' ), - // Function nr. 24 + // Function nr. 8 ( Name: 'ASBINARY'; Declaration: '(g)'; - Category: 'Geographic Features'; + Category: 'WKB'; Version: SQL_VERSION_ANSI; - Description: 'Converts a value in internal geometry format to its WKB representation ' + Description: 'Converts a value in internal geometry format to its WKB representation'+sLineBreak +'and returns the binary result.' ), - // Function nr. 25 + // Function nr. 9 ( Name: 'ASCII'; Declaration: '(str)'; Category: 'String Functions'; Version: SQL_VERSION_ANSI; - Description: 'Returns the numeric value of the leftmost character of the string str. ' - +'Returns 0 if str is the empty string. Returns NULL if str is NULL. ' + Description: 'Returns the numeric value of the leftmost character of the string str.'+sLineBreak + +'Returns 0 if str is the empty string. Returns NULL if str is NULL.'+sLineBreak +'ASCII() works for 8-bit characters.' ), - // Function nr. 26 + // Function nr. 10 ( Name: 'ASIN'; Declaration: '(X)'; Category: 'Numeric Functions'; Version: SQL_VERSION_ANSI; - Description: 'Returns the arc sine of X, that is, the value whose sine is X. Returns ' + Description: 'Returns the arc sine of X, that is, the value whose sine is X. Returns'+sLineBreak +'NULL if X is not in the range -1 to 1.' ), - // Function nr. 27 + // Function nr. 11 ( Name: 'ASTEXT'; Declaration: '(g)'; - Category: 'Geographic Features'; + Category: 'WKT'; Version: SQL_VERSION_ANSI; - Description: 'Converts a value in internal geometry format to its WKT representation ' + Description: 'Converts a value in internal geometry format to its WKT representation'+sLineBreak +'and returns the string result.' ), - // Function nr. 28 + // Function nr. 12 ( Name: 'ATAN'; Declaration: '(X)'; @@ -2264,90 +2127,63 @@ var Description: 'Returns the arc tangent of X, that is, the value whose tangent is X.' ), - // Function nr. 29 - ( - Name: 'ATAN2'; - Declaration: '(Y,X)'; - Category: 'Numeric Functions'; - Version: SQL_VERSION_ANSI; - Description: 'Returns the arc tangent of the two variables X and Y. It is similar to ' - +'calculating the arc tangent of Y / X, except that the signs of both ' - +'arguments are used to determine the quadrant of the result.' - ), - - // Function nr. 30 + // Function nr. 13 ( Name: 'AVG'; Declaration: '([DISTINCT] expr)'; Category: 'Functions and Modifiers for Use with GROUP BY'; Version: SQL_VERSION_ANSI; - Description: 'Returns the average value of expr. The DISTINCT option can be used to ' - +'return the average of the distinct values of expr. AVG() returns NULL ' - +'if there were no matching rows.' + Description: 'Returns the average value of expr. The DISTINCT option can be used to'+sLineBreak + +'return the average of the distinct values of expr.'+sLineBreak + +''+sLineBreak + +'AVG() returns NULL if there were no matching rows.' ), - // Function nr. 31 + // Function nr. 14 ( Name: 'BENCHMARK'; Declaration: '(count,expr)'; Category: 'Information Functions'; Version: SQL_VERSION_ANSI; - Description: 'The BENCHMARK() function executes the expression expr repeatedly count ' - +'times. It may be used to time how quickly MySQL processes the ' - +'expression. The result value is always 0. The intended use is from ' + Description: 'The BENCHMARK() function executes the expression expr repeatedly count'+sLineBreak + +'times. It may be used to time how quickly MySQL processes the'+sLineBreak + +'expression. The result value is always 0. The intended use is from'+sLineBreak +'within the mysql client, which reports query execution times:' ), - // Function nr. 32 - ( - Name: 'BETWEEN'; - Declaration: ''; - Category: 'Comparison operators'; - Version: SQL_VERSION_ANSI; - Description: 'If expr is greater than or equal to min and expr is less than or equal ' - +'to max, BETWEEN returns 1, otherwise it returns 0. This is equivalent ' - +'to the expression (min <= expr AND expr <= max) if all the arguments ' - +'are of the same type. Otherwise type conversion takes place according ' - +'to the rules described in ' - +'http://dev.mysql.com/doc/refman/5.1/en/type-conversion.html, but ' - +'applied to all the three arguments.' - ), - - // Function nr. 33 + // Function nr. 15 ( Name: 'BIN'; Declaration: '(N)'; Category: 'String Functions'; Version: SQL_VERSION_ANSI; - Description: 'Returns a string representation of the binary value of N, where N is a ' - +'longlong (BIGINT) number. This is equivalent to CONV(N,10,2). Returns ' + Description: 'Returns a string representation of the binary value of N, where N is a'+sLineBreak + +'longlong (BIGINT) number. This is equivalent to CONV(N,10,2). Returns'+sLineBreak +'NULL if N is NULL.' ), - // Function nr. 34 + // Function nr. 16 ( Name: 'BINARY'; - Declaration: ''; - Category: 'String Functions'; + Declaration: '(M)'; + Category: 'Data Types'; Version: SQL_VERSION_ANSI; - Description: 'The BINARY operator casts the string following it to a binary string. ' - +'This is an easy way to force a column comparison to be done byte by ' - +'byte rather than character by character. This causes the comparison to ' - +'be case sensitive even if the column isn''t defined as BINARY or BLOB. ' - +'BINARY also causes trailing spaces to be significant.' + Description: 'The BINARY type is similar to the CHAR type, but stores binary byte'+sLineBreak + +'strings rather than nonbinary character strings. M represents the'+sLineBreak + +'column length in bytes.' ), - // Function nr. 35 + // Function nr. 17 ( Name: 'BIT_AND'; Declaration: '(expr)'; Category: 'Functions and Modifiers for Use with GROUP BY'; Version: SQL_VERSION_ANSI; - Description: 'Returns the bitwise AND of all bits in expr. The calculation is ' + Description: 'Returns the bitwise AND of all bits in expr. The calculation is'+sLineBreak +'performed with 64-bit (BIGINT) precision.' ), - // Function nr. 36 + // Function nr. 18 ( Name: 'BIT_COUNT'; Declaration: '(N)'; @@ -2356,7 +2192,7 @@ var Description: 'Returns the number of bits that are set in the argument N.' ), - // Function nr. 37 + // Function nr. 19 ( Name: 'BIT_LENGTH'; Declaration: '(str)'; @@ -2365,61 +2201,48 @@ var Description: 'Returns the length of the string str in bits.' ), - // Function nr. 38 + // Function nr. 20 ( Name: 'BIT_OR'; Declaration: '(expr)'; Category: 'Functions and Modifiers for Use with GROUP BY'; Version: SQL_VERSION_ANSI; - Description: 'Returns the bitwise OR of all bits in expr. The calculation is ' + Description: 'Returns the bitwise OR of all bits in expr. The calculation is'+sLineBreak +'performed with 64-bit (BIGINT) precision.' ), - // Function nr. 39 + // Function nr. 21 ( Name: 'BIT_XOR'; Declaration: '(expr)'; Category: 'Functions and Modifiers for Use with GROUP BY'; Version: SQL_VERSION_ANSI; - Description: 'Returns the bitwise XOR of all bits in expr. The calculation is ' + Description: 'Returns the bitwise XOR of all bits in expr. The calculation is'+sLineBreak +'performed with 64-bit (BIGINT) precision.' ), - // Function nr. 40 + // Function nr. 22 ( Name: 'BOUNDARY'; Declaration: '(g)'; - Category: 'Geographic Features'; + Category: 'Geometry properties'; Version: SQL_VERSION_ANSI; - Description: 'Returns a geometry that is the closure of the combinatorial boundary ' - +'of the geometry value g.' + Description: 'Returns a geometry that is the closure of the combinatorial boundary of'+sLineBreak + +'the geometry value g.' ), - // Function nr. 41 - ( - Name: 'CASE'; - Declaration: ''; - Category: 'Control flow functions'; - Version: SQL_VERSION_ANSI; - Description: 'CASE WHEN [condition] THEN result [WHEN [condition] THEN result ...] ' - +'[ELSE result] END The first version returns the result where ' - +'value=compare_value. The second version returns the result for the ' - +'first condition that is true. If there was no matching result value, ' - +'the result after ELSE is returned, or NULL if there is no ELSE part.' - ), - - // Function nr. 42 + // Function nr. 23 ( Name: 'CAST'; Declaration: '(expr AS type)'; Category: 'String Functions'; Version: SQL_VERSION_ANSI; - Description: 'The CAST() function takes a value of one type and produce a value of ' - +'another type, similar to CONVERT(). See the description of CONVERT() ' - +'for more information.' + Description: 'The CAST() function takes an expression of any type and produces a'+sLineBreak + +'result value of a specified type, similar to CONVERT(). See the'+sLineBreak + +'description of CONVERT() for more information.' ), - // Function nr. 43 + // Function nr. 24 ( Name: 'CEIL'; Declaration: '(X)'; @@ -2428,7 +2251,7 @@ var Description: 'CEIL() is a synonym for CEILING().' ), - // Function nr. 44 + // Function nr. 25 ( Name: 'CEILING'; Declaration: '(X)'; @@ -2437,27 +2260,7 @@ var Description: 'Returns the smallest integer value not less than X.' ), - // Function nr. 45 - ( - Name: 'CHAR'; - Declaration: '(N,... [USING charset_name])'; - Category: 'String Functions'; - Version: SQL_VERSION_ANSI; - Description: 'CHAR() interprets each argument N as an integer and returns a string ' - +'consisting of the characters given by the code values of those ' - +'integers. NULL values are skipped. By default, CHAR() returns a binary ' - +'string. To produce a string in a given character set, use the optional ' - +'USING clause: mysql> SELECT CHARSET(CHAR(0x65)), CHARSET(CHAR(0x65 ' - +'USING utf8)); +---------------------+--------------------------------+ ' - +'| CHARSET(CHAR(0x65)) | CHARSET(CHAR(0x65 USING utf8)) | ' - +'+---------------------+--------------------------------+ | binary | ' - +'utf8 | +---------------------+--------------------------------+ If ' - +'USING is given and the result string is illegal for the given ' - +'character set, a warning is issued. Also, if strict SQL mode is ' - +'enabled, the result from CHAR() becomes NULL.' - ), - - // Function nr. 46 + // Function nr. 26 ( Name: 'CHARACTER_LENGTH'; Declaration: '(str)'; @@ -2466,7 +2269,7 @@ var Description: 'CHARACTER_LENGTH() is a synonym for CHAR_LENGTH().' ), - // Function nr. 47 + // Function nr. 27 ( Name: 'CHARSET'; Declaration: '(str)'; @@ -2475,29 +2278,29 @@ var Description: 'Returns the character set of the string argument.' ), - // Function nr. 48 + // Function nr. 28 ( Name: 'CHAR_LENGTH'; Declaration: '(str)'; Category: 'String Functions'; Version: SQL_VERSION_ANSI; - Description: 'Returns the length of the string str, measured in characters. A ' - +'multi-byte character counts as a single character. This means that for ' - +'a string containing five two-byte characters, LENGTH() returns 10, ' + Description: 'Returns the length of the string str, measured in characters. A'+sLineBreak + +'multi-byte character counts as a single character. This means that for'+sLineBreak + +'a string containing five 2-byte characters, LENGTH() returns 10,'+sLineBreak +'whereas CHAR_LENGTH() returns 5.' ), - // Function nr. 49 + // Function nr. 29 ( Name: 'COALESCE'; Declaration: '(value,...)'; Category: 'Comparison operators'; Version: SQL_VERSION_ANSI; - Description: 'Returns the first non-NULL value in the list, or NULL if there are no ' + Description: 'Returns the first non-NULL value in the list, or NULL if there are no'+sLineBreak +'non-NULL values.' ), - // Function nr. 50 + // Function nr. 30 ( Name: 'COERCIBILITY'; Declaration: '(str)'; @@ -2506,7 +2309,7 @@ var Description: 'Returns the collation coercibility value of the string argument.' ), - // Function nr. 51 + // Function nr. 31 ( Name: 'COLLATION'; Declaration: '(str)'; @@ -2515,122 +2318,150 @@ var Description: 'Returns the collation of the string argument.' ), - // Function nr. 52 + // Function nr. 32 ( Name: 'COMPRESS'; Declaration: '(string_to_compress)'; Category: 'Encryption Functions'; Version: SQL_VERSION_ANSI; - Description: 'Compresses a string and returns the result as a binary string. This ' - +'function requires MySQL to have been compiled with a compression ' - +'library such as zlib. Otherwise, the return value is always NULL. The ' + Description: 'Compresses a string and returns the result as a binary string. This'+sLineBreak + +'function requires MySQL to have been compiled with a compression'+sLineBreak + +'library such as zlib. Otherwise, the return value is always NULL. The'+sLineBreak +'compressed string can be uncompressed with UNCOMPRESS().' ), - // Function nr. 53 + // Function nr. 33 ( Name: 'CONCAT'; Declaration: '(str1,str2,...)'; Category: 'String Functions'; Version: SQL_VERSION_ANSI; - Description: 'Returns the string that results from concatenating the arguments. May ' - +'have one or more arguments. If all arguments are nonbinary strings, ' - +'the result is a nonbinary string. If the arguments include any binary ' - +'strings, the result is a binary string. A numeric argument is ' - +'converted to its equivalent binary string form; if you want to avoid ' - +'that, you can use an explicit type cast, as in this example: SELECT ' - +'CONCAT(CAST(int_col AS CHAR), char_col); CONCAT() returns NULL if any ' - +'argument is NULL.' + Description: 'Returns the string that results from concatenating the arguments. May'+sLineBreak + +'have one or more arguments. If all arguments are nonbinary strings, the'+sLineBreak + +'result is a nonbinary string. If the arguments include any binary'+sLineBreak + +'strings, the result is a binary string. A numeric argument is converted'+sLineBreak + +'to its equivalent string form. This is a nonbinary string as of MySQL'+sLineBreak + +'5.5.3. Before 5.5.3, it is a binary string; to to avoid that and'+sLineBreak + +'produce a nonbinary string, you can use an explicit type cast, as in'+sLineBreak + +'this example:'+sLineBreak + +''+sLineBreak + +'SELECT CONCAT(CAST(int_col AS CHAR), char_col);'+sLineBreak + +''+sLineBreak + +'CONCAT() returns NULL if any argument is NULL.' ), - // Function nr. 54 + // Function nr. 34 ( Name: 'CONCAT_WS'; Declaration: '(separator,str1,str2,...)'; Category: 'String Functions'; Version: SQL_VERSION_ANSI; - Description: 'CONCAT_WS() stands for Concatenate With Separator and is a special ' - +'form of CONCAT(). The first argument is the separator for the rest of ' - +'the arguments. The separator is added between the strings to be ' - +'concatenated. The separator can be a string, as can the rest of the ' + Description: 'CONCAT_WS() stands for Concatenate With Separator and is a special form'+sLineBreak + +'of CONCAT(). The first argument is the separator for the rest of the'+sLineBreak + +'arguments. The separator is added between the strings to be'+sLineBreak + +'concatenated. The separator can be a string, as can the rest of the'+sLineBreak +'arguments. If the separator is NULL, the result is NULL.' ), - // Function nr. 55 + // Function nr. 35 ( Name: 'CONNECTION_ID'; Declaration: '()'; Category: 'Information Functions'; Version: SQL_VERSION_ANSI; - Description: 'Returns the connection ID (thread ID) for the connection. Every ' - +'connection has an ID that is unique among the set of currently ' + Description: 'Returns the connection ID (thread ID) for the connection. Every'+sLineBreak + +'connection has an ID that is unique among the set of currently'+sLineBreak +'connected clients.' ), - // Function nr. 56 + // Function nr. 36 ( Name: 'CONTAINS'; Declaration: '(g1,g2)'; - Category: 'Geographic Features'; + Category: 'Geometry relations'; Version: SQL_VERSION_ANSI; - Description: 'Returns 1 or 0 to indicate whether g1 completely contains g2. This ' + Description: 'Returns 1 or 0 to indicate whether g1 completely contains g2. This'+sLineBreak +'tests the opposite relationship as Within().' ), - // Function nr. 57 + // Function nr. 37 ( Name: 'CONV'; Declaration: '(N,from_base,to_base)'; Category: 'Numeric Functions'; Version: SQL_VERSION_ANSI; - Description: 'Converts numbers between different number bases. Returns a string ' - +'representation of the number N, converted from base from_base to base ' - +'to_base. Returns NULL if any argument is NULL. The argument N is ' - +'interpreted as an integer, but may be specified as an integer or a ' - +'string. The minimum base is 2 and the maximum base is 36. If to_base ' - +'is a negative number, N is regarded as a signed number. Otherwise, N ' - +'is treated as unsigned. CONV() works with 64-bit precision.' + Description: 'Converts numbers between different number bases. Returns a string'+sLineBreak + +'representation of the number N, converted from base from_base to base'+sLineBreak + +'to_base. Returns NULL if any argument is NULL. The argument N is'+sLineBreak + +'interpreted as an integer, but may be specified as an integer or a'+sLineBreak + +'string. The minimum base is 2 and the maximum base is 36. If to_base is'+sLineBreak + +'a negative number, N is regarded as a signed number. Otherwise, N is'+sLineBreak + +'treated as unsigned. CONV() works with 64-bit precision.' ), - // Function nr. 58 + // Function nr. 38 ( Name: 'CONVERT'; Declaration: '(expr,type)'; Category: 'String Functions'; Version: SQL_VERSION_ANSI; - Description: 'The CONVERT() and CAST() functions take a value of one type and ' - +'produce a value of another type. The type can be one of the following ' - +'values: BINARY[(N)] CHAR[(N)] DATE DATETIME DECIMAL[(M[,D])] SIGNED ' - +'[INTEGER] TIME UNSIGNED [INTEGER] BINARY produces a string with the ' - +'BINARY data type. See ' - +'http://dev.mysql.com/doc/refman/5.1/en/binary-varbinary.html for a ' - +'description of how this affects comparisons. If the optional length N ' - +'is given, BINARY(N) causes the cast to use no more than N bytes of the ' - +'argument. Values shorter than N bytes are padded with 0x00 bytes to a ' - +'length of N. CHAR(N) causes the cast to use no more than N characters ' - +'of the argument. CAST() and CONVERT(... USING ...) are standard SQL ' - +'syntax. The non-USING form of CONVERT() is ODBC syntax. CONVERT() with ' - +'USING is used to convert data between different character sets. In ' - +'MySQL, transcoding names are the same as the corresponding character ' - +'set names. For example, this statement converts the string ''abc'' in ' - +'the default character set to the corresponding string in the utf8 ' - +'character set: SELECT CONVERT(''abc'' USING utf8);' + Description: 'The CONVERT() and CAST() functions take an expression of any type and'+sLineBreak + +'produce a result value of a specified type.'+sLineBreak + +''+sLineBreak + +'The type for the result can be one of the following values:'+sLineBreak + +''+sLineBreak + +'o BINARY[(N)]'+sLineBreak + +''+sLineBreak + +'o CHAR[(N)]'+sLineBreak + +''+sLineBreak + +'o DATE'+sLineBreak + +''+sLineBreak + +'o DATETIME'+sLineBreak + +''+sLineBreak + +'o DECIMAL[(M[,D])]'+sLineBreak + +''+sLineBreak + +'o SIGNED [INTEGER]'+sLineBreak + +''+sLineBreak + +'o TIME'+sLineBreak + +''+sLineBreak + +'o UNSIGNED [INTEGER]'+sLineBreak + +''+sLineBreak + +'BINARY produces a string with the BINARY data type. See'+sLineBreak + +'https://mariadb.com/kb/en/binary/ for a'+sLineBreak + +'description of how this affects comparisons. If the optional length N'+sLineBreak + +'is given, BINARY(N) causes the cast to use no more than N bytes of the'+sLineBreak + +'argument. Values shorter than N bytes are padded with 0x00 bytes to a'+sLineBreak + +'length of N.'+sLineBreak + +''+sLineBreak + +'CHAR(N) causes the cast to use no more than N characters of the'+sLineBreak + +'argument.'+sLineBreak + +''+sLineBreak + +'CAST() and CONVERT(... USING ...) are standard SQL syntax. The'+sLineBreak + +'non-USING form of CONVERT() is ODBC syntax.'+sLineBreak + +''+sLineBreak + +'CONVERT() with USING is used to convert data between different'+sLineBreak + +'character sets. In MySQL, transcoding names are the same as the'+sLineBreak + +'corresponding character set names. For example, this statement converts'+sLineBreak + +'the string ''abc'' in the default character set to the corresponding'+sLineBreak + +'string in the utf8 character set:'+sLineBreak + +''+sLineBreak + +'SELECT CONVERT(''abc'' USING utf8);' ), - // Function nr. 59 + // Function nr. 39 ( Name: 'CONVERT_TZ'; Declaration: '(dt,from_tz,to_tz)'; Category: 'Date and Time Functions'; Version: SQL_VERSION_ANSI; - Description: 'CONVERT_TZ() converts a datetime value dt from the time zone given by ' - +'from_tz to the time zone given by to_tz and returns the resulting ' - +'value. Time zones are specified as described in ' - +'http://dev.mysql.com/doc/refman/5.1/en/time-zone-support.html. This ' + Description: 'CONVERT_TZ() converts a datetime value dt from the time zone given by'+sLineBreak + +'from_tz to the time zone given by to_tz and returns the resulting'+sLineBreak + +'value. Time zones are specified as described in'+sLineBreak + +'https://mariadb.com/kb/en/time-zones/. This'+sLineBreak +'function returns NULL if the arguments are invalid.' ), - // Function nr. 60 + // Function nr. 40 ( Name: 'COS'; Declaration: '(X)'; @@ -2639,7 +2470,7 @@ var Description: 'Returns the cosine of X, where X is given in radians.' ), - // Function nr. 61 + // Function nr. 41 ( Name: 'COT'; Declaration: '(X)'; @@ -2648,156 +2479,113 @@ var Description: 'Returns the cotangent of X.' ), - // Function nr. 62 + // Function nr. 42 ( Name: 'COUNT'; Declaration: '(expr)'; Category: 'Functions and Modifiers for Use with GROUP BY'; Version: SQL_VERSION_ANSI; - Description: 'Returns a count of the number of non-NULL values of expr in the rows ' - +'retrieved by a SELECT statement. The result is a BIGINT value. COUNT() ' - +'returns 0 if there were no matching rows.' + Description: 'Returns a count of the number of non-NULL values of expr in the rows'+sLineBreak + +'retrieved by a SELECT statement. The result is a BIGINT value.'+sLineBreak + +''+sLineBreak + +'COUNT() returns 0 if there were no matching rows.' ), - // Function nr. 63 + // Function nr. 43 ( Name: 'CRC32'; Declaration: '(expr)'; Category: 'Numeric Functions'; Version: SQL_VERSION_ANSI; - Description: 'Computes a cyclic redundancy check value and returns a 32-bit unsigned ' - +'value. The result is NULL if the argument is NULL. The argument is ' - +'expected to be a string and (if possible) is treated as one if it is ' + Description: 'Computes a cyclic redundancy check value and returns a 32-bit unsigned'+sLineBreak + +'value. The result is NULL if the argument is NULL. The argument is'+sLineBreak + +'expected to be a string and (if possible) is treated as one if it is'+sLineBreak +'not.' ), - // Function nr. 64 + // Function nr. 44 ( Name: 'CROSSES'; Declaration: '(g1,g2)'; - Category: 'Geographic Features'; + Category: 'Geometry relations'; Version: SQL_VERSION_ANSI; - Description: 'Returns 1 if g1 spatially crosses g2. Returns NULL if g1 is a Polygon ' - +'or a MultiPolygon, or if g2 is a Point or a MultiPoint. Otherwise, ' - +'returns 0. The term spatially crosses denotes a spatial relation ' - +'between two given geometries that has the following properties: The ' - +'two geometries intersect Their intersection results in a geometry that ' - +'has a dimension that is one less than the maximum dimension of the two ' - +'given geometries Their intersection is not equal to either of the two ' - +'given geometries' + Description: 'Returns 1 if g1 spatially crosses g2. Returns NULL if g1 is a Polygon'+sLineBreak + +'or a MultiPolygon, or if g2 is a Point or a MultiPoint. Otherwise,'+sLineBreak + +'returns 0.'+sLineBreak + +''+sLineBreak + +'The term spatially crosses denotes a spatial relation between two given'+sLineBreak + +'geometries that has the following properties:'+sLineBreak + +''+sLineBreak + +'o The two geometries intersect'+sLineBreak + +''+sLineBreak + +'o Their intersection results in a geometry that has a dimension that is'+sLineBreak + +' one less than the maximum dimension of the two given geometries'+sLineBreak + +''+sLineBreak + +'o Their intersection is not equal to either of the two given geometries' ), - // Function nr. 65 + // Function nr. 45 ( Name: 'CURDATE'; Declaration: '()'; Category: 'Date and Time Functions'; Version: SQL_VERSION_ANSI; - Description: 'Returns the current date as a value in ''YYYY-MM-DD'' or YYYYMMDD ' - +'format, depending on whether the function is used in a string or ' - +'numeric context.' + Description: 'Returns the current date as a value in ''YYYY-MM-DD'' or YYYYMMDD format,'+sLineBreak + +'depending on whether the function is used in a string or numeric'+sLineBreak + +'context.' ), - // Function nr. 66 - ( - Name: 'CURRENT_DATE'; - Declaration: '()'; - Category: 'Date and Time Functions'; - Version: SQL_VERSION_ANSI; - Description: 'CURRENT_DATE and CURRENT_DATE() are synonyms for CURDATE().' - ), - - // Function nr. 67 - ( - Name: 'CURRENT_TIME'; - Declaration: '()'; - Category: 'Date and Time Functions'; - Version: SQL_VERSION_ANSI; - Description: 'CURRENT_TIME and CURRENT_TIME() are synonyms for CURTIME().' - ), - - // Function nr. 68 - ( - Name: 'CURRENT_TIMESTAMP'; - Declaration: '()'; - Category: 'Date and Time Functions'; - Version: SQL_VERSION_ANSI; - Description: 'CURRENT_TIMESTAMP and CURRENT_TIMESTAMP() are synonyms for NOW().' - ), - - // Function nr. 69 - ( - Name: 'CURRENT_USER'; - Declaration: '()'; - Category: 'Information Functions'; - Version: SQL_VERSION_ANSI; - Description: 'Returns the user name and host name combination for the MySQL account ' - +'that the server used to authenticate the current client. This account ' - +'determines your access privileges. The return value is a string in the ' - +'utf8 character set. The value of CURRENT_USER() can differ from the ' - +'value of USER().' - ), - - // Function nr. 70 + // Function nr. 46 ( Name: 'CURTIME'; Declaration: '()'; Category: 'Date and Time Functions'; Version: SQL_VERSION_ANSI; - Description: 'Returns the current time as a value in ''HH:MM:SS'' or HHMMSS.uuuuuu ' - +'format, depending on whether the function is used in a string or ' + Description: 'Returns the current time as a value in ''HH:MM:SS'' or HHMMSS.uuuuuu'+sLineBreak + +'format, depending on whether the function is used in a string or'+sLineBreak +'numeric context. The value is expressed in the current time zone.' ), - // Function nr. 71 + // Function nr. 47 ( Name: 'DATABASE'; Declaration: '()'; Category: 'Information Functions'; Version: SQL_VERSION_ANSI; - Description: 'Returns the default (current) database name as a string in the utf8 ' - +'character set. If there is no default database, DATABASE() returns ' - +'NULL. Within a stored routine, the default database is the database ' - +'that the routine is associated with, which is not necessarily the same ' + Description: 'Returns the default (current) database name as a string in the utf8'+sLineBreak + +'character set. If there is no default database, DATABASE() returns'+sLineBreak + +'NULL. Within a stored routine, the default database is the database'+sLineBreak + +'that the routine is associated with, which is not necessarily the same'+sLineBreak +'as the database that is the default in the calling context.' ), - // Function nr. 72 - ( - Name: 'DATE'; - Declaration: '(expr)'; - Category: 'Date and Time Functions'; - Version: SQL_VERSION_ANSI; - Description: 'Extracts the date part of the date or datetime expression expr.' - ), - - // Function nr. 73 + // Function nr. 48 ( Name: 'DATEDIFF'; Declaration: '(expr1,expr2)'; Category: 'Date and Time Functions'; Version: SQL_VERSION_ANSI; - Description: 'DATEDIFF() returns expr1 - expr2 expressed as a value in days from one ' - +'date to the other. expr1 and expr2 are date or date-and-time ' - +'expressions. Only the date parts of the values are used in the ' + Description: 'DATEDIFF() returns expr1 - expr2 expressed as a value in days from one'+sLineBreak + +'date to the other. expr1 and expr2 are date or date-and-time'+sLineBreak + +'expressions. Only the date parts of the values are used in the'+sLineBreak +'calculation.' ), - // Function nr. 74 + // Function nr. 49 ( Name: 'DATE_ADD'; Declaration: '(date,INTERVAL expr unit)'; Category: 'Date and Time Functions'; Version: SQL_VERSION_ANSI; - Description: 'These functions perform date arithmetic. The date argument specifies ' - +'the starting date or datetime value. expr is an expression specifying ' - +'the interval value to be added or subtracted from the starting date. ' - +'expr is a string; it may start with a "-" for negative intervals. unit ' - +'is a keyword indicating the units in which the expression should be ' + Description: 'These functions perform date arithmetic. The date argument specifies'+sLineBreak + +'the starting date or datetime value. expr is an expression specifying'+sLineBreak + +'the interval value to be added or subtracted from the starting date.'+sLineBreak + +'expr is a string; it may start with a "-" for negative intervals. unit'+sLineBreak + +'is a keyword indicating the units in which the expression should be'+sLineBreak +'interpreted.' ), - // Function nr. 75 + // Function nr. 50 ( Name: 'DATE_FORMAT'; Declaration: '(date,format)'; @@ -2806,7 +2594,7 @@ var Description: 'Formats the date value according to the format string.' ), - // Function nr. 76 + // Function nr. 51 ( Name: 'DATE_SUB'; Declaration: '(date,INTERVAL expr unit)'; @@ -2815,7 +2603,7 @@ var Description: 'See the description for DATE_ADD().' ), - // Function nr. 77 + // Function nr. 52 ( Name: 'DAY'; Declaration: '(date)'; @@ -2824,40 +2612,38 @@ var Description: 'DAY() is a synonym for DAYOFMONTH().' ), - // Function nr. 78 + // Function nr. 53 ( Name: 'DAYNAME'; Declaration: '(date)'; Category: 'Date and Time Functions'; Version: SQL_VERSION_ANSI; - Description: 'Returns the name of the weekday for date. As of MySQL 5.1.12, the ' - +'language used for the name is controlled by the value of the ' - +'lc_time_names system variable ' - +'(http://dev.mysql.com/doc/refman/5.1/en/locale-support.html).' + Description: 'Returns the name of the weekday for date. The language used for the'+sLineBreak + +'name is controlled by the value of the lc_time_names system variable'+sLineBreak + +'(https://mariadb.com/kb/en/server-system-variables#lc_time_names).' ), - // Function nr. 79 + // Function nr. 54 ( Name: 'DAYOFMONTH'; Declaration: '(date)'; Category: 'Date and Time Functions'; Version: SQL_VERSION_ANSI; - Description: 'Returns the day of the month for date, in the range 1 to 31, or 0 for ' - +'dates such as ''0000-00-00'' or ''2008-00-00'' that have a zero day ' - +'part.' + Description: 'Returns the day of the month for date, in the range 1 to 31, or 0 for'+sLineBreak + +'dates such as ''0000-00-00'' or ''2008-00-00'' that have a zero day part.' ), - // Function nr. 80 + // Function nr. 55 ( Name: 'DAYOFWEEK'; Declaration: '(date)'; Category: 'Date and Time Functions'; Version: SQL_VERSION_ANSI; - Description: 'Returns the weekday index for date (1 = Sunday, 2 = Monday, ..., 7 = ' + Description: 'Returns the weekday index for date (1 = Sunday, 2 = Monday, ..., 7 ='+sLineBreak +'Saturday). These index values correspond to the ODBC standard.' ), - // Function nr. 81 + // Function nr. 56 ( Name: 'DAYOFYEAR'; Declaration: '(date)'; @@ -2866,27 +2652,27 @@ var Description: 'Returns the day of the year for date, in the range 1 to 366.' ), - // Function nr. 82 + // Function nr. 57 ( Name: 'DECODE'; Declaration: '(crypt_str,pass_str)'; Category: 'Encryption Functions'; Version: SQL_VERSION_ANSI; - Description: 'Decrypts the encrypted string crypt_str using pass_str as the ' - +'password. crypt_str should be a string returned from ENCODE().' + Description: 'Decrypts the encrypted string crypt_str using pass_str as the password.'+sLineBreak + +'crypt_str should be a string returned from ENCODE().' ), - // Function nr. 83 + // Function nr. 58 ( Name: 'DEFAULT'; Declaration: '(col_name)'; Category: 'Miscellaneous Functions'; Version: SQL_VERSION_ANSI; - Description: 'Returns the default value for a table column. An error results if the ' + Description: 'Returns the default value for a table column. An error results if the'+sLineBreak +'column has no default value.' ), - // Function nr. 84 + // Function nr. 59 ( Name: 'DEGREES'; Declaration: '(X)'; @@ -2895,288 +2681,341 @@ var Description: 'Returns the argument X, converted from radians to degrees.' ), - // Function nr. 85 + // Function nr. 60 ( Name: 'DES_DECRYPT'; Declaration: '(crypt_str[,key_str])'; Category: 'Encryption Functions'; Version: SQL_VERSION_ANSI; - Description: 'Decrypts a string encrypted with DES_ENCRYPT(). If an error occurs, ' - +'this function returns NULL. This function works only if MySQL has been ' - +'configured with SSL support. See ' - +'http://dev.mysql.com/doc/refman/5.1/en/secure-connections.html. If no ' - +'key_str argument is given, DES_DECRYPT() examines the first byte of ' - +'the encrypted string to determine the DES key number that was used to ' - +'encrypt the original string, and then reads the key from the DES key ' - +'file to decrypt the message. For this to work, the user must have the ' - +'SUPER privilege. The key file can be specified with the --des-key-file ' - +'server option. If you pass this function a key_str argument, that ' - +'string is used as the key for decrypting the message. If the crypt_str ' - +'argument does not appear to be an encrypted string, MySQL returns the ' - +'given crypt_str.' + Description: 'Decrypts a string encrypted with DES_ENCRYPT(). If an error occurs,'+sLineBreak + +'this function returns NULL.'+sLineBreak + +''+sLineBreak + +'This function works only if MySQL has been configured with SSL support.'+sLineBreak + +'See https://mariadb.com/kb/en/ssl-connections/.'+sLineBreak + +''+sLineBreak + +'If no key_str argument is given, DES_DECRYPT() examines the first byte'+sLineBreak + +'of the encrypted string to determine the DES key number that was used'+sLineBreak + +'to encrypt the original string, and then reads the key from the DES key'+sLineBreak + +'file to decrypt the message. For this to work, the user must have the'+sLineBreak + +'SUPER privilege. The key file can be specified with the --des-key-file'+sLineBreak + +'server option.'+sLineBreak + +''+sLineBreak + +'If you pass this function a key_str argument, that string is used as'+sLineBreak + +'the key for decrypting the message.'+sLineBreak + +''+sLineBreak + +'If the crypt_str argument does not appear to be an encrypted string,'+sLineBreak + +'MySQL returns the given crypt_str.' ), - // Function nr. 86 + // Function nr. 61 ( Name: 'DES_ENCRYPT'; Declaration: '(str[,{key_num|key_str}])'; Category: 'Encryption Functions'; Version: SQL_VERSION_ANSI; - Description: 'Encrypts the string with the given key using the Triple-DES algorithm. ' - +'This function works only if MySQL has been configured with SSL ' - +'support. See ' - +'http://dev.mysql.com/doc/refman/5.1/en/secure-connections.html. The ' - +'encryption key to use is chosen based on the second argument to ' - +'DES_ENCRYPT(), if one was given. With no argument, the first key from ' - +'the DES key file is used. With a key_num argument, the given key ' - +'number (0-9) from the DES key file is used. With a key_str argument, ' - +'the given key string is used to encrypt str. The key file can be ' - +'specified with the --des-key-file server option. The return string is ' - +'a binary string where the first character is CHAR(128 | key_num). If ' - +'an error occurs, DES_ENCRYPT() returns NULL. The 128 is added to make ' - +'it easier to recognize an encrypted key. If you use a string key, ' - +'key_num is 127. The string length for the result is given by this ' - +'formula: new_len = orig_len + (8 - (orig_len % 8)) + 1 Each line in ' - +'the DES key file has the following format: key_num des_key_str Each ' - +'key_num value must be a number in the range from 0 to 9. Lines in the ' - +'file may be in any order. des_key_str is the string that is used to ' - +'encrypt the message. There should be at least one space between the ' - +'number and the key. The first key is the default key that is used if ' - +'you do not specify any key argument to DES_ENCRYPT(). You can tell ' - +'MySQL to read new key values from the key file with the FLUSH ' - +'DES_KEY_FILE statement. This requires the RELOAD privilege. One ' - +'benefit of having a set of default keys is that it gives applications ' - +'a way to check for the existence of encrypted column values, without ' - +'giving the end user the right to decrypt those values.' + Description: 'Encrypts the string with the given key using the Triple-DES algorithm.'+sLineBreak + +''+sLineBreak + +'This function works only if MySQL has been configured with SSL support.'+sLineBreak + +'See https://mariadb.com/kb/en/ssl-connections/.'+sLineBreak + +''+sLineBreak + +'The encryption key to use is chosen based on the second argument to'+sLineBreak + +'DES_ENCRYPT(), if one was given. With no argument, the first key from'+sLineBreak + +'the DES key file is used. With a key_num argument, the given key number'+sLineBreak + +'(0 to 9) from the DES key file is used. With a key_str argument, the'+sLineBreak + +'given key string is used to encrypt str.'+sLineBreak + +''+sLineBreak + +'The key file can be specified with the --des-key-file server option.'+sLineBreak + +''+sLineBreak + +'The return string is a binary string where the first character is'+sLineBreak + +'CHAR(128 | key_num). If an error occurs, DES_ENCRYPT() returns NULL.'+sLineBreak + +''+sLineBreak + +'The 128 is added to make it easier to recognize an encrypted key. If'+sLineBreak + +'you use a string key, key_num is 127.'+sLineBreak + +''+sLineBreak + +'The string length for the result is given by this formula:'+sLineBreak + +''+sLineBreak + +'new_len = orig_len + (8 - (orig_len % 8)) + 1'+sLineBreak + +''+sLineBreak + +'Each line in the DES key file has the following format:'+sLineBreak + +''+sLineBreak + +'key_num des_key_str'+sLineBreak + +''+sLineBreak + +'Each key_num value must be a number in the range from 0 to 9. Lines in'+sLineBreak + +'the file may be in any order. des_key_str is the string that is used to'+sLineBreak + +'encrypt the message. There should be at least one space between the'+sLineBreak + +'number and the key. The first key is the default key that is used if'+sLineBreak + +'you do not specify any key argument to DES_ENCRYPT().'+sLineBreak + +''+sLineBreak + +'You can tell MySQL to read new key values from the key file with the'+sLineBreak + +'FLUSH DES_KEY_FILE statement. This requires the RELOAD privilege.'+sLineBreak + +''+sLineBreak + +'One benefit of having a set of default keys is that it gives'+sLineBreak + +'applications a way to check for the existence of encrypted column'+sLineBreak + +'values, without giving the end user the right to decrypt those values.' ), - // Function nr. 87 + // Function nr. 62 ( Name: 'DIMENSION'; Declaration: '(g)'; - Category: 'Geographic Features'; + Category: 'Geometry properties'; Version: SQL_VERSION_ANSI; - Description: 'Returns the inherent dimension of the geometry value g. The result can ' - +'be -1, 0, 1, or 2. The meaning of these values is given in ' - +'http://dev.mysql.com/doc/refman/5.1/en/gis-class-geometry.html.' + Description: 'Returns the inherent dimension of the geometry value g. The result can'+sLineBreak + +'be -1, 0, 1, or 2. The meaning of these values is given in'+sLineBreak + +'https://mariadb.com/kb/en/dimension/.' ), - // Function nr. 88 + // Function nr. 63 ( Name: 'DISJOINT'; Declaration: '(g1,g2)'; - Category: 'Geographic Features'; + Category: 'Geometry relations'; Version: SQL_VERSION_ANSI; - Description: 'Returns 1 or 0 to indicate whether g1 is spatially disjoint from (does ' + Description: 'Returns 1 or 0 to indicate whether g1 is spatially disjoint from (does'+sLineBreak +'not intersect) g2.' ), - // Function nr. 89 - ( - Name: 'DIV'; - Declaration: ''; - Category: 'Numeric Functions'; - Version: SQL_VERSION_ANSI; - Description: 'Integer division. Similar to FLOOR(), but is safe with BIGINT values. ' - +'Incorrect results may occur for noninteger operands that exceed BIGINT ' - +'range.' - ), - - // Function nr. 90 + // Function nr. 64 ( Name: 'ELT'; Declaration: '(N,str1,str2,str3,...)'; Category: 'String Functions'; Version: SQL_VERSION_ANSI; - Description: 'Returns str1 if N = 1, str2 if N = 2, and so on. Returns NULL if N is ' - +'less than 1 or greater than the number of arguments. ELT() is the ' + Description: 'Returns str1 if N = 1, str2 if N = 2, and so on. Returns NULL if N is'+sLineBreak + +'less than 1 or greater than the number of arguments. ELT() is the'+sLineBreak +'complement of FIELD().' ), - // Function nr. 91 + // Function nr. 65 ( Name: 'ENCODE'; Declaration: '(str,pass_str)'; Category: 'Encryption Functions'; Version: SQL_VERSION_ANSI; - Description: 'Encrypt str using pass_str as the password. To decrypt the result, use ' - +'DECODE(). The result is a binary string of the same length as str. The ' - +'strength of the encryption is based on how good the random generator ' - +'is. It should suffice for short strings.' + Description: 'Encrypt str using pass_str as the password. To decrypt the result, use'+sLineBreak + +'DECODE().'+sLineBreak + +''+sLineBreak + +'The result is a binary string of the same length as str.'+sLineBreak + +''+sLineBreak + +'The strength of the encryption is based on how good the random'+sLineBreak + +'generator is. It should suffice for short strings.' ), - // Function nr. 92 + // Function nr. 66 ( Name: 'ENCRYPT'; Declaration: '(str[,salt])'; Category: 'Encryption Functions'; Version: SQL_VERSION_ANSI; - Description: 'Encrypts str using the Unix crypt() system call and returns a binary ' - +'string. The salt argument should be a string with at least two ' - +'characters. If no salt argument is given, a random value is used.' + Description: 'Encrypts str using the Unix crypt() system call and returns a binary'+sLineBreak + +'string. The salt argument must be a string with at least two characters'+sLineBreak + +'or the result will be NULL. If no salt argument is given, a random'+sLineBreak + +'value is used.' ), - // Function nr. 93 + // Function nr. 67 ( Name: 'ENDPOINT'; Declaration: '(ls)'; - Category: 'Geographic Features'; + Category: 'LineString properties'; Version: SQL_VERSION_ANSI; Description: 'Returns the Point that is the endpoint of the LineString value ls.' ), - // Function nr. 94 + // Function nr. 68 + ( + Name: 'ENUM'; + Declaration: '(''value1'',''value2'',...)'; + Category: 'Data Types'; + Version: SQL_VERSION_ANSI; + Description: 'collation_name]'+sLineBreak + +''+sLineBreak + +'An enumeration. A string object that can have only one value, chosen'+sLineBreak + +'from the list of values ''value1'', ''value2'', ..., NULL or the special '''''+sLineBreak + +'error value. An ENUM column can have a maximum of 65,535 distinct'+sLineBreak + +'values. ENUM values are represented internally as integers.' + ), + + // Function nr. 69 ( Name: 'ENVELOPE'; Declaration: '(g)'; - Category: 'Geographic Features'; + Category: 'Geometry properties'; Version: SQL_VERSION_ANSI; - Description: 'Returns the Minimum Bounding Rectangle (MBR) for the geometry value g. ' - +'The result is returned as a Polygon value. The polygon is defined by ' - +'the corner points of the bounding box: POLYGON((MINX MINY, MAXX MINY, ' - +'MAXX MAXY, MINX MAXY, MINX MINY))' + Description: 'Returns the Minimum Bounding Rectangle (MBR) for the geometry value g.'+sLineBreak + +'The result is returned as a Polygon value.'+sLineBreak + +''+sLineBreak + +'The polygon is defined by the corner points of the bounding box:'+sLineBreak + +''+sLineBreak + +'POLYGON((MINX MINY, MAXX MINY, MAXX MAXY, MINX MAXY, MINX MINY))' ), - // Function nr. 95 + // Function nr. 70 ( Name: 'EQUALS'; Declaration: '(g1,g2)'; - Category: 'Geographic Features'; + Category: 'Geometry relations'; Version: SQL_VERSION_ANSI; Description: 'Returns 1 or 0 to indicate whether g1 is spatially equal to g2.' ), - // Function nr. 96 + // Function nr. 71 ( Name: 'EXP'; Declaration: '(X)'; Category: 'Numeric Functions'; Version: SQL_VERSION_ANSI; - Description: 'Returns the value of e (the base of natural logarithms) raised to the ' - +'power of X. The inverse of this function is LOG() (using a single ' + Description: 'Returns the value of e (the base of natural logarithms) raised to the'+sLineBreak + +'power of X. The inverse of this function is LOG() (using a single'+sLineBreak +'argument only) or LN().' ), - // Function nr. 97 + // Function nr. 72 ( Name: 'EXPORT_SET'; Declaration: '(bits,on,off[,separator[,number_of_bits]])'; Category: 'String Functions'; Version: SQL_VERSION_ANSI; - Description: 'Returns a string such that for every bit set in the value bits, you ' - +'get an on string and for every bit not set in the value, you get an ' - +'off string. Bits in bits are examined from right to left (from ' - +'low-order to high-order bits). Strings are added to the result from ' - +'left to right, separated by the separator string (the default being ' - +'the comma character ","). The number of bits examined is given by ' - +'number_of_bits (defaults to 64).' + Description: 'Returns a string such that for every bit set in the value bits, you get'+sLineBreak + +'an on string and for every bit not set in the value, you get an off'+sLineBreak + +'string. Bits in bits are examined from right to left (from low-order to'+sLineBreak + +'high-order bits). Strings are added to the result from left to right,'+sLineBreak + +'separated by the separator string (the default being the comma'+sLineBreak + +'character ","). The number of bits examined is given by number_of_bits,'+sLineBreak + +'which has a default of 64 if not specified. number_of_bits is silently'+sLineBreak + +'clipped to 64 if larger than 64. It is treated as an unsigned integer,'+sLineBreak + +'so a value of -1 is effectively the same as 64.' ), - // Function nr. 98 + // Function nr. 73 ( Name: 'EXTERIORRING'; Declaration: '(poly)'; - Category: 'Geographic Features'; + Category: 'Polygon properties'; Version: SQL_VERSION_ANSI; Description: 'Returns the exterior ring of the Polygon value poly as a LineString.' ), - // Function nr. 99 + // Function nr. 74 ( Name: 'EXTRACT'; Declaration: '(unit FROM date)'; Category: 'Date and Time Functions'; Version: SQL_VERSION_ANSI; - Description: 'The EXTRACT() function uses the same kinds of unit specifiers as ' - +'DATE_ADD() or DATE_SUB(), but extracts parts from the date rather than ' + Description: 'The EXTRACT() function uses the same kinds of unit specifiers as'+sLineBreak + +'DATE_ADD() or DATE_SUB(), but extracts parts from the date rather than'+sLineBreak +'performing date arithmetic.' ), - // Function nr. 100 + // Function nr. 75 ( Name: 'EXTRACTVALUE'; Declaration: '(xml_frag, xpath_expr)'; Category: 'String Functions'; Version: SQL_VERSION_ANSI; - Description: 'ExtractValue() takes two string arguments, a fragment of XML markup ' - +'xml_frag and an XPath expression xpath_expr (also known as a locator); ' - +'it returns the text (CDATA) of the first text node which is a child of ' - +'the element(s) matched by the XPath expression. It is the equivalent ' - +'of performing a match using the xpath_expr after appending /text(). In ' - +'other words, ExtractValue(''Sakila'', ''/a/b'') and ' - +'ExtractValue(''Sakila'', ''/a/b/text()'') produce the ' - +'same result. If multiple matches are found, then the content of the ' - +'first child text node of each matching element is returned (in the ' - +'order matched) as a single, space-delimited string. If no matching ' - +'text node is found for the expression (including the implicit /text()) ' - +'--- for whatever reason, as long as xpath_expr is valid, and xml_frag ' - +'consists of elements which are properly nested and closed --- an empty ' - +'string is returned. No distinction is made between a match on an empty ' - +'element and no match at all. This is by design. If you need to ' - +'determine whether no matching element was found in xml_frag or such an ' - +'element was found but contained no child text nodes, you should test ' - +'the result of an expression that uses the XPath count() function. For ' - +'example, both of these statements return an empty string, as shown ' - +'here: mysql> SELECT ExtractValue('''', ''/a/b''); ' - +'+-------------------------------------+ | ' - +'ExtractValue('''', ''/a/b'') | ' - +'+-------------------------------------+ | | ' - +'+-------------------------------------+ 1 row in set (0.00 sec) mysql> ' - +'SELECT ExtractValue('''', ''/a/b''); ' - +'+-------------------------------------+ | ' - +'ExtractValue('''', ''/a/b'') | ' - +'+-------------------------------------+ | | ' - +'+-------------------------------------+ 1 row in set (0.00 sec) ' - +'However, you can determine whether there was actually a matching ' - +'element using the following: mysql> SELECT ' - +'ExtractValue('''', ''count(/a/b)''); ' - +'+-------------------------------------+ | ' - +'ExtractValue('''', ''count(/a/b)'') | ' - +'+-------------------------------------+ | 1 | ' - +'+-------------------------------------+ 1 row in set (0.00 sec) mysql> ' - +'SELECT ExtractValue('''', ''count(/a/b)''); ' - +'+-------------------------------------+ | ' - +'ExtractValue('''', ''count(/a/b)'') | ' - +'+-------------------------------------+ | 0 | ' - +'+-------------------------------------+ 1 row in set (0.01 sec) ' - +'*Important*: ExtractValue() returns only CDATA, and does not return ' - +'any tags that might be contained within a matching tag, nor any of ' - +'their content (see the result returned as val1 in the following ' - +'example).' + Description: 'ExtractValue() takes two string arguments, a fragment of XML markup'+sLineBreak + +'xml_frag and an XPath expression xpath_expr (also known as a locator);'+sLineBreak + +'it returns the text (CDATA) of the first text node which is a child of'+sLineBreak + +'the elements or elements matched by the XPath expression. In MySQL 5.5,'+sLineBreak + +'the XPath expression can contain at most 127 characters. (This'+sLineBreak + +'limitation is lifted in MySQL 5.6.)'+sLineBreak + +''+sLineBreak + +'Using this function is the equivalent of performing a match using the'+sLineBreak + +'xpath_expr after appending /text(). In other words,'+sLineBreak + +'ExtractValue(''Sakila'', ''/a/b'') and'+sLineBreak + +'ExtractValue(''Sakila'', ''/a/b/text()'') produce the same'+sLineBreak + +'result.'+sLineBreak + +''+sLineBreak + +'If multiple matches are found, the content of the first child text node'+sLineBreak + +'of each matching element is returned (in the order matched) as a'+sLineBreak + +'single, space-delimited string.'+sLineBreak + +''+sLineBreak + +'If no matching text node is found for the expression (including the'+sLineBreak + +'implicit /text())---for whatever reason, as long as xpath_expr is'+sLineBreak + +'valid, and xml_frag consists of elements which are properly nested and'+sLineBreak + +'closed---an empty string is returned. No distinction is made between a'+sLineBreak + +'match on an empty element and no match at all. This is by design.'+sLineBreak + +''+sLineBreak + +'If you need to determine whether no matching element was found in'+sLineBreak + +'xml_frag or such an element was found but contained no child text'+sLineBreak + +'nodes, you should test the result of an expression that uses the XPath'+sLineBreak + +'count() function. For example, both of these statements return an empty'+sLineBreak + +'string, as shown here:'+sLineBreak + +''+sLineBreak + +'MariaDB> SELECT ExtractValue('''', ''/a/b'');'+sLineBreak + +'+-------------------------------------+'+sLineBreak + +'| ExtractValue('''', ''/a/b'') |'+sLineBreak + +'+-------------------------------------+'+sLineBreak + +'| |'+sLineBreak + +'+-------------------------------------+'+sLineBreak + +'1 row in set (0.00 sec)'+sLineBreak + +''+sLineBreak + +'MariaDB> SELECT ExtractValue('''', ''/a/b'');'+sLineBreak + +'+-------------------------------------+'+sLineBreak + +'| ExtractValue('''', ''/a/b'') |'+sLineBreak + +'+-------------------------------------+'+sLineBreak + +'| |'+sLineBreak + +'+-------------------------------------+'+sLineBreak + +'1 row in set (0.00 sec)'+sLineBreak + +''+sLineBreak + +'However, you can determine whether there was actually a matching'+sLineBreak + +'element using the following:'+sLineBreak + +''+sLineBreak + +'MariaDB> SELECT ExtractValue('''', ''count(/a/b)'');'+sLineBreak + +'+-------------------------------------+'+sLineBreak + +'| ExtractValue('''', ''count(/a/b)'') |'+sLineBreak + +'+-------------------------------------+'+sLineBreak + +'| 1 |'+sLineBreak + +'+-------------------------------------+'+sLineBreak + +'1 row in set (0.00 sec)'+sLineBreak + +''+sLineBreak + +'MariaDB> SELECT ExtractValue('''', ''count(/a/b)'');'+sLineBreak + +'+-------------------------------------+'+sLineBreak + +'| ExtractValue('''', ''count(/a/b)'') |'+sLineBreak + +'+-------------------------------------+'+sLineBreak + +'| 0 |'+sLineBreak + +'+-------------------------------------+'+sLineBreak + +'1 row in set (0.01 sec)'+sLineBreak + +''+sLineBreak + +'*Important*: ExtractValue() returns only CDATA, and does not return any'+sLineBreak + +'tags that might be contained within a matching tag, nor any of their'+sLineBreak + +'content (see the result returned as val1 in the following example).' ), - // Function nr. 101 + // Function nr. 76 ( Name: 'FIELD'; Declaration: '(str,str1,str2,str3,...)'; Category: 'String Functions'; Version: SQL_VERSION_ANSI; - Description: 'Returns the index (position) of str in the str1, str2, str3, ... list. ' - +'Returns 0 if str is not found. If all arguments to FIELD() are ' - +'strings, all arguments are compared as strings. If all arguments are ' - +'numbers, they are compared as numbers. Otherwise, the arguments are ' - +'compared as double. If str is NULL, the return value is 0 because NULL ' - +'fails equality comparison with any value. FIELD() is the complement of ' - +'ELT().' + Description: 'Returns the index (position) of str in the str1, str2, str3, ... list.'+sLineBreak + +'Returns 0 if str is not found.'+sLineBreak + +''+sLineBreak + +'If all arguments to FIELD() are strings, all arguments are compared as'+sLineBreak + +'strings. If all arguments are numbers, they are compared as numbers.'+sLineBreak + +'Otherwise, the arguments are compared as double.'+sLineBreak + +''+sLineBreak + +'If str is NULL, the return value is 0 because NULL fails equality'+sLineBreak + +'comparison with any value. FIELD() is the complement of ELT().' ), - // Function nr. 102 + // Function nr. 77 ( Name: 'FIND_IN_SET'; Declaration: '(str,strlist)'; Category: 'String Functions'; Version: SQL_VERSION_ANSI; - Description: 'Returns a value in the range of 1 to N if the string str is in the ' - +'string list strlist consisting of N substrings. A string list is a ' - +'string composed of substrings separated by "," characters. If the ' - +'first argument is a constant string and the second is a column of type ' - +'SET, the FIND_IN_SET() function is optimized to use bit arithmetic. ' - +'Returns 0 if str is not in strlist or if strlist is the empty string. ' - +'Returns NULL if either argument is NULL. This function does not work ' - +'properly if the first argument contains a comma (",") character.' + Description: 'Returns a value in the range of 1 to N if the string str is in the'+sLineBreak + +'string list strlist consisting of N substrings. A string list is a'+sLineBreak + +'string composed of substrings separated by "," characters. If the first'+sLineBreak + +'argument is a constant string and the second is a column of type SET,'+sLineBreak + +'the FIND_IN_SET() function is optimized to use bit arithmetic. Returns'+sLineBreak + +'0 if str is not in strlist or if strlist is the empty string. Returns'+sLineBreak + +'NULL if either argument is NULL. This function does not work properly'+sLineBreak + +'if the first argument contains a comma (",") character.' ), - // Function nr. 103 + // Function nr. 78 ( Name: 'FLOOR'; Declaration: '(X)'; @@ -3185,32 +3024,39 @@ var Description: 'Returns the largest integer value not greater than X.' ), - // Function nr. 104 + // Function nr. 79 ( Name: 'FORMAT'; - Declaration: '(X,D)'; + Declaration: '(X,D[,locale])'; Category: 'String Functions'; Version: SQL_VERSION_ANSI; - Description: 'Formats the number X to a format like ''#,###,###.##'', rounded to D ' - +'decimal places, and returns the result as a string. If D is 0, the ' - +'result has no decimal point or fractional part.' + Description: 'Formats the number X to a format like ''#,###,###.##'', rounded to D'+sLineBreak + +'decimal places, and returns the result as a string. If D is 0, the'+sLineBreak + +'result has no decimal point or fractional part.'+sLineBreak + +''+sLineBreak + +'The optional third parameter enables a locale to be specified to be'+sLineBreak + +'used for the result number''s decimal point, thousands separator, and'+sLineBreak + +'grouping between separators. Permissible locale values are the same as'+sLineBreak + +'the legal values for the lc_time_names system variable (see'+sLineBreak + +'https://mariadb.com/kb/en/server-locale/). If no'+sLineBreak + +'locale is specified, the default is ''en_US''.' ), - // Function nr. 105 + // Function nr. 80 ( Name: 'FOUND_ROWS'; Declaration: '()'; Category: 'Information Functions'; Version: SQL_VERSION_ANSI; - Description: 'A SELECT statement may include a LIMIT clause to restrict the number ' - +'of rows the server returns to the client. In some cases, it is ' - +'desirable to know how many rows the statement would have returned ' - +'without the LIMIT, but without running the statement again. To obtain ' - +'this row count, include a SQL_CALC_FOUND_ROWS option in the SELECT ' - +'statement, and then invoke FOUND_ROWS() afterward:' + Description: 'A SELECT statement may include a LIMIT clause to restrict the number of'+sLineBreak + +'rows the server returns to the client. In some cases, it is desirable'+sLineBreak + +'to know how many rows the statement would have returned without the'+sLineBreak + +'LIMIT, but without running the statement again. To obtain this row'+sLineBreak + +'count, include a SQL_CALC_FOUND_ROWS option in the SELECT statement,'+sLineBreak + +'and then invoke FOUND_ROWS() afterward:' ), - // Function nr. 106 + // Function nr. 81 ( Name: 'FROM_DAYS'; Declaration: '(N)'; @@ -3219,327 +3065,291 @@ var Description: 'Given a day number N, returns a DATE value.' ), - // Function nr. 107 + // Function nr. 82 ( Name: 'FROM_UNIXTIME'; Declaration: '(unix_timestamp)'; Category: 'Date and Time Functions'; Version: SQL_VERSION_ANSI; - Description: 'Returns a representation of the unix_timestamp argument as a value in ' - +'''YYYY-MM-DD HH:MM:SS'' or YYYYMMDDHHMMSS.uuuuuu format, depending on ' - +'whether the function is used in a string or numeric context. The value ' - +'is expressed in the current time zone. unix_timestamp is an internal ' - +'timestamp value such as is produced by the UNIX_TIMESTAMP() function. ' - +'If format is given, the result is formatted according to the format ' - +'string, which is used the same way as listed in the entry for the ' + Description: 'Returns a representation of the unix_timestamp argument as a value in'+sLineBreak + +'''YYYY-MM-DD HH:MM:SS'' or YYYYMMDDHHMMSS.uuuuuu format, depending on'+sLineBreak + +'whether the function is used in a string or numeric context. The value'+sLineBreak + +'is expressed in the current time zone. unix_timestamp is an internal'+sLineBreak + +'timestamp value such as is produced by the UNIX_TIMESTAMP() function.'+sLineBreak + +''+sLineBreak + +'If format is given, the result is formatted according to the format'+sLineBreak + +'string, which is used the same way as listed in the entry for the'+sLineBreak +'DATE_FORMAT() function.' ), - // Function nr. 108 + // Function nr. 83 ( Name: 'GEOMCOLLFROMTEXT'; Declaration: '(wkt[,srid])'; - Category: 'Geographic Features'; + Category: 'WKT'; Version: SQL_VERSION_ANSI; - Description: 'Constructs a GEOMETRYCOLLECTION value using its WKT representation and ' + Description: 'Constructs a GEOMETRYCOLLECTION value using its WKT representation and'+sLineBreak +'SRID.' ), - // Function nr. 109 + // Function nr. 84 ( Name: 'GEOMCOLLFROMWKB'; Declaration: '(wkb[,srid])'; - Category: 'Geographic Features'; + Category: 'WKB'; Version: SQL_VERSION_ANSI; - Description: 'Constructs a GEOMETRYCOLLECTION value using its WKB representation and ' + Description: 'Constructs a GEOMETRYCOLLECTION value using its WKB representation and'+sLineBreak +'SRID.' ), - // Function nr. 110 - ( - Name: 'GEOMETRY'; - Declaration: ''; - Category: 'Geographic Features'; - Version: SQL_VERSION_ANSI; - Description: '' - ), - - // Function nr. 111 + // Function nr. 85 ( Name: 'GEOMETRYCOLLECTION'; Declaration: '(g1,g2,...)'; - Category: 'Geographic Features'; + Category: 'Geometry constructors'; Version: SQL_VERSION_ANSI; Description: 'Constructs a GeometryCollection.' ), - // Function nr. 112 + // Function nr. 86 + ( + Name: 'GEOMETRYN'; + Declaration: '(gc,N)'; + Category: 'GeometryCollection properties'; + Version: SQL_VERSION_ANSI; + Description: 'Returns the N-th geometry in the GeometryCollection value gc.'+sLineBreak + +'Geometries are numbered beginning with 1.' + ), + + // Function nr. 87 ( Name: 'GEOMETRYTYPE'; Declaration: '(g)'; - Category: 'Geographic Features'; + Category: 'Geometry properties'; Version: SQL_VERSION_ANSI; - Description: 'Returns as a string the name of the geometry type of which the ' - +'geometry instance g is a member. The name corresponds to one of the ' + Description: 'Returns as a binary string the name of the geometry type of which the'+sLineBreak + +'geometry instance g is a member. The name corresponds to one of the'+sLineBreak +'instantiable Geometry subclasses.' ), - // Function nr. 113 + // Function nr. 88 ( Name: 'GEOMFROMTEXT'; Declaration: '(wkt[,srid])'; - Category: 'Geographic Features'; + Category: 'WKT'; Version: SQL_VERSION_ANSI; - Description: 'Constructs a geometry value of any type using its WKT representation ' + Description: 'Constructs a geometry value of any type using its WKT representation'+sLineBreak +'and SRID.' ), - // Function nr. 114 + // Function nr. 89 ( Name: 'GEOMFROMWKB'; Declaration: '(wkb[,srid])'; - Category: 'Geographic Features'; + Category: 'WKB'; Version: SQL_VERSION_ANSI; - Description: 'Constructs a geometry value of any type using its WKB representation ' + Description: 'Constructs a geometry value of any type using its WKB representation'+sLineBreak +'and SRID.' ), - // Function nr. 115 + // Function nr. 90 ( Name: 'GET_FORMAT'; Declaration: '({DATE|TIME|DATETIME}, {''EUR''|''USA''|''JIS''|''ISO''|''INTERNAL''})'; Category: 'Date and Time Functions'; Version: SQL_VERSION_ANSI; - Description: 'Returns a format string. This function is useful in combination with ' + Description: 'Returns a format string. This function is useful in combination with'+sLineBreak +'the DATE_FORMAT() and the STR_TO_DATE() functions.' ), - // Function nr. 116 + // Function nr. 91 ( Name: 'GET_LOCK'; Declaration: '(str,timeout)'; Category: 'Miscellaneous Functions'; Version: SQL_VERSION_ANSI; - Description: 'Tries to obtain a lock with a name given by the string str, using a ' - +'timeout of timeout seconds. Returns 1 if the lock was obtained ' - +'successfully, 0 if the attempt timed out (for example, because another ' - +'client has previously locked the name), or NULL if an error occurred ' - +'(such as running out of memory or the thread was killed with ' - +'mysqladmin kill). If you have a lock obtained with GET_LOCK(), it is ' - +'released when you execute RELEASE_LOCK(), execute a new GET_LOCK(), or ' - +'your connection terminates (either normally or abnormally). Locks ' - +'obtained with GET_LOCK() do not interact with transactions. That is, ' - +'committing a transaction does not release any such locks obtained ' - +'during the transaction. This function can be used to implement ' - +'application locks or to simulate record locks. Names are locked on a ' - +'server-wide basis. If a name has been locked by one client, GET_LOCK() ' - +'blocks any request by another client for a lock with the same name. ' - +'This allows clients that agree on a given lock name to use the name to ' - +'perform cooperative advisory locking. But be aware that it also allows ' - +'a client that is not among the set of cooperating clients to lock a ' - +'name, either inadvertently or deliberately, and thus prevent any of ' - +'the cooperating clients from locking that name. One way to reduce the ' - +'likelihood of this is to use lock names that are database-specific or ' - +'application-specific. For example, use lock names of the form ' - +'db_name.str or app_name.str.' + Description: 'Tries to obtain a lock with a name given by the string str, using a'+sLineBreak + +'timeout of timeout seconds. Returns 1 if the lock was obtained'+sLineBreak + +'successfully, 0 if the attempt timed out (for example, because another'+sLineBreak + +'client has previously locked the name), or NULL if an error occurred'+sLineBreak + +'(such as running out of memory or the thread was killed with mysqladmin'+sLineBreak + +'kill). If you have a lock obtained with GET_LOCK(), it is released when'+sLineBreak + +'you execute RELEASE_LOCK(), execute a new GET_LOCK(), or your'+sLineBreak + +'connection terminates (either normally or abnormally). Locks obtained'+sLineBreak + +'with GET_LOCK() do not interact with transactions. That is, committing'+sLineBreak + +'a transaction does not release any such locks obtained during the'+sLineBreak + +'transaction.'+sLineBreak + +''+sLineBreak + +'This function can be used to implement application locks or to simulate'+sLineBreak + +'record locks. Names are locked on a server-wide basis. If a name has'+sLineBreak + +'been locked by one client, GET_LOCK() blocks any request by another'+sLineBreak + +'client for a lock with the same name. This enables clients that agree'+sLineBreak + +'on a given lock name to use the name to perform cooperative advisory'+sLineBreak + +'locking. But be aware that it also enables a client that is not among'+sLineBreak + +'the set of cooperating clients to lock a name, either inadvertently or'+sLineBreak + +'deliberately, and thus prevent any of the cooperating clients from'+sLineBreak + +'locking that name. One way to reduce the likelihood of this is to use'+sLineBreak + +'lock names that are database-specific or application-specific. For'+sLineBreak + +'example, use lock names of the form db_name.str or app_name.str.' ), - // Function nr. 117 + // Function nr. 92 ( Name: 'GLENGTH'; Declaration: '(ls)'; - Category: 'Geographic Features'; + Category: 'LineString properties'; Version: SQL_VERSION_ANSI; - Description: 'Returns as a double-precision number the length of the LineString ' - +'value ls in its associated spatial reference.' + Description: 'Returns as a double-precision number the length of the LineString value'+sLineBreak + +'ls in its associated spatial reference.' ), - // Function nr. 118 + // Function nr. 93 ( Name: 'GREATEST'; Declaration: '(value1,value2,...)'; Category: 'Comparison operators'; Version: SQL_VERSION_ANSI; - Description: 'With two or more arguments, returns the largest (maximum-valued) ' - +'argument. The arguments are compared using the same rules as for ' + Description: 'With two or more arguments, returns the largest (maximum-valued)'+sLineBreak + +'argument. The arguments are compared using the same rules as for'+sLineBreak +'LEAST().' ), - // Function nr. 119 + // Function nr. 94 ( Name: 'GROUP_CONCAT'; Declaration: '(expr)'; Category: 'Functions and Modifiers for Use with GROUP BY'; Version: SQL_VERSION_ANSI; - Description: 'This function returns a string result with the concatenated non-NULL ' - +'values from a group. It returns NULL if there are no non-NULL values. ' - +'The full syntax is as follows: GROUP_CONCAT([DISTINCT] expr [,expr ' - +'...] [ORDER BY {unsigned_integer | col_name | expr} [ASC | DESC] ' - +'[,col_name ...]] [SEPARATOR str_val])' + Description: 'This function returns a string result with the concatenated non-NULL'+sLineBreak + +'values from a group. It returns NULL if there are no non-NULL values.'+sLineBreak + +'The full syntax is as follows:'+sLineBreak + +''+sLineBreak + +'GROUP_CONCAT([DISTINCT] expr [,expr ...]'+sLineBreak + +' [ORDER BY {unsigned_integer | col_name | expr}'+sLineBreak + +' [ASC | DESC] [,col_name ...]]'+sLineBreak + +' [SEPARATOR str_val])' ), - // Function nr. 120 + // Function nr. 95 ( Name: 'HEX'; - Declaration: '(N_or_S)'; + Declaration: '(str)'; Category: 'String Functions'; Version: SQL_VERSION_ANSI; - Description: 'If N_or_S is a number, returns a string representation of the ' - +'hexadecimal value of N, where N is a longlong (BIGINT) number. This is ' - +'equivalent to CONV(N,10,16). If N_or_S is a string, returns a ' - +'hexadecimal string representation of N_or_S where each character in ' - +'N_or_S is converted to two hexadecimal digits. The inverse of this ' - +'operation is performed by the UNHEX() function.' + Description: 'For a string argument str, HEX() returns a hexadecimal string'+sLineBreak + +'representation of str where each character in str is converted to two'+sLineBreak + +'hexadecimal digits. The inverse of this operation is performed by the'+sLineBreak + +'UNHEX() function.'+sLineBreak + +''+sLineBreak + +'For a numeric argument N, HEX() returns a hexadecimal string'+sLineBreak + +'representation of the value of N treated as a longlong (BIGINT) number.'+sLineBreak + +'This is equivalent to CONV(N,10,16). The inverse of this operation is'+sLineBreak + +'performed by CONV(HEX(N),16,10).' ), - // Function nr. 121 + // Function nr. 96 ( Name: 'HOUR'; Declaration: '(time)'; Category: 'Date and Time Functions'; Version: SQL_VERSION_ANSI; - Description: 'Returns the hour for time. The range of the return value is 0 to 23 ' - +'for time-of-day values. However, the range of TIME values actually is ' - +'much larger, so HOUR can return values greater than 23.' + Description: 'Returns the hour for time. The range of the return value is 0 to 23 for'+sLineBreak + +'time-of-day values. However, the range of TIME values actually is much'+sLineBreak + +'larger, so HOUR can return values greater than 23.' ), - // Function nr. 122 - ( - Name: 'IF'; - Declaration: '(expr1,expr2,expr3)'; - Category: 'Control flow functions'; - Version: SQL_VERSION_ANSI; - Description: 'If expr1 is TRUE (expr1 <> 0 and expr1 <> NULL) then IF() returns ' - +'expr2; otherwise it returns expr3. IF() returns a numeric or string ' - +'value, depending on the context in which it is used.' - ), - - // Function nr. 123 + // Function nr. 97 ( Name: 'IFNULL'; Declaration: '(expr1,expr2)'; Category: 'Control flow functions'; Version: SQL_VERSION_ANSI; - Description: 'If expr1 is not NULL, IFNULL() returns expr1; otherwise it returns ' - +'expr2. IFNULL() returns a numeric or string value, depending on the ' + Description: 'If expr1 is not NULL, IFNULL() returns expr1; otherwise it returns'+sLineBreak + +'expr2. IFNULL() returns a numeric or string value, depending on the'+sLineBreak +'context in which it is used.' ), - // Function nr. 124 - ( - Name: 'IN'; - Declaration: '(value,...)'; - Category: 'Comparison operators'; - Version: SQL_VERSION_ANSI; - Description: 'Returns 1 if expr is equal to any of the values in the IN list, else ' - +'returns 0. If all values are constants, they are evaluated according ' - +'to the type of expr and sorted. The search for the item then is done ' - +'using a binary search. This means IN is very quick if the IN value ' - +'list consists entirely of constants. Otherwise, type conversion takes ' - +'place according to the rules described in ' - +'http://dev.mysql.com/doc/refman/5.1/en/type-conversion.html, but ' - +'applied to all the arguments.' - ), - - // Function nr. 125 + // Function nr. 98 ( Name: 'INET_ATON'; Declaration: '(expr)'; Category: 'Miscellaneous Functions'; Version: SQL_VERSION_ANSI; - Description: 'Given the dotted-quad representation of a network address as a string, ' - +'returns an integer that represents the numeric value of the address. ' - +'Addresses may be 4- or 8-byte addresses.' + Description: 'Given the dotted-quad representation of an IPv4 network address as a'+sLineBreak + +'string, returns an integer that represents the numeric value of the'+sLineBreak + +'address in network byte order (big endian). INET_ATON() returns NULL if'+sLineBreak + +'it does not understand its argument.' ), - // Function nr. 126 + // Function nr. 99 ( Name: 'INET_NTOA'; Declaration: '(expr)'; Category: 'Miscellaneous Functions'; Version: SQL_VERSION_ANSI; - Description: 'Given a numeric network address in network byte order (4 or 8 byte), ' - +'returns the dotted-quad representation of the address as a string.' + Description: 'Given a numeric IPv4 network address in network byte order, returns the'+sLineBreak + +'dotted-quad representation of the address as a string. INET_NTOA()'+sLineBreak + +'returns NULL if it does not understand its argument.'+sLineBreak + +''+sLineBreak + +'As of MySQL 5.5.3, the return value is a nonbinary string in the'+sLineBreak + +'connection character set. Before 5.5.3, the return value is a binary'+sLineBreak + +'string.' ), - // Function nr. 127 - ( - Name: 'INSERT'; - Declaration: '(str,pos,len,newstr)'; - Category: 'String Functions'; - Version: SQL_VERSION_ANSI; - Description: 'Returns the string str, with the substring beginning at position pos ' - +'and len characters long replaced by the string newstr. Returns the ' - +'original string if pos is not within the length of the string. ' - +'Replaces the rest of the string from position pos if len is not within ' - +'the length of the rest of the string. Returns NULL if any argument is ' - +'NULL.' - ), - - // Function nr. 128 + // Function nr. 100 ( Name: 'INSTR'; Declaration: '(str,substr)'; Category: 'String Functions'; Version: SQL_VERSION_ANSI; - Description: 'Returns the position of the first occurrence of substring substr in ' - +'string str. This is the same as the two-argument form of LOCATE(), ' + Description: 'Returns the position of the first occurrence of substring substr in'+sLineBreak + +'string str. This is the same as the two-argument form of LOCATE(),'+sLineBreak +'except that the order of the arguments is reversed.' ), - // Function nr. 129 + // Function nr. 101 ( Name: 'INTERIORRINGN'; Declaration: '(poly,N)'; - Category: 'Geographic Features'; + Category: 'Polygon properties'; Version: SQL_VERSION_ANSI; - Description: 'Returns the N-th interior ring for the Polygon value poly as a ' + Description: 'Returns the N-th interior ring for the Polygon value poly as a'+sLineBreak +'LineString. Rings are numbered beginning with 1.' ), - // Function nr. 130 + // Function nr. 102 ( Name: 'INTERSECTS'; Declaration: '(g1,g2)'; - Category: 'Geographic Features'; + Category: 'Geometry relations'; Version: SQL_VERSION_ANSI; Description: 'Returns 1 or 0 to indicate whether g1 spatially intersects g2.' ), - // Function nr. 131 + // Function nr. 103 ( Name: 'INTERVAL'; Declaration: '(N,N1,N2,N3,...)'; Category: 'Comparison operators'; Version: SQL_VERSION_ANSI; - Description: 'Returns 0 if N < N1, 1 if N < N2 and so on or -1 if N is NULL. All ' - +'arguments are treated as integers. It is required that N1 < N2 < N3 < ' - +'... < Nn for this function to work correctly. This is because a binary ' + Description: 'Returns 0 if N < N1, 1 if N < N2 and so on or -1 if N is NULL. All'+sLineBreak + +'arguments are treated as integers. It is required that N1 < N2 < N3 <'+sLineBreak + +'... < Nn for this function to work correctly. This is because a binary'+sLineBreak +'search is used (very fast).' ), - // Function nr. 132 - ( - Name: 'IS'; - Declaration: ''; - Category: 'Comparison operators'; - Version: SQL_VERSION_ANSI; - Description: 'Tests a value against a boolean value, where boolean_value can be ' - +'TRUE, FALSE, or UNKNOWN.' - ), - - // Function nr. 133 + // Function nr. 104 ( Name: 'ISEMPTY'; Declaration: '(g)'; - Category: 'Geographic Features'; + Category: 'Geometry properties'; Version: SQL_VERSION_ANSI; - Description: 'Returns 1 if the geometry value g is the empty geometry, 0 if it is ' - +'not empty, and -1 if the argument is NULL. If the geometry is empty, ' - +'it represents the empty point set.' + Description: 'Returns 1 if the geometry value g is the empty geometry, 0 if it is not'+sLineBreak + +'empty, and -1 if the argument is NULL. If the geometry is empty, it'+sLineBreak + +'represents the empty point set.' ), - // Function nr. 134 + // Function nr. 105 ( Name: 'ISNULL'; Declaration: '(expr)'; @@ -3548,106 +3358,109 @@ var Description: 'If expr is NULL, ISNULL() returns 1, otherwise it returns 0.' ), - // Function nr. 135 + // Function nr. 106 ( Name: 'ISSIMPLE'; Declaration: '(g)'; - Category: 'Geographic Features'; + Category: 'Geometry properties'; Version: SQL_VERSION_ANSI; - Description: 'Currently, this function is a placeholder and should not be used. If ' - +'implemented, its behavior will be as described in the next paragraph. ' - +'Returns 1 if the geometry value g has no anomalous geometric points, ' - +'such as self-intersection or self-tangency. IsSimple() returns 0 if ' - +'the argument is not simple, and -1 if it is NULL. The description of ' - +'each instantiable geometric class given earlier in the chapter ' - +'includes the specific conditions that cause an instance of that class ' - +'to be classified as not simple. (See [HELP Geometry hierarchy].)' + Description: 'Currently, this function is a placeholder and should not be used. If'+sLineBreak + +'implemented, its behavior will be as described in the next paragraph.'+sLineBreak + +''+sLineBreak + +'Returns 1 if the geometry value g has no anomalous geometric points,'+sLineBreak + +'such as self-intersection or self-tangency. IsSimple() returns 0 if the'+sLineBreak + +'argument is not simple, and -1 if it is NULL.'+sLineBreak + +''+sLineBreak + +'The description of each instantiable geometric class given earlier in'+sLineBreak + +'the chapter includes the specific conditions that cause an instance of'+sLineBreak + +'that class to be classified as not simple. (See [HELP Geometry'+sLineBreak + +'hierarchy].)' ), - // Function nr. 136 + // Function nr. 107 ( Name: 'IS_FREE_LOCK'; Declaration: '(str)'; Category: 'Miscellaneous Functions'; Version: SQL_VERSION_ANSI; - Description: 'Checks whether the lock named str is free to use (that is, not ' - +'locked). Returns 1 if the lock is free (no one is using the lock), 0 ' - +'if the lock is in use, and NULL if an error occurs (such as an ' - +'incorrect argument).' + Description: 'Checks whether the lock named str is free to use (that is, not locked).'+sLineBreak + +'Returns 1 if the lock is free (no one is using the lock), 0 if the lock'+sLineBreak + +'is in use, and NULL if an error occurs (such as an incorrect argument).' ), - // Function nr. 137 + // Function nr. 108 ( Name: 'IS_USED_LOCK'; Declaration: '(str)'; Category: 'Miscellaneous Functions'; Version: SQL_VERSION_ANSI; - Description: 'Checks whether the lock named str is in use (that is, locked). If so, ' - +'it returns the connection identifier of the client that holds the ' - +'lock. Otherwise, it returns NULL.' + Description: 'Checks whether the lock named str is in use (that is, locked). If so,'+sLineBreak + +'it returns the connection identifier of the client that holds the lock.'+sLineBreak + +'Otherwise, it returns NULL.' ), - // Function nr. 138 + // Function nr. 109 ( Name: 'LAST_DAY'; Declaration: '(date)'; Category: 'Date and Time Functions'; Version: SQL_VERSION_ANSI; - Description: 'Takes a date or datetime value and returns the corresponding value for ' + Description: 'Takes a date or datetime value and returns the corresponding value for'+sLineBreak +'the last day of the month. Returns NULL if the argument is invalid.' ), - // Function nr. 139 + // Function nr. 110 ( Name: 'LAST_INSERT_ID'; Declaration: '()'; Category: 'Information Functions'; Version: SQL_VERSION_ANSI; - Description: 'For MySQL 5.1.12 and later, LAST_INSERT_ID() (no arguments) returns ' - +'the first automatically generated value successfully inserted for an ' - +'AUTO_INCREMENT column as a result of the most recently executed INSERT ' - +'statement. The value of LAST_INSERT_ID() remains unchanged if no rows ' - +'are successfully inserted. For example, after inserting a row that ' - +'generates an AUTO_INCREMENT value, you can get the value like this: ' - +'mysql> SELECT LAST_INSERT_ID(); -> 195 In MySQL 5.1.11 and earlier, ' - +'LAST_INSERT_ID() (no arguments) returns the first automatically ' - +'generated value if any rows were successfully inserted or updated. ' - +'This means that the returned value could be a value that was not ' - +'successfully inserted into the table. If no rows were successfully ' - +'inserted, LAST_INSERT_ID() returns 0. The value of LAST_INSERT_ID() ' - +'will be consistent across all versions if all rows in the INSERT or ' - +'UPDATE statement were successful. if a table contains an ' - +'AUTO_INCREMENT column and INSERT ... ON DUPLICATE KEY UPDATE updates ' - +'(rather than inserts) a row, the value of LAST_INSERT_ID() is not ' - +'meaningful prior to MySQL 5.1.12. For a workaround, see ' - +'http://dev.mysql.com/doc/refman/5.1/en/insert-on-duplicate.html. The ' - +'currently executing statement does not affect the value of ' - +'LAST_INSERT_ID(). Suppose that you generate an AUTO_INCREMENT value ' - +'with one statement, and then refer to LAST_INSERT_ID() in a ' - +'multiple-row INSERT statement that inserts rows into a table with its ' - +'own AUTO_INCREMENT column. The value of LAST_INSERT_ID() will remain ' - +'stable in the second statement; its value for the second and later ' - +'rows is not affected by the earlier row insertions. (However, if you ' - +'mix references to LAST_INSERT_ID() and LAST_INSERT_ID(expr), the ' - +'effect is undefined.) If the previous statement returned an error, the ' - +'value of LAST_INSERT_ID() is undefined. For transactional tables, if ' - +'the statement is rolled back due to an error, the value of ' - +'LAST_INSERT_ID() is left undefined. For manual ROLLBACK, the value of ' - +'LAST_INSERT_ID() is not restored to that before the transaction; it ' - +'remains as it was at the point of the ROLLBACK. Within the body of a ' - +'stored routine (procedure or function) or a trigger, the value of ' - +'LAST_INSERT_ID() changes the same way as for statements executed ' - +'outside the body of these kinds of objects. The effect of a stored ' - +'routine or trigger upon the value of LAST_INSERT_ID() that is seen by ' - +'following statements depends on the kind of routine: If a stored ' - +'procedure executes statements that change the value of ' - +'LAST_INSERT_ID(), the changed value will be seen by statements that ' - +'follow the procedure call. For stored functions and triggers that ' - +'change the value, the value is restored when the function or trigger ' - +'ends, so following statements will not see a changed value.' + Description: 'LAST_INSERT_ID() (with no argument) returns a BIGINT (64-bit) value'+sLineBreak + +'representing the first automatically generated value successfully'+sLineBreak + +'inserted for an AUTO_INCREMENT column as a result of the most recently'+sLineBreak + +'executed INSERT statement. The value of LAST_INSERT_ID() remains'+sLineBreak + +'unchanged if no rows are successfully inserted.'+sLineBreak + +''+sLineBreak + +'For example, after inserting a row that generates an AUTO_INCREMENT'+sLineBreak + +'value, you can get the value like this:'+sLineBreak + +''+sLineBreak + +'MariaDB> SELECT LAST_INSERT_ID();'+sLineBreak + +' -> 195'+sLineBreak + +''+sLineBreak + +'The currently executing statement does not affect the value of'+sLineBreak + +'LAST_INSERT_ID(). Suppose that you generate an AUTO_INCREMENT value'+sLineBreak + +'with one statement, and then refer to LAST_INSERT_ID() in a'+sLineBreak + +'multiple-row INSERT statement that inserts rows into a table with its'+sLineBreak + +'own AUTO_INCREMENT column. The value of LAST_INSERT_ID() will remain'+sLineBreak + +'stable in the second statement; its value for the second and later rows'+sLineBreak + +'is not affected by the earlier row insertions. (However, if you mix'+sLineBreak + +'references to LAST_INSERT_ID() and LAST_INSERT_ID(expr), the effect is'+sLineBreak + +'undefined.)'+sLineBreak + +''+sLineBreak + +'If the previous statement returned an error, the value of'+sLineBreak + +'LAST_INSERT_ID() is undefined. For transactional tables, if the'+sLineBreak + +'statement is rolled back due to an error, the value of LAST_INSERT_ID()'+sLineBreak + +'is left undefined. For manual ROLLBACK, the value of LAST_INSERT_ID()'+sLineBreak + +'is not restored to that before the transaction; it remains as it was at'+sLineBreak + +'the point of the ROLLBACK.'+sLineBreak + +''+sLineBreak + +'Within the body of a stored routine (procedure or function) or a'+sLineBreak + +'trigger, the value of LAST_INSERT_ID() changes the same way as for'+sLineBreak + +'statements executed outside the body of these kinds of objects. The'+sLineBreak + +'effect of a stored routine or trigger upon the value of'+sLineBreak + +'LAST_INSERT_ID() that is seen by following statements depends on the'+sLineBreak + +'kind of routine:'+sLineBreak + +''+sLineBreak + +'o If a stored procedure executes statements that change the value of'+sLineBreak + +' LAST_INSERT_ID(), the changed value is seen by statements that follow'+sLineBreak + +' the procedure call.'+sLineBreak + +''+sLineBreak + +'o For stored functions and triggers that change the value, the value is'+sLineBreak + +' restored when the function or trigger ends, so following statements'+sLineBreak + +' will not see a changed value.' ), - // Function nr. 140 + // Function nr. 111 ( Name: 'LCASE'; Declaration: '(str)'; @@ -3656,158 +3469,140 @@ var Description: 'LCASE() is a synonym for LOWER().' ), - // Function nr. 141 + // Function nr. 112 ( Name: 'LEAST'; Declaration: '(value1,value2,...)'; Category: 'Comparison operators'; Version: SQL_VERSION_ANSI; - Description: 'With two or more arguments, returns the smallest (minimum-valued) ' - +'argument. The arguments are compared using the following rules: If the ' - +'return value is used in an INTEGER context or all arguments are ' - +'integer-valued, they are compared as integers. If the return value is ' - +'used in a REAL context or all arguments are real-valued, they are ' - +'compared as reals. If any argument is a case-sensitive string, the ' - +'arguments are compared as case-sensitive strings. In all other cases, ' - +'the arguments are compared as case-insensitive strings. LEAST() ' - +'returns NULL if any argument is NULL.' + Description: 'With two or more arguments, returns the smallest (minimum-valued)'+sLineBreak + +'argument. The arguments are compared using the following rules:'+sLineBreak + +''+sLineBreak + +'o If any argument is NULL, the result is NULL. No comparison is needed.'+sLineBreak + +''+sLineBreak + +'o If the return value is used in an INTEGER context or all arguments'+sLineBreak + +' are integer-valued, they are compared as integers.'+sLineBreak + +''+sLineBreak + +'o If the return value is used in a REAL context or all arguments are'+sLineBreak + +' real-valued, they are compared as reals.'+sLineBreak + +''+sLineBreak + +'o If the arguments comprise a mix of numbers and strings, they are'+sLineBreak + +' compared as numbers.'+sLineBreak + +''+sLineBreak + +'o If any argument is a nonbinary (character) string, the arguments are'+sLineBreak + +' compared as nonbinary strings.'+sLineBreak + +''+sLineBreak + +'o In all other cases, the arguments are compared as binary strings.' ), - // Function nr. 142 + // Function nr. 113 ( Name: 'LEFT'; Declaration: '(str,len)'; Category: 'String Functions'; Version: SQL_VERSION_ANSI; - Description: 'Returns the leftmost len characters from the string str, or NULL if ' - +'any argument is NULL.' + Description: 'Returns the leftmost len characters from the string str, or NULL if any'+sLineBreak + +'argument is NULL.' ), - // Function nr. 143 + // Function nr. 114 ( Name: 'LENGTH'; Declaration: '(str)'; Category: 'String Functions'; Version: SQL_VERSION_ANSI; - Description: 'Returns the length of the string str, measured in bytes. A multi-byte ' - +'character counts as multiple bytes. This means that for a string ' - +'containing five two-byte characters, LENGTH() returns 10, whereas ' + Description: 'Returns the length of the string str, measured in bytes. A multi-byte'+sLineBreak + +'character counts as multiple bytes. This means that for a string'+sLineBreak + +'containing five 2-byte characters, LENGTH() returns 10, whereas'+sLineBreak +'CHAR_LENGTH() returns 5.' ), - // Function nr. 144 - ( - Name: 'LIKE'; - Declaration: ''; - Category: 'String Functions'; - Version: SQL_VERSION_ANSI; - Description: 'Pattern matching using SQL simple regular expression comparison. ' - +'Returns 1 (TRUE) or 0 (FALSE). If either expr or pat is NULL, the ' - +'result is NULL. The pattern need not be a literal string. For example, ' - +'it can be specified as a string expression or table column.' - ), - - // Function nr. 145 + // Function nr. 115 ( Name: 'LINEFROMTEXT'; Declaration: '(wkt[,srid])'; - Category: 'Geographic Features'; + Category: 'WKT'; Version: SQL_VERSION_ANSI; Description: 'Constructs a LINESTRING value using its WKT representation and SRID.' ), - // Function nr. 146 + // Function nr. 116 ( Name: 'LINEFROMWKB'; Declaration: '(wkb[,srid])'; - Category: 'Geographic Features'; + Category: 'WKB'; Version: SQL_VERSION_ANSI; Description: 'Constructs a LINESTRING value using its WKB representation and SRID.' ), - // Function nr. 147 + // Function nr. 117 ( Name: 'LINESTRING'; Declaration: '(pt1,pt2,...)'; - Category: 'Geographic Features'; + Category: 'Geometry constructors'; Version: SQL_VERSION_ANSI; - Description: 'Constructs a LineString value from a number of Point or WKB Point ' - +'arguments. If the number of arguments is less than two, the return ' + Description: 'Constructs a LineString value from a number of Point or WKB Point'+sLineBreak + +'arguments. If the number of arguments is less than two, the return'+sLineBreak +'value is NULL.' ), - // Function nr. 148 + // Function nr. 118 ( Name: 'LN'; Declaration: '(X)'; Category: 'Numeric Functions'; Version: SQL_VERSION_ANSI; - Description: 'Returns the natural logarithm of X; that is, the base-e logarithm of ' - +'X. If X is less than or equal to 0, then NULL is returned.' + Description: 'Returns the natural logarithm of X; that is, the base-e logarithm of X.'+sLineBreak + +'If X is less than or equal to 0, then NULL is returned.' ), - // Function nr. 149 + // Function nr. 119 ( Name: 'LOAD_FILE'; Declaration: '(file_name)'; Category: 'String Functions'; Version: SQL_VERSION_ANSI; - Description: 'Reads the file and returns the file contents as a string. To use this ' - +'function, the file must be located on the server host, you must ' - +'specify the full path name to the file, and you must have the FILE ' - +'privilege. The file must be readable by all and its size less than ' - +'max_allowed_packet bytes. If the secure_file_priv system variable is ' - +'set to a nonempty directory name, the file to be loaded must be ' - +'located in that directory. If the file does not exist or cannot be ' - +'read because one of the preceding conditions is not satisfied, the ' - +'function returns NULL. As of MySQL 5.1.6, the character_set_filesystem ' - +'system variable controls interpretation of file names that are given ' - +'as literal strings.' + Description: 'Reads the file and returns the file contents as a string. To use this'+sLineBreak + +'function, the file must be located on the server host, you must specify'+sLineBreak + +'the full path name to the file, and you must have the FILE privilege.'+sLineBreak + +'The file must be readable by all and its size less than'+sLineBreak + +'max_allowed_packet bytes. If the secure_file_priv system variable is'+sLineBreak + +'set to a nonempty directory name, the file to be loaded must be located'+sLineBreak + +'in that directory.'+sLineBreak + +''+sLineBreak + +'If the file does not exist or cannot be read because one of the'+sLineBreak + +'preceding conditions is not satisfied, the function returns NULL.'+sLineBreak + +''+sLineBreak + +'The character_set_filesystem system variable controls interpretation of'+sLineBreak + +'file names that are given as literal strings.' ), - // Function nr. 150 - ( - Name: 'LOCALTIME'; - Declaration: '()'; - Category: 'Date and Time Functions'; - Version: SQL_VERSION_ANSI; - Description: 'LOCALTIME and LOCALTIME() are synonyms for NOW().' - ), - - // Function nr. 151 - ( - Name: 'LOCALTIMESTAMP'; - Declaration: '()'; - Category: 'Date and Time Functions'; - Version: SQL_VERSION_ANSI; - Description: 'LOCALTIMESTAMP and LOCALTIMESTAMP() are synonyms for NOW().' - ), - - // Function nr. 152 + // Function nr. 120 ( Name: 'LOCATE'; Declaration: '(substr,str)'; Category: 'String Functions'; Version: SQL_VERSION_ANSI; - Description: 'The first syntax returns the position of the first occurrence of ' - +'substring substr in string str. The second syntax returns the position ' - +'of the first occurrence of substring substr in string str, starting at ' + Description: 'The first syntax returns the position of the first occurrence of'+sLineBreak + +'substring substr in string str. The second syntax returns the position'+sLineBreak + +'of the first occurrence of substring substr in string str, starting at'+sLineBreak +'position pos. Returns 0 if substr is not in str.' ), - // Function nr. 153 + // Function nr. 121 ( Name: 'LOG'; Declaration: '(X)'; Category: 'Numeric Functions'; Version: SQL_VERSION_ANSI; - Description: 'If called with one parameter, this function returns the natural ' - +'logarithm of X. If X is less than or equal to 0, then NULL is ' - +'returned. The inverse of this function (when called with a single ' - +'argument) is the EXP() function.' + Description: 'If called with one parameter, this function returns the natural'+sLineBreak + +'logarithm of X. If X is less than or equal to 0, then NULL is returned.'+sLineBreak + +''+sLineBreak + +'The inverse of this function (when called with a single argument) is'+sLineBreak + +'the EXP() function.' ), - // Function nr. 154 + // Function nr. 122 ( Name: 'LOG10'; Declaration: '(X)'; @@ -3816,7 +3611,7 @@ var Description: 'Returns the base-10 logarithm of X.' ), - // Function nr. 155 + // Function nr. 123 ( Name: 'LOG2'; Declaration: '(X)'; @@ -3825,37 +3620,44 @@ var Description: 'Returns the base-2 logarithm of X.' ), - // Function nr. 156 + // Function nr. 124 ( Name: 'LOWER'; Declaration: '(str)'; Category: 'String Functions'; Version: SQL_VERSION_ANSI; - Description: 'Returns the string str with all characters changed to lowercase ' - +'according to the current character set mapping. The default is latin1 ' - +'(cp1252 West European). mysql> SELECT LOWER(''QUADRATICALLY''); -> ' - +'''quadratically'' LOWER() (and UPPER()) are ineffective when applied ' - +'to binary strings (BINARY, VARBINARY, BLOB). To perform lettercase ' - +'conversion, convert the string to a nonbinary string: mysql> SET @str ' - +'= BINARY ''New York''; mysql> SELECT LOWER(@str), LOWER(CONVERT(@str ' - +'USING latin1)); +-------------+-----------------------------------+ | ' - +'LOWER(@str) | LOWER(CONVERT(@str USING latin1)) | ' - +'+-------------+-----------------------------------+ | New York | new ' - +'york | +-------------+-----------------------------------+' + Description: 'Returns the string str with all characters changed to lowercase'+sLineBreak + +'according to the current character set mapping. The default is latin1'+sLineBreak + +'(cp1252 West European).'+sLineBreak + +''+sLineBreak + +'MariaDB> SELECT LOWER(''QUADRATICALLY'');'+sLineBreak + +' -> ''quadratically'''+sLineBreak + +''+sLineBreak + +'LOWER() (and UPPER()) are ineffective when applied to binary strings'+sLineBreak + +'(BINARY, VARBINARY, BLOB). To perform lettercase conversion, convert'+sLineBreak + +'the string to a nonbinary string:'+sLineBreak + +''+sLineBreak + +'MariaDB> SET @str = BINARY ''New York'';'+sLineBreak + +'MariaDB> SELECT LOWER(@str), LOWER(CONVERT(@str USING latin1));'+sLineBreak + +'+-------------+-----------------------------------+'+sLineBreak + +'| LOWER(@str) | LOWER(CONVERT(@str USING latin1)) |'+sLineBreak + +'+-------------+-----------------------------------+'+sLineBreak + +'| New York | new york |'+sLineBreak + +'+-------------+-----------------------------------+' ), - // Function nr. 157 + // Function nr. 125 ( Name: 'LPAD'; Declaration: '(str,len,padstr)'; Category: 'String Functions'; Version: SQL_VERSION_ANSI; - Description: 'Returns the string str, left-padded with the string padstr to a length ' - +'of len characters. If str is longer than len, the return value is ' + Description: 'Returns the string str, left-padded with the string padstr to a length'+sLineBreak + +'of len characters. If str is longer than len, the return value is'+sLineBreak +'shortened to len characters.' ), - // Function nr. 158 + // Function nr. 126 ( Name: 'LTRIM'; Declaration: '(str)'; @@ -3864,229 +3666,182 @@ var Description: 'Returns the string str with leading space characters removed.' ), - // Function nr. 159 + // Function nr. 127 ( Name: 'MAKEDATE'; Declaration: '(year,dayofyear)'; Category: 'Date and Time Functions'; Version: SQL_VERSION_ANSI; - Description: 'Returns a date, given year and day-of-year values. dayofyear must be ' + Description: 'Returns a date, given year and day-of-year values. dayofyear must be'+sLineBreak +'greater than 0 or the result is NULL.' ), - // Function nr. 160 + // Function nr. 128 ( Name: 'MAKETIME'; Declaration: '(hour,minute,second)'; Category: 'Date and Time Functions'; Version: SQL_VERSION_ANSI; - Description: 'Returns a time value calculated from the hour, minute, and second ' + Description: 'Returns a time value calculated from the hour, minute, and second'+sLineBreak +'arguments.' ), - // Function nr. 161 + // Function nr. 129 ( Name: 'MAKE_SET'; Declaration: '(bits,str1,str2,...)'; Category: 'String Functions'; Version: SQL_VERSION_ANSI; - Description: 'Returns a set value (a string containing substrings separated by "," ' - +'characters) consisting of the strings that have the corresponding bit ' - +'in bits set. str1 corresponds to bit 0, str2 to bit 1, and so on. NULL ' + Description: 'Returns a set value (a string containing substrings separated by ","'+sLineBreak + +'characters) consisting of the strings that have the corresponding bit'+sLineBreak + +'in bits set. str1 corresponds to bit 0, str2 to bit 1, and so on. NULL'+sLineBreak +'values in str1, str2, ... are not appended to the result.' ), - // Function nr. 162 + // Function nr. 130 ( Name: 'MASTER_POS_WAIT'; Declaration: '(log_name,log_pos[,timeout])'; Category: 'Miscellaneous Functions'; Version: SQL_VERSION_ANSI; - Description: 'This function is useful for control of master/slave synchronization. ' - +'It blocks until the slave has read and applied all updates up to the ' - +'specified position in the master log. The return value is the number ' - +'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() 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() stops waiting when ' - +'timeout seconds have elapsed. timeout must be greater than 0; a zero ' - +'or negative timeout means no timeout.' + Description: 'This function is useful for control of master/slave synchronization. It'+sLineBreak + +'blocks until the slave has read and applied all updates up to the'+sLineBreak + +'specified position in the master log. The return value is the number of'+sLineBreak + +'log events the slave had to wait for to advance to the specified'+sLineBreak + +'position. The function returns NULL if the slave SQL thread is not'+sLineBreak + +'started, the slave''s master information is not initialized, the'+sLineBreak + +'arguments are incorrect, or an error occurs. It returns -1 if the'+sLineBreak + +'timeout has been exceeded. If the slave SQL thread stops while'+sLineBreak + +'MASTER_POS_WAIT() is waiting, the function returns NULL. If the slave'+sLineBreak + +'is past the specified position, the function returns immediately.'+sLineBreak + +''+sLineBreak + +'If a timeout value is specified, MASTER_POS_WAIT() stops waiting when'+sLineBreak + +'timeout seconds have elapsed. timeout must be greater than 0; a zero or'+sLineBreak + +'negative timeout means no timeout.' ), - // Function nr. 163 - ( - Name: 'MATCH'; - Declaration: '(col1,col2,...)'; - Category: 'String Functions'; - Version: SQL_VERSION_ANSI; - Description: 'MySQL has support for full-text indexing and searching: A full-text ' - +'index in MySQL is an index of type FULLTEXT. Full-text indexes can be ' - +'used only with MyISAM tables, and can be created only for CHAR, ' - +'VARCHAR, or TEXT columns. A FULLTEXT index definition can be given in ' - +'the CREATE TABLE statement when a table is created, or added later ' - +'using ALTER TABLE or CREATE INDEX. For large data sets, it is much ' - +'faster to load your data into a table that has no FULLTEXT index and ' - +'then create the index after that, than to load data into a table that ' - +'has an existing FULLTEXT index. Full-text searching is performed using ' - +'MATCH() ... AGAINST syntax. MATCH() takes a comma-separated list that ' - +'names the columns to be searched. AGAINST takes a string to search ' - +'for, and an optional modifier that indicates what type of search to ' - +'perform. The search string must be a literal string, not a variable or ' - +'a column name. There are three types of full-text searches: A boolean ' - +'search interprets the search string using the rules of a special query ' - +'language. The string contains the words to search for. It can also ' - +'contain operators that specify requirements such that a word must be ' - +'present or absent in matching rows, or that it should be weighted ' - +'higher or lower than usual. Common words such as "some" or "then" are ' - +'stopwords and do not match if present in the search string. The IN ' - +'BOOLEAN MODE modifier specifies a boolean search. For more ' - +'information, see ' - +'http://dev.mysql.com/doc/refman/5.1/en/fulltext-boolean.html. A ' - +'natural language search interprets the search string as a phrase in ' - +'natural human language (a phrase in free text). There are no special ' - +'operators. The stopword list applies. In addition, words that are ' - +'present in 50% or more of the rows are considered common and do not ' - +'match. Full-text searches are natural language searches if the IN ' - +'NATURAL LANGUAGE MODE modifier is given or if no modifier is given. A ' - +'query expansion search is a modification of a natural language search. ' - +'The search string is used to perform a natural language search. Then ' - +'words from the most relevant rows returned by the search are added to ' - +'the search string and the search is done again. The query returns the ' - +'rows from the second search. The IN NATURAL LANGUAGE MODE WITH QUERY ' - +'EXPANSION or WITH QUERY EXPANSION modifier specifies a query expansion ' - +'search. For more information, see ' - +'http://dev.mysql.com/doc/refman/5.1/en/fulltext-query-expansion.html. ' - +'The IN NATURAL LANGUAGE MODE and IN NATURAL LANGUAGE MODE WITH QUERY ' - +'EXPANSION modifiers were added in MySQL 5.1.7.' - ), - - // Function nr. 164 + // Function nr. 131 ( Name: 'MAX'; Declaration: '([DISTINCT] expr)'; Category: 'Functions and Modifiers for Use with GROUP BY'; Version: SQL_VERSION_ANSI; - Description: 'Returns the maximum value of expr. MAX() may take a string argument; ' - +'in such cases, it returns the maximum string value. See ' - +'http://dev.mysql.com/doc/refman/5.1/en/mysql-indexes.html. The ' - +'DISTINCT keyword can be used to find the maximum of the distinct ' - +'values of expr, however, this produces the same result as omitting ' - +'DISTINCT. MAX() returns NULL if there were no matching rows.' + Description: 'Returns the maximum value of expr. MAX() may take a string argument; in'+sLineBreak + +'such cases, it returns the maximum string value. See'+sLineBreak + +'https://mariadb.com/kb/en/max/. The DISTINCT'+sLineBreak + +'keyword can be used to find the maximum of the distinct values of expr,'+sLineBreak + +'however, this produces the same result as omitting DISTINCT.'+sLineBreak + +''+sLineBreak + +'MAX() returns NULL if there were no matching rows.' ), - // Function nr. 165 - ( - Name: 'MBR'; - Declaration: '(Minimum Bounding Rectangle)'; - Category: 'Geographic Features'; - Version: SQL_VERSION_ANSI; - Description: '' - ), - - // Function nr. 166 + // Function nr. 132 ( Name: 'MBRCONTAINS'; Declaration: '(g1,g2)'; - Category: 'Geographic Features'; + Category: 'MBR'; Version: SQL_VERSION_ANSI; - Description: 'Returns 1 or 0 to indicate whether the Minimum Bounding Rectangle of ' - +'g1 contains the Minimum Bounding Rectangle of g2. This tests the ' - +'opposite relationship as MBRWithin().' + Description: 'Returns 1 or 0 to indicate whether the Minimum Bounding Rectangle of g1'+sLineBreak + +'contains the Minimum Bounding Rectangle of g2. This tests the opposite'+sLineBreak + +'relationship as MBRWithin().' ), - // Function nr. 167 + // Function nr. 133 ( Name: 'MBRDISJOINT'; Declaration: '(g1,g2)'; - Category: 'Geographic Features'; + Category: 'MBR'; Version: SQL_VERSION_ANSI; - Description: 'Returns 1 or 0 to indicate whether the Minimum Bounding Rectangles of ' + Description: 'Returns 1 or 0 to indicate whether the Minimum Bounding Rectangles of'+sLineBreak +'the two geometries g1 and g2 are disjoint (do not intersect).' ), - // Function nr. 168 + // Function nr. 134 ( Name: 'MBREQUAL'; Declaration: '(g1,g2)'; - Category: 'Geographic Features'; + Category: 'MBR'; Version: SQL_VERSION_ANSI; - Description: 'Returns 1 or 0 to indicate whether the Minimum Bounding Rectangles of ' + Description: 'Returns 1 or 0 to indicate whether the Minimum Bounding Rectangles of'+sLineBreak +'the two geometries g1 and g2 are the same.' ), - // Function nr. 169 + // Function nr. 135 ( Name: 'MBRINTERSECTS'; Declaration: '(g1,g2)'; - Category: 'Geographic Features'; + Category: 'MBR'; Version: SQL_VERSION_ANSI; - Description: 'Returns 1 or 0 to indicate whether the Minimum Bounding Rectangles of ' + Description: 'Returns 1 or 0 to indicate whether the Minimum Bounding Rectangles of'+sLineBreak +'the two geometries g1 and g2 intersect.' ), - // Function nr. 170 + // Function nr. 136 ( Name: 'MBROVERLAPS'; Declaration: '(g1,g2)'; - Category: 'Geographic Features'; + Category: 'MBR'; Version: SQL_VERSION_ANSI; - Description: 'Returns 1 or 0 to indicate whether the Minimum Bounding Rectangles of ' - +'the two geometries g1 and g2 overlap. The term spatially overlaps is ' - +'used if two geometries intersect and their intersection results in a ' - +'geometry of the same dimension but not equal to either of the given ' + Description: 'Returns 1 or 0 to indicate whether the Minimum Bounding Rectangles of'+sLineBreak + +'the two geometries g1 and g2 overlap. The term spatially overlaps is'+sLineBreak + +'used if two geometries intersect and their intersection results in a'+sLineBreak + +'geometry of the same dimension but not equal to either of the given'+sLineBreak +'geometries.' ), - // Function nr. 171 + // Function nr. 137 ( Name: 'MBRTOUCHES'; Declaration: '(g1,g2)'; - Category: 'Geographic Features'; + Category: 'MBR'; Version: SQL_VERSION_ANSI; - Description: 'Returns 1 or 0 to indicate whether the Minimum Bounding Rectangles of ' - +'the two geometries g1 and g2 touch. Two geometries spatially touch if ' - +'the interiors of the geometries do not intersect, but the boundary of ' - +'one of the geometries intersects either the boundary or the interior ' - +'of the other.' + Description: 'Returns 1 or 0 to indicate whether the Minimum Bounding Rectangles of'+sLineBreak + +'the two geometries g1 and g2 touch. Two geometries spatially touch if'+sLineBreak + +'the interiors of the geometries do not intersect, but the boundary of'+sLineBreak + +'one of the geometries intersects either the boundary or the interior of'+sLineBreak + +'the other.' ), - // Function nr. 172 + // Function nr. 138 ( Name: 'MBRWITHIN'; Declaration: '(g1,g2)'; - Category: 'Geographic Features'; + Category: 'MBR'; Version: SQL_VERSION_ANSI; - Description: 'Returns 1 or 0 to indicate whether the Minimum Bounding Rectangle of ' - +'g1 is within the Minimum Bounding Rectangle of g2. This tests the ' - +'opposite relationship as MBRContains().' + Description: 'Returns 1 or 0 to indicate whether the Minimum Bounding Rectangle of g1'+sLineBreak + +'is within the Minimum Bounding Rectangle of g2. This tests the opposite'+sLineBreak + +'relationship as MBRContains().' ), - // Function nr. 173 + // Function nr. 139 ( Name: 'MD5'; Declaration: '(str)'; Category: 'Encryption Functions'; Version: SQL_VERSION_ANSI; - Description: 'Calculates an MD5 128-bit checksum for the string. The value is ' - +'returned as a binary string of 32 hex digits, or NULL if the argument ' - +'was NULL. The return value can, for example, be used as a hash key.' + Description: 'Calculates an MD5 128-bit checksum for the string. The value is'+sLineBreak + +'returned as a string of 32 hex digits, or NULL if the argument was'+sLineBreak + +'NULL. The return value can, for example, be used as a hash key. See the'+sLineBreak + +'notes at the beginning of this section about storing hash values'+sLineBreak + +'efficiently.'+sLineBreak + +''+sLineBreak + +'As of MySQL 5.5.3, the return value is a nonbinary string in the'+sLineBreak + +'connection character set. Before 5.5.3, the return value is a binary'+sLineBreak + +'string; see the notes at the beginning of this section about using the'+sLineBreak + +'value as a nonbinary string.' ), - // Function nr. 174 + // Function nr. 140 ( Name: 'MICROSECOND'; Declaration: '(expr)'; Category: 'Date and Time Functions'; Version: SQL_VERSION_ANSI; - Description: 'Returns the microseconds from the time or datetime expression expr as ' - +'a number in the range from 0 to 999999.' + Description: 'Returns the microseconds from the time or datetime expression expr as a'+sLineBreak + +'number in the range from 0 to 999999.' ), - // Function nr. 175 + // Function nr. 141 ( Name: 'MID'; Declaration: '(str,pos,len)'; @@ -4095,21 +3850,21 @@ var Description: 'MID(str,pos,len) is a synonym for SUBSTRING(str,pos,len).' ), - // Function nr. 176 + // Function nr. 142 ( Name: 'MIN'; Declaration: '([DISTINCT] expr)'; Category: 'Functions and Modifiers for Use with GROUP BY'; Version: SQL_VERSION_ANSI; - Description: 'Returns the minimum value of expr. MIN() may take a string argument; ' - +'in such cases, it returns the minimum string value. See ' - +'http://dev.mysql.com/doc/refman/5.1/en/mysql-indexes.html. The ' - +'DISTINCT keyword can be used to find the minimum of the distinct ' - +'values of expr, however, this produces the same result as omitting ' - +'DISTINCT. MIN() returns NULL if there were no matching rows.' + Description: 'Returns the minimum value of expr. MIN() may take a string argument; in'+sLineBreak + +'such cases, it returns the minimum string value.'+sLineBreak + +'The DISTINCT keyword can be used to find the minimum of the distinct values'+sLineBreak + +'of expr, however, this produces the same result as omitting DISTINCT.'+sLineBreak + +''+sLineBreak + +'MIN() returns NULL if there were no matching rows.' ), - // Function nr. 177 + // Function nr. 143 ( Name: 'MINUTE'; Declaration: '(time)'; @@ -4118,27 +3873,27 @@ var Description: 'Returns the minute for time, in the range 0 to 59.' ), - // Function nr. 178 + // Function nr. 144 ( Name: 'MLINEFROMTEXT'; Declaration: '(wkt[,srid])'; - Category: 'Geographic Features'; + Category: 'WKT'; Version: SQL_VERSION_ANSI; - Description: 'Constructs a MULTILINESTRING value using its WKT representation and ' + Description: 'Constructs a MULTILINESTRING value using its WKT representation and'+sLineBreak +'SRID.' ), - // Function nr. 179 + // Function nr. 145 ( Name: 'MLINEFROMWKB'; Declaration: '(wkb[,srid])'; - Category: 'Geographic Features'; + Category: 'WKB'; Version: SQL_VERSION_ANSI; - Description: 'Constructs a MULTILINESTRING value using its WKB representation and ' + Description: 'Constructs a MULTILINESTRING value using its WKB representation and'+sLineBreak +'SRID.' ), - // Function nr. 180 + // Function nr. 146 ( Name: 'MOD'; Declaration: '(N,M)'; @@ -4147,167 +3902,172 @@ var Description: 'Modulo operation. Returns the remainder of N divided by M.' ), - // Function nr. 181 + // Function nr. 147 ( Name: 'MONTH'; Declaration: '(date)'; Category: 'Date and Time Functions'; Version: SQL_VERSION_ANSI; - Description: 'Returns the month for date, in the range 1 to 12 for January to ' - +'December, or 0 for dates such as ''0000-00-00'' or ''2008-00-00'' that ' - +'have a zero month part.' + Description: 'Returns the month for date, in the range 1 to 12 for January to'+sLineBreak + +'December, or 0 for dates such as ''0000-00-00'' or ''2008-00-00'' that have'+sLineBreak + +'a zero month part.' ), - // Function nr. 182 + // Function nr. 148 ( Name: 'MONTHNAME'; Declaration: '(date)'; Category: 'Date and Time Functions'; Version: SQL_VERSION_ANSI; - Description: 'Returns the full name of the month for date. As of MySQL 5.1.12, the ' - +'language used for the name is controlled by the value of the ' - +'lc_time_names system variable ' - +'(http://dev.mysql.com/doc/refman/5.1/en/locale-support.html).' + Description: 'Returns the full name of the month for date. The language used for the'+sLineBreak + +'name is controlled by the value of the lc_time_names system variable'+sLineBreak + +'(https://mariadb.com/kb/en/server-locale/).' ), - // Function nr. 183 + // Function nr. 149 ( Name: 'MPOINTFROMTEXT'; Declaration: '(wkt[,srid])'; - Category: 'Geographic Features'; + Category: 'WKT'; Version: SQL_VERSION_ANSI; Description: 'Constructs a MULTIPOINT value using its WKT representation and SRID.' ), - // Function nr. 184 + // Function nr. 150 ( Name: 'MPOINTFROMWKB'; Declaration: '(wkb[,srid])'; - Category: 'Geographic Features'; + Category: 'WKB'; Version: SQL_VERSION_ANSI; Description: 'Constructs a MULTIPOINT value using its WKB representation and SRID.' ), - // Function nr. 185 + // Function nr. 151 ( Name: 'MPOLYFROMTEXT'; Declaration: '(wkt[,srid])'; - Category: 'Geographic Features'; + Category: 'WKT'; Version: SQL_VERSION_ANSI; Description: 'Constructs a MULTIPOLYGON value using its WKT representation and SRID.' ), - // Function nr. 186 + // Function nr. 152 ( Name: 'MPOLYFROMWKB'; Declaration: '(wkb[,srid])'; - Category: 'Geographic Features'; + Category: 'WKB'; Version: SQL_VERSION_ANSI; Description: 'Constructs a MULTIPOLYGON value using its WKB representation and SRID.' ), - // Function nr. 187 + // Function nr. 153 ( Name: 'MULTILINESTRING'; Declaration: '(ls1,ls2,...)'; - Category: 'Geographic Features'; + Category: 'Geometry constructors'; Version: SQL_VERSION_ANSI; - Description: 'Constructs a MultiLineString value using LineString or WKB LineString ' + Description: 'Constructs a MultiLineString value using LineString or WKB LineString'+sLineBreak +'arguments.' ), - // Function nr. 188 + // Function nr. 154 ( Name: 'MULTIPOINT'; Declaration: '(pt1,pt2,...)'; - Category: 'Geographic Features'; + Category: 'Geometry constructors'; Version: SQL_VERSION_ANSI; Description: 'Constructs a MultiPoint value using Point or WKB Point arguments.' ), - // Function nr. 189 + // Function nr. 155 ( Name: 'MULTIPOLYGON'; Declaration: '(poly1,poly2,...)'; - Category: 'Geographic Features'; + Category: 'Geometry constructors'; Version: SQL_VERSION_ANSI; - Description: 'Constructs a MultiPolygon value from a set of Polygon or WKB Polygon ' + Description: 'Constructs a MultiPolygon value from a set of Polygon or WKB Polygon'+sLineBreak +'arguments.' ), - // Function nr. 190 + // Function nr. 156 ( Name: 'NAME_CONST'; Declaration: '(name,value)'; Category: 'Miscellaneous Functions'; Version: SQL_VERSION_ANSI; - Description: 'Returns the given value. When used to produce a result set column, ' - +'NAME_CONST() causes the column to have the given name. The arguments ' - +'should be constants. mysql> SELECT NAME_CONST(''myname'', 14); ' - +'+--------+ | myname | +--------+ | 14 | +--------+' + Description: 'Returns the given value. When used to produce a result set column,'+sLineBreak + +'NAME_CONST() causes the column to have the given name. The arguments'+sLineBreak + +'should be constants.'+sLineBreak + +''+sLineBreak + +'MariaDB> SELECT NAME_CONST(''myname'', 14);'+sLineBreak + +'+--------+'+sLineBreak + +'| myname |'+sLineBreak + +'+--------+'+sLineBreak + +'| 14 |'+sLineBreak + +'+--------+' ), - // Function nr. 191 - ( - Name: 'NOT'; - Declaration: ''; - Category: 'Comparison operators'; - Version: SQL_VERSION_ANSI; - Description: 'This is the same as NOT (expr BETWEEN min AND max).' - ), - - // Function nr. 192 + // Function nr. 157 ( Name: 'NOW'; Declaration: '()'; Category: 'Date and Time Functions'; Version: SQL_VERSION_ANSI; - Description: 'Returns the current date and time as a value in ''YYYY-MM-DD ' - +'HH:MM:SS'' or YYYYMMDDHHMMSS.uuuuuu format, depending on whether the ' - +'function is used in a string or numeric context. The value is ' - +'expressed in the current time zone.' + Description: 'Returns the current date and time as a value in ''YYYY-MM-DD HH:MM:SS'''+sLineBreak + +'or YYYYMMDDHHMMSS.uuuuuu format, depending on whether the function is'+sLineBreak + +'used in a string or numeric context. The value is expressed in the'+sLineBreak + +'current time zone.' ), - // Function nr. 193 + // Function nr. 158 ( Name: 'NULLIF'; Declaration: '(expr1,expr2)'; Category: 'Control flow functions'; Version: SQL_VERSION_ANSI; - Description: 'Returns NULL if expr1 = expr2 is true, otherwise returns expr1. This ' - +'is the same as CASE WHEN expr1 = expr2 THEN NULL ELSE expr1 END.' + Description: 'Returns NULL if expr1 = expr2 is true, otherwise returns expr1. This is'+sLineBreak + +'the same as CASE WHEN expr1 = expr2 THEN NULL ELSE expr1 END.' ), - // Function nr. 194 + // Function nr. 159 + ( + Name: 'NUMGEOMETRIES'; + Declaration: '(gc)'; + Category: 'GeometryCollection properties'; + Version: SQL_VERSION_ANSI; + Description: 'Returns the number of geometries in the GeometryCollection value gc.' + ), + + // Function nr. 160 ( Name: 'NUMINTERIORRINGS'; Declaration: '(poly)'; - Category: 'Geographic Features'; + Category: 'Polygon properties'; Version: SQL_VERSION_ANSI; Description: 'Returns the number of interior rings in the Polygon value poly.' ), - // Function nr. 195 + // Function nr. 161 ( Name: 'NUMPOINTS'; Declaration: '(ls)'; - Category: 'Geographic Features'; + Category: 'LineString properties'; Version: SQL_VERSION_ANSI; Description: 'Returns the number of Point objects in the LineString value ls.' ), - // Function nr. 196 + // Function nr. 162 ( Name: 'OCT'; Declaration: '(N)'; - Category: 'Numeric Functions'; + Category: 'String Functions'; Version: SQL_VERSION_ANSI; - Description: 'Returns a string representation of the octal value of N, where N is a ' - +'longlong (BIGINT) number. This is equivalent to CONV(N,10,8). Returns ' + Description: 'Returns a string representation of the octal value of N, where N is a'+sLineBreak + +'longlong (BIGINT) number. This is equivalent to CONV(N,10,8). Returns'+sLineBreak +'NULL if N is NULL.' ), - // Function nr. 197 + // Function nr. 163 ( Name: 'OCTET_LENGTH'; Declaration: '(str)'; @@ -4316,160 +4076,172 @@ var Description: 'OCTET_LENGTH() is a synonym for LENGTH().' ), - // Function nr. 198 + // Function nr. 164 ( Name: 'OLD_PASSWORD'; Declaration: '(str)'; Category: 'Encryption Functions'; Version: SQL_VERSION_ANSI; - Description: 'OLD_PASSWORD() was added to MySQL when the implementation of ' - +'PASSWORD() was changed to improve security. OLD_PASSWORD() returns the ' - +'value of the old (pre-4.1) implementation of PASSWORD() as a binary ' - +'string, and is intended to permit you to reset passwords for any ' - +'pre-4.1 clients that need to connect to your version 5.1 MySQL server ' - +'without locking them out. See ' - +'http://dev.mysql.com/doc/refman/5.1/en/password-hashing.html.' + Description: 'OLD_PASSWORD() was added when the implementation of PASSWORD() was'+sLineBreak + +'changed in MySQL 4.1 to improve security. OLD_PASSWORD() returns the'+sLineBreak + +'value of the pre-4.1 implementation of PASSWORD() as a string, and is'+sLineBreak + +'intended to permit you to reset passwords for any pre-4.1 clients that'+sLineBreak + +'need to connect to your version 5.5 MySQL server without locking them'+sLineBreak + +'out. See http://dev.mysql.com/doc/refman/5.1/en/password-hashing.html.'+sLineBreak + +''+sLineBreak + +'As of MySQL 5.5.3, the return value is a nonbinary string in the'+sLineBreak + +'connection character set. Before 5.5.3, the return value is a binary'+sLineBreak + +'string.' ), - // Function nr. 199 + // Function nr. 165 ( Name: 'ORD'; Declaration: '(str)'; Category: 'String Functions'; Version: SQL_VERSION_ANSI; - Description: 'If the leftmost character of the string str is a multi-byte character, ' - +'returns the code for that character, calculated from the numeric ' - +'values of its constituent bytes using this formula: (1st byte code) + ' - +'(2nd byte code x 256) + (3rd byte code x 2562) ... If the leftmost ' - +'character is not a multi-byte character, ORD() returns the same value ' - +'as the ASCII() function.' + Description: 'If the leftmost character of the string str is a multi-byte character,'+sLineBreak + +'returns the code for that character, calculated from the numeric values'+sLineBreak + +'of its constituent bytes using this formula:'+sLineBreak + +''+sLineBreak + +' (1st byte code)'+sLineBreak + +'+ (2nd byte code * 256)'+sLineBreak + +'+ (3rd byte code * 2562) ...'+sLineBreak + +''+sLineBreak + +'If the leftmost character is not a multi-byte character, ORD() returns'+sLineBreak + +'the same value as the ASCII() function.' ), - // Function nr. 200 + // Function nr. 166 ( Name: 'OVERLAPS'; Declaration: '(g1,g2)'; - Category: 'Geographic Features'; + Category: 'Geometry relations'; Version: SQL_VERSION_ANSI; - Description: 'Returns 1 or 0 to indicate whether g1 spatially overlaps g2. The term ' - +'spatially overlaps is used if two geometries intersect and their ' - +'intersection results in a geometry of the same dimension but not equal ' + Description: 'Returns 1 or 0 to indicate whether g1 spatially overlaps g2. The term'+sLineBreak + +'spatially overlaps is used if two geometries intersect and their'+sLineBreak + +'intersection results in a geometry of the same dimension but not equal'+sLineBreak +'to either of the given geometries.' ), - // Function nr. 201 + // Function nr. 167 ( Name: 'PASSWORD'; Declaration: '(str)'; Category: 'Encryption Functions'; Version: SQL_VERSION_ANSI; - Description: 'Calculates and returns a password string from the plaintext password ' - +'str and returns a binary string, or NULL if the argument was NULL. ' - +'This is the function that is used for encrypting MySQL passwords for ' - +'storage in the Password column of the user grant table.' + Description: 'Calculates and returns a hashed password string from the plaintext'+sLineBreak + +'password str and returns a nonbinary string in the connection character'+sLineBreak + +'set (a binary string before MySQL 5.5.3), or NULL if the argument is'+sLineBreak + +'NULL. This function is the SQL interface to the algorithm used by the'+sLineBreak + +'server to encrypt MySQL passwords for storage in the mysql.user grant'+sLineBreak + +'table.'+sLineBreak + +''+sLineBreak + +'The password hashing method used by PASSWORD() depends on the value of'+sLineBreak + +'the old_passwords system variable:' ), - // Function nr. 202 + // Function nr. 168 ( Name: 'PERIOD_ADD'; Declaration: '(P,N)'; Category: 'Date and Time Functions'; Version: SQL_VERSION_ANSI; - Description: 'Adds N months to period P (in the format YYMM or YYYYMM). Returns a ' - +'value in the format YYYYMM. Note that the period argument P is not a ' + Description: 'Adds N months to period P (in the format YYMM or YYYYMM). Returns a'+sLineBreak + +'value in the format YYYYMM. Note that the period argument P is not a'+sLineBreak +'date value.' ), - // Function nr. 203 + // Function nr. 169 ( Name: 'PERIOD_DIFF'; Declaration: '(P1,P2)'; Category: 'Date and Time Functions'; Version: SQL_VERSION_ANSI; - Description: 'Returns the number of months between periods P1 and P2. P1 and P2 ' - +'should be in the format YYMM or YYYYMM. Note that the period arguments ' + Description: 'Returns the number of months between periods P1 and P2. P1 and P2'+sLineBreak + +'should be in the format YYMM or YYYYMM. Note that the period arguments'+sLineBreak +'P1 and P2 are not date values.' ), - // Function nr. 204 + // Function nr. 170 ( Name: 'PI'; Declaration: '()'; Category: 'Numeric Functions'; Version: SQL_VERSION_ANSI; - Description: 'Returns the value of ? (pi). The default number of decimal places ' - +'displayed is seven, but MySQL uses the full double-precision value ' + Description: 'Returns the value of ? (pi). The default number of decimal places'+sLineBreak + +'displayed is seven, but MySQL uses the full double-precision value'+sLineBreak +'internally.' ), - // Function nr. 205 + // Function nr. 171 ( Name: 'POINT'; Declaration: '(x,y)'; - Category: 'Geographic Features'; + Category: 'Geometry constructors'; Version: SQL_VERSION_ANSI; Description: 'Constructs a Point using its coordinates.' ), - // Function nr. 206 + // Function nr. 172 ( Name: 'POINTFROMTEXT'; Declaration: '(wkt[,srid])'; - Category: 'Geographic Features'; + Category: 'WKT'; Version: SQL_VERSION_ANSI; Description: 'Constructs a POINT value using its WKT representation and SRID.' ), - // Function nr. 207 + // Function nr. 173 ( Name: 'POINTFROMWKB'; Declaration: '(wkb[,srid])'; - Category: 'Geographic Features'; + Category: 'WKB'; Version: SQL_VERSION_ANSI; Description: 'Constructs a POINT value using its WKB representation and SRID.' ), - // Function nr. 208 + // Function nr. 174 ( Name: 'POINTN'; Declaration: '(ls,N)'; - Category: 'Geographic Features'; + Category: 'LineString properties'; Version: SQL_VERSION_ANSI; - Description: 'Returns the N-th Point in the Linestring value ls. Points are numbered ' + Description: 'Returns the N-th Point in the Linestring value ls. Points are numbered'+sLineBreak +'beginning with 1.' ), - // Function nr. 209 + // Function nr. 175 ( Name: 'POLYFROMTEXT'; Declaration: '(wkt[,srid])'; - Category: 'Geographic Features'; + Category: 'WKT'; Version: SQL_VERSION_ANSI; Description: 'Constructs a POLYGON value using its WKT representation and SRID.' ), - // Function nr. 210 + // Function nr. 176 ( Name: 'POLYFROMWKB'; Declaration: '(wkb[,srid])'; - Category: 'Geographic Features'; + Category: 'WKB'; Version: SQL_VERSION_ANSI; Description: 'Constructs a POLYGON value using its WKB representation and SRID.' ), - // Function nr. 211 + // Function nr. 177 ( Name: 'POLYGON'; Declaration: '(ls1,ls2,...)'; - Category: 'Geographic Features'; + Category: 'Geometry constructors'; Version: SQL_VERSION_ANSI; - Description: 'Constructs a Polygon value from a number of LineString or WKB ' - +'LineString arguments. If any argument does not represent a LinearRing ' - +'(that is, not a closed and simple LineString), the return value is ' + Description: 'Constructs a Polygon value from a number of LineString or WKB'+sLineBreak + +'LineString arguments. If any argument does not represent a LinearRing'+sLineBreak + +'(that is, not a closed and simple LineString), the return value is'+sLineBreak +'NULL.' ), - // Function nr. 212 + // Function nr. 178 ( Name: 'POSITION'; Declaration: '(substr IN str)'; @@ -4478,7 +4250,7 @@ var Description: 'POSITION(substr IN str) is a synonym for LOCATE(substr,str).' ), - // Function nr. 213 + // Function nr. 179 ( Name: 'POW'; Declaration: '(X,Y)'; @@ -4487,7 +4259,7 @@ var Description: 'Returns the value of X raised to the power of Y.' ), - // Function nr. 214 + // Function nr. 180 ( Name: 'POWER'; Declaration: '(X,Y)'; @@ -4496,7 +4268,7 @@ var Description: 'This is a synonym for POW().' ), - // Function nr. 215 + // Function nr. 181 ( Name: 'QUARTER'; Declaration: '(date)'; @@ -4505,101 +4277,61 @@ var Description: 'Returns the quarter of the year for date, in the range 1 to 4.' ), - // Function nr. 216 + // Function nr. 182 ( Name: 'QUOTE'; Declaration: '(str)'; Category: 'String Functions'; Version: SQL_VERSION_ANSI; - Description: 'Quotes a string to produce a result that can be used as a properly ' - +'escaped data value in an SQL statement. The string is returned ' - +'enclosed by single quotes and with each instance of single quote ' - +'("''"), backslash ("\"), ASCII NUL, and Control-Z preceded by a ' - +'backslash. If the argument is NULL, the return value is the word ' - +'"NULL" without enclosing single quotes.' + Description: 'Quotes a string to produce a result that can be used as a properly'+sLineBreak + +'escaped data value in an SQL statement. The string is returned enclosed'+sLineBreak + +'by single quotation marks and with each instance of backslash ("\"),'+sLineBreak + +'single quote ("''"), ASCII NUL, and Control+Z preceded by a backslash.'+sLineBreak + +'If the argument is NULL, the return value is the word "NULL" without'+sLineBreak + +'enclosing single quotation marks.' ), - // Function nr. 217 + // Function nr. 183 ( Name: 'RADIANS'; Declaration: '(X)'; Category: 'Numeric Functions'; Version: SQL_VERSION_ANSI; - Description: 'Returns the argument X, converted from degrees to radians. (Note that ' + Description: 'Returns the argument X, converted from degrees to radians. (Note that'+sLineBreak +'? radians equals 180 degrees.)' ), - // Function nr. 218 + // Function nr. 184 ( Name: 'RAND'; Declaration: '()'; Category: 'Numeric Functions'; Version: SQL_VERSION_ANSI; - Description: 'Returns a random floating-point value v in the range 0 <= v < 1.0. If ' - +'a constant integer argument N is specified, it is used as the seed ' - +'value, which produces a repeatable sequence of column values. In the ' - +'following example, note that the sequences of values produced by ' - +'RAND(3) is the same both places where it occurs.' + Description: 'Returns a random floating-point value v in the range 0 <= v < 1.0. If a'+sLineBreak + +'constant integer argument N is specified, it is used as the seed value,'+sLineBreak + +'which produces a repeatable sequence of column values. In the following'+sLineBreak + +'example, note that the sequences of values produced by RAND(3) is the'+sLineBreak + +'same both places where it occurs.' ), - // Function nr. 219 - ( - Name: 'REGEXP'; - Declaration: ''; - Category: 'String Functions'; - Version: SQL_VERSION_ANSI; - Description: 'Performs a pattern match of a string expression expr against a pattern ' - +'pat. The pattern can be an extended regular expression. The syntax for ' - +'regular expressions is discussed in ' - +'http://dev.mysql.com/doc/refman/5.1/en/regexp.html. Returns 1 if expr ' - +'matches pat; otherwise it returns 0. If either expr or pat is NULL, ' - +'the result is NULL. RLIKE is a synonym for REGEXP, provided for mSQL ' - +'compatibility. The pattern need not be a literal string. For example, ' - +'it can be specified as a string expression or table column. *Note*: ' - +'Because MySQL uses the C escape syntax in strings (for example, "\n" ' - +'to represent the newline character), you must double any "\" that you ' - +'use in your REGEXP strings. REGEXP is not case sensitive, except when ' - +'used with binary strings.' - ), - - // Function nr. 220 + // Function nr. 185 ( Name: 'RELEASE_LOCK'; Declaration: '(str)'; Category: 'Miscellaneous Functions'; Version: SQL_VERSION_ANSI; - Description: 'Releases the lock named by the string str that was obtained with ' - +'GET_LOCK(). 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() or if it has previously ' - +'been released. The DO statement is convenient to use with ' - +'RELEASE_LOCK(). See [HELP DO].' + Description: 'Releases the lock named by the string str that was obtained with'+sLineBreak + +'GET_LOCK(). Returns 1 if the lock was released, 0 if the lock was not'+sLineBreak + +'established by this thread (in which case the lock is not released),'+sLineBreak + +'and NULL if the named lock did not exist. The lock does not exist if it'+sLineBreak + +'was never obtained by a call to GET_LOCK() or if it has previously been'+sLineBreak + +'released.'+sLineBreak + +''+sLineBreak + +'The DO statement is convenient to use with RELEASE_LOCK(). See [HELP'+sLineBreak + +'DO].' ), - // Function nr. 221 - ( - Name: 'REPEAT'; - Declaration: '(str,count)'; - Category: 'String Functions'; - Version: SQL_VERSION_ANSI; - Description: 'Returns a string consisting of the string str repeated count times. If ' - +'count is less than 1, returns an empty string. Returns NULL if str or ' - +'count are NULL.' - ), - - // Function nr. 222 - ( - Name: 'REPLACE'; - Declaration: '(str,from_str,to_str)'; - Category: 'String Functions'; - Version: SQL_VERSION_ANSI; - Description: 'Returns the string str with all occurrences of the string from_str ' - +'replaced by the string to_str. REPLACE() performs a case-sensitive ' - +'match when searching for from_str.' - ), - - // Function nr. 223 + // Function nr. 186 ( Name: 'REVERSE'; Declaration: '(str)'; @@ -4608,52 +4340,85 @@ var Description: 'Returns the string str with the order of the characters reversed.' ), - // Function nr. 224 + // Function nr. 187 ( Name: 'RIGHT'; Declaration: '(str,len)'; Category: 'String Functions'; Version: SQL_VERSION_ANSI; - Description: 'Returns the rightmost len characters from the string str, or NULL if ' + Description: 'Returns the rightmost len characters from the string str, or NULL if'+sLineBreak +'any argument is NULL.' ), - // Function nr. 225 + // Function nr. 188 ( Name: 'ROUND'; Declaration: '(X)'; Category: 'Numeric Functions'; Version: SQL_VERSION_ANSI; - Description: 'Rounds the argument X to D decimal places. The rounding algorithm ' - +'depends on the data type of X. D defaults to 0 if not specified. D can ' - +'be negative to cause D digits left of the decimal point of the value X ' + Description: 'Rounds the argument X to D decimal places. The rounding algorithm'+sLineBreak + +'depends on the data type of X. D defaults to 0 if not specified. D can'+sLineBreak + +'be negative to cause D digits left of the decimal point of the value X'+sLineBreak +'to become zero.' ), - // Function nr. 226 + // Function nr. 189 ( Name: 'ROW_COUNT'; Declaration: '()'; Category: 'Information Functions'; Version: SQL_VERSION_ANSI; - Description: 'ROW_COUNT() returns the number of rows updated, inserted, or deleted ' - +'by the preceding statement. This is the same as the row count that the ' - +'mysql client displays and the value from the mysql_affected_rows() C ' - +'API function.' + Description: 'Before MySQL 5.5.5, ROW_COUNT() returns the number of rows changed,'+sLineBreak + +'deleted, or inserted by the last statement if it was an UPDATE, DELETE,'+sLineBreak + +'or INSERT. For other statements, the value may not be meaningful.'+sLineBreak + +''+sLineBreak + +'As of MySQL 5.5.5, ROW_COUNT() returns a value as follows:'+sLineBreak + +''+sLineBreak + +'o DDL statements: 0. This applies to statements such as CREATE TABLE or'+sLineBreak + +' DROP TABLE.'+sLineBreak + +''+sLineBreak + +'o DML statements other than SELECT: The number of affected rows. This'+sLineBreak + +' applies to statements such as UPDATE, INSERT, or DELETE (as before),'+sLineBreak + +' but now also to statements such as ALTER TABLE and LOAD DATA INFILE.'+sLineBreak + +''+sLineBreak + +'o SELECT: -1 if the statement returns a result set, or the number of'+sLineBreak + +' rows "affected" if it does not. For example, for SELECT * FROM t1,'+sLineBreak + +' ROW_COUNT() returns -1. For SELECT * FROM t1 INTO OUTFILE'+sLineBreak + +' ''file_name'', ROW_COUNT() returns the number of rows written to the'+sLineBreak + +' file.'+sLineBreak + +''+sLineBreak + +'o SIGNAL statements: 0.'+sLineBreak + +''+sLineBreak + +'For UPDATE statements, the affected-rows value by default is the number'+sLineBreak + +'of rows actually changed. If you specify the CLIENT_FOUND_ROWS flag to'+sLineBreak + +'mysql_real_connect() when connecting to mysqld, the affected-rows value'+sLineBreak + +'is the number of rows "found"; that is, matched by the WHERE clause.'+sLineBreak + +''+sLineBreak + +'For REPLACE statements, the affected-rows value is 2 if the new row'+sLineBreak + +'replaced an old row, because in this case, one row was inserted after'+sLineBreak + +'the duplicate was deleted.'+sLineBreak + +''+sLineBreak + +'For INSERT ... ON DUPLICATE KEY UPDATE statements, the affected-rows'+sLineBreak + +'value is 1 if the row is inserted as a new row and 2 if an existing row'+sLineBreak + +'is updated.'+sLineBreak + +''+sLineBreak + +'The ROW_COUNT() value is similar to the value from the'+sLineBreak + +'mysql_affected_rows() C API function and the row count that the mysql'+sLineBreak + +'client displays following statement execution.' ), - // Function nr. 227 + // Function nr. 190 ( Name: 'RPAD'; Declaration: '(str,len,padstr)'; Category: 'String Functions'; Version: SQL_VERSION_ANSI; - Description: 'Returns the string str, right-padded with the string padstr to a ' - +'length of len characters. If str is longer than len, the return value ' - +'is shortened to len characters.' + Description: 'Returns the string str, right-padded with the string padstr to a length'+sLineBreak + +'of len characters. If str is longer than len, the return value is'+sLineBreak + +'shortened to len characters.' ), - // Function nr. 228 + // Function nr. 191 ( Name: 'RTRIM'; Declaration: '(str)'; @@ -4662,7 +4427,7 @@ var Description: 'Returns the string str with trailing space characters removed.' ), - // Function nr. 229 + // Function nr. 192 ( Name: 'SCHEMA'; Declaration: '()'; @@ -4671,7 +4436,7 @@ var Description: 'This function is a synonym for DATABASE().' ), - // Function nr. 230 + // Function nr. 193 ( Name: 'SECOND'; Declaration: '(time)'; @@ -4680,19 +4445,19 @@ var Description: 'Returns the second for time, in the range 0 to 59.' ), - // Function nr. 231 + // Function nr. 194 ( Name: 'SEC_TO_TIME'; Declaration: '(seconds)'; Category: 'Date and Time Functions'; Version: SQL_VERSION_ANSI; - Description: 'Returns the seconds argument, converted to hours, minutes, and ' - +'seconds, as a TIME value. The range of the result is constrained to ' - +'that of the TIME data type. A warning occurs if the argument ' - +'corresponds to a value outside that range.' + Description: 'Returns the seconds argument, converted to hours, minutes, and seconds,'+sLineBreak + +'as a TIME value. The range of the result is constrained to that of the'+sLineBreak + +'TIME data type. A warning occurs if the argument corresponds to a value'+sLineBreak + +'outside that range.' ), - // Function nr. 232 + // Function nr. 195 ( Name: 'SESSION_USER'; Declaration: '()'; @@ -4701,31 +4466,59 @@ var Description: 'SESSION_USER() is a synonym for USER().' ), - // Function nr. 233 + // Function nr. 196 ( Name: 'SHA1'; Declaration: '(str)'; Category: 'Encryption Functions'; Version: SQL_VERSION_ANSI; - Description: 'Calculates an SHA-1 160-bit checksum for the string, as described in ' - +'RFC 3174 (Secure Hash Algorithm). The value is returned as a binary ' - +'string of 40 hex digits, or NULL if the argument was NULL. One of the ' - +'possible uses for this function is as a hash key. You can also use it ' - +'as a cryptographic function for storing passwords. SHA() is synonymous ' - +'with SHA1().' + Description: 'Calculates an SHA-1 160-bit checksum for the string, as described in'+sLineBreak + +'RFC 3174 (Secure Hash Algorithm). The value is returned as a string of'+sLineBreak + +'40 hex digits, or NULL if the argument was NULL. One of the possible'+sLineBreak + +'uses for this function is as a hash key. See the notes at the beginning'+sLineBreak + +'of this section about storing hash values efficiently. You can also use'+sLineBreak + +'SHA1() as a cryptographic function for storing passwords. SHA() is'+sLineBreak + +'synonymous with SHA1().'+sLineBreak + +''+sLineBreak + +'As of MySQL 5.5.3, the return value is a nonbinary string in the'+sLineBreak + +'connection character set. Before 5.5.3, the return value is a binary'+sLineBreak + +'string; see the notes at the beginning of this section about using the'+sLineBreak + +'value as a nonbinary string.' ), - // Function nr. 234 + // Function nr. 197 + ( + Name: 'SHA2'; + Declaration: '(str, hash_length)'; + Category: 'Encryption Functions'; + Version: SQL_VERSION_ANSI; + Description: 'Calculates the SHA-2 family of hash functions (SHA-224, SHA-256,'+sLineBreak + +'SHA-384, and SHA-512). The first argument is the cleartext string to be'+sLineBreak + +'hashed. The second argument indicates the desired bit length of the'+sLineBreak + +'result, which must have a value of 224, 256, 384, 512, or 0 (which is'+sLineBreak + +'equivalent to 256). If either argument is NULL or the hash length is'+sLineBreak + +'not one of the permitted values, the return value is NULL. Otherwise,'+sLineBreak + +'the function result is a hash value containing the desired number of'+sLineBreak + +'bits. See the notes at the beginning of this section about storing hash'+sLineBreak + +'values efficiently.'+sLineBreak + +''+sLineBreak + +'As of MySQL 5.5.6, the return value is a nonbinary string in the'+sLineBreak + +'connection character set. Before 5.5.6, the return value is a binary'+sLineBreak + +'string; see the notes at the beginning of this section about using the'+sLineBreak + +'value as a nonbinary string.' + ), + + // Function nr. 198 ( Name: 'SIGN'; Declaration: '(X)'; Category: 'Numeric Functions'; Version: SQL_VERSION_ANSI; - Description: 'Returns the sign of the argument as -1, 0, or 1, depending on whether ' - +'X is negative, zero, or positive.' + Description: 'Returns the sign of the argument as -1, 0, or 1, depending on whether X'+sLineBreak + +'is negative, zero, or positive.' ), - // Function nr. 235 + // Function nr. 199 ( Name: 'SIN'; Declaration: '(X)'; @@ -4734,50 +4527,46 @@ var Description: 'Returns the sine of X, where X is given in radians.' ), - // Function nr. 236 + // Function nr. 200 ( Name: 'SLEEP'; Declaration: '(duration)'; Category: 'Miscellaneous Functions'; Version: SQL_VERSION_ANSI; - Description: 'Sleeps (pauses) for the number of seconds given by the duration ' - +'argument, then returns 0. If SLEEP() is interrupted, it returns 1. The ' + Description: 'Sleeps (pauses) for the number of seconds given by the duration'+sLineBreak + +'argument, then returns 0. If SLEEP() is interrupted, it returns 1. The'+sLineBreak +'duration may have a fractional part given in microseconds.' ), - // Function nr. 237 + // Function nr. 201 ( Name: 'SOUNDEX'; Declaration: '(str)'; Category: 'String Functions'; Version: SQL_VERSION_ANSI; - Description: 'Returns a soundex string from str. Two strings that sound almost the ' - +'same should have identical soundex strings. A standard soundex string ' - +'is four characters long, but the SOUNDEX() function returns an ' - +'arbitrarily long string. You can use SUBSTRING() on the result to get ' - +'a standard soundex string. All nonalphabetic characters in str are ' - +'ignored. All international alphabetic characters outside the A-Z range ' - +'are treated as vowels. *Important*: When using SOUNDEX(), you should ' - +'be aware of the following limitations: This function, as currently ' - +'implemented, is intended to work well with strings that are in the ' - +'English language only. Strings in other languages may not produce ' - +'reliable results. This function is not guaranteed to provide ' - +'consistent results with strings that use multi-byte character sets, ' - +'including utf-8. We hope to remove these limitations in a future ' - +'release. See Bug#22638 (http://bugs.mysql.com/bug.php?id=22638) for ' - +'more information.' + Description: 'Returns a soundex string from str. Two strings that sound almost the'+sLineBreak + +'same should have identical soundex strings. A standard soundex string'+sLineBreak + +'is four characters long, but the SOUNDEX() function returns an'+sLineBreak + +'arbitrarily long string. You can use SUBSTRING() on the result to get a'+sLineBreak + +'standard soundex string. All nonalphabetic characters in str are'+sLineBreak + +'ignored. All international alphabetic characters outside the A-Z range'+sLineBreak + +'are treated as vowels.'+sLineBreak + +''+sLineBreak + +'*Important*: When using SOUNDEX(), you should be aware of the following'+sLineBreak + +'limitations:'+sLineBreak + +''+sLineBreak + +'o This function, as currently implemented, is intended to work well'+sLineBreak + +' with strings that are in the English language only. Strings in other'+sLineBreak + +' languages may not produce reliable results.'+sLineBreak + +''+sLineBreak + +'o This function is not guaranteed to provide consistent results with'+sLineBreak + +' strings that use multi-byte character sets, including utf-8.'+sLineBreak + +''+sLineBreak + +' We hope to remove these limitations in a future release. See Bug'+sLineBreak + +' #22638 for more information.' ), - // Function nr. 238 - ( - Name: 'SOUNDS'; - Declaration: ''; - Category: 'String Functions'; - Version: SQL_VERSION_ANSI; - Description: 'This is the same as SOUNDEX(expr1) = SOUNDEX(expr2).' - ), - - // Function nr. 239 + // Function nr. 202 ( Name: 'SPACE'; Declaration: '(N)'; @@ -4786,29 +4575,7 @@ var Description: 'Returns a string consisting of N space characters.' ), - // Function nr. 240 - ( - Name: 'SPATIAL'; - Declaration: ''; - Category: 'Geographic Features'; - Version: SQL_VERSION_ANSI; - Description: 'o With CREATE TABLE: CREATE TABLE geom (g GEOMETRY NOT NULL, SPATIAL ' - +'INDEX(g)); With ALTER TABLE: ALTER TABLE geom ADD SPATIAL INDEX(g); ' - +'With CREATE INDEX: CREATE SPATIAL INDEX sp_index ON geom (g); For ' - +'MyISAM tables, SPATIAL INDEX creates an R-tree index. For storage ' - +'engines that support nonspatial indexing of spatial columns, the ' - +'engine creates a B-tree index. A B-tree index on spatial values will ' - +'be useful for exact-value lookups, but not for range scans. For more ' - +'information on indexing spatial columns, see [HELP CREATE INDEX]. To ' - +'drop spatial indexes, use ALTER TABLE or DROP INDEX: With ALTER TABLE: ' - +'ALTER TABLE geom DROP INDEX g; With DROP INDEX: DROP INDEX sp_index ON ' - +'geom; Example: Suppose that a table geom contains more than 32,000 ' - +'geometries, which are stored in the column g of type GEOMETRY. The ' - +'table also has an AUTO_INCREMENT column fid for storing object ID ' - +'values.' - ), - - // Function nr. 241 + // Function nr. 203 ( Name: 'SQRT'; Declaration: '(X)'; @@ -4817,239 +4584,280 @@ var Description: 'Returns the square root of a nonnegative number X.' ), - // Function nr. 242 + // Function nr. 204 ( Name: 'SRID'; Declaration: '(g)'; - Category: 'Geographic Features'; + Category: 'Geometry properties'; Version: SQL_VERSION_ANSI; - Description: 'Returns an integer indicating the Spatial Reference System ID for the ' - +'geometry value g. In MySQL, the SRID value is just an integer ' - +'associated with the geometry value. All calculations are done assuming ' - +'Euclidean (planar) geometry.' + Description: 'Returns an integer indicating the Spatial Reference System ID for the'+sLineBreak + +'geometry value g.'+sLineBreak + +''+sLineBreak + +'In MySQL, the SRID value is just an integer associated with the'+sLineBreak + +'geometry value. All calculations are done assuming Euclidean (planar)'+sLineBreak + +'geometry.' ), - // Function nr. 243 + // Function nr. 205 ( Name: 'STARTPOINT'; Declaration: '(ls)'; - Category: 'Geographic Features'; + Category: 'LineString properties'; Version: SQL_VERSION_ANSI; Description: 'Returns the Point that is the start point of the LineString value ls.' ), - // Function nr. 244 + // Function nr. 206 ( Name: 'STD'; Declaration: '(expr)'; Category: 'Functions and Modifiers for Use with GROUP BY'; Version: SQL_VERSION_ANSI; - Description: 'Returns the population standard deviation of expr. This is an ' - +'extension to standard SQL. The standard SQL function STDDEV_POP() can ' - +'be used instead. This function returns NULL if there were no matching ' - +'rows.' + Description: 'Returns the population standard deviation of expr. This is an extension'+sLineBreak + +'to standard SQL. The standard SQL function STDDEV_POP() can be used'+sLineBreak + +'instead.'+sLineBreak + +''+sLineBreak + +'This function returns NULL if there were no matching rows.' ), - // Function nr. 245 + // Function nr. 207 ( Name: 'STDDEV'; Declaration: '(expr)'; Category: 'Functions and Modifiers for Use with GROUP BY'; Version: SQL_VERSION_ANSI; - Description: 'Returns the population standard deviation of expr. This function is ' - +'provided for compatibility with Oracle. The standard SQL function ' - +'STDDEV_POP() can be used instead. This function returns NULL if there ' - +'were no matching rows.' + Description: 'Returns the population standard deviation of expr. This function is'+sLineBreak + +'provided for compatibility with Oracle. The standard SQL function'+sLineBreak + +'STDDEV_POP() can be used instead.'+sLineBreak + +''+sLineBreak + +'This function returns NULL if there were no matching rows.' ), - // Function nr. 246 + // Function nr. 208 ( Name: 'STDDEV_POP'; Declaration: '(expr)'; Category: 'Functions and Modifiers for Use with GROUP BY'; Version: SQL_VERSION_ANSI; - Description: 'Returns the population standard deviation of expr (the square root of ' - +'VAR_POP()). You can also use STD() or STDDEV(), which are equivalent ' - +'but not standard SQL. STDDEV_POP() returns NULL if there were no ' - +'matching rows.' + Description: 'Returns the population standard deviation of expr (the square root of'+sLineBreak + +'VAR_POP()). You can also use STD() or STDDEV(), which are equivalent'+sLineBreak + +'but not standard SQL.'+sLineBreak + +''+sLineBreak + +'STDDEV_POP() returns NULL if there were no matching rows.' ), - // Function nr. 247 + // Function nr. 209 ( Name: 'STDDEV_SAMP'; Declaration: '(expr)'; Category: 'Functions and Modifiers for Use with GROUP BY'; Version: SQL_VERSION_ANSI; - Description: 'Returns the sample standard deviation of expr (the square root of ' - +'VAR_SAMP(). STDDEV_SAMP() returns NULL if there were no matching rows.' + Description: 'Returns the sample standard deviation of expr (the square root of'+sLineBreak + +'VAR_SAMP().'+sLineBreak + +''+sLineBreak + +'STDDEV_SAMP() returns NULL if there were no matching rows.' ), - // Function nr. 248 + // Function nr. 210 ( Name: 'STRCMP'; Declaration: '(expr1,expr2)'; Category: 'String Functions'; Version: SQL_VERSION_ANSI; - Description: 'STRCMP() returns 0 if the strings are the same, -1 if the first ' - +'argument is smaller than the second according to the current sort ' + Description: 'STRCMP() returns 0 if the strings are the same, -1 if the first'+sLineBreak + +'argument is smaller than the second according to the current sort'+sLineBreak +'order, and 1 otherwise.' ), - // Function nr. 249 + // Function nr. 211 ( Name: 'STR_TO_DATE'; Declaration: '(str,format)'; Category: 'Date and Time Functions'; Version: SQL_VERSION_ANSI; - Description: 'This is the inverse of the DATE_FORMAT() function. It takes a string ' - +'str and a format string format. STR_TO_DATE() returns a DATETIME value ' - +'if the format string contains both date and time parts, or a DATE or ' - +'TIME value if the string contains only date or time parts. If the ' - +'date, time, or datetime value extracted from str is illegal, ' - +'STR_TO_DATE() returns NULL and produces a warning. The server scans ' - +'str attempting to match format to it. The format string can contain ' - +'literal characters and format specifiers beginning with %. Literal ' - +'characters in format must match literally in str. Format specifiers in ' - +'format must match a date or time part in str. For the specifiers that ' - +'can be used in format, see the DATE_FORMAT() function description. ' - +'mysql> SELECT STR_TO_DATE(''01,5,2013'',''%d,%m,%Y''); -> ' - +'''2013-05-01'' mysql> SELECT STR_TO_DATE(''May 1, 2013'',''%M ' - +'%d,%Y''); -> ''2013-05-01'' Scanning starts at the beginning of str ' - +'and fails if format is found not to match. Extra characters at the end ' - +'of str are ignored. mysql> SELECT ' - +'STR_TO_DATE(''a09:30:17'',''a%h:%i:%s''); -> ''09:30:17'' mysql> ' - +'SELECT STR_TO_DATE(''a09:30:17'',''%h:%i:%s''); -> NULL mysql> SELECT ' - +'STR_TO_DATE(''09:30:17a'',''%h:%i:%s''); -> ''09:30:17'' Unspecified ' - +'date or time parts have a value of 0, so incompletely specified values ' - +'in str produce a result with some or all parts set to 0: mysql> SELECT ' - +'STR_TO_DATE(''abc'',''abc''); -> ''0000-00-00'' mysql> SELECT ' - +'STR_TO_DATE(''9'',''%m''); -> ''0000-09-00'' mysql> SELECT ' - +'STR_TO_DATE(''9'',''%s''); -> ''00:00:09''' + Description: 'This is the inverse of the DATE_FORMAT() function. It takes a string'+sLineBreak + +'str and a format string format. STR_TO_DATE() returns a DATETIME value'+sLineBreak + +'if the format string contains both date and time parts, or a DATE or'+sLineBreak + +'TIME value if the string contains only date or time parts. If the date,'+sLineBreak + +'time, or datetime value extracted from str is illegal, STR_TO_DATE()'+sLineBreak + +'returns NULL and produces a warning.'+sLineBreak + +''+sLineBreak + +'The server scans str attempting to match format to it. The format'+sLineBreak + +'string can contain literal characters and format specifiers beginning'+sLineBreak + +'with %. Literal characters in format must match literally in str.'+sLineBreak + +'Format specifiers in format must match a date or time part in str. For'+sLineBreak + +'the specifiers that can be used in format, see the DATE_FORMAT()'+sLineBreak + +'function description.'+sLineBreak + +''+sLineBreak + +'MariaDB> SELECT STR_TO_DATE(''01,5,2013'',''%d,%m,%Y'');'+sLineBreak + +' -> ''2013-05-01'''+sLineBreak + +'MariaDB> SELECT STR_TO_DATE(''May 1, 2013'',''%M %d,%Y'');'+sLineBreak + +' -> ''2013-05-01'''+sLineBreak + +''+sLineBreak + +'Scanning starts at the beginning of str and fails if format is found'+sLineBreak + +'not to match. Extra characters at the end of str are ignored.'+sLineBreak + +''+sLineBreak + +'MariaDB> SELECT STR_TO_DATE(''a09:30:17'',''a%h:%i:%s'');'+sLineBreak + +' -> ''09:30:17'''+sLineBreak + +'MariaDB> SELECT STR_TO_DATE(''a09:30:17'',''%h:%i:%s'');'+sLineBreak + +' -> NULL'+sLineBreak + +'MariaDB> SELECT STR_TO_DATE(''09:30:17a'',''%h:%i:%s'');'+sLineBreak + +' -> ''09:30:17'''+sLineBreak + +''+sLineBreak + +'Unspecified date or time parts have a value of 0, so incompletely'+sLineBreak + +'specified values in str produce a result with some or all parts set to'+sLineBreak + +'0:'+sLineBreak + +''+sLineBreak + +'MariaDB> SELECT STR_TO_DATE(''abc'',''abc'');'+sLineBreak + +' -> ''0000-00-00'''+sLineBreak + +'MariaDB> SELECT STR_TO_DATE(''9'',''%m'');'+sLineBreak + +' -> ''0000-09-00'''+sLineBreak + +'MariaDB> SELECT STR_TO_DATE(''9'',''%s'');'+sLineBreak + +' -> ''00:00:09''' ), - // Function nr. 250 + // Function nr. 212 ( Name: 'SUBDATE'; Declaration: '(date,INTERVAL expr unit)'; Category: 'Date and Time Functions'; Version: SQL_VERSION_ANSI; - Description: 'When invoked with the INTERVAL form of the second argument, SUBDATE() ' - +'is a synonym for DATE_SUB(). For information on the INTERVAL unit ' - +'argument, see the discussion for DATE_ADD(). mysql> SELECT ' - +'DATE_SUB(''2008-01-02'', INTERVAL 31 DAY); -> ''2007-12-02'' mysql> ' - +'SELECT SUBDATE(''2008-01-02'', INTERVAL 31 DAY); -> ''2007-12-02'' The ' - +'second form allows the use of an integer value for days. In such ' - +'cases, it is interpreted as the number of days to be subtracted from ' - +'the date or datetime expression expr. mysql> SELECT ' - +'SUBDATE(''2008-01-02 12:00:00'', 31); -> ''2007-12-02 12:00:00''' + Description: 'When invoked with the INTERVAL form of the second argument, SUBDATE()'+sLineBreak + +'is a synonym for DATE_SUB(). For information on the INTERVAL unit'+sLineBreak + +'argument, see the discussion for DATE_ADD().'+sLineBreak + +''+sLineBreak + +'MariaDB> SELECT DATE_SUB(''2008-01-02'', INTERVAL 31 DAY);'+sLineBreak + +' -> ''2007-12-02'''+sLineBreak + +'MariaDB> SELECT SUBDATE(''2008-01-02'', INTERVAL 31 DAY);'+sLineBreak + +' -> ''2007-12-02'''+sLineBreak + +''+sLineBreak + +'The second form enables the use of an integer value for days. In such'+sLineBreak + +'cases, it is interpreted as the number of days to be subtracted from'+sLineBreak + +'the date or datetime expression expr.'+sLineBreak + +''+sLineBreak + +'MariaDB> SELECT SUBDATE(''2008-01-02 12:00:00'', 31);'+sLineBreak + +' -> ''2007-12-02 12:00:00''' ), - // Function nr. 251 + // Function nr. 213 ( Name: 'SUBSTR'; Declaration: '(str,pos)'; Category: 'String Functions'; Version: SQL_VERSION_ANSI; - Description: 'SUBSTR() is a synonym for SUBSTRING().' + Description: 'FROM pos FOR len)'+sLineBreak + +''+sLineBreak + +'SUBSTR() is a synonym for SUBSTRING().' ), - // Function nr. 252 + // Function nr. 214 ( Name: 'SUBSTRING'; Declaration: '(str,pos)'; Category: 'String Functions'; Version: SQL_VERSION_ANSI; - Description: 'The forms without a len argument return a substring from string str ' - +'starting at position pos. The forms with a len argument return a ' - +'substring len characters long from string str, starting at position ' - +'pos. The forms that use FROM are standard SQL syntax. It is also ' - +'possible to use a negative value for pos. In this case, the beginning ' - +'of the substring is pos characters from the end of the string, rather ' - +'than the beginning. A negative value may be used for pos in any of the ' - +'forms of this function. For all forms of SUBSTRING(), the position of ' - +'the first character in the string from which the substring is to be ' - +'extracted is reckoned as 1.' + Description: 'SUBSTRING(str FROM pos FOR len)'+sLineBreak + +''+sLineBreak + +'The forms without a len argument return a substring from string str'+sLineBreak + +'starting at position pos. The forms with a len argument return a'+sLineBreak + +'substring len characters long from string str, starting at position'+sLineBreak + +'pos. The forms that use FROM are standard SQL syntax. It is also'+sLineBreak + +'possible to use a negative value for pos. In this case, the beginning'+sLineBreak + +'of the substring is pos characters from the end of the string, rather'+sLineBreak + +'than the beginning. A negative value may be used for pos in any of the'+sLineBreak + +'forms of this function.'+sLineBreak + +''+sLineBreak + +'For all forms of SUBSTRING(), the position of the first character in'+sLineBreak + +'the string from which the substring is to be extracted is reckoned as'+sLineBreak + +'1.' ), - // Function nr. 253 + // Function nr. 215 ( Name: 'SUBSTRING_INDEX'; Declaration: '(str,delim,count)'; Category: 'String Functions'; Version: SQL_VERSION_ANSI; - Description: 'Returns the substring from string str before count occurrences of the ' - +'delimiter delim. If count is positive, everything to the left of the ' - +'final delimiter (counting from the left) is returned. If count is ' - +'negative, everything to the right of the final delimiter (counting ' - +'from the right) is returned. SUBSTRING_INDEX() performs a ' - +'case-sensitive match when searching for delim.' + Description: 'Returns the substring from string str before count occurrences of the'+sLineBreak + +'delimiter delim. If count is positive, everything to the left of the'+sLineBreak + +'final delimiter (counting from the left) is returned. If count is'+sLineBreak + +'negative, everything to the right of the final delimiter (counting from'+sLineBreak + +'the right) is returned. SUBSTRING_INDEX() performs a case-sensitive'+sLineBreak + +'match when searching for delim.' ), - // Function nr. 254 + // Function nr. 216 ( Name: 'SUBTIME'; Declaration: '(expr1,expr2)'; Category: 'Date and Time Functions'; Version: SQL_VERSION_ANSI; - Description: 'SUBTIME() returns expr1 - expr2 expressed as a value in the same ' - +'format as expr1. expr1 is a time or datetime expression, and expr2 is ' - +'a time expression.' + Description: 'SUBTIME() returns expr1 - expr2 expressed as a value in the same format'+sLineBreak + +'as expr1. expr1 is a time or datetime expression, and expr2 is a time'+sLineBreak + +'expression.' ), - // Function nr. 255 + // Function nr. 217 ( Name: 'SUM'; Declaration: '([DISTINCT] expr)'; Category: 'Functions and Modifiers for Use with GROUP BY'; Version: SQL_VERSION_ANSI; - Description: 'Returns the sum of expr. If the return set has no rows, SUM() returns ' - +'NULL. The DISTINCT keyword can be used in MySQL 5.1 to sum only the ' - +'distinct values of expr. SUM() returns NULL if there were no matching ' - +'rows.' + Description: 'Returns the sum of expr. If the return set has no rows, SUM() returns'+sLineBreak + +'NULL. The DISTINCT keyword can be used to sum only the distinct values'+sLineBreak + +'of expr.'+sLineBreak + +''+sLineBreak + +'SUM() returns NULL if there were no matching rows.' ), - // Function nr. 256 + // Function nr. 218 ( Name: 'SYSDATE'; Declaration: '()'; Category: 'Date and Time Functions'; Version: SQL_VERSION_ANSI; - Description: 'Returns the current date and time as a value in ''YYYY-MM-DD ' - +'HH:MM:SS'' or YYYYMMDDHHMMSS.uuuuuu format, depending on whether the ' - +'function is used in a string or numeric context. SYSDATE() returns the ' - +'time at which it executes. This differs from the behavior for NOW(), ' - +'which returns a constant time that indicates the time at which the ' - +'statement began to execute. (Within a stored function or trigger, ' - +'NOW() returns the time at which the function or triggering statement ' - +'began to execute.) mysql> SELECT NOW(), SLEEP(2), NOW(); ' - +'+---------------------+----------+---------------------+ | NOW() | ' - +'SLEEP(2) | NOW() | ' - +'+---------------------+----------+---------------------+ | 2006-04-12 ' - +'13:47:36 | 0 | 2006-04-12 13:47:36 | ' - +'+---------------------+----------+---------------------+ mysql> SELECT ' - +'SYSDATE(), SLEEP(2), SYSDATE(); ' - +'+---------------------+----------+---------------------+ | SYSDATE() | ' - +'SLEEP(2) | SYSDATE() | ' - +'+---------------------+----------+---------------------+ | 2006-04-12 ' - +'13:47:44 | 0 | 2006-04-12 13:47:46 | ' - +'+---------------------+----------+---------------------+ In addition, ' - +'the SET TIMESTAMP statement affects the value returned by NOW() but ' - +'not by SYSDATE(). This means that timestamp settings in the binary log ' - +'have no effect on invocations of SYSDATE(). Because SYSDATE() can ' - +'return different values even within the same statement, and is not ' - +'affected by SET TIMESTAMP, it is nondeterministic and therefore unsafe ' - +'for replication if statement-based binary logging is used. If that is ' - +'a problem, you can use row-based logging. Alternatively, you can use ' - +'the --sysdate-is-now option to cause SYSDATE() to be an alias for ' - +'NOW(). This works if the option is used on both the master and the ' - +'slave. The nondeterministic nature of SYSDATE() also means that ' - +'indexes cannot be used for evaluating expressions that refer to it. ' - +'Beginning with MySQL 5.1.42, a warning is logged if you use this ' - +'function when binlog_format is set to STATEMENT. (Bug#47995 ' - +'(http://bugs.mysql.com/bug.php?id=47995))' + Description: 'Returns the current date and time as a value in ''YYYY-MM-DD HH:MM:SS'''+sLineBreak + +'or YYYYMMDDHHMMSS.uuuuuu format, depending on whether the function is'+sLineBreak + +'used in a string or numeric context.'+sLineBreak + +''+sLineBreak + +'SYSDATE() returns the time at which it executes. This differs from the'+sLineBreak + +'behavior for NOW(), which returns a constant time that indicates the'+sLineBreak + +'time at which the statement began to execute. (Within a stored function'+sLineBreak + +'or trigger, NOW() returns the time at which the function or triggering'+sLineBreak + +'statement began to execute.)'+sLineBreak + +''+sLineBreak + +'MariaDB> SELECT NOW(), SLEEP(2), NOW();'+sLineBreak + +'+---------------------+----------+---------------------+'+sLineBreak + +'| NOW() | SLEEP(2) | NOW() |'+sLineBreak + +'+---------------------+----------+---------------------+'+sLineBreak + +'| 2006-04-12 13:47:36 | 0 | 2006-04-12 13:47:36 |'+sLineBreak + +'+---------------------+----------+---------------------+'+sLineBreak + +''+sLineBreak + +'MariaDB> SELECT SYSDATE(), SLEEP(2), SYSDATE();'+sLineBreak + +'+---------------------+----------+---------------------+'+sLineBreak + +'| SYSDATE() | SLEEP(2) | SYSDATE() |'+sLineBreak + +'+---------------------+----------+---------------------+'+sLineBreak + +'| 2006-04-12 13:47:44 | 0 | 2006-04-12 13:47:46 |'+sLineBreak + +'+---------------------+----------+---------------------+'+sLineBreak + +''+sLineBreak + +'In addition, the SET TIMESTAMP statement affects the value returned by'+sLineBreak + +'NOW() but not by SYSDATE(). This means that timestamp settings in the'+sLineBreak + +'binary log have no effect on invocations of SYSDATE().'+sLineBreak + +''+sLineBreak + +'Because SYSDATE() can return different values even within the same'+sLineBreak + +'statement, and is not affected by SET TIMESTAMP, it is nondeterministic'+sLineBreak + +'and therefore unsafe for replication if statement-based binary logging'+sLineBreak + +'is used. If that is a problem, you can use row-based logging.'+sLineBreak + +''+sLineBreak + +'Alternatively, you can use the --sysdate-is-now option to cause'+sLineBreak + +'SYSDATE() to be an alias for NOW(). This works if the option is used on'+sLineBreak + +'both the master and the slave.'+sLineBreak + +''+sLineBreak + +'The nondeterministic nature of SYSDATE() also means that indexes cannot'+sLineBreak + +'be used for evaluating expressions that refer to it.' ), - // Function nr. 257 + // Function nr. 219 ( Name: 'SYSTEM_USER'; Declaration: '()'; @@ -5058,7 +4866,7 @@ var Description: 'SYSTEM_USER() is a synonym for USER().' ), - // Function nr. 258 + // Function nr. 220 ( Name: 'TAN'; Declaration: '(X)'; @@ -5067,83 +4875,67 @@ var Description: 'Returns the tangent of X, where X is given in radians.' ), - // Function nr. 259 - ( - Name: 'TIME'; - Declaration: '(expr)'; - Category: 'Date and Time Functions'; - Version: SQL_VERSION_ANSI; - Description: 'Extracts the time part of the time or datetime expression expr and ' - +'returns it as a string.' - ), - - // Function nr. 260 + // Function nr. 221 ( Name: 'TIMEDIFF'; Declaration: '(expr1,expr2)'; Category: 'Date and Time Functions'; Version: SQL_VERSION_ANSI; - Description: 'TIMEDIFF() returns expr1 - expr2 expressed as a time value. expr1 and ' - +'expr2 are time or date-and-time expressions, but both must be of the ' - +'same type.' + Description: 'TIMEDIFF() returns expr1 - expr2 expressed as a time value. expr1 and'+sLineBreak + +'expr2 are time or date-and-time expressions, but both must be of the'+sLineBreak + +'same type.'+sLineBreak + +''+sLineBreak + +'The result returned by TIMEDIFF() is limited to the range allowed for'+sLineBreak + +'TIME values. Alternatively, you can use either of the functions'+sLineBreak + +'TIMESTAMPDIFF() and UNIX_TIMESTAMP(), both of which return integers.' ), - // Function nr. 261 - ( - Name: 'TIMESTAMP'; - Declaration: '(expr)'; - Category: 'Date and Time Functions'; - Version: SQL_VERSION_ANSI; - Description: 'With a single argument, this function returns the date or datetime ' - +'expression expr as a datetime value. With two arguments, it adds the ' - +'time expression expr2 to the date or datetime expression expr1 and ' - +'returns the result as a datetime value.' - ), - - // Function nr. 262 + // Function nr. 222 ( Name: 'TIMESTAMPADD'; Declaration: '(unit,interval,datetime_expr)'; Category: 'Date and Time Functions'; Version: SQL_VERSION_ANSI; - Description: 'Adds the integer expression interval to the date or datetime ' - +'expression datetime_expr. The unit for interval is given by the unit ' - +'argument, which should be one of the following values: FRAC_SECOND ' - +'(microseconds), SECOND, MINUTE, HOUR, DAY, WEEK, MONTH, QUARTER, or ' - +'YEAR. Beginning with MySQL 5.1.24, it is possible to use MICROSECOND ' - +'in place of FRAC_SECOND with this function, and FRAC_SECOND is ' - +'deprecated. The unit value may be specified using one of keywords as ' - +'shown, or with a prefix of SQL_TSI_. For example, DAY and SQL_TSI_DAY ' - +'both are legal.' + Description: 'Adds the integer expression interval to the date or datetime expression'+sLineBreak + +'datetime_expr. The unit for interval is given by the unit argument,'+sLineBreak + +'which should be one of the following values: MICROSECOND'+sLineBreak + +'(microseconds), SECOND, MINUTE, HOUR, DAY, WEEK, MONTH, QUARTER, or'+sLineBreak + +'YEAR.'+sLineBreak + +''+sLineBreak + +'It is possible to use FRAC_SECOND in place of MICROSECOND, but'+sLineBreak + +'FRAC_SECOND is deprecated. FRAC_SECOND was removed in MySQL 5.5.3.'+sLineBreak + +''+sLineBreak + +'The unit value may be specified using one of keywords as shown, or with'+sLineBreak + +'a prefix of SQL_TSI_. For example, DAY and SQL_TSI_DAY both are legal.' ), - // Function nr. 263 + // Function nr. 223 ( Name: 'TIMESTAMPDIFF'; Declaration: '(unit,datetime_expr1,datetime_expr2)'; Category: 'Date and Time Functions'; Version: SQL_VERSION_ANSI; - Description: 'Returns datetime_expr2 - datetime_expr1, where datetime_expr1 and ' - +'datetime_expr2 are date or datetime expressions. One expression may be ' - +'a date and the other a datetime; a date value is treated as a datetime ' - +'having the time part ''00:00:00'' where necessary. The unit for the ' - +'result (an integer) is given by the unit argument. The legal values ' - +'for unit are the same as those listed in the description of the ' + Description: 'Returns datetime_expr2 - datetime_expr1, where datetime_expr1 and'+sLineBreak + +'datetime_expr2 are date or datetime expressions. One expression may be'+sLineBreak + +'a date and the other a datetime; a date value is treated as a datetime'+sLineBreak + +'having the time part ''00:00:00'' where necessary. The unit for the'+sLineBreak + +'result (an integer) is given by the unit argument. The legal values for'+sLineBreak + +'unit are the same as those listed in the description of the'+sLineBreak +'TIMESTAMPADD() function.' ), - // Function nr. 264 + // Function nr. 224 ( Name: 'TIME_FORMAT'; Declaration: '(time,format)'; Category: 'Date and Time Functions'; Version: SQL_VERSION_ANSI; - Description: 'This is used like the DATE_FORMAT() function, but the format string ' - +'may contain format specifiers only for hours, minutes, seconds, and ' + Description: 'This is used like the DATE_FORMAT() function, but the format string may'+sLineBreak + +'contain format specifiers only for hours, minutes, seconds, and'+sLineBreak +'microseconds. Other specifiers produce a NULL value or 0.' ), - // Function nr. 265 + // Function nr. 225 ( Name: 'TIME_TO_SEC'; Declaration: '(time)'; @@ -5152,52 +4944,64 @@ var Description: 'Returns the time argument, converted to seconds.' ), - // Function nr. 266 + // Function nr. 226 ( Name: 'TOUCHES'; Declaration: '(g1,g2)'; - Category: 'Geographic Features'; + Category: 'Geometry relations'; Version: SQL_VERSION_ANSI; - Description: 'Returns 1 or 0 to indicate whether g1 spatially touches g2. Two ' - +'geometries spatially touch if the interiors of the geometries do not ' - +'intersect, but the boundary of one of the geometries intersects either ' + Description: 'Returns 1 or 0 to indicate whether g1 spatially touches g2. Two'+sLineBreak + +'geometries spatially touch if the interiors of the geometries do not'+sLineBreak + +'intersect, but the boundary of one of the geometries intersects either'+sLineBreak +'the boundary or the interior of the other.' ), - // Function nr. 267 + // Function nr. 227 ( Name: 'TO_DAYS'; Declaration: '(date)'; Category: 'Date and Time Functions'; Version: SQL_VERSION_ANSI; - Description: 'Given a date date, returns a day number (the number of days since year ' + Description: 'Given a date date, returns a day number (the number of days since year'+sLineBreak +'0).' ), - // Function nr. 268 + // Function nr. 228 + ( + Name: 'TO_SECONDS'; + Declaration: '(expr)'; + Category: 'Date and Time Functions'; + Version: SQL_VERSION_ANSI; + Description: 'Given a date or datetime expr, returns a the number of seconds since'+sLineBreak + +'the year 0. If expr is not a valid date or datetime value, returns'+sLineBreak + +'NULL.' + ), + + // Function nr. 229 ( Name: 'TRIM'; Declaration: '([{BOTH | LEADING | TRAILING} [remstr] FROM] str)'; Category: 'String Functions'; Version: SQL_VERSION_ANSI; - Description: 'Returns the string str with all remstr prefixes or suffixes removed. ' - +'If none of the specifiers BOTH, LEADING, or TRAILING is given, BOTH is ' + Description: 'FROM] str)'+sLineBreak + +''+sLineBreak + +'Returns the string str with all remstr prefixes or suffixes removed. If'+sLineBreak + +'none of the specifiers BOTH, LEADING, or TRAILING is given, BOTH is'+sLineBreak +'assumed. remstr is optional and, if not specified, spaces are removed.' ), - // Function nr. 269 + // Function nr. 230 ( Name: 'TRUNCATE'; Declaration: '(X,D)'; Category: 'Numeric Functions'; Version: SQL_VERSION_ANSI; - Description: 'Returns the number X, truncated to D decimal places. If D is 0, the ' - +'result has no decimal point or fractional part. D can be negative to ' - +'cause D digits left of the decimal point of the value X to become ' - +'zero.' + Description: 'Returns the number X, truncated to D decimal places. If D is 0, the'+sLineBreak + +'result has no decimal point or fractional part. D can be negative to'+sLineBreak + +'cause D digits left of the decimal point of the value X to become zero.' ), - // Function nr. 270 + // Function nr. 231 ( Name: 'UCASE'; Declaration: '(str)'; @@ -5206,384 +5010,338 @@ var Description: 'UCASE() is a synonym for UPPER().' ), - // Function nr. 271 + // Function nr. 232 ( Name: 'UNCOMPRESS'; Declaration: '(string_to_uncompress)'; Category: 'Encryption Functions'; Version: SQL_VERSION_ANSI; - Description: 'Uncompresses a string compressed by the COMPRESS() function. If the ' - +'argument is not a compressed value, the result is NULL. This function ' - +'requires MySQL to have been compiled with a compression library such ' - +'as zlib. Otherwise, the return value is always NULL.' + Description: 'Uncompresses a string compressed by the COMPRESS() function. If the'+sLineBreak + +'argument is not a compressed value, the result is NULL. This function'+sLineBreak + +'requires MySQL to have been compiled with a compression library such as'+sLineBreak + +'zlib. Otherwise, the return value is always NULL.' ), - // Function nr. 272 + // Function nr. 233 ( Name: 'UNCOMPRESSED_LENGTH'; Declaration: '(compressed_string)'; Category: 'Encryption Functions'; Version: SQL_VERSION_ANSI; - Description: 'Returns the length that the compressed string had before being ' + Description: 'Returns the length that the compressed string had before being'+sLineBreak +'compressed.' ), - // Function nr. 273 + // Function nr. 234 ( Name: 'UNHEX'; - Declaration: ''; + Declaration: '(str)'; Category: 'String Functions'; Version: SQL_VERSION_ANSI; - Description: 'UNHEX(str) Performs the inverse operation of HEX(str). That is, it ' - +'interprets each pair of hexadecimal digits in the argument as a number ' - +'and converts it to the character represented by the number. The ' - +'resulting characters are returned as a binary string.' + Description: 'For a string argument str, UNHEX(str) performs the inverse operation of'+sLineBreak + +'HEX(str). That is, it interprets each pair of characters in the'+sLineBreak + +'argument as a hexadecimal number and converts it to the character'+sLineBreak + +'represented by the number. The return value is a binary string.' ), - // Function nr. 274 + // Function nr. 235 ( Name: 'UNIX_TIMESTAMP'; Declaration: '()'; Category: 'Date and Time Functions'; Version: SQL_VERSION_ANSI; - Description: 'If called with no argument, returns a Unix timestamp (seconds since ' - +'''1970-01-01 00:00:00'' UTC) as an unsigned integer. If ' - +'UNIX_TIMESTAMP() is called with a date argument, it returns the value ' - +'of the argument as seconds since ''1970-01-01 00:00:00'' UTC. date may ' - +'be a DATE string, a DATETIME string, a TIMESTAMP, or a number in the ' - +'format YYMMDD or YYYYMMDD. The server interprets date as a value in ' - +'the current time zone and converts it to an internal value in UTC. ' - +'Clients can set their time zone as described in ' - +'http://dev.mysql.com/doc/refman/5.1/en/time-zone-support.html.' + Description: 'If called with no argument, returns a Unix timestamp (seconds since'+sLineBreak + +'''1970-01-01 00:00:00'' UTC) as an unsigned integer. If UNIX_TIMESTAMP()'+sLineBreak + +'is called with a date argument, it returns the value of the argument as'+sLineBreak + +'seconds since ''1970-01-01 00:00:00'' UTC. date may be a DATE string, a'+sLineBreak + +'DATETIME string, a TIMESTAMP, or a number in the format YYMMDD or'+sLineBreak + +'YYYYMMDD. The server interprets date as a value in the current time'+sLineBreak + +'zone and converts it to an internal value in UTC. Clients can set their'+sLineBreak + +'time zone as described in'+sLineBreak + +'https://mariadb.com/kb/en/time-zones/.' ), - // Function nr. 275 + // Function nr. 236 ( Name: 'UPDATEXML'; Declaration: '(xml_target, xpath_expr, new_xml)'; Category: 'String Functions'; Version: SQL_VERSION_ANSI; - Description: 'This function replaces a single portion of a given fragment of XML ' - +'markup xml_target with a new XML fragment new_xml, and then returns ' - +'the changed XML. The portion of xml_target that is replaced matches an ' - +'XPath expression xpath_expr supplied by the user. If no expression ' - +'matching xpath_expr is found, or if multiple matches are found, the ' - +'function returns the original xml_target XML fragment. All three ' - +'arguments should be strings.' + Description: 'This function replaces a single portion of a given fragment of XML'+sLineBreak + +'markup xml_target with a new XML fragment new_xml, and then returns the'+sLineBreak + +'changed XML. The portion of xml_target that is replaced matches an'+sLineBreak + +'XPath expression xpath_expr supplied by the user. In MySQL 5.5, the'+sLineBreak + +'XPath expression can contain at most 127 characters. (This limitation'+sLineBreak + +'is lifted in MySQL 5.6.)'+sLineBreak + +''+sLineBreak + +'If no expression matching xpath_expr is found, or if multiple matches'+sLineBreak + +'are found, the function returns the original xml_target XML fragment.'+sLineBreak + +'All three arguments should be strings.' ), - // Function nr. 276 + // Function nr. 237 ( Name: 'UPPER'; Declaration: '(str)'; Category: 'String Functions'; Version: SQL_VERSION_ANSI; - Description: 'Returns the string str with all characters changed to uppercase ' - +'according to the current character set mapping. The default is latin1 ' - +'(cp1252 West European). mysql> SELECT UPPER(''Hej''); -> ''HEJ'' ' - +'UPPER() is ineffective when applied to binary strings (BINARY, ' - +'VARBINARY, BLOB). The description of LOWER() shows how to perform ' - +'lettercase conversion of binary strings.' + Description: 'Returns the string str with all characters changed to uppercase'+sLineBreak + +'according to the current character set mapping. The default is latin1'+sLineBreak + +'(cp1252 West European).'+sLineBreak + +''+sLineBreak + +'MariaDB> SELECT UPPER(''Hej'');'+sLineBreak + +' -> ''HEJ'''+sLineBreak + +''+sLineBreak + +'See the description of LOWER() for information that also applies to'+sLineBreak + +'UPPER(), such as information about how to perform lettercase conversion'+sLineBreak + +'of binary strings (BINARY, VARBINARY, BLOB) for which these functions'+sLineBreak + +'are ineffective.' ), - // Function nr. 277 + // Function nr. 238 ( Name: 'USER'; Declaration: '()'; Category: 'Information Functions'; Version: SQL_VERSION_ANSI; - Description: 'Returns the current MySQL user name and host name as a string in the ' + Description: 'Returns the current MySQL user name and host name as a string in the'+sLineBreak +'utf8 character set.' ), - // Function nr. 278 - ( - Name: 'UTC_DATE'; - Declaration: '()'; - Category: 'Date and Time Functions'; - Version: SQL_VERSION_ANSI; - Description: 'Returns the current UTC date as a value in ''YYYY-MM-DD'' or YYYYMMDD ' - +'format, depending on whether the function is used in a string or ' - +'numeric context.' - ), - - // Function nr. 279 - ( - Name: 'UTC_TIME'; - Declaration: '()'; - Category: 'Date and Time Functions'; - Version: SQL_VERSION_ANSI; - Description: 'Returns the current UTC time as a value in ''HH:MM:SS'' or ' - +'HHMMSS.uuuuuu format, depending on whether the function is used in a ' - +'string or numeric context.' - ), - - // Function nr. 280 - ( - Name: 'UTC_TIMESTAMP'; - Declaration: '()'; - Category: 'Date and Time Functions'; - Version: SQL_VERSION_ANSI; - Description: 'Returns the current UTC date and time as a value in ''YYYY-MM-DD ' - +'HH:MM:SS'' or YYYYMMDDHHMMSS.uuuuuu format, depending on whether the ' - +'function is used in a string or numeric context.' - ), - - // Function nr. 281 + // Function nr. 239 ( Name: 'UUID'; Declaration: '()'; Category: 'Miscellaneous Functions'; Version: SQL_VERSION_ANSI; - Description: '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() 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). The fifth number is an IEEE 802 ' - +'node number that provides spatial uniqueness. A random number is ' - +'substituted if the latter is not available (for example, because the ' - +'host computer has no Ethernet card, or we do not know how to find the ' - +'hardware address of an interface on your operating system). In this ' - +'case, spatial uniqueness cannot be guaranteed. Nevertheless, a ' - +'collision should have very low probability. Currently, the MAC address ' - +'of an interface is taken into account only on FreeBSD and Linux. On ' - +'other operating systems, MySQL uses a randomly generated 48-bit ' - +'number.' + Description: 'Returns a Universal Unique Identifier (UUID) generated according to'+sLineBreak + +'"DCE 1.1: Remote Procedure Call" (Appendix A) CAE (Common Applications'+sLineBreak + +'Environment) Specifications published by The Open Group in October 1997'+sLineBreak + +'(Document Number C706,'+sLineBreak + +'http://www.opengroup.org/public/pubs/catalog/c706.htm).'+sLineBreak + +''+sLineBreak + +'A UUID is designed as a number that is globally unique in space and'+sLineBreak + +'time. Two calls to UUID() are expected to generate two different'+sLineBreak + +'values, even if these calls are performed on two separate computers'+sLineBreak + +'that are not connected to each other.'+sLineBreak + +''+sLineBreak + +'A UUID is a 128-bit number represented by a utf8 string of five'+sLineBreak + +'hexadecimal numbers in aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee format:'+sLineBreak + +''+sLineBreak + +'o The first three numbers are generated from a timestamp.'+sLineBreak + +''+sLineBreak + +'o The fourth number preserves temporal uniqueness in case the timestamp'+sLineBreak + +' value loses monotonicity (for example, due to daylight saving time).'+sLineBreak + +''+sLineBreak + +'o The fifth number is an IEEE 802 node number that provides spatial'+sLineBreak + +' uniqueness. A random number is substituted if the latter is not'+sLineBreak + +' available (for example, because the host computer has no Ethernet'+sLineBreak + +' card, or we do not know how to find the hardware address of an'+sLineBreak + +' interface on your operating system). In this case, spatial uniqueness'+sLineBreak + +' cannot be guaranteed. Nevertheless, a collision should have very low'+sLineBreak + +' probability.'+sLineBreak + +''+sLineBreak + +' Currently, the MAC address of an interface is taken into account only'+sLineBreak + +' on FreeBSD and Linux. On other operating systems, MySQL uses a'+sLineBreak + +' randomly generated 48-bit number.' ), - // Function nr. 282 + // Function nr. 240 ( Name: 'UUID_SHORT'; Declaration: '()'; Category: 'Miscellaneous Functions'; Version: SQL_VERSION_ANSI; - Description: 'Returns a "short" universal identifier as a 64-bit unsigned integer ' - +'(rather than a string-form 128-bit identifier as returned by the ' - +'UUID() function). The value of UUID_SHORT() is guaranteed to be unique ' - +'if the following conditions hold: The server_id of the current host is ' - +'unique among your set of master and slave servers server_id is between ' - +'0 and 255 You don''t set back your system time for your server between ' - +'mysqld restarts You do not invoke UUID_SHORT() on average more than 16 ' - +'million times per second between mysqld restarts The UUID_SHORT() ' - +'return value is constructed this way: (server_id & 255) << 56 + ' - +'(server_startup_time_in_seconds << 24) + incremented_variable++;' + Description: 'Returns a "short" universal identifier as a 64-bit unsigned integer'+sLineBreak + +'(rather than a string-form 128-bit identifier as returned by the UUID()'+sLineBreak + +'function).'+sLineBreak + +''+sLineBreak + +'The value of UUID_SHORT() is guaranteed to be unique if the following'+sLineBreak + +'conditions hold:'+sLineBreak + +''+sLineBreak + +'o The server_id of the current host is unique among your set of master'+sLineBreak + +' and slave servers'+sLineBreak + +''+sLineBreak + +'o server_id is between 0 and 255'+sLineBreak + +''+sLineBreak + +'o You do not set back your system time for your server between mysqld'+sLineBreak + +' restarts'+sLineBreak + +''+sLineBreak + +'o You do not invoke UUID_SHORT() on average more than 16 million times'+sLineBreak + +' per second between mysqld restarts'+sLineBreak + +''+sLineBreak + +'The UUID_SHORT() return value is constructed this way:'+sLineBreak + +''+sLineBreak + +' (server_id & 255) << 56'+sLineBreak + +'+ (server_startup_time_in_seconds << 24)'+sLineBreak + +'+ incremented_variable++;' ), - // Function nr. 283 + // Function nr. 241 ( Name: 'VALUES'; Declaration: '(col_name)'; Category: 'Miscellaneous Functions'; Version: SQL_VERSION_ANSI; - Description: 'In an INSERT ... ON DUPLICATE KEY UPDATE statement, you can use the ' - +'VALUES(col_name) function in the UPDATE clause to refer to column ' - +'values from the INSERT portion of the statement. In other words, ' - +'VALUES(col_name) in the UPDATE clause refers to the value of col_name ' - +'that would be inserted, had no duplicate-key conflict occurred. This ' - +'function is especially useful in multiple-row inserts. The VALUES() ' - +'function is meaningful only in INSERT ... ON DUPLICATE KEY UPDATE ' - +'statements and returns NULL otherwise. ' - +'http://dev.mysql.com/doc/refman/5.1/en/insert-on-duplicate.html.' + Description: 'In an INSERT ... ON DUPLICATE KEY UPDATE statement, you can use the'+sLineBreak + +'VALUES(col_name) function in the UPDATE clause to refer to column'+sLineBreak + +'values from the INSERT portion of the statement. In other words,'+sLineBreak + +'VALUES(col_name) in the UPDATE clause refers to the value of col_name'+sLineBreak + +'that would be inserted, had no duplicate-key conflict occurred. This'+sLineBreak + +'function is especially useful in multiple-row inserts. The VALUES()'+sLineBreak + +'function is meaningful only in the ON DUPLICATE KEY UPDATE clause of'+sLineBreak + +'INSERT statements and returns NULL otherwise. See'+sLineBreak + +'https://mariadb.com/kb/en/insert-on-duplicate-key-update/.' ), - // Function nr. 284 + // Function nr. 242 + ( + Name: 'VARBINARY'; + Declaration: '(M)'; + Category: 'Data Types'; + Version: SQL_VERSION_ANSI; + Description: 'The VARBINARY type is similar to the VARCHAR type, but stores binary'+sLineBreak + +'byte strings rather than nonbinary character strings. M represents the'+sLineBreak + +'maximum column length in bytes.' + ), + + // Function nr. 243 ( Name: 'VARIANCE'; Declaration: '(expr)'; Category: 'Functions and Modifiers for Use with GROUP BY'; Version: SQL_VERSION_ANSI; - Description: 'Returns the population standard variance of expr. This is an extension ' - +'to standard SQL. The standard SQL function VAR_POP() can be used ' - +'instead. VARIANCE() returns NULL if there were no matching rows.' + Description: 'Returns the population standard variance of expr. This is an extension'+sLineBreak + +'to standard SQL. The standard SQL function VAR_POP() can be used'+sLineBreak + +'instead.'+sLineBreak + +''+sLineBreak + +'VARIANCE() returns NULL if there were no matching rows.' ), - // Function nr. 285 + // Function nr. 244 ( Name: 'VAR_POP'; Declaration: '(expr)'; Category: 'Functions and Modifiers for Use with GROUP BY'; Version: SQL_VERSION_ANSI; - Description: 'Returns the population standard variance of expr. It considers rows as ' - +'the whole population, not as a sample, so it has the number of rows as ' - +'the denominator. You can also use VARIANCE(), which is equivalent but ' - +'is not standard SQL. VAR_POP() returns NULL if there were no matching ' - +'rows.' + Description: 'Returns the population standard variance of expr. It considers rows as'+sLineBreak + +'the whole population, not as a sample, so it has the number of rows as'+sLineBreak + +'the denominator. You can also use VARIANCE(), which is equivalent but'+sLineBreak + +'is not standard SQL.'+sLineBreak + +''+sLineBreak + +'VAR_POP() returns NULL if there were no matching rows.' ), - // Function nr. 286 + // Function nr. 245 ( Name: 'VAR_SAMP'; Declaration: '(expr)'; Category: 'Functions and Modifiers for Use with GROUP BY'; Version: SQL_VERSION_ANSI; - Description: 'Returns the sample variance of expr. That is, the denominator is the ' - +'number of rows minus one. VAR_SAMP() returns NULL if there were no ' - +'matching rows.' + Description: 'Returns the sample variance of expr. That is, the denominator is the'+sLineBreak + +'number of rows minus one.'+sLineBreak + +''+sLineBreak + +'VAR_SAMP() returns NULL if there were no matching rows.' ), - // Function nr. 287 + // Function nr. 246 ( Name: 'VERSION'; Declaration: '()'; Category: 'Information Functions'; Version: SQL_VERSION_ANSI; - Description: 'Returns a string that indicates the MySQL server version. The string ' - +'uses the utf8 character set.' + Description: 'Returns a string that indicates the MySQL server version. The string'+sLineBreak + +'uses the utf8 character set. The value might have a suffix in addition'+sLineBreak + +'to the version number. See the description of the version system'+sLineBreak + +'variable in'+sLineBreak + +'https://mariadb.com/kb/en/server-system-variables#version.' ), - // Function nr. 288 + // Function nr. 247 ( Name: 'WEEK'; Declaration: '(date[,mode])'; Category: 'Date and Time Functions'; Version: SQL_VERSION_ANSI; - Description: 'This function returns the week number for date. The two-argument form ' - +'of WEEK() allows you to specify whether the week starts on Sunday or ' - +'Monday and whether the return value should be in the range from 0 to ' - +'53 or from 1 to 53. If the mode argument is omitted, the value of the ' - +'default_week_format system variable is used. See ' - +'http://dev.mysql.com/doc/refman/5.1/en/server-system-variables.html.' + Description: 'This function returns the week number for date. The two-argument form'+sLineBreak + +'of WEEK() enables you to specify whether the week starts on Sunday or'+sLineBreak + +'Monday and whether the return value should be in the range from 0 to 53'+sLineBreak + +'or from 1 to 53. If the mode argument is omitted, the value of the'+sLineBreak + +'default_week_format system variable is used. See'+sLineBreak + +'https://mariadb.com/kb/en/server-system-variables/.' ), - // Function nr. 289 + // Function nr. 248 ( Name: 'WEEKDAY'; Declaration: '(date)'; Category: 'Date and Time Functions'; Version: SQL_VERSION_ANSI; - Description: 'Returns the weekday index for date (0 = Monday, 1 = Tuesday, ... 6 = ' + Description: 'Returns the weekday index for date (0 = Monday, 1 = Tuesday, ... 6 ='+sLineBreak +'Sunday).' ), - // Function nr. 290 + // Function nr. 249 ( Name: 'WEEKOFYEAR'; Declaration: '(date)'; Category: 'Date and Time Functions'; Version: SQL_VERSION_ANSI; - Description: 'Returns the calendar week of the date as a number in the range from 1 ' - +'to 53. WEEKOFYEAR() is a compatibility function that is equivalent to ' + Description: 'Returns the calendar week of the date as a number in the range from 1'+sLineBreak + +'to 53. WEEKOFYEAR() is a compatibility function that is equivalent to'+sLineBreak +'WEEK(date,3).' ), - // Function nr. 291 + // Function nr. 250 ( Name: 'WITHIN'; Declaration: '(g1,g2)'; - Category: 'Geographic Features'; + Category: 'Geometry relations'; Version: SQL_VERSION_ANSI; - Description: 'Returns 1 or 0 to indicate whether g1 is spatially within g2. This ' + Description: 'Returns 1 or 0 to indicate whether g1 is spatially within g2. This'+sLineBreak +'tests the opposite relationship as Contains().' ), - // Function nr. 292 - ( - Name: 'WKT'; - Declaration: '(WKT)'; - Category: 'Geographic Features'; - Version: SQL_VERSION_ANSI; - Description: '' - ), - - // Function nr. 293 + // Function nr. 251 ( Name: 'X'; Declaration: '(p)'; - Category: 'Geographic Features'; + Category: 'Point properties'; Version: SQL_VERSION_ANSI; - Description: 'Returns the X-coordinate value for the point p as a double-precision ' - +'number.' + Description: 'Returns the X-coordinate value for the Point object p as a'+sLineBreak + +'double-precision number.' ), - // Function nr. 294 - ( - Name: 'XOR'; - Declaration: ''; - Category: 'Logical operators'; - Version: SQL_VERSION_ANSI; - Description: 'Logical XOR. Returns NULL if either operand is NULL. For non-NULL ' - +'operands, evaluates to 1 if an odd number of operands is nonzero, ' - +'otherwise 0 is returned.' - ), - - // Function nr. 295 + // Function nr. 252 ( Name: 'Y'; Declaration: '(p)'; - Category: 'Geographic Features'; + Category: 'Point properties'; Version: SQL_VERSION_ANSI; - Description: 'Returns the Y-coordinate value for the point p as a double-precision ' - +'number.' + Description: 'Returns the Y-coordinate value for the Point object p as a'+sLineBreak + +'double-precision number.' ), - // Function nr. 296 + // Function nr. 253 ( Name: 'YEAR'; Declaration: '(date)'; Category: 'Date and Time Functions'; Version: SQL_VERSION_ANSI; - Description: 'Returns the year for date, in the range 1000 to 9999, or 0 for the ' + Description: 'Returns the year for date, in the range 1000 to 9999, or 0 for the'+sLineBreak +'"zero" date.' ), - // Function nr. 297 + // Function nr. 254 ( Name: 'YEARWEEK'; Declaration: '(date)'; Category: 'Date and Time Functions'; Version: SQL_VERSION_ANSI; - Description: 'Returns year and week for a date. The mode argument works exactly like ' - +'the mode argument to WEEK(). The year in the result may be different ' - +'from the year in the date argument for the first and the last week of ' + Description: 'Returns year and week for a date. The mode argument works exactly like'+sLineBreak + +'the mode argument to WEEK(). The year in the result may be different'+sLineBreak + +'from the year in the date argument for the first and the last week of'+sLineBreak +'the year.' - ), - - // Function nr. 298 - ( - Name: '^'; - Declaration: ''; - Category: 'Bit Functions'; - Version: SQL_VERSION_ANSI; - Description: 'Bitwise XOR:' - ), - - // Function nr. 299 - ( - Name: '|'; - Declaration: ''; - Category: 'Bit Functions'; - Version: SQL_VERSION_ANSI; - Description: 'Bitwise OR:' - ), - - // Function nr. 300 - ( - Name: '||'; - Declaration: ''; - Category: 'Logical operators'; - Version: SQL_VERSION_ANSI; - Description: 'Logical OR. When both operands are non-NULL, the result is 1 if any ' - +'operand is nonzero, and 0 otherwise. With a NULL operand, the result ' - +'is 1 if the other operand is nonzero, and NULL otherwise. If both ' - +'operands are NULL, the result is NULL.' - ), - - // Function nr. 301 - ( - Name: '~'; - Declaration: ''; - Category: 'Bit Functions'; - Version: SQL_VERSION_ANSI; - Description: 'Invert all bits.' ) );