INSERT INTO help_topic (help_topic_id, help_category_id, name, description, example, url) VALUES (418, 37, 'CHAR\\_LENGTH', 'Syntax\n------\n\nCHAR_LENGTH(str)\nCHARACTER_LENGTH(str)\n\nDescription\n-----------\n\nReturns the length of the given string argument, measured in characters. A multi-byte character counts as a single character. This means that for a string containing five two-byte characters, LENGTH() (or OCTET_LENGTH() in Oracle mode) returns 10, whereas CHAR_LENGTH() returns 5. If the argument is NULL, it returns NULL.\n\nIf the argument is not a string value, it is converted into a string.\n\nIt is synonymous with the CHARACTER_LENGTH() function.\n\nExamples\n--------\n\nSELECT CHAR_LENGTH(''MariaDB'');\n+------------------------+\n| CHAR_LENGTH(''MariaDB'') |\n+------------------------+\n|                      7 |\n+------------------------+\n\nURL: https://mariadb.com/docs/server/reference/sql-functions/string-functions/char_length', '', 'https://mariadb.com/docs/server/reference/sql-functions/string-functions/char_length');
INSERT INTO help_topic (help_topic_id, help_category_id, name, description, example, url) VALUES (419, 37, 'CHARACTER\\_LENGTH', 'Syntax\n------\n\nCHARACTER_LENGTH(str)\n\nDescription\n-----------\n\nCHARACTER_LENGTH() is a synonym for CHAR_LENGTH().\n\nURL: https://mariadb.com/docs/server/reference/sql-functions/string-functions/character_length', '', 'https://mariadb.com/docs/server/reference/sql-functions/string-functions/character_length');
INSERT INTO help_topic (help_topic_id, help_category_id, name, description, example, url) VALUES (420, 37, 'CHR', 'Syntax\n------\n\nCHR(N)\n\nDescription\n-----------\n\nCHR() interprets each argument N as an integer and returns a VARCHAR(1) string consisting of the character given by the code values of the integer. The character set and collation of the string are set according to the values of the character_set_database and collation_database system variables.\n\nCHR() is similar to the CHAR() function, but only accepts a single argument.\n\nCHR() is available in all sql_modes.\n\nExamples\n--------\n\nSELECT CHR(67);\n+---------+\n| CHR(67) |\n+---------+\n| C       |\n+---------+\n\nSELECT CHR(''67'');\n+-----------+\n| CHR(''67'') |\n+-----------+\n| C         |\n+-----------+\n\nSELECT CHR(''C'');\n+----------+\n| CHR(''C'') |\n+----------+\n|          |\n+----------+\n1 row in set, 1 warning (0.000 sec)\n\nSHOW WARNINGS;\n+---------+------+----------------------------------------+\n| Level   | Code | Message                                |\n+---------+------+----------------------------------------+\n| Warning | 1292 | Truncated incorrect INTEGER value: ''C'' |\n+---------+------+----------------------------------------+\n\nURL: https://mariadb.com/docs/server/reference/sql-functions/string-functions/chr', '', 'https://mariadb.com/docs/server/reference/sql-functions/string-functions/chr');
INSERT INTO help_topic (help_topic_id, help_category_id, name, description, example, url) VALUES (421, 37, 'CONCAT', 'Syntax\n------\n\nCONCAT(str1,str2,...)\n\nDescription\n-----------\n\nReturns the string that results from concatenating the arguments. May have one or more arguments. If all arguments are non-binary strings, the result is a non-binary 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:\n\n``sql\nSELECT CONCAT(CAST(int_col AS CHAR), char_col);\n`\n\nCONCAT() returns NULL if any argument is NULL.\n\nA NULL parameter hides all information contained in other parameters from the result. Sometimes this is not desirable; to avoid this, you can:\n\n Use the CONCAT_WS() function with an empty separator, because that function is NULL-safe.\n Use IFNULL() to turn NULLs into empty strings.\n\nOracle Mode\n\nIn Oracle mode, CONCAT` ignores null.\n\nExamples\n--------\n\nSELECT CONCAT(''Ma'', ''ria'', ''DB'');\n+---------------------------+\n| CONCAT(''Ma'', ''ria'', ''DB'') |\n+---------------------------+\n| MariaDB                   |\n+---------------------------+\n\nSELECT CONCAT(''Ma'', ''ria'', NULL, ''DB'');\n+---------------------------------+\n| CONCAT(''Ma'', ''ria'', NULL, ''DB'') |\n+---------------------------------+\n| NULL                            |\n+---------------------------------+\n\nSELECT CONCAT(42.0);\n+--------------+\n| CONCAT(42.0) |\n+--------------+\n| 42.0         |\n+--------------+\n\nURL: https://mariadb.com/docs/server/reference/sql-functions/string-functions/concat', '', 'https://mariadb.com/docs/server/reference/sql-functions/string-functions/concat');
INSERT INTO help_topic (help_topic_id, help_category_id, name, description, example, url) VALUES (422, 37, 'CONCAT\\_WS', 'Syntax\n------\n\nCONCAT_WS(separator,str1,str2,...)\n\nDescription\n-----------\n\nCONCAT_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 arguments.\n\nIf the separator is NULL, the result is NULL; all other NULL values are skipped. This makes CONCAT_WS() suitable when you want to concatenate some values and avoid losing all information if one of them is NULL.\n\nExamples\n--------\n\nSELECT CONCAT_WS('','',''First name'',''Second name'',''Last Name'');\n+-------------------------------------------------------+\n| CONCAT_WS('','',''First name'',''Second name'',''Last Name'') |\n+-------------------------------------------------------+\n| First name,Second name,Last Name                      |\n+-------------------------------------------------------+\n\nSELECT CONCAT_WS(''-'',''Floor'',NULL,''Room'');\n+------------------------------------+\n| CONCAT_WS(''-'',''Floor'',NULL,''Room'') |\n+------------------------------------+\n| Floor-Room                         |\n+------------------------------------+\n\nURL: https://mariadb.com/docs/server/reference/sql-functions/string-functions/concat_ws', '', 'https://mariadb.com/docs/server/reference/sql-functions/string-functions/concat_ws');
INSERT INTO help_topic (help_topic_id, help_category_id, name, description, example, url) VALUES (423, 37, 'CONVERT', 'Syntax\n------\n\nCONVERT(expr,type), CONVERT(expr USING transcoding_name)\n\nDescription\n-----------\n\nThe CONVERT() and CAST() functions take a value of one type and produce a value of another type.\n\nThe type can be one of the following values:\n\n BINARY\n CHAR\n DATE\n DATETIME\n \\[DECIMAL [(M\\[,D\\])](../../data-types/numeric-data-types/decimal.md)]\n DOUBLE\n FLOAT\n INTEGER\n   Short for SIGNED INTEGER\n SIGNED \\[INTEGER]\n UNSIGNED \\[INTEGER]\n TIME\n* VARCHAR (in Oracle mode)\n\nNote that in MariaDB, INT and INTEGER are the same thing.\n\nBINARY produces a string with the BINARY data type. If the optional length is given, BINARY(N) causes the cast to use no more than N bytes of the argument. Values shorter than the given number in bytes are padded with 0x00 bytes to make them equal the length value.\n\nCHAR(N) causes the cast to use no more than the number of characters given in the argument.\n\nThe main difference between the CAST() and CONVERT() is that CONVERT(expr,type) is ODBC syntax while CAST(expr as type) and CONVERT(... USING ...) are SQL92 syntax.\n\nCONVERT() with USING is used to convert data between different character sets. In MariaDB, 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:\n\n``sql\nSELECT CONVERT(''abc'' USING utf8);\n``\n\nExamples\n--------\n\nSELECT enum_col FROM tbl_name \nORDER BY CAST(enum_col AS CHAR);\n\nURL: https://mariadb.com/docs/server/reference/sql-functions/string-functions/convert', '', 'https://mariadb.com/docs/server/reference/sql-functions/string-functions/convert');
INSERT INTO help_topic (help_topic_id, help_category_id, name, description, example, url) VALUES (424, 37, 'ELT', 'Syntax\n------\n\nELT(N, str1[, str2, str3,...])\n\nDescription\n-----------\n\nTakes a numeric argument and a series of string arguments. Returns the string that corresponds to the given numeric position. For instance, it returns str1 if N is 1, str2 if N is 2, and so on. If the numeric argument is a FLOAT, MariaDB rounds it to the nearest INTEGER. If the numeric argument is less than 1, greater than the total number of arguments, or not a number, ELT() returns NULL. It must have at least two arguments.\n\nIt is complementary to the FIELD() function.\n\nExamples\n--------\n\nSELECT ELT(1, ''ej'', ''Heja'', ''hej'', ''foo'');\n+------------------------------------+\n| ELT(1, ''ej'', ''Heja'', ''hej'', ''foo'') |\n+------------------------------------+\n| ej                                 |\n+------------------------------------+\n\nSELECT ELT(4, ''ej'', ''Heja'', ''hej'', ''foo'');\n+------------------------------------+\n| ELT(4, ''ej'', ''Heja'', ''hej'', ''foo'') |\n+------------------------------------+\n| foo                                |\n+------------------------------------+\n\nURL: https://mariadb.com/docs/server/reference/sql-functions/string-functions/elt', '', 'https://mariadb.com/docs/server/reference/sql-functions/string-functions/elt');
INSERT INTO help_topic (help_topic_id, help_category_id, name, description, example, url) VALUES (425, 37, 'EXPORT\\_SET', 'Syntax\n------\n\nEXPORT_SET(bits, on, off[, separator[, number_of_bits]])\n\nDescription\n-----------\n\nTakes a minimum of three arguments. Returns a string where each bit in the given bits argument is returned, with the string values given for on and off.\n\nBits 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 a separator string (defaults as '',''). You can optionally limit the number of bits the EXPORT_SET() function examines using the number_of_bits option.\n\nIf any of the arguments are set as NULL, the function returns NULL.\n\nExamples\n--------\n\nSELECT EXPORT_SET(5,''Y'',''N'','','',4);\n+-----------------------------+\n| EXPORT_SET(5,''Y'',''N'','','',4) |\n+-----------------------------+\n| Y,N,Y,N                     |\n+-----------------------------+\n\nSELECT EXPORT_SET(6,''1'',''0'','','',10);\n+------------------------------+\n| EXPORT_SET(6,''1'',''0'','','',10) |\n+------------------------------+\n| 0,1,1,0,0,0,0,0,0,0          |\n+------------------------------+\n\nURL: https://mariadb.com/docs/server/reference/sql-functions/string-functions/export_set', '', 'https://mariadb.com/docs/server/reference/sql-functions/string-functions/export_set');
INSERT INTO help_topic (help_topic_id, help_category_id, name, description, example, url) VALUES (426, 37, 'EXTRACTVALUE', 'Syntax\n------\n\nEXTRACTVALUE(xml_frag, xpath_expr)\n\nDescription\n-----------\n\nThe EXTRACTVALUE() function takes two string arguments: a fragment of XML markup and an XPath expression, (also known as a locator). It returns the text (That is, CDDATA), of the first text node which is a child of the element or elements matching the XPath expression.\n\nIn cases where a valid XPath expression does not match any text nodes in a valid XML fragment, (including the implicit /text() expression), the EXTRACTVALUE() function returns an empty string.\n\nInvalid Arguments\n\nWhen either the XML fragment or the XPath expression is NULL, the EXTRACTVALUE() function returns NULL. When the XML fragment is invalid, it raises a warning Code 1525:\n\n``sql\nWarning (Code 1525): Incorrect XML value: ''parse error at line 1 pos 11: unexpected END-OF-INPUT''\n`\n\nWhen the XPath value is invalid, it generates an Error 1105:\n\n`sql\nERROR 1105 (HY000): XPATH syntax error: '')''\n`\n\nExplicit text() Expressions\n\nThis function is the equivalent of performing a match using the XPath expression after appending /text(). In other words:\n\n`sql\nSELECT\n   EXTRACTVALUE(''<cases><case>example</case></cases>'', ''/cases/case'') \n    AS ''Base Example'',\n   EXTRACTVALUE(''<cases><case>example</case></cases>'', ''/cases/case/text()'') \n    AS ''text() Example'';\n+--------------+----------------+\n| Base Example | text() Example |\n+--------------+----------------+\n| example      | example        |\n+--------------+----------------+\n`\n\nCount Matches\n\nWhen EXTRACTVALUE() returns multiple matches, it returns the content of the first child text node of each matching element, in the matched order, as a single, space-delimited string.\n\nBy design, the EXTRACTVALUE() function makes no distinction between a match on an empty element and no match at all. If you need to determine whether no matching element was found in the XML fragment or if an element was found that contained no child text nodes, use the XPath count() function.\n\nFor instance, when looking for a value that exists, but contains no child text nodes, you would get a count of the number of matching instances:\n\n`sql\nSELECT\n   EXTRACTVALUE(''<cases><case/></cases>'', ''/cases/case'') \n    AS ''Empty Example'',\n   EXTRACTVALUE(''<cases><case/></cases>'', ''count(/cases/case)'') \n    AS ''count() Example'';\n+---------------+-----------------+\n| Empty Example | count() Example |\n+---------------+-----------------+\n|               |               1 |\n+---------------+-----------------+\n`\n\nAlternatively, when looking for a value that doesn''t exist, count() returns 0.\n\n`sql\nSELECT\n   EXTRACTVALUE(''<cases><case/></cases>'', ''/cases/person'') \n    AS ''No Match Example'',\n   EXTRACTVALUE(''<cases><case/></cases>'', ''count(/cases/person)'') \n    AS ''count() Example'';\n+------------------+-----------------+\n| No Match Example | count() Example |\n+------------------+-----------------+\n|                  |                0|\n+------------------+-----------------+\n`\n\nMatches\n\nImportant: The EXTRACTVALUE() function only returns CDDATA. It does not return tags that the element might contain or the text that these child elements contain.\n\n`sql\nSELECT \n  EXTRACTVALUE(''<cases><case>Person<email>x@example.com</email></case></cases>'', ''/cases'')\n   AS Case;\n+--------+\n| Case   |\n+--------+\n| Person |\n+--------+\n`\n\nNote, in the above example, while the XPath expression matches to the parent <case> instance, it does not return the contained <email>` tag or its content.\n\nExamples\n--------\n\nSELECT\n    ExtractValue(''<a>ccc<b>ddd</b></a>'', ''/a'')            AS val1,\n    ExtractValue(''<a>ccc<b>ddd</b></a>'', ''/a/b'')          AS val2,\n    ExtractValue(''<a>ccc<b>ddd</b></a>'', ''//b'')           AS val3,\n    ExtractValue(''<a>ccc<b>ddd</b></a>'', ''/b'')            AS val4,\n    ExtractValue(''<a>ccc<b>ddd</b><b>eee</b></a>'', ''//b'') AS val5;\n+------+------+------+------+---------+\n| val1 | val2 | val3 | val4 | val5    |\n+------+------+------+------+---------+\n| ccc  | ddd  | ddd  |      | ddd eee |\n+------+------+------+------+---------+\n\nURL: https://mariadb.com/docs/server/reference/sql-functions/string-functions/extractvalue', '', 'https://mariadb.com/docs/server/reference/sql-functions/string-functions/extractvalue');
INSERT INTO help_topic (help_topic_id, help_category_id, name, description, example, url) VALUES (427, 37, 'FIELD', 'Syntax\n------\n\nFIELD(pattern, str1[,str2,...])\n\nDescription\n-----------\n\nReturns the index position of the string or number matching the given pattern. Returns 0 in the event that none of the arguments match the pattern. Raises an Error 1582 if not given at least two arguments.\n\nWhen all arguments given to the FIELD() function are strings, they are treated as case-insensitive. When all the arguments are numbers, they are treated as numbers. Otherwise, they are treated as doubles.\n\nIf the given pattern occurs more than once, the FIELD() function only returns the index of the first instance. If the given pattern is NULL, the function returns 0, as a NULL pattern always fails to match.\n\nThis function is complementary to the ELT() function.\n\nExamples\n--------\n\nSELECT FIELD(''ej'', ''Hej'', ''ej'', ''Heja'', ''hej'', ''foo'') \n   AS ''Field Results'';\n+---------------+\n| Field Results | \n+---------------+\n|             2 |\n+---------------+\n\nSELECT FIELD(''fo'', ''Hej'', ''ej'', ''Heja'', ''hej'', ''foo'')\n   AS ''Field Results'';\n+---------------+\n| Field Results | \n+---------------+\n|             0 |\n+---------------+\n\nSELECT FIELD(1, 2, 3, 4, 5, 1) AS ''Field Results'';\n+---------------+\n| Field Results |\n+---------------+\n|             5 |\n+---------------+\n\nSELECT FIELD(NULL, 2, 3) AS ''Field Results'';\n+---------------+\n| Field Results |\n+---------------+\n|             0 |\n+---------------+\n\nSELECT FIELD(''fail'') AS ''Field Results'';\nError 1582 (42000): Incorrect parameter count in call\nto native function ''field''\n\nURL: https://mariadb.com/docs/server/reference/sql-functions/string-functions/field', '', 'https://mariadb.com/docs/server/reference/sql-functions/string-functions/field');
INSERT INTO help_topic (help_topic_id, help_category_id, name, description, example, url) VALUES (428, 37, 'FIND\\_IN\\_SET', 'Syntax\n------\n\nFIND_IN_SET(pattern, strlist)\n\nDescription\n-----------\n\nReturns the index position where the given pattern occurs in a string list. The first argument is the pattern you want to search for. The second argument is a string containing comma-separated variables. If the second argument is of the SET data-type, the function is optimized to use bit arithmetic.\n\nIf the pattern does not occur in the string list or if the string list is an empty string, the function returns 0. If either argument is NULL, the function returns NULL. The function does not return the correct result if the pattern contains a comma (",") character.\n\nExamples\n--------\n\nSELECT FIND_IN_SET(''b'',''a,b,c,d'') AS "Found Results";\n+---------------+\n| Found Results |\n+---------------+\n|             2 |\n+---------------+\n\nURL: https://mariadb.com/docs/server/reference/sql-functions/string-functions/find_in_set', '', 'https://mariadb.com/docs/server/reference/sql-functions/string-functions/find_in_set');
INSERT INTO help_topic (help_topic_id, help_category_id, name, description, example, url) VALUES (429, 37, 'FORMAT', 'Description\n-----------\n\nFormats the given number for display as a string, adding separators to appropriate position and rounding the results to the given decimal position. For instance, it would format 15233.345 to 15,233.35.\n\nIf the given decimal position is 0, it rounds to return no decimal point or fractional part. You can optionally specify a locale value to format numbers to the pattern appropriate for the given region.\n\nExamples\n--------\n\nSELECT FORMAT(1234567890.09876543210, 4) AS ''Format'';\n+--------------------+\n| Format             |\n+--------------------+\n| 1,234,567,890.0988 |\n+--------------------+\n\nSELECT FORMAT(1234567.89, 4) AS ''Format'';\n+----------------+\n| Format         |\n+----------------+\n| 1,234,567.8900 |\n+----------------+\n\nSELECT FORMAT(1234567.89, 0) AS ''Format'';\n+-----------+\n| Format    |\n+-----------+\n| 1,234,568 |\n+-----------+\n\n-- Format number to German number formatting\nSELECT FORMAT(123456789,2,''de_DE'') AS ''Format'';\n+----------------+\n| Format         |\n+----------------+\n| 123.456.789,00 |\n+----------------+\n\nURL: https://mariadb.com/docs/server/reference/sql-functions/string-functions/format', '', 'https://mariadb.com/docs/server/reference/sql-functions/string-functions/format');
INSERT INTO help_topic (help_topic_id, help_category_id, name, description, example, url) VALUES (430, 37, 'FROM\\_BASE64', 'Syntax\n------\n\nFROM_BASE64(str)\n\nDescription\n-----------\n\nDecodes the given base-64 encode string, returning the result as a binary string. Returns NULL if the given string is NULL or if it''s invalid.\n\nIt is the reverse of the TO_BASE64 function.\n\nThere are numerous methods to base-64 encode a string. MariaDB uses the following:\n\n It encodes alphabet value 64 as ''+''.\n It encodes alphabet value 63 as ''/''.\n It codes output in groups of four printable characters. Each three byte of data encoded uses four characters. If the final group is incomplete, it pads the difference with the ''='' character.\n It divides long output, adding a new line very 76 characters.\n* In decoding, it recognizes and ignores newlines, carriage returns, tabs and space whitespace characters.\n\n``sql\nSELECT TO_BASE64(''Maria'') AS ''Input'';\n+-----------+\n| Input     |\n+-----------+\n| TWFyaWE=  |\n+-----------+\n\nSELECT FROM_BASE64(''TWFyaWE='') AS ''Output'';\n+--------+\n| Output |\n+--------+\n| Maria  |\n+--------+\n``\n\nURL: https://mariadb.com/docs/server/reference/sql-functions/string-functions/from_base64', '', 'https://mariadb.com/docs/server/reference/sql-functions/string-functions/from_base64');
INSERT INTO help_topic (help_topic_id, help_category_id, name, description, example, url) VALUES (431, 37, 'HEX', 'Description\n-----------\n\nIf 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).\n\nIf N_or_S is a string, returns a hexadecimal string representation ofN_or_S where each byte of each character in N_or_S is converted to two hexadecimal digits. If N_or_S is NULL, returns NULL. The inverse of this operation is performed by the UNHEX()\\\nfunction.\n\nHEX() with an INET6 argument returns a hexadecimal representation of the underlying 16-byte binary string.\n\nExamples\n--------\n\nSELECT HEX(255);\n+----------+\n| HEX(255) |\n+----------+\n| FF       |\n+----------+\n\nSELECT 0x4D617269614442;\n+------------------+\n| 0x4D617269614442 |\n+------------------+\n| MariaDB          |\n+------------------+\n\nSELECT HEX(''MariaDB'');\n+----------------+\n| HEX(''MariaDB'') |\n+----------------+\n| 4D617269614442 |\n+----------------+\n\nURL: https://mariadb.com/docs/server/reference/sql-functions/string-functions/hex', '', 'https://mariadb.com/docs/server/reference/sql-functions/string-functions/hex');
INSERT INTO help_topic (help_topic_id, help_category_id, name, description, example, url) VALUES (432, 37, 'INSERT Function', 'Syntax\n------\n\nINSERT(str,pos,len,newstr)\n\nDescription\n-----------\n\nReturns 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.\\\nReplaces 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.\n\nExamples\n--------\n\nSELECT INSERT(''Quadratic'', 3, 4, ''What'');\n+-----------------------------------+\n| INSERT(''Quadratic'', 3, 4, ''What'') |\n+-----------------------------------+\n| QuWhattic                         |\n+-----------------------------------+\n\nSELECT INSERT(''Quadratic'', -1, 4, ''What'');\n+------------------------------------+\n| INSERT(''Quadratic'', -1, 4, ''What'') |\n+------------------------------------+\n| Quadratic                          |\n+------------------------------------+\n\nSELECT INSERT(''Quadratic'', 3, 100, ''What'');\n+-------------------------------------+\n| INSERT(''Quadratic'', 3, 100, ''What'') |\n+-------------------------------------+\n| QuWhat                              |\n+-------------------------------------+\n\nURL: https://mariadb.com/docs/server/reference/sql-functions/string-functions/insert-function', '', 'https://mariadb.com/docs/server/reference/sql-functions/string-functions/insert-function');
INSERT INTO help_topic (help_topic_id, help_category_id, name, description, example, url) VALUES (433, 37, 'INSTR', 'Syntax\n------\n\nINSTR(str,substr)\n\nDescription\n-----------\n\nReturns the position of the first occurrence of substring _substr_ in string _str_. This is the same as the two-argument form of LOCATE(), except that the order of the arguments is reversed.\n\nINSTR() performs a case-insensitive search.\n\nIf any argument is NULL, returns NULL.\n\nExamples\n--------\n\nSELECT INSTR(''foobarbar'', ''bar'');\n+---------------------------+\n| INSTR(''foobarbar'', ''bar'') |\n+---------------------------+\n|                         4 |\n+---------------------------+\n\nSELECT INSTR(''My'', ''Maria'');\n+----------------------+\n| INSTR(''My'', ''Maria'') |\n+----------------------+\n|                    0 |\n+----------------------+\n\nURL: https://mariadb.com/docs/server/reference/sql-functions/string-functions/instr', '', 'https://mariadb.com/docs/server/reference/sql-functions/string-functions/instr');
INSERT INTO help_topic (help_topic_id, help_category_id, name, description, example, url) VALUES (434, 37, 'LCASE', 'Syntax\n------\n\nLCASE(str)\n\nDescription\n-----------\n\nLCASE() is a synonym for LOWER().\n\nURL: https://mariadb.com/docs/server/reference/sql-functions/string-functions/lcase', '', 'https://mariadb.com/docs/server/reference/sql-functions/string-functions/lcase');
INSERT INTO help_topic (help_topic_id, help_category_id, name, description, example, url) VALUES (435, 37, 'LEFT', 'Syntax\n------\n\nLEFT(str,len)\n\nDescription\n-----------\n\nReturns the leftmost len characters from the string str, or NULL if any argument is NULL.\n\nExamples\n--------\n\nSELECT LEFT(''MariaDB'', 5);\n+--------------------+\n| LEFT(''MariaDB'', 5) |\n+--------------------+\n| Maria              |\n+--------------------+\n\nURL: https://mariadb.com/docs/server/reference/sql-functions/string-functions/left', '', 'https://mariadb.com/docs/server/reference/sql-functions/string-functions/left');
INSERT INTO help_topic (help_topic_id, help_category_id, name, description, example, url) VALUES (436, 37, 'LENGTH', 'Syntax\n------\n\nLENGTH(str)\n\nDescription\n-----------\n\nReturns the length of the string str.\n\nIn the default mode, when Oracle mode is not set, the length is measured in bytes. In this case, a multi-byte character counts as multiple bytes. LENGTH() returns the length in bytes, whereas CHAR_LENGTH() returns the number of characters. This means that, for a string containing five two-byte characters, LENGTH() returns 10, whereas CHAR_LENGTH() returns 5.\nWhen running Oracle mode, the length is measured in characters, and LENGTH is a synonym for CHAR_LENGTH().\n\nIf str is not a string value, it is converted into a string. If str is NULL, the function returns NULL.\n\nExamples\n--------\n\nSELECT LENGTH(''MariaDB'');\n+-------------------+\n| LENGTH(''MariaDB'') |\n+-------------------+\n|                 7 |\n+-------------------+\n\nURL: https://mariadb.com/docs/server/reference/sql-functions/string-functions/length', '', 'https://mariadb.com/docs/server/reference/sql-functions/string-functions/length');
INSERT INTO help_topic (help_topic_id, help_category_id, name, description, example, url) VALUES (437, 37, 'LENGTHB', 'Syntax\n------\n\nLENGTHB(str)\n\nDescription\n-----------\n\nLENGTHB() returns the length of the given string, in bytes. When Oracle mode is not set, this is a synonym for LENGTH.\n\nA multi-byte character counts as multiple bytes. This means that for a string containing five two-byte characters, LENGTHB() returns 10, whereas CHAR_LENGTH() returns 5.\n\nIf str is not a string value, it is converted into a string. If str is NULL, the function returns NULL.\n\nExamples\n--------\n\nSELECT CHAR_LENGTH(''π''), LENGTH(''π''), LENGTHB(''π''), OCTET_LENGTH(''π'');\n+-------------------+--------------+---------------+--------------------+\n| CHAR_LENGTH(''π'')  | LENGTH(''π'')  | LENGTHB(''π'')  | OCTET_LENGTH(''π'')  |\n+-------------------+--------------+---------------+--------------------+\n|                 1 |            2 |             2 |                  2 |\n+-------------------+--------------+---------------+--------------------+\n\nURL: https://mariadb.com/docs/server/reference/sql-functions/string-functions/lengthb', '', 'https://mariadb.com/docs/server/reference/sql-functions/string-functions/lengthb');
INSERT INTO help_topic (help_topic_id, help_category_id, name, description, example, url) VALUES (438, 37, 'LIKE', 'Description\n-----------\n\nTests whether _expr_ matches the pattern _pat_. Returns either 1 (TRUE) or 0 (FALSE).\\\nBoth _expr_ and _pat_ may be any valid expression and are evaluated to strings.\\\nPatterns may use the following wildcard characters:\n\n % matches any number of characters, including zero.\n _ matches any single character.\n\nUse NOT LIKE to test if a string does not match a pattern. This is equivalent to using\\\nthe NOT operator on the entire LIKE expression.\n\nIf either the expression or the pattern is NULL, the result is NULL.\n\nLIKE performs case-insensitive substring matches if the collation for the expression and pattern is case-insensitive. For case-sensitive matches, declare either argument to use a binary collation using collate, or coerce either of them to a BINARY string using CAST. Use SHOW COLLATION to get a list of\\\navailable collations. Collations ending in _bin are case-sensitive.\n\nNumeric arguments are coerced to binary strings.\n\nThe _ wildcard matches a single character, not byte. It will only match a multi-byte character\\\nif it is valid in the expression''s character set. For example, _ will match _utf8"€", but it\\\nwill not match _latin1"€" because the Euro sign is not a valid latin1 character. If necessary,\\\nuse CONVERT to use the expression in a different character set.\n\nIf you need to match the characters _ or %, you must escape them. By default, you can prefix the wildcard characters the backslash character \\ to escape them. The backslash is used both to encode special characters like newlines when a string is parsed as well as to escape wildcards in a pattern after parsing. Thus, to match an actual backslash, you sometimes need to double-escape it as "\\\\\\\\".\n\nTo avoid difficulties with the backslash character, you can change the wildcard escape character using ESCAPE in a LIKE expression. The argument to ESCAPE must be a single-character string.\n\nExamples\n--------\n\nCREATE TABLE t1 (d VARCHAR(16));\nINSERT INTO t1 VALUES \n  ("Monday"), ("Tuesday"), ("Wednesday"), \n  ("Thursday"), ("Friday"), ("Saturday"), ("Sunday");\nSELECT * FROM t1 WHERE d LIKE "T%";\n\nURL: https://mariadb.com/docs/server/reference/sql-functions/string-functions/like', '', 'https://mariadb.com/docs/server/reference/sql-functions/string-functions/like');
INSERT INTO help_topic (help_topic_id, help_category_id, name, description, example, url) VALUES (439, 37, 'LOAD\\_FILE', 'Syntax\n------\n\nLOAD_FILE(file_name)\n\nDescription\n-----------\n\nReads 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 it must be less than the size, in bytes, of the max_allowed_packet system variable. If the secure_file_priv system variable is set to a non-empty directory name, the file to be loaded must be located in that directory.\n\nIf the file does not exist or cannot be read because one of the preceding conditions is not satisfied, the function returns NULL.\n\nThe character_set_filesystem system variable has controlled interpretation of file names that are given as literal strings.\n\nStatements using the LOAD_FILE() function are not safe for statement based replication. This is because the slave will execute the LOAD_FILE() command itself. If the file doesn''t exist on the slave, the function will return NULL.\n\nExamples\n--------\n\nUPDATE t SET blob_col=LOAD_FILE(''/tmp/picture'') WHERE id=1;\n\nURL: https://mariadb.com/docs/server/reference/sql-functions/string-functions/load_file', '', 'https://mariadb.com/docs/server/reference/sql-functions/string-functions/load_file');
INSERT INTO help_topic (help_topic_id, help_category_id, name, description, example, url) VALUES (440, 37, 'LOCATE', 'Syntax\n------\n\nLOCATE(substr,str), LOCATE(substr,str,pos)\n\nDescription\n-----------\n\nThe 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 position pos. Returns 0 if substr is not in str.\n\nLOCATE() performs a case-insensitive search.\n\nIf any argument is NULL, returns NULL.\n\nINSTR() is the same as the two-argument form of LOCATE(), except that the order of the arguments is reversed.\n\nExamples\n--------\n\nSELECT LOCATE(''bar'', ''foobarbar'');\n+----------------------------+\n| LOCATE(''bar'', ''foobarbar'') |\n+----------------------------+\n|                          4 |\n+----------------------------+\n\nSELECT LOCATE(''My'', ''Maria'');\n+-----------------------+\n| LOCATE(''My'', ''Maria'') |\n+-----------------------+\n|                     0 |\n+-----------------------+\n\nSELECT LOCATE(''bar'', ''foobarbar'', 5);\n+-------------------------------+\n| LOCATE(''bar'', ''foobarbar'', 5) |\n+-------------------------------+\n|                             7 |\n+-------------------------------+\n\nURL: https://mariadb.com/docs/server/reference/sql-functions/string-functions/locate', '', 'https://mariadb.com/docs/server/reference/sql-functions/string-functions/locate');
INSERT INTO help_topic (help_topic_id, help_category_id, name, description, example, url) VALUES (441, 37, 'LOWER', 'Syntax\n------\n\nLOWER(str)\nLCASE(str)\n\nDescription\n-----------\n\nReturns the string str with all characters changed to lowercase according to the current character set mapping. The default is latin1 (cp1252 West European).\n\nLCASE is a synonym for LOWER .\n\nExamples\n--------\n\nSELECT LOWER(''QUADRATICALLY'');\n+------------------------+\n| LOWER(''QUADRATICALLY'') |\n+------------------------+\n| quadratically          |\n+------------------------+\n\nURL: https://mariadb.com/docs/server/reference/sql-functions/string-functions/lower', '', 'https://mariadb.com/docs/server/reference/sql-functions/string-functions/lower');
INSERT INTO help_topic (help_topic_id, help_category_id, name, description, example, url) VALUES (442, 37, 'LPAD', 'Syntax\n------\n\nLPAD(str, len [,padstr])\n\nDescription\n-----------\n\nReturns 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 shortened to len characters. If padstr is omitted, the LPAD function pads spaces.\n\nReturns NULL if given a NULL argument. If the result is empty (zero length), returns either an empty string or with SQL_MODE=Oracle, NULL.\n\nThe Oracle mode version of the function can be accessed outside of Oracle mode by using LPAD_ORACLE as the function name.\n\nExamples\n--------\n\nSELECT LPAD(''hello'',10,''.'');\n+----------------------+\n| LPAD(''hello'',10,''.'') |\n+----------------------+\n| .....hello           |\n+----------------------+\n\nSELECT LPAD(''hello'',2,''.'');\n+---------------------+\n| LPAD(''hello'',2,''.'') |\n+---------------------+\n| he                  |\n+---------------------+\n\nURL: https://mariadb.com/docs/server/reference/sql-functions/string-functions/lpad', '', 'https://mariadb.com/docs/server/reference/sql-functions/string-functions/lpad');
INSERT INTO help_topic (help_topic_id, help_category_id, name, description, example, url) VALUES (443, 37, 'LTRIM', 'Syntax\n------\n\nLTRIM(str)\n\nDescription\n-----------\n\nReturns the string str with leading space characters removed.\n\nReturns NULL if given a NULL argument. If the result is empty, returns either an empty string, or with SQL_MODE=Oracle, NULL.\n\nThe Oracle mode version of the function can be accessed outside of Oracle mode by using LTRIM_ORACLE as the function name.\n\nExamples\n--------\n\nSELECT QUOTE(LTRIM(''   MariaDB   ''));\n+-------------------------------+\n| QUOTE(LTRIM(''   MariaDB   '')) |\n+-------------------------------+\n| ''MariaDB   ''                  |\n+-------------------------------+\n\nURL: https://mariadb.com/docs/server/reference/sql-functions/string-functions/ltrim', '', 'https://mariadb.com/docs/server/reference/sql-functions/string-functions/ltrim');
INSERT INTO help_topic (help_topic_id, help_category_id, name, description, example, url) VALUES (444, 37, 'MAKE\\_SET', 'Syntax\n------\n\nMAKE_SET(bits,str1,str2,...)\n\nDescription\n-----------\n\nReturns 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\\\nvalues in _str1_, _str2_, ... are not appended to the result.\n\nExamples\n--------\n\nSELECT MAKE_SET(1,''a'',''b'',''c'');\n+-------------------------+\n| MAKE_SET(1,''a'',''b'',''c'') |\n+-------------------------+\n| a                       |\n+-------------------------+\n\nSELECT MAKE_SET(1 | 4,''hello'',''nice'',''world'');\n+----------------------------------------+\n| MAKE_SET(1 | 4,''hello'',''nice'',''world'') |\n+----------------------------------------+\n| hello,world                            |\n+----------------------------------------+\n\nSELECT MAKE_SET(1 | 4,''hello'',''nice'',NULL,''world'');\n+---------------------------------------------+\n| MAKE_SET(1 | 4,''hello'',''nice'',NULL,''world'') |\n+---------------------------------------------+\n| hello                                       |\n+---------------------------------------------+\n\nSELECT QUOTE(MAKE_SET(0,''a'',''b'',''c''));\n+--------------------------------+\n| QUOTE(MAKE_SET(0,''a'',''b'',''c'')) |\n+--------------------------------+\n| ''''                             |\n+--------------------------------+\n\nURL: https://mariadb.com/docs/server/reference/sql-functions/string-functions/make_set', '', 'https://mariadb.com/docs/server/reference/sql-functions/string-functions/make_set');
INSERT INTO help_topic (help_topic_id, help_category_id, name, description, example, url) VALUES (445, 37, 'MATCH AGAINST', 'Syntax\n------\n\nMATCH (col1,col2,...) AGAINST (expr [search_modifier])\n\nDescription\n-----------\n\nA special construct used to perform a fulltext search on a fulltext index.\n\nSee Fulltext Index Overview for a full description, and Full-text Indexes for more articles on the topic.\n\nExamples\n--------\n\nCREATE TABLE ft_myisam(copy TEXT,FULLTEXT(copy)) ENGINE=MyISAM;\n\nINSERT INTO ft_myisam(copy) VALUES (''Once upon a time''), (''There was a wicked witch''), \n (''Who ate everybody up'');\n\nSELECT * FROM ft_myisam WHERE MATCH(copy) AGAINST(''wicked'');\n+--------------------------+\n| copy                     |\n+--------------------------+\n| There was a wicked witch |\n+--------------------------+\n\nURL: https://mariadb.com/docs/server/reference/sql-functions/string-functions/match-against', '', 'https://mariadb.com/docs/server/reference/sql-functions/string-functions/match-against');
INSERT INTO help_topic (help_topic_id, help_category_id, name, description, example, url) VALUES (446, 37, 'MID', 'Syntax\n------\n\nMID(str,pos,len)\n\nDescription\n-----------\n\nMID(str,pos,len) is a synonym for SUBSTRING(str,pos,len)!\n\nExamples\n--------\n\nSELECT MID(''abcd'',4,1);\n+-----------------+\n| MID(''abcd'',4,1) |\n+-----------------+\n| d               |\n+-----------------+\n\nSELECT MID(''abcd'',2,2);\n+-----------------+\n| MID(''abcd'',2,2) |\n+-----------------+\n| bc              |\n+-----------------+\n\nURL: https://mariadb.com/docs/server/reference/sql-functions/string-functions/mid', '', 'https://mariadb.com/docs/server/reference/sql-functions/string-functions/mid');
INSERT INTO help_topic (help_topic_id, help_category_id, name, description, example, url) VALUES (447, 37, 'NATURAL\\_SORT\\_KEY', 'Syntax\n------\n\nNATURAL_SORT_KEY(str)\n\nDescription\n-----------\n\nThe NATURAL_SORT_KEY function is used for sorting that is closer to natural sorting. Strings are sorted in alphabetical order, while numbers are treated in a way such that, for example, 10 is greater than 2, whereas in other forms of sorting, 2 would be greater than 10, just like z is greater than ya.\n\nThere are multiple natural sort implementations, differing in the way they handle leading zeroes, fractions, i18n, negatives, decimals and so on.\n\nMariaDB''s implementation ignores leading zeroes when performing the sort.\n\nYou can use also use NATURAL_SORT_KEY with generated columns. The value is not stored permanently in the table. When using a generated column, the virtual column must be longer than the base column to cater for embedded numbers in the string and MDEV-24582.\n\nExamples\n--------\n\nCREATE TABLE t1 (c TEXT);\n\nINSERT INTO t1 VALUES (''b1''),(''a2''),(''a11''),(''a1'');\n\nSELECT c FROM t1;\n+------+\n| c    |\n+------+\n| b1   |\n| a2   |\n| a11  |\n| a1   |\n+------+\n\nSELECT c FROM t1 ORDER BY c;\n+------+\n| c    |\n+------+\n| a1   |\n| a11  |\n| a2   |\n| b1   |\n+------+\n\nURL: https://mariadb.com/docs/server/reference/sql-functions/string-functions/natural_sort_key', '', 'https://mariadb.com/docs/server/reference/sql-functions/string-functions/natural_sort_key');
INSERT INTO help_topic (help_topic_id, help_category_id, name, description, example, url) VALUES (448, 37, 'NOT LIKE', 'Syntax\n------\n\nexpr NOT LIKE pat [ESCAPE ''escape_char'']\n\nDescription\n-----------\n\nThis is the same as [NOT (expr LIKE pat \\[ESCAPE ''escape_char''\\])](../../sql-structure/operators/logical-operators/not.md).\n\nURL: https://mariadb.com/docs/server/reference/sql-functions/string-functions/not-like', '', 'https://mariadb.com/docs/server/reference/sql-functions/string-functions/not-like');
INSERT INTO help_topic (help_topic_id, help_category_id, name, description, example, url) VALUES (449, 37, 'NOT REGEXP', 'Syntax\n------\n\nexpr NOT REGEXP pat, expr NOT RLIKE pat\n\nDescription\n-----------\n\nThis is the same as NOT (expr REGEXP pat).\n\nURL: https://mariadb.com/docs/server/reference/sql-functions/string-functions/not-regexp', '', 'https://mariadb.com/docs/server/reference/sql-functions/string-functions/not-regexp');
INSERT INTO help_topic (help_topic_id, help_category_id, name, description, example, url) VALUES (450, 37, 'OCTET\\_LENGTH', 'Description\n-----------\n\nOCTET_LENGTH() returns the length of the given string, in octets (bytes). This is a synonym for LENGTHB(), and, when Oracle mode is not set, a synonym for LENGTH().\n\nA multi-byte character counts as multiple bytes. This means that for a string containing five two-byte characters, OCTET_LENGTH() returns 10, whereas CHAR_LENGTH() returns 5.\n\nIf str is not a string value, it is converted into a string. If str is NULL, the function returns NULL.\n\nExamples\n--------\n\nSELECT CHAR_LENGTH(''π''), LENGTH(''π''), LENGTHB(''π''), OCTET_LENGTH(''π'');\n+-------------------+--------------+---------------+--------------------+\n| CHAR_LENGTH(''π'')  | LENGTH(''π'')  | LENGTHB(''π'')  | OCTET_LENGTH(''π'')  |\n+-------------------+--------------+---------------+--------------------+\n|                 1 |            2 |             2 |                  2 |\n+-------------------+--------------+---------------+--------------------+\n\nURL: https://mariadb.com/docs/server/reference/sql-functions/string-functions/octet_length', '', 'https://mariadb.com/docs/server/reference/sql-functions/string-functions/octet_length');
INSERT INTO help_topic (help_topic_id, help_category_id, name, description, example, url) VALUES (451, 37, 'ORD', 'Syntax\n------\n\nORD(str)\n\nDescription\n-----------\n\nIf 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:\n\n``sql\n(1st byte code)\n+ (2nd byte code x 256)\n+ (3rd byte code x 256 x 256) ...\n`\n\nIf the leftmost character is not a multi-byte character, ORD()` returns the same value as the ASCII() function.\n\nExamples\n--------\n\nSELECT ORD(''2'');\n+----------+\n| ORD(''2'') |\n+----------+\n|       50 |\n+----------+\n\nURL: https://mariadb.com/docs/server/reference/sql-functions/string-functions/ord', '', 'https://mariadb.com/docs/server/reference/sql-functions/string-functions/ord');
INSERT INTO help_topic (help_topic_id, help_category_id, name, description, example, url) VALUES (452, 37, 'POSITION', 'Syntax\n------\n\nPOSITION(substr IN str)\n\nDescription\n-----------\n\nPOSITION(substr IN str) is a synonym for LOCATE(substr,str).\n\nThe function is part of ODBC 3.0.\n\nURL: https://mariadb.com/docs/server/reference/sql-functions/string-functions/position', '', 'https://mariadb.com/docs/server/reference/sql-functions/string-functions/position');
INSERT INTO help_topic (help_topic_id, help_category_id, name, description, example, url) VALUES (453, 37, 'QUOTE', 'Syntax\n------\n\nQUOTE(str)\n\nDescription\n-----------\n\nQuotes 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.\n\nExamples\n--------\n\nSELECT QUOTE("Don''t!");\n+-----------------+\n| QUOTE("Don''t!") |\n+-----------------+\n| ''Don\\''t!''       |\n+-----------------+\n\nSELECT QUOTE(NULL); \n+-------------+\n| QUOTE(NULL) |\n+-------------+\n| NULL        |\n+-------------+\n\nURL: https://mariadb.com/docs/server/reference/sql-functions/string-functions/quote', '', 'https://mariadb.com/docs/server/reference/sql-functions/string-functions/quote');
INSERT INTO help_topic (help_topic_id, help_category_id, name, description, example, url) VALUES (454, 37, 'PCRE - Perl Compatible Regular Expressions', 'Description\n-----------\n\nPCRE Versions\n\n| PCRE Version                         | Introduced                                                                                                                                                                                                                                                                                                                               | Maturity |\n| ------------------------------------ | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------- |\n| PCRE2 10.34 | MariaDB 10.5.1                                                                                                                                                                                                                               | Stable   |\n| PCRE 8.43                            | MariaDB 10.1.39                                                                                                                                                                                                                             | Stable   |\n| PCRE 8.42                            | MariaDB 10.2.15, MariaDB 10.1.33, MariaDB 10.0.35 | Stable   |\n| PCRE 8.41                            | MariaDB 10.2.8, MariaDB 10.1.26, MariaDB 10.0.32   | Stable   |\n| PCRE 8.40                            | MariaDB 10.2.5, MariaDB 10.1.22, MariaDB 10.0.30   | Stable   |\n| PCRE 8.39                            | MariaDB 10.1.15, MariaDB 10.0.26                                                                                                               | Stable   |\n| PCRE 8.38                            | MariaDB 10.1.10, MariaDB 10.0.23                                                                                                               | Stable   |\n| PCRE 8.37                            | MariaDB 10.1.5, MariaDB 10.0.18                                                                                                                 | Stable   |\n| PCRE 8.36                            | MariaDB 10.1.2, MariaDB 10.0.15                                                                                                                 | Stable   |\n| PCRE 8.35                            | MariaDB 10.1.0, MariaDB 10.0.12                                                                                                                 | Stable   |\n| PCRE 8.34                            | MariaDB 10.0.8                                                                                                                                                                                                                               | Stable   |\n\nPCRE Enhancements\n\nMariaDB uses the PCRE library, which significantly improves the power of the REGEXP/RLIKE operator.\n\nThe switch to PCRE added a number of features, including recursive patterns, named capture, look-ahead and look-behind assertions, non-capturing groups, non-greedy quantifiers, Unicode character properties, extended syntax for characters and character classes, multi-line matching, and many other.\n\nThese functions work with regular expressions: REGEXP_REPLACE(), REGEXP_INSTR(), and REGEXP_SUBSTR().\n\nAlso, REGEXP/RLIKE, and the new functions, work correctly with all multi-byte character sets supported by MariaDB, including East-Asian character sets (big5, gb2313, gbk, eucjp, eucjpms, cp932, ujis, euckr), and Unicode character sets (utf8, utf8mb4, ucs2, utf16, utf16le, utf32).\n\nNew Regular Expression Functions\n\n REGEXP_REPLACE(subject, pattern, replace) - Replaces all occurrences of a pattern.\n REGEXP_INSTR(subject, pattern) - Position of the first appearance of a regex.\n REGEXP_SUBSTR(subject,pattern) - Returns the matching part of a string.\n\nSee the individual articles for more details and examples.\n\nPCRE Syntax\n\nIn most cases PCRE is backward compatible with the old POSIX 1003.2 compliant regexp library (see Regular Expressions Overview), so you won''t need to change your applications that use SQL queries with the REGEXP/RLIKE predicate.\n\nThis section briefly describes the most important extended PCRE features. For more details, please refer to the documentation on the PCRE site, or to the documentation which is bundled in the /pcre/doc/html/ directory of a MariaDB sources distribution. The pages pcresyntax.html and pcrepattern.html should be a good start. Regular-Expressions.Info is another good resource to learn about PCRE and regular expressions generally.\n\nSpecial Characters\n\nPCRE supports the following escape sequences to match special characters:\n\n| Sequence  | Description                                 |\n| --------- | ------------------------------------------- |\n| \\a        | 0x07 (BEL)                                  |\n| \\cx       | "control-x", where x is any ASCII character |\n| \\e        | 0x1B (escape)                               |\n| \\f        | 0x0C (form feed)                            |\n|           | 0x0A (newline)                              |\n|           | 0x0D (carriage return)                      |\n|           | 0x09 (TAB)                                  |\n| \\ddd      | character with octal code ddd               |\n| \\xhh      | character with hex code hh                  |\n| \\x{hhh..} | character with hex code hhh..               |\n\nNote, the backslash characters (here, and in all examples in the sections below) must be escaped with another backslash, unless you''re using the SQL_MODE NO_BACKSLASH_ESCAPES.\n\nThis example tests if a character has hex code 0x61:\n\n``sql\nSELECT ''a'' RLIKE ''\\\\x{61}'';\n-> 1\n`\n\nCharacter Classes\n\nPCRE supports the standard POSIX character classes such as alnum, alpha, blank, cntrl, digit, graph, lower, print, punct, space, upper, xdigit, with the following additional classes:\n\n| Class | Description                                                |\n| ----- | ---------------------------------------------------------- |\n| ascii | any ASCII character (0x00..0x7F)                           |\n| word  | any "word" character (a letter, a digit, or an underscore) |\n\nThis example checks if the string consists of ASCII characters only:\n\n`\nSELECT ''abc'' RLIKE ''^[[:ascii:]]+$'';\n-> 1\n`\n\nGeneric Character Types\n\nGeneric character types complement the POSIX character classes and serve to simplify writing patterns:\n\n| Class | Description                                                |\n| ----- | ---------------------------------------------------------- |\n| \\d    | a decimal digit (same as \\[:digit:])                       |\n| \\D    | a character that is not a decimal digit                    |\n| \\h    | a horizontal white space character                         |\n| \\H    | a character that is not a horizontal white space character |\n|       | a character that is not a new line                         |\n|       | a newline sequence                                         |\n| \\s    | a white space character                                    |\n| \\S    | a character that is not a white space character            |\n| \\v    | a vertical white space character                           |\n| \\V    | a character that is not a vertical white space character   |\n| \\w    | a "word" character (same as \\[:word:])                     |\n| \\W    | a "non-word" character                                     |\n\nThis example checks if the string consists of "word" characters only:\n\n`sql\nSELECT ''abc'' RLIKE ''^\\\\w+$'';\n-> 1\n`\n\nUnicode Character Properties\n\n\\p{xx} is a character with the xx property, and \\P{xx} is a character without the xx property.\n\nThe property names represented by xx above are limited to the Unicode script names, the general category properties, and "Any", which matches any character (including newline). Those that are not part of an identified script are lumped together as "Common".\n\nGeneral Category Properties For \\p and \\P\n\n| Property | Description           |\n| -------- | --------------------- |\n| C        | Other                 |\n| Cc       | Control               |\n| Cf       | Format                |\n| Cn       | Unassigned            |\n| Co       | Private use           |\n| Cs       | Surrogate             |\n| L        | Letter                |\n| Ll       | Lower case letter     |\n| Lm       | Modifier letter       |\n| Lo       | Other letter          |\n| Lt       | Title case letter     |\n| Lu       | Upper case letter     |\n| L&       | Ll, Lu, or Lt         |\n| M        | Mark                  |\n| Mc       | Spacing mark          |\n| Me       | Enclosing mark        |\n| Mn       | Non-spacing mark      |\n| N        | Number                |\n| Nd       | Decimal number        |\n| Nl       | Letter number         |\n| No       | Other number          |\n| P        | Punctuation           |\n| Pc       | Connector punctuation |\n| Pd       | Dash punctuation      |\n| Pe       | Close punctuation     |\n| Pf       | Final punctuation     |\n| Pi       | Initial punctuation   |\n| Po       | Other punctuation     |\n| Ps       | Open punctuation      |\n| S        | Symbol                |\n| Sc       | Currency symbol       |\n| Sk       | Modifier symbol       |\n| Sm       | Mathematical symbol   |\n| So       | Other symbol          |\n| Z        | Separator             |\n| Zl       | Line separator        |\n| Zp       | Paragraph separator   |\n| Zs       | Space separator       |\n\nThis example checks if the string consists only of characters with property N (number):\n\n`sql\nSELECT ''1¼①'' RLIKE ''^\\\\p{N}+$'';\n-> 1\n`\n\nSpecial Category Properties For \\p and \\P\n\n| Property | Description                                                       |\n| -------- | ----------------------------------------------------------------- |\n| Xan      | Alphanumeric: union of properties L and N                         |\n| Xps      | POSIX space: property Z or tab, NL, VT, FF, CR                    |\n| Xsp      | Perl space: property Z or tab, NL, FF, CR                         |\n| Xuc      | A character than can be represented by a Universal Character Name |\n| Xwd      | Perl word: property Xan or underscore                             |\n\nThe property Xuc matches any character that can be represented by a Universal Character Name (in C++ and other programming languages). These include $, @, \\\\\\, and all characters with Unicode code points greater than U+00A0, excluding the surrogates U+D800..U+DFFF.\n\nScript Names For \\p and \\P\n\nArabic, Armenian, Avestan, Balinese, Bamum, Batak, Bengali, Bopomofo, Brahmi, Braille, Buginese, Buhid, Canadian_Aboriginal, Carian, Chakma, Cham, Cherokee, Common, Coptic, Cuneiform, Cypriot, Cyrillic, Deseret, Devanagari, Egyptian_Hieroglyphs, Ethiopic, Georgian, Glagolitic, Gothic, Greek, Gujarati, Gurmukhi, Han, Hangul, Hanunoo, Hebrew, Hiragana, Imperial_Aramaic, Inherited, Inscriptional_Pahlavi, Inscriptional_Parthian, Javanese, Kaithi, Kannada, Katakana, Kayah_Li, Kharoshthi, Khmer, Lao, Latin, Lepcha, Limbu, Linear_B, Lisu, Lycian, Lydian, Malayalam, Mandaic, Meetei_Mayek, Meroitic_Cursive, Meroitic_Hieroglyphs, Miao, Mongolian, Myanmar, New_Tai_Lue, Nko, Ogham, Old_Italic, Old_Persian, Old_South_Arabian, Old_Turkic, Ol_Chiki, Oriya, Osmanya, Phags_Pa, Phoenician, Rejang, Runic, Samaritan, Saurashtra, Sharada, Shavian, Sinhala, Sora_Sompeng, Sundanese, Syloti_Nagri, Syriac, Tagalog, Tagbanwa, Tai_Le, Tai_Tham, Tai_Viet, Takri, Tamil, Telugu, Thaana, Thai, Tibetan, Tifinagh, Ugaritic, Vai, Yi.\n\nThis example checks if the string consists only of Greek characters:\n\n``sql\nSELECT ''ΣΦΩ'' RLIKE ''^\\\\p{Greek}+$'';\n-> 1\n`\n\nExtended Unicode Grapheme Sequence\n\nThe \\X escape sequence matches a character sequence that makes an "extended grapheme cluster", i.e. a composite character that consists of multiple Unicode code points.\n\nOne of the examples of a composite character can be a letter followed by non-spacing accent marks. This example demonstrates that U+0045 LATIN CAPITAL LETTER E followed by U+0302 COMBINING CIRCUMFLEX ACCENT followed by U+0323 COMBINING DOT BELOW together form an extended grapheme cluster:\n\n`sql\nSELECT _ucs2 0x004503020323 RLIKE ''^\\\\X$'';\n-> 1\n`\n\nSee the PCRE documentation for the other types of extended grapheme clusters.\n\nSimple Assertions\n\nAn assertion specifies a certain condition that must match at a particular point, but without consuming characters from the subject string. In addition to the standard POSIX simple assertions ^ (that matches at the beginning of a line) and $ (that matches at the end of a line), PCRE supports a number of other assertions:\n\n| Assertion | Description                                                                                |\n| --------- | ------------------------------------------------------------------------------------------ |\n| \\b        | matches at a word boundary                                                                 |\n| \\B        | matches when not at a word boundary                                                        |\n| \\A        | matches at the start of the subject                                                        |\n| \\Z        | matches at the end of the subject, also matches before a newline at the end of the subject |\n| \\z        | matches only at the end of the subject                                                     |\n| \\G        | matches at the first matching position in the subject                                      |\n\nThis example cuts a word that consists only of 3 characters from a string:\n\n`sql\nSELECT REGEXP_SUBSTR(''---abcd---xyz---'', ''\\\\b\\\\w{3}\\\\b'');\n-> xyz\n`\n\nNotice that the two \\b assertions checked the word boundaries but did not get into the matching pattern.\n\nThe \\b assertions work well in the beginning and the end of the subject string:\n\n`sql\nSELECT REGEXP_SUBSTR(''xyz'', ''\\\\b\\\\w{3}\\\\b'');\n-> xyz\n`\n\nBy default, the ^ and $ assertions have the same meaning with \\A, \\Z, and \\z. However, the meanings of ^ and $ can change in multiline mode (see below). By contrast, the meanings of \\A, \\Z, and \\z are always the same; they are independent of the multiline mode.\n\nOption Setting\n\nA number of options that control the default match behavior can be changed within the pattern by a sequence of option letters enclosed between (? and ).\n\n| Option  | Description                                                              |\n| ------- | ------------------------------------------------------------------------ |\n| (?i)    | case insensitive match                                                   |\n| (?m)    | multiline mode                                                           |\n| (?s)    | dotall mode (dot matches newline characters)                             |\n| (?x)    | extended (ignore white space)                                            |\n| (?U)    | ungreedy (lazy) ma\n\n[Truncated — full content at mariadb.com/docs]', '', 'https://mariadb.com/docs/server/reference/sql-functions/string-functions/regular-expressions-functions/pcre');
INSERT INTO help_topic (help_topic_id, help_category_id, name, description, example, url) VALUES (455, 37, 'REGEXP', 'Syntax\n------\n\nexpr REGEXP pat, expr RLIKE pat\n\nDescription\n-----------\n\nPerforms a pattern match of a string expression expr against a patternpat. The pattern can be an extended regular expression. See Regular Expressions Overview for details on the syntax for\\\nregular expressions (see also PCRE Regular Expressions).\n\nReturns 1 if expr matches pat or 0 if it doesn''t match. If either expr or pat are NULL, the result is NULL.\n\nThe negative form NOT REGEXP also exists, as an alias for NOT (string REGEXP pattern). RLIKE and NOT RLIKE are synonyms for REGEXP and NOT REGEXP, originally provided for mSQL compatibility.\n\nThe pattern need not be a literal string. For example, it can be specified as a string expression or table column.\n\nNote: Because MariaDB 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.\n\nREGEXP is not case sensitive, except when used with binary strings.\n\nThe default_regex_flags variable addresses the remaining compatibilities between PCRE and the old regex library.\n\nExamples\n--------\n\nSELECT ''Monty!'' REGEXP ''m%y%%'';\n+-------------------------+\n| ''Monty!'' REGEXP ''m%y%%'' |\n+-------------------------+\n|                       0 |\n+-------------------------+\n\nSELECT ''Monty!'' REGEXP ''.'';\n+----------------------+\n| ''Monty!'' REGEXP ''.'' |\n+----------------------+\n|                    1 |\n+----------------------+\n\nSELECT ''new\\nline'' REGEXP ''new\\\\.\\\\line'';\n+---------------------------------------+\n| ''new\\nline'' REGEXP ''new\\\\.\\\\line'' |\n+---------------------------------------+\n|                                     1 |\n+---------------------------------------+\n\nSELECT ''a'' REGEXP ''A'', ''a'' REGEXP BINARY ''A'';\n+----------------+-----------------------+\n| ''a'' REGEXP ''A'' | ''a'' REGEXP BINARY ''A'' |\n+----------------+-----------------------+\n|              1 |                     0 |\n+----------------+-----------------------+\n\nSELECT ''a'' REGEXP ''^[a-d]'';\n+---------------------+\n| ''a'' REGEXP ''^[a-d]'' |\n+---------------------+\n|                   1 |\n+---------------------+\n\nURL: https://mariadb.com/docs/server/reference/sql-functions/string-functions/regular-expressions-functions/regexp', '', 'https://mariadb.com/docs/server/reference/sql-functions/string-functions/regular-expressions-functions/regexp');
INSERT INTO help_topic (help_topic_id, help_category_id, name, description, example, url) VALUES (456, 37, 'REGEXP\\_INSTR', 'Description\n-----------\n\nSyntax\n\n``sql\nREGEXP_INSTR(subject, pattern)\n`\n\nReturns the position of the first occurrence of the regular expression pattern in the string subject, or 0 if pattern was not found.\n\nThe positions start with 1 and are measured in characters (i.e. not in bytes), which is important for multi-byte character sets. You can cast a multi-byte character set to BINARY to get offsets in bytes.\n\nThe function follows the case sensitivity rules of the effective collation. Matching is performed case insensitively for case insensitive collations, and case sensitively for case sensitive collations and for binary data.\n\nThe collation case sensitivity can be overwritten using the (?i) and (?-i) PCRE flags.\n\nMariaDB uses the PCRE regular expression library for enhanced regular expression performance, and REGEXP_INSTR` was introduced as part of this enhancement.\n\nExamples\n--------\n\nSELECT REGEXP_INSTR(''abc'',''b'');\n-> 2\n\nSELECT REGEXP_INSTR(''abc'',''x'');\n-> 0\n\nSELECT REGEXP_INSTR(''BJÖRN'',''N'');\n-> 5\n\nURL: https://mariadb.com/docs/server/reference/sql-functions/string-functions/regular-expressions-functions/regexp_instr', '', 'https://mariadb.com/docs/server/reference/sql-functions/string-functions/regular-expressions-functions/regexp_instr');
INSERT INTO help_topic (help_topic_id, help_category_id, name, description, example, url) VALUES (457, 37, 'REGEXP\\_REPLACE', 'Syntax\n------\n\nREGEXP_REPLACE(subject, pattern, replace)\n\nDescription\n-----------\n\nREGEXP_REPLACE returns the string subject with all occurrences of the regular expression pattern replaced by the string replace. If no occurrences are found, then subject is returned as is.\n\nThe replace string can have backreferences to the subexpressions in the form \\N, where N is a number from 1 to 9.\n\nThe function follows the case sensitivity rules of the effective collation. Matching is performed case insensitively for case insensitive collations, and case sensitively for case sensitive collations and for binary data.\n\nThe collation case sensitivity can be overwritten using the (?i) and (?-i) PCRE flags.\n\nMariaDB uses the PCRE regular expression library for enhanced regular expression performance, and REGEXP_REPLACE was introduced as part of this enhancement.\n\nThe default_regex_flags variable addresses the remaining compatibilities between PCRE and the old regex library.\n\nExamples\n--------\n\nSELECT REGEXP_REPLACE(''ab12cd'',''[0-9]'','''') AS remove_digits;\n-> abcd\n\nSELECT REGEXP_REPLACE(''<html><head><title>title</title><body>body</body></htm>'', ''<.+?>'','' '')\nAS strip_html;\n-> title  body\n\nURL: https://mariadb.com/docs/server/reference/sql-functions/string-functions/regular-expressions-functions/regexp_replace', '', 'https://mariadb.com/docs/server/reference/sql-functions/string-functions/regular-expressions-functions/regexp_replace');
INSERT INTO help_topic (help_topic_id, help_category_id, name, description, example, url) VALUES (458, 37, 'REGEXP\\_SUBSTR', 'Syntax\n------\n\nREGEXP_SUBSTR(subject,pattern)\n\nDescription\n-----------\n\nReturns the part of the string subject that matches the regular expression pattern, or an empty string if pattern was not found.\n\nThe function follows the case sensitivity rules of the effective collation. Matching is performed case insensitively for case insensitive collations, and case sensitively for case sensitive collations and for binary data.\n\nThe collation case sensitivity can be overwritten using the (?i) and (?-i) PCRE flags.\n\nMariaDB uses the PCRE regular expression library for enhanced regular expression performance, and REGEXP_SUBSTR was introduced as part of this enhancement.\n\nThe default_regex_flags variable addresses the remaining compatibilities between PCRE and the old regex library.\n\nExamples\n--------\n\nSELECT REGEXP_SUBSTR(''ab12cd'',''[0-9]+'');\n-> 12\n\nSELECT REGEXP_SUBSTR(\n  ''See https://mariadb.org/en/foundation/ for details'',\n  ''https?://[^/]*'');\n-> https://mariadb.org\n\nURL: https://mariadb.com/docs/server/reference/sql-functions/string-functions/regular-expressions-functions/regexp_substr', '', 'https://mariadb.com/docs/server/reference/sql-functions/string-functions/regular-expressions-functions/regexp_substr');
INSERT INTO help_topic (help_topic_id, help_category_id, name, description, example, url) VALUES (459, 37, 'Regular Expressions Overview', 'Description\n-----------\n\nRegular Expressions allow MariaDB to perform complex pattern matching on a string. In many cases, the simple pattern matching provided by LIKE is sufficient. LIKE performs two kinds of matches:\n\n _ - the underscore, matching a single character\n % - the percentage sign, matching any number of characters.\n\nIn other cases you may need more control over the returned matches, and will need to use regular expressions.\n\nRegular expression matches are performed with the REGEXP function. RLIKE is a synonym for REGEXP.\n\nComparisons are performed on the byte value, so characters that are treated as equivalent by a collation, but do not have the same byte-value, such as accented characters, could evaluate as unequal.\n\nWithout any special characters, a regular expression match is true if the characters match. The match is case-insensitive, except in the case of BINARY strings.\n\n``sql\nSELECT ''Maria'' REGEXP ''Maria'';\n+------------------------+\n| ''Maria'' REGEXP ''Maria'' |\n+------------------------+\n|                      1 |\n+------------------------+\n\nSELECT ''Maria'' REGEXP ''maria'';\n+------------------------+\n| ''Maria'' REGEXP ''maria'' |\n+------------------------+\n|                      1 |\n+------------------------+\n\nSELECT BINARY ''Maria'' REGEXP ''maria'';\n+-------------------------------+\n| BINARY ''Maria'' REGEXP ''maria'' |\n+-------------------------------+\n|                             0 |\n+-------------------------------+\n`\n\nNote that the word being matched must match the whole pattern:\n\n`sql\nSELECT ''Maria'' REGEXP ''Mari'';\n+-----------------------+\n| ''Maria'' REGEXP ''Mari'' |\n+-----------------------+\n|                     1 |\n+-----------------------+\n\nSELECT ''Mari'' REGEXP ''Maria'';\n+-----------------------+\n| ''Mari'' REGEXP ''Maria'' |\n+-----------------------+\n|                     0 |\n+-----------------------+\n`\n\nThe first returns true because the pattern "Mari" exists in the expression "Maria". When the order is reversed, the result is false, as the pattern "Maria" does not exist in the expression "Mari"\n\nA match can be performed against more than one word with the | character. For example:\n\n`sql\nSELECT ''Maria'' REGEXP ''Monty|Maria'';\n+------------------------------+\n| ''Maria'' REGEXP ''Monty|Maria'' |\n+------------------------------+\n|                            1 |\n+------------------------------+\n`\n\nSpecial Characters\n\nThe above examples introduce the syntax, but are not very useful on their own. It''s the special characters that give regular expressions their power.\n\n^\n\n^ matches the beginning of a string (inside square brackets it can also mean NOT - see below):\n\n`sql\nSELECT ''Maria'' REGEXP ''^Ma'';\n+----------------------+\n| ''Maria'' REGEXP ''^Ma'' |\n+----------------------+\n|                    1 |\n+----------------------+\n`\n\n$\n\n$ matches the end of a string:\n\n`sql\nSELECT ''Maria'' REGEXP ''ia$'';\n+----------------------+\n| ''Maria'' REGEXP ''ia$'' |\n+----------------------+\n|                    1 |\n+----------------------+\n`\n\n.\n\n. matches any single character:\n\n`sql\nSELECT ''Maria'' REGEXP ''Ma.ia'';\n+------------------------+\n| ''Maria'' REGEXP ''Ma.ia'' |\n+------------------------+\n|                      1 |\n+------------------------+\n\nSELECT ''Maria'' REGEXP ''Ma..ia'';\n+-------------------------+\n| ''Maria'' REGEXP ''Ma..ia'' |\n+-------------------------+\n|                       0 |\n+-------------------------+\n`\n\n\\\n\nx matches zero or more of a character x. In the examples below, it''s the r character.\n\n`sql\nSELECT ''Maria'' REGEXP ''Maria'';\n+-------------------------+\n| ''Maria'' REGEXP ''Maria'' |\n+-------------------------+\n|                       1 |\n+-------------------------+\n\nSELECT ''Maia'' REGEXP ''Maria'';\n+------------------------+\n| ''Maia'' REGEXP ''Maria'' |\n+------------------------+\n|                      1 |\n+------------------------+\n\nSELECT ''Marrria'' REGEXP ''Maria'';\n+---------------------------+\n| ''Marrria'' REGEXP ''Maria'' |\n+---------------------------+\n|                         1 |\n+---------------------------+\n`\n\n+\n\nx+ matches one or more of a character x. In the examples below, it''s the r character.\n\n`sql\nSELECT ''Maria'' REGEXP ''Mar+ia'';\n+-------------------------+\n| ''Maria'' REGEXP ''Mar+ia'' |\n+-------------------------+\n|                       1 |\n+-------------------------+\n\nSELECT ''Maia'' REGEXP ''Mar+ia'';\n+------------------------+\n| ''Maia'' REGEXP ''Mar+ia'' |\n+------------------------+\n|                      0 |\n+------------------------+\n\nSELECT ''Marrria'' REGEXP ''Mar+ia'';\n+---------------------------+\n| ''Marrria'' REGEXP ''Mar+ia'' |\n+---------------------------+\n|                         1 |\n+---------------------------+\n`\n\n?\n\nx? matches zero or one of a character x. In the examples below, it''s the r character.\n\n`sql\nSELECT ''Maria'' REGEXP ''Mar?ia'';\n+-------------------------+\n| ''Maria'' REGEXP ''Mar?ia'' |\n+-------------------------+\n|                       1 |\n+-------------------------+\n\nSELECT ''Maia'' REGEXP ''Mar?ia'';\n+------------------------+\n| ''Maia'' REGEXP ''Mar?ia'' |\n+------------------------+\n|                      1 |\n+------------------------+\n\nSELECT ''Marrria'' REGEXP ''Mar?ia'';\n+---------------------------+\n| ''Marrria'' REGEXP ''Mar?ia'' |\n+---------------------------+\n|                         0 |\n+---------------------------+\n`\n\n()\n\n(xyz) - combine a sequence, for example (xyz)+ or (xyz)\n\n`sql\nSELECT ''Maria'' REGEXP ''(ari)+'';\n+-------------------------+\n| ''Maria'' REGEXP ''(ari)+'' |\n+-------------------------+\n|                       1 |\n+-------------------------+\n`\n\n{}\n\nx{n} and x{m,n}\\\nThis notation is used to match many instances of the x. In the case of x{n} the match must be exactly that many times. In the case of x{m,n}, the match can occur from m to n times. For example, to match zero or one instance of the string ari (which is identical to (ari)?), the following can be used:\n\n`sql\nSELECT ''Maria'' REGEXP ''(ari){0,1}'';\n+-----------------------------+\n| ''Maria'' REGEXP ''(ari){0,1}'' |\n+-----------------------------+\n|                           1 |\n+-----------------------------+\n`\n\n\\[]\n\n[xy] groups characters for matching purposes. For example, to match either the p or the r character:\n\n`sql\nSELECT ''Maria'' REGEXP ''Ma[pr]ia'';\n+---------------------------+\n| ''Maria'' REGEXP ''Ma[pr]ia'' |\n+---------------------------+\n|                         1 |\n+---------------------------+\n`\n\nThe square brackets also permit a range match, for example, to match any character from a-z, [a-z] is used. Numeric ranges are also permitted.\n\n`sql\nSELECT ''Maria'' REGEXP ''Ma[a-z]ia'';\n+----------------------------+\n| ''Maria'' REGEXP ''Ma[a-z]ia'' |\n+----------------------------+\n|                          1 |\n+----------------------------+\n`\n\nThe following does not match, as r falls outside of the range a-p.\n\n`sql\nSELECT ''Maria'' REGEXP ''Ma[a-p]ia'';\n+----------------------------+\n| ''Maria'' REGEXP ''Ma[a-p]ia'' |\n+----------------------------+\n|                          0 |\n+----------------------------+\n`\n\n^\n\nThe ^ character means does NOT match, for example:\n\n`sql\nSELECT ''Maria'' REGEXP ''Ma[^p]ia'';\n+---------------------------+\n| ''Maria'' REGEXP ''Ma[^p]ia'' |\n+---------------------------+\n|                         1 |\n+---------------------------+\n\nSELECT ''Maria'' REGEXP ''Ma[^r]ia'';\n+---------------------------+\n| ''Maria'' REGEXP ''Ma[^r]ia'' |\n+---------------------------+\n|                         0 |\n+---------------------------+\n`\n\nThe [ and ] characters on their own can be literally matched inside a [] block, without escaping, as long as they immediately match the opening bracket:\n\n`sql\nSELECT ''[Maria'' REGEXP ''[[]'';\n+-----------------------+\n| ''[Maria'' REGEXP ''[[]'' |\n+-----------------------+\n|                     1 |\n+-----------------------+\n\nSELECT ''[Maria'' REGEXP ''[]]'';\n+-----------------------+\n| ''[Maria'' REGEXP ''[]]'' |\n+-----------------------+\n|                     0 |\n+-----------------------+\n\nSELECT '']Maria'' REGEXP ''[]]'';\n+-----------------------+\n| '']Maria'' REGEXP ''[]]'' |\n+-----------------------+\n|                     1 |\n+-----------------------+\n\nSELECT '']Maria'' REGEXP ''[]a]'';\n+------------------------+\n| '']Maria'' REGEXP ''[]a]'' |\n+------------------------+\n|                      1 |\n+------------------------+\n`\n\nIncorrect order, so no match:\n\n`sql\nSELECT '']Maria'' REGEXP ''[a]]'';\n+------------------------+\n| '']Maria'' REGEXP ''[a]]'' |\n+------------------------+\n|                      0 |\n+------------------------+\n`\n\nThe - character can also be matched in the same way:\n\n`sql\nSELECT ''-Maria'' REGEXP ''[1-10]'';\n+--------------------------+\n| ''-Maria'' REGEXP ''[1-10]'' |\n+--------------------------+\n|                        0 |\n+--------------------------+\n\nSELECT ''-Maria'' REGEXP ''[-1-10]'';\n+---------------------------+\n| ''-Maria'' REGEXP ''[-1-10]'' |\n+---------------------------+\n|                         1 |\n+---------------------------+\n`\n\nWord boundaries\n\nThe :<: and :>: patterns match the beginning and the end of a word respectively. For example:\n\n`sql\nSELECT ''How do I upgrade MariaDB?'' REGEXP ''[[:<:]]MariaDB[[:>:]]'';\n+------------------------------------------------------------+\n| ''How do I upgrade MariaDB?'' REGEXP ''[[:<:]]MariaDB[[:>:]]'' |\n+------------------------------------------------------------+\n|                                                          1 |\n+------------------------------------------------------------+\n\nSELECT ''How do I upgrade MariaDB?'' REGEXP ''[[:<:]]Maria[[:>:]]'';\n+----------------------------------------------------------+\n| ''How do I upgrade MariaDB?'' REGEXP ''[[:<:]]Maria[[:>:]]'' |\n+----------------------------------------------------------+\n|                                                        0 |\n+----------------------------------------------------------+\n`\n\nCharacter Classes\n\nThere are a number of shortcuts to match particular preset character classes. These are matched with the [:character_class:] pattern (inside a [] set). The following character classes exist:\n\n| Character Class | Description                              |\n| --------------- | ---------------------------------------- |\n| alnum           | Alphanumeric                             |\n| alpha           | Alphabetic                               |\n| blank           | Whitespace                               |\n| cntrl           | Control characters                       |\n| digit           | Digits                                   |\n| graph           | Graphic characters                       |\n| lower           | Lowercase alphabetic                     |\n| print           | Graphic or space characters              |\n| punct           | Punctuation                              |\n| space           | Space, tab, newline, and carriage return |\n| upper           | Uppercase alphabetic                     |\n| xdigit          | Hexadecimal digit                        |\n\nFor example:\n\n`sql\nSELECT ''Maria'' REGEXP ''Mar[[:alnum:]]'';\n+--------------------------------+\n| ''Maria'' REGEXP ''Mar[:alnum:]'' |\n+--------------------------------+\n|                              1 |\n+--------------------------------+\n`\n\nRemember that matches are by default case-insensitive, unless a binary string is used, so the following example, specifically looking for an uppercase, counter-intuitively matches a lowercase character:\n\n`sql\nSELECT ''Mari'' REGEXP ''Mar[[:upper:]]+'';\n+---------------------------------+\n| ''Mari'' REGEXP ''Mar[[:upper:]]+'' |\n+---------------------------------+\n|                               1 |\n+---------------------------------+\n\nSELECT BINARY ''Mari'' REGEXP ''Mar[[:upper:]]+'';\n+----------------------------------------+\n| BINARY ''Mari'' REGEXP ''Mar[[:upper:]]+'' |\n+----------------------------------------+\n|                                      0 |\n+----------------------------------------+\n`\n\nCharacter Names\n\nThere are also number of shortcuts to match particular preset character names. These are matched with the [.character.] pattern (inside a [] set). The following character classes exist:\n\n| Name                 | Character |\n| -------------------- | --------- |\n| NUL                  | 0         |\n| SOH                  | 001       |\n| STX                  | 002       |\n| ETX                  | 003       |\n| EOT                  | 004       |\n| ENQ                  | 005       |\n| ACK                  | 006       |\n| BEL                  | 007       |\n| alert                | 007       |\n| BS                   | 010       |\n| backspace            | ''\\b''      |\n| HT                   | 011       |\n| tab                  | ''\\t''      |\n| LF                   | 012       |\n| newline              | ''\\n''      |\n| VT                   | 013       |\n| vertical-tab         | ''\\v''      |\n| FF                   | 014       |\n| form-feed            | ''\\f''      |\n| CR                   | 015       |\n| carriage-return      | ''\\r''      |\n| SO                   | 016       |\n| SI                   | 017       |\n| DLE                  | 020       |\n| DC1                  | 021       |\n| DC2                  | 022       |\n| DC3                  | 023       |\n| DC4                  | 024       |\n| NAK                  | 025       |\n| SYN                  | 026       |\n| ETB                  | 027       |\n| CAN                  | 030       |\n| EM                   | 031       |\n| SUB                  | 032       |\n| ESC                  | 033       |\n| IS4                  | 034       |\n| FS                   | 034       |\n| IS3                  | 035       |\n| GS                   | 035       |\n| IS2                  | 036       |\n| RS                   | 036       |\n| IS1                  | 037       |\n| US                   | 037       |\n| space                | '' ''       |\n| exclamation-mark     | ''!''       |\n| quotation-mark       | ''"''       |\n| number-sign          | ''#''       |\n| dollar-sign          | ''$''       |\n| percent-sign         | ''%''       |\n| ampersand            | ''&''       |\n| apostrophe           | ''''''       |\n| left-parenthesis     | ''(''       |\n| right-parenthesis    | '')''       |\n| asterisk             | ''\\''      |\n| plus-sign            | ''+''       |\n| comma                | '',''       |\n| hyphen               | ''-''       |\n| hyphen-minus         | ''-''       |\n| period               | ''.''       |\n| full-stop            | ''.''       |\n| slash                | ''/''       |\n| solidus              | ''/''       |\n| zero                 | ''0''       |\n| one                  | ''1''       |\n| two                  | ''2''       |\n| three                | ''3''       |\n| four                 | ''4''       |\n| five                 | ''5''       |\n| six                  | ''6''       |\n| seven                | ''7''       |\n| eight                | ''8''       |\n| nine                 | ''9''       |\n| colon                | '':''       |\n| semicolon            | '';''       |\n| less-than-sign       | ''<''       |\n| equals-sign          | ''=''       |\n| greater-than-sign    | ''>''       |\n| question-mark        | ''?''       |\n| commercial-at        | ''@''       |\n| left-square-bracket  | ''\\[''      |\n| backslash            | ''''        |\n| reverse-solidus      | ''''        |\n| right-square-bracket | '']''\n\n[Truncated — full content at mariadb.com/docs]', '', 'https://mariadb.com/docs/server/reference/sql-functions/string-functions/regular-expressions-functions/regular-expressions-overview');
INSERT INTO help_topic (help_topic_id, help_category_id, name, description, example, url) VALUES (460, 37, 'RLIKE', 'Syntax\n------\n\nexpr REGEXP pat, expr RLIKE pat\n\nDescription\n-----------\n\nRLIKE is a synonym for REGEXP.\n\nURL: https://mariadb.com/docs/server/reference/sql-functions/string-functions/regular-expressions-functions/rlike', '', 'https://mariadb.com/docs/server/reference/sql-functions/string-functions/regular-expressions-functions/rlike');
INSERT INTO help_topic (help_topic_id, help_category_id, name, description, example, url) VALUES (461, 37, 'REPEAT Function', 'Syntax\n------\n\nREPEAT(str,count)\n\nDescription\n-----------\n\nReturns a string consisting of the string str repeated count times. Ifcount is less than 1, returns an empty string. Returns NULL if str orcount are NULL.\n\nExamples\n--------\n\nSELECT QUOTE(REPEAT(''MariaDB '',4));\n+------------------------------------+\n| QUOTE(REPEAT(''MariaDB '',4))        |\n+------------------------------------+\n| ''MariaDB MariaDB MariaDB MariaDB '' |\n+------------------------------------+\n\nURL: https://mariadb.com/docs/server/reference/sql-functions/string-functions/repeat-function', '', 'https://mariadb.com/docs/server/reference/sql-functions/string-functions/repeat-function');
INSERT INTO help_topic (help_topic_id, help_category_id, name, description, example, url) VALUES (462, 37, 'REPLACE Function', 'Syntax\n------\n\nREPLACE(str,from_str,to_str)\n\nDescription\n-----------\n\nReturns 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. If any argument is NULL, the function returns NULL.\n\nExamples\n--------\n\nSELECT REPLACE(''www.mariadb.org'', ''w'', ''Ww'');\n+---------------------------------------+\n| REPLACE(''www.mariadb.org'', ''w'', ''Ww'') |\n+---------------------------------------+\n| WwWwWw.mariadb.org                    |\n+---------------------------------------+\n\nURL: https://mariadb.com/docs/server/reference/sql-functions/string-functions/replace-function', '', 'https://mariadb.com/docs/server/reference/sql-functions/string-functions/replace-function');
INSERT INTO help_topic (help_topic_id, help_category_id, name, description, example, url) VALUES (463, 37, 'REVERSE', 'Syntax\n------\n\nREVERSE(str)\n\nDescription\n-----------\n\nReturns the string str with the order of the characters reversed. If the input string is NULL, the function returns NULL.\n\nExamples\n--------\n\nSELECT REVERSE(''desserts'');\n+---------------------+\n| REVERSE(''desserts'') |\n+---------------------+\n| stressed            |\n+---------------------+\n\nURL: https://mariadb.com/docs/server/reference/sql-functions/string-functions/reverse', '', 'https://mariadb.com/docs/server/reference/sql-functions/string-functions/reverse');
INSERT INTO help_topic (help_topic_id, help_category_id, name, description, example, url) VALUES (464, 37, 'RIGHT', 'Syntax\n------\n\nRIGHT(str,len)\n\nDescription\n-----------\n\nReturns the rightmost _len_ characters from the string _str_, or NULL if any argument is NULL.\n\nExamples\n--------\n\nSELECT RIGHT(''MariaDB'', 2);\n+---------------------+\n| RIGHT(''MariaDB'', 2) |\n+---------------------+\n| DB                  |\n+---------------------+\n\nURL: https://mariadb.com/docs/server/reference/sql-functions/string-functions/right', '', 'https://mariadb.com/docs/server/reference/sql-functions/string-functions/right');
INSERT INTO help_topic (help_topic_id, help_category_id, name, description, example, url) VALUES (465, 37, 'RPAD', 'Syntax\n------\n\nRPAD(str, len [, padstr])\n\nDescription\n-----------\n\nReturns 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. If padstr is omitted, the RPAD function pads spaces.\n\nReturns NULL if given a NULL argument. If the result is empty (a length of zero), returns either an empty string, or, with SQL_MODE=Oracle, NULL.\n\nThe Oracle mode version of the function can be accessed outside of Oracle mode by using RPAD_ORACLE as the function name.\n\nExamples\n--------\n\nSELECT RPAD(''hello'',10,''.'');\n+----------------------+\n| RPAD(''hello'',10,''.'') |\n+----------------------+\n| hello.....           |\n+----------------------+\n\nSELECT RPAD(''hello'',2,''.'');\n+---------------------+\n| RPAD(''hello'',2,''.'') |\n+---------------------+\n| he                  |\n+---------------------+\n\nURL: https://mariadb.com/docs/server/reference/sql-functions/string-functions/rpad', '', 'https://mariadb.com/docs/server/reference/sql-functions/string-functions/rpad');
INSERT INTO help_topic (help_topic_id, help_category_id, name, description, example, url) VALUES (466, 37, 'RTRIM', 'Syntax\n------\n\nRTRIM(str)\n\nDescription\n-----------\n\nReturns the string str with trailing space characters removed.\n\nReturns NULL if given a NULL argument. If the result is empty, returns either an empty string, or, with SQL_MODE=Oracle, NULL.\n\nThe Oracle mode version of the function can be accessed outside of Oracle mode by using RTRIM_ORACLE as the function name.\n\nExamples\n--------\n\nSELECT QUOTE(RTRIM(''MariaDB    ''));\n+-----------------------------+\n| QUOTE(RTRIM(''MariaDB    '')) |\n+-----------------------------+\n| ''MariaDB''                   |\n+-----------------------------+\n\nURL: https://mariadb.com/docs/server/reference/sql-functions/string-functions/rtrim', '', 'https://mariadb.com/docs/server/reference/sql-functions/string-functions/rtrim');
INSERT INTO help_topic (help_topic_id, help_category_id, name, description, example, url) VALUES (467, 37, 'SFORMAT', 'Description\n-----------\n\nThe SFORMAT function takes an input string and a formatting specification and returns the string formatted using the rules the user passed in the specification.\n\nIt uses the fmtlib library for Python-like (as well as Rust, C++20, etc) string formatting.\n\nOnly fmtlib 7.0.0+ is supported.\n\nThere is no native support for temporal and decimal values:\n\n TIME_RESULT is handled as STRING_RESULT.\n DECIMAL_RESULT is handled as REAL_RESULT.\n\nExamples\n--------\n\nSELECT SFORMAT("The answer is {}.", 42);\n+----------------------------------+\n| SFORMAT("The answer is {}.", 42) |\n+----------------------------------+\n| The answer is 42.                |\n+----------------------------------+\n\nCREATE TABLE test_sformat(mdb_release char(6), mdev int, feature char(20));\n\nINSERT INTO test_sformat VALUES(''10.7.0'', 25015, ''Python style sformat''), \n  (''10.7.0'', 4958, ''UUID'');\n\nSELECT * FROM test_sformat;\n+-------------+-------+----------------------+\n| mdb_release | mdev  | feature              |\n+-------------+-------+----------------------+\n| 10.7.0      | 25015 | Python style sformat |\n| 10.7.0      |  4958 | UUID                 |\n+-------------+-------+----------------------+\n\nSELECT SFORMAT(''MariaDB Server {} has a preview for MDEV-{} which is about {}'', \n  mdb_release, mdev, feature) AS ''Preview Release Examples''\n  FROM test_sformat;\n+----------------------------------------------------------------------------------------+\n| Preview Release Examples                                                               |\n+----------------------------------------------------------------------------------------+\n| MariaDB Server 10.7.0 has a preview for MDEV-25015 which is about Python style sformat |\n| MariaDB Server 10.7.0 has a preview for MDEV-4958 which is about UUID                  |\n+----------------------------------------------------------------------------------------+\n\nURL: https://mariadb.com/docs/server/reference/sql-functions/string-functions/sformat', '', 'https://mariadb.com/docs/server/reference/sql-functions/string-functions/sformat');
INSERT INTO help_topic (help_topic_id, help_category_id, name, description, example, url) VALUES (468, 37, 'SOUNDEX', 'Syntax\n------\n\nSOUNDEX(str)\n\nDescription\n-----------\n\nReturns 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 non-alphabetic characters in _str_ are ignored. All international alphabetic characters outside the A-Z range are treated as vowels.\n\nImportant: When using SOUNDEX(), you should be aware of the following details:\n\n 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 reasonable results.\n This function implements the original Soundex algorithm, not the more popular enhanced version (also described by D. Knuth). The difference is that original version discards vowels first and duplicates second, whereas the enhanced version discards duplicates first and vowels second.\n\nExamples\n--------\n\nSOUNDEX(''Hello'');\n+------------------+\n| SOUNDEX(''Hello'') |\n+------------------+\n| H400             |\n+------------------+\n\nURL: https://mariadb.com/docs/server/reference/sql-functions/string-functions/soundex', '', 'https://mariadb.com/docs/server/reference/sql-functions/string-functions/soundex');
INSERT INTO help_topic (help_topic_id, help_category_id, name, description, example, url) VALUES (469, 37, 'SOUNDS LIKE', 'Syntax\n------\n\nexpr1 SOUNDS LIKE expr2\n\nDescription\n-----------\n\nThis is the same as SOUNDEX(expr1) = SOUNDEX(expr2).\n\nExamples\n--------\n\nSELECT givenname, surname FROM users WHERE givenname SOUNDS LIKE "robert";\n+-----------+---------+\n| givenname | surname |\n+-----------+---------+\n| Roberto   | Castro  |\n+-----------+---------+\n\nURL: https://mariadb.com/docs/server/reference/sql-functions/string-functions/sounds-like', '', 'https://mariadb.com/docs/server/reference/sql-functions/string-functions/sounds-like');
INSERT INTO help_topic (help_topic_id, help_category_id, name, description, example, url) VALUES (470, 37, 'SPACE', 'Syntax\n------\n\nSPACE(N)\n\nDescription\n-----------\n\nReturns a string consisting of _N_ space characters. If N is NULL, returns NULL.\n\nExamples\n--------\n\nSELECT QUOTE(SPACE(6));\n+-----------------+\n| QUOTE(SPACE(6)) |\n+-----------------+\n| ''      ''        |\n+-----------------+\n\nURL: https://mariadb.com/docs/server/reference/sql-functions/string-functions/space', '', 'https://mariadb.com/docs/server/reference/sql-functions/string-functions/space');
INSERT INTO help_topic (help_topic_id, help_category_id, name, description, example, url) VALUES (471, 37, 'STRCMP', 'Syntax\n------\n\nSTRCMP(expr1,expr2)\n\nDescription\n-----------\n\nSTRCMP() returns 0 if the strings are the same, -1 if the first argument is smaller than the second according to the current sort order, and 1 if the strings are otherwise not the same. Returns NULL is either argument is NULL.\n\nExamples\n--------\n\nSELECT STRCMP(''text'', ''text2'');\n+-------------------------+\n| STRCMP(''text'', ''text2'') |\n+-------------------------+\n|                      -1 |\n+-------------------------+\n\nSELECT STRCMP(''text2'', ''text'');\n+-------------------------+\n| STRCMP(''text2'', ''text'') |\n+-------------------------+\n|                       1 |\n+-------------------------+\n\nSELECT STRCMP(''text'', ''text'');\n+------------------------+\n| STRCMP(''text'', ''text'') |\n+------------------------+\n|                      0 |\n+------------------------+\n\nURL: https://mariadb.com/docs/server/reference/sql-functions/string-functions/strcmp', '', 'https://mariadb.com/docs/server/reference/sql-functions/string-functions/strcmp');
INSERT INTO help_topic (help_topic_id, help_category_id, name, description, example, url) VALUES (472, 37, 'SUBSTR', 'Description\n-----------\n\nSUBSTR() is a synonym for SUBSTRING().\n\nURL: https://mariadb.com/docs/server/reference/sql-functions/string-functions/substr', '', 'https://mariadb.com/docs/server/reference/sql-functions/string-functions/substr');
INSERT INTO help_topic (help_topic_id, help_category_id, name, description, example, url) VALUES (473, 37, 'SUBSTRING', 'Description\n-----------\n\nThe forms without a _len_ argument return a substring from string _str_ starting at position _pos_.\n\nThe forms with a _len_ argument return a substring _len_ characters long from string _str_, starting at position _pos_.\n\nThe forms that use _FROM_ are standard SQL syntax.\n\nIt 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.\n\nBy default, the position of the first character in the string from which the substring is to be extracted is 1. If the value of _pos_ is 0, the result is empty string. For Oracle compatibility, when sql_mode is set to ''oracle'', position 0 is treated as position 1.\n\nIf any argument is NULL, returns NULL.\n\nThe optimizer can make use of an index for conditions like SUBSTR(indexed_column, 1, n) = const_string.\n\nThe optimizer cannot make use of an index if an indexed column is an argument of SUBSTR().\n\nExamples\n--------\n\nSELECT SUBSTRING(''Knowledgebase'',5);\n+------------------------------+\n| SUBSTRING(''Knowledgebase'',5) |\n+------------------------------+\n| ledgebase                    |\n+------------------------------+\n\nSELECT SUBSTRING(''MariaDB'' FROM 6);\n+-----------------------------+\n| SUBSTRING(''MariaDB'' FROM 6) |\n+-----------------------------+\n| DB                          |\n+-----------------------------+\n\nSELECT SUBSTRING(''Knowledgebase'',3,7);\n+--------------------------------+\n| SUBSTRING(''Knowledgebase'',3,7) |\n+--------------------------------+\n| owledge                        |\n+--------------------------------+\n\nSELECT SUBSTRING(''Knowledgebase'', -4);\n+--------------------------------+\n| SUBSTRING(''Knowledgebase'', -4) |\n+--------------------------------+\n| base                           |\n+--------------------------------+\n\nSELECT SUBSTRING(''Knowledgebase'', 0);\n+--------------------------------+\n| SUBSTRING(''Knowledgebase'', 0)  |\n+--------------------------------+\n|                                |\n+--------------------------------+\n\nSELECT SUBSTRING(''Knowledgebase'', -8, 4);\n+-----------------------------------+\n| SUBSTRING(''Knowledgebase'', -8, 4) |\n+-----------------------------------+\n| edge                              |\n+-----------------------------------+\n\nSELECT SUBSTRING(''Knowledgebase'' FROM -8 FOR 4);\n+------------------------------------------+\n| SUBSTRING(''Knowledgebase'' FROM -8 FOR 4) |\n+------------------------------------------+\n| edge                                     |\n+------------------------------------------+\n\nURL: https://mariadb.com/docs/server/reference/sql-functions/string-functions/substring', '', 'https://mariadb.com/docs/server/reference/sql-functions/string-functions/substring');
INSERT INTO help_topic (help_topic_id, help_category_id, name, description, example, url) VALUES (474, 37, 'SUBSTRING\\_INDEX', 'Syntax\n------\n\nSUBSTRING_INDEX(str,delim,count)\n\nDescription\n-----------\n\nReturns 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_.\n\nIf any argument is NULL, returns NULL.\n\nFor example:\n\n``sql\nSUBSTRING_INDEX(''www.mariadb.org'', ''.'', 2)\n``\n\nIt means "Return all of the characters up to the 2nd occurrence of ."\n\nExamples\n--------\n\nSELECT SUBSTRING_INDEX(''www.mariadb.org'', ''.'', 2);\n+--------------------------------------------+\n| SUBSTRING_INDEX(''www.mariadb.org'', ''.'', 2) |\n+--------------------------------------------+\n| www.mariadb                                |\n+--------------------------------------------+\n\nSELECT SUBSTRING_INDEX(''www.mariadb.org'', ''.'', -2);\n+---------------------------------------------+\n| SUBSTRING_INDEX(''www.mariadb.org'', ''.'', -2) |\n+---------------------------------------------+\n| mariadb.org                                 |\n+---------------------------------------------+\n\nURL: https://mariadb.com/docs/server/reference/sql-functions/string-functions/substring_index', '', 'https://mariadb.com/docs/server/reference/sql-functions/string-functions/substring_index');
INSERT INTO help_topic (help_topic_id, help_category_id, name, description, example, url) VALUES (475, 37, 'TO\\_BASE64', 'Syntax\n------\n\nTO_BASE64(str)\n\nDescription\n-----------\n\nConverts the string argument str to its base-64 encoded form, returning the result as a character string in the connection character set and collation.\n\nThe argument str will be converted to string first if it is not a string. A NULL argument will return a NULL result.\n\nThe reverse function, FROM_BASE64(), decodes an encoded base-64 string.\n\nThere are a numerous different methods to base-64 encode a string. The following are used by MariaDB and MySQL:\n\n Alphabet value 64 is encoded as ''+''.\n Alphabet value 63 is encoded as ''/''.\n Encoding output is made up of groups of four printable characters, with each three bytes of data encoded using four characters. If the final group is not complete, it is padded with ''='' characters to make up a length of four.\n To divide long output, a newline is added after every 76 characters.\n* Decoding will recognize and ignore newlines, carriage returns, tabs, and spaces.\n\nExamples\n--------\n\nSELECT TO_BASE64(''Maria'');\n+--------------------+\n| TO_BASE64(''Maria'') |\n+--------------------+\n| TWFyaWE=           |\n+--------------------+\n\nURL: https://mariadb.com/docs/server/reference/sql-functions/string-functions/to_base64', '', 'https://mariadb.com/docs/server/reference/sql-functions/string-functions/to_base64');
INSERT INTO help_topic (help_topic_id, help_category_id, name, description, example, url) VALUES (476, 37, 'TO\\_CHAR', 'Syntax\n------\n\nTO_CHAR(expr[, fmt])\n\nDescription\n-----------\n\nThe TO_CHAR function converts an _expr_ of type date, datetime, time or timestamp to a string. The optional _fmt_ argument supports YYY/YYY/YY/RRRR/RR/MM/MON/MONTH/MI/DD/DY/HH/HH12/HH24/SS and special characters. The default value is YYYY-MM-DD HH24:MI:SS. TO_CHAR also accepts FM in the format string, which disables padding of all components following it.\n\nFM can be specified multiple times, with each time disabling the previous state:\n\n An odd number of FMs disables padding.\n An even number of FMs enables padding.\n\nThese additional formats (for _fmt_) are available:\n\n FF[1-6] – Fractional seconds\n DDD – Day (1-366)\n IW – Week 1-53 according to ISO 8601\n I – 1-digit year according to ISO 8601\n IY – 2-digit year according to ISO 8601\n IYY – 3-digit year according to ISO 8601\n IYYY – 4-digit year according to ISO 8601\n SYYY – 4-digit year according to ISO 8601 (Oracle can use signed years)\n\nThe TO_CHAR function converts an _expr_ of type date, datetime, time or timestamp to a string. The optional _fmt_ argument supports YYY/YYY/YY/RRRR/RR/MM/MON/MONTH/MI/DD/DY/HH/HH12/HH24/SS and special characters. The default value is YYYY-MM-DD HH24:MI:SS. TO_CHAR also accepts FM in the format string, which disables padding of all components following it.\n\nFM can be specified multiple times, with each time disabling the previous state:\n\n An odd number of FMs disables padding.\n An even number of FMs enables padding.\n\nThe TO_CHAR function converts an _expr_ of type date, datetime, time or timestamp to a string. The optional _fmt_ argument supports YYY/YYY/YY/RRRR/RR/MM/MON/MONTH/MI/DD/DY/HH/HH12/HH24/SS and special characters. The default value is YYYY-MM-DD HH24:MI:SS.\n\nIn Oracle, TO_CHAR can also be used to convert numbers to strings, but this is not supported in MariaDB and gives an error.\n\nExamples\n--------\n\nSELECT TO_CHAR(''1980-01-11 04:50:39'', ''YYYY-MM-DD'');\n+----------------------------------------------+\n| TO_CHAR(''1980-01-11 04:50:39'', ''YYYY-MM-DD'') |\n+----------------------------------------------+\n| 1980-01-11                                   |\n+----------------------------------------------+\n\nSELECT TO_CHAR(''1980-01-11 04:50:39'', ''HH24-MI-SS'');\n+----------------------------------------------+\n| TO_CHAR(''1980-01-11 04:50:39'', ''HH24-MI-SS'') |\n+----------------------------------------------+\n| 04-50-39                                     |\n+----------------------------------------------+\n\nSELECT TO_CHAR(''00-01-01 00:00:00'', ''YY-MM-DD HH24:MI:SS'');\n+-----------------------------------------------------+\n| TO_CHAR(''00-01-01 00:00:00'', ''YY-MM-DD HH24:MI:SS'') |\n+-----------------------------------------------------+\n| 00-01-01 00:00:00                                   |\n+-----------------------------------------------------+\n\nSELECT TO_CHAR(''99-12-31 23:59:59'', ''YY-MM-DD HH24:MI:SS'');\n+-----------------------------------------------------+\n| TO_CHAR(''99-12-31 23:59:59'', ''YY-MM-DD HH24:MI:SS'') |\n+-----------------------------------------------------+\n| 99-12-31 23:59:59                                   |\n+-----------------------------------------------------+\n\nSELECT TO_CHAR(''9999-12-31 23:59:59'', ''YY-MM-DD HH24:MI:SS'');\n+-------------------------------------------------------+\n| TO_CHAR(''9999-12-31 23:59:59'', ''YY-MM-DD HH24:MI:SS'') |\n+-------------------------------------------------------+\n| 99-12-31 23:59:59                                     |\n+-------------------------------------------------------+\n\nSELECT TO_CHAR(''21-01-03 08:30:00'', ''Y-MONTH-DY HH:MI:SS'');\n+-----------------------------------------------------+\n| TO_CHAR(''21-01-03 08:30:00'', ''Y-MONTH-DY HH:MI:SS'') |\n+-----------------------------------------------------+\n| 1-January  -Sun 08:30:00                            |\n+-----------------------------------------------------+\n\nFrom MariaDB 12.0, FM removes following padding:\n\nSELECT CONCAT(''/'', TO_CHAR(''2020-01-06 10:11:12'', ''DAY''), ''/'');\n+---------------------------------------------------------+\n| CONCAT(''/'', TO_CHAR(''2020-01-06 10:11:12'', ''DAY''), ''/'') |\n+---------------------------------------------------------+\n| /Monday   /                                             |\n+---------------------------------------------------------+\n\nSELECT CONCAT(''/'', TO_CHAR(''2020-01-06 10:11:12'', ''FMDAY''), ''/'');\n+-----------------------------------------------------------+\n| CONCAT(''/'', TO_CHAR(''2020-01-06 10:11:12'', ''FMDAY''), ''/'') |\n+-----------------------------------------------------------+\n| /Monday/                                                  |\n+-----------------------------------------------------------+\n\nEven numbers of FM enable padding, while odd numbers disable it:\n\nSELECT CONCAT(''/'', TO_CHAR(''2020-01-06 10:11:12'', ''FMFMDAY''), ''/'');\n+-------------------------------------------------------------+\n| CONCAT(''/'', TO_CHAR(''2020-01-06 10:11:12'', ''FMFMDAY''), ''/'') |\n+-------------------------------------------------------------+\n| /Monday   /                                                 |\n+-------------------------------------------------------------+\n\nSELECT CONCAT(''/'', TO_CHAR(''2020-01-06 10:11:12'', ''FMFMFMDAY''), ''/'');\n+---------------------------------------------------------------+\n| CONCAT(''/'', TO_CHAR(''2020-01-06 10:11:12'', ''FMFMFMDAY''), ''/'') |\n+---------------------------------------------------------------+\n| /Monday/                                                      |\n+---------------------------------------------------------------+\n\nFM only suppresses following padding:\n\nSELECT CONCAT(''/'', TO_CHAR(''2020-01-06 10:11:12'', ''DAYFM''), ''/'');\n+-----------------------------------------------------------+\n| CONCAT(''/'', TO_CHAR(''2020-01-06 10:11:12'', ''DAYFM''), ''/'') |\n+-----------------------------------------------------------+\n| /Monday   /                                               |\n+-----------------------------------------------------------+\n\nURL: https://mariadb.com/docs/server/reference/sql-functions/string-functions/to_char', '', 'https://mariadb.com/docs/server/reference/sql-functions/string-functions/to_char');
INSERT INTO help_topic (help_topic_id, help_category_id, name, description, example, url) VALUES (477, 37, 'TRIM', 'Syntax\n------\n\nTRIM_ORACLE([{BOTH | LEADING | TRAILING} [remstr] FROM] str), TRIM([remstr FROM] str)\n\nDescription\n-----------\n\nReturns the string str with all remstr prefixes or suffixes removed. If none of the specifiers BOTH, LEADING, or TRAILING is given, BOTH is assumed. remstr is optional and, if not specified, spaces are removed.\n\nReturns NULL if given a NULL argument. If the result is empty, returns either an empty string, or, with SQL_MODE=Oracle, NULL. SQL_MODE=Oracle is not set by default.\n\nThe Oracle mode version of the function can be accessed in any mode by using TRIM_ORACLE as the function name.\n\nExamples\n--------\n\nSELECT TRIM(''  bar   '')\\G\n************************ 1. row *********************\nTRIM(''  bar   ''): bar\n\nSELECT TRIM(LEADING ''x'' FROM ''xxxbarxxx'')\\G\n********************* 1. row *********************\nTRIM(LEADING ''x'' FROM ''xxxbarxxx''): barxxx\n\nSELECT TRIM(BOTH ''x'' FROM ''xxxbarxxx'')\\G\n********************* 1. row *********************\nTRIM(BOTH ''x'' FROM ''xxxbarxxx''): bar\n\nSELECT TRIM(TRAILING ''xyz'' FROM ''barxxyz'')\\G\n********************* 1. row ************************\nTRIM(TRAILING ''xyz'' FROM ''barxxyz''): barx\n\nURL: https://mariadb.com/docs/server/reference/sql-functions/string-functions/trim', '', 'https://mariadb.com/docs/server/reference/sql-functions/string-functions/trim');
INSERT INTO help_topic (help_topic_id, help_category_id, name, description, example, url) VALUES (478, 37, 'TRIM\\_ORACLE', 'Description\n-----------\n\nTRIM_ORACLE is a synonym for the Oracle mode version of the TRIM function, and is available in all modes.\n\nURL: https://mariadb.com/docs/server/reference/sql-functions/string-functions/trim_oracle', '', 'https://mariadb.com/docs/server/reference/sql-functions/string-functions/trim_oracle');
INSERT INTO help_topic (help_topic_id, help_category_id, name, description, example, url) VALUES (479, 37, 'Type Conversion', 'Description\n-----------\n\nImplicit type conversion takes place when MariaDB is using operands or different types, in order to make the operands compatible.\n\nIt is best practice not to rely upon implicit conversion; rather use CAST to explicitly convert types.\n\nRules for Conversion on Comparison\n\n If either argument is NULL, the result of the comparison is NULL unless the NULL-safe <=> equality comparison operator is used.\n If both arguments are integers, they are compared as integers.\n If both arguments are strings, they are compared as strings.\n If one argument is decimal and the other argument is decimal or integer, they are compared as decimals.\n If one argument is decimal and the other argument is a floating point, they are compared as floating point values.\n If one argument is string and the other argument is integer, they are compared as decimals.\n If a hexadecimal argument is not compared to a number, it is treated as a binary string.\n If a constant is compared to a TIMESTAMP or DATETIME, the constant is converted to a timestamp, unless used as an argument to the IN function.\n In other cases, arguments are compared as floating point, or real, numbers.\n\nNote that if a string column is being compared with a numeric value, MariaDB will not use the index on the column, as there are numerous alternatives that may evaluate as equal (see examples below).\n\nComparison Examples\n\nConverting a string to a number:\n\n``sql\nSELECT 15+''15'';\n+---------+\n| 15+''15'' |\n+---------+\n|      30 |\n+---------+\n`\n\nConverting a number to a string:\n\n`sql\nSELECT CONCAT(15,''15'');\n+-----------------+\n| CONCAT(15,''15'') |\n+-----------------+\n| 1515            |\n+-----------------+\n`\n\nFloating point number errors:\n\n`sql\nSELECT ''9746718491924563214'' = 9746718491924563213;\n+---------------------------------------------+\n| ''9746718491924563214'' = 9746718491924563213 |\n+---------------------------------------------+\n|                                           1 |\n+---------------------------------------------+\n`\n\nNumeric equivalence with strings:\n\n`sql\nSELECT ''5'' = 5;\n+---------+\n| ''5'' = 5 |\n+---------+\n|       1 |\n+---------+\n\nSELECT ''   5'' = 5;\n+------------+\n| ''   5'' = 5 |\n+------------+\n|          1 |\n+------------+\n\nSELECT ''   5  '' = 5;\n+--------------+\n| ''   5  '' = 5 |\n+--------------+\n|            1 |\n+--------------+\n1 row in set, 1 warning (0.000 sec)\n\nSHOW WARNINGS;\n+-------+------+--------------------------------------------+\n| Level | Code | Message                                    |\n+-------+------+--------------------------------------------+\n| Note  | 1292 | Truncated incorrect DOUBLE value: ''   5  '' |\n+-------+------+--------------------------------------------+\n`\n\nAs a result of the above, MariaDB cannot use the index when comparing a string with a numeric value in the example below:\n\n`sql\nCREATE TABLE t (a VARCHAR(10), b VARCHAR(10), INDEX idx_a (a));\n\nINSERT INTO t VALUES \n  (''1'', ''1''), (''2'', ''2''), (''3'', ''3''), \n  (''4'', ''4''), (''5'', ''5''), (''1'', ''5'');\n\nEXPLAIN SELECT  FROM t WHERE a = ''3'' \\G\n************************ 1. row ***********************\n           id: 1\n  select_type: SIMPLE\n        table: t\n         type: ref\npossible_keys: idx_a\n          key: idx_a\n      key_len: 13\n          ref: const\n         rows: 1\n        Extra: Using index condition\n\nEXPLAIN SELECT  FROM t WHERE a = 3 \\G\n************************ 1. row ***********************\n           id: 1\n  select_type: SIMPLE\n        table: t\n         type: ALL\npossible_keys: idx_a\n          key: NULL\n      key_len: NULL\n          ref: NULL\n         rows: 6\n        Extra: Using where\n`\n\nRules for Conversion on Dyadic Arithmetic Operations\n\nImplicit type conversion also takes place on dyadic arithmetic operations (+,-,\\,/). MariaDB chooses the minimum data type that is guaranteed to fit the result and converts both arguments to the result data type.\n\nFor addition (+), subtraction (-) and multiplication (\\), the result data type is chosen as follows:\n\n If either of the arguments is an approximate number (float, double), the result is double.\n If either of the arguments is a string (char, varchar, text), the result is double.\n If either of the arguments is a decimal number, the result is decimal.\n If either of the arguments is of a temporal type with a non-zero fractional second precision (time(N), datetime(N), timestamp(N)), the result is decimal.\n If either of the arguments is of a temporal type with a zero fractional second precision (time(0), date, datetime(0), timestamp(0)), the result may vary between int, int unsigned, bigint or bigint unsigned, depending on the exact data type combination.\n If both arguments are integer numbers (tinyint, smallint, mediumint, bigint), the result may vary between int, int unsigned, bigint or bigint unsigned, depending of the exact data types and their signs.\n\nFor division (/), the result data type is chosen as follows:\n\n If either of the arguments is an approximate number (float, double), the result is double.\n If either of the arguments is a string (char, varchar, text), the result is double.\n Otherwise, the result is decimal.\n\nArithmetic Examples\n\nNote, the above rules mean that when an argument of a temporal data type appears in addition or subtraction, it''s treated as a number by default.\n\n`sql\nSELECT TIME''10:20:30'' + 1;\n+--------------------+\n| TIME''10:20:30'' + 1 |\n+--------------------+\n|             102031 |\n+--------------------+\n`\n\nIn order to do temporal addition or subtraction instead, use the DATE_ADD() or DATE_SUB() functions, or an INTERVAL expression as the second argument:\n\n`sql\nSELECT TIME''10:20:30'' + INTERVAL 1 SECOND;\n+------------------------------------+\n| TIME''10:20:30'' + INTERVAL 1 SECOND |\n+------------------------------------+\n| 10:20:31                           |\n+------------------------------------+\n`\n\n`sql\nSELECT "2.2" + 3;\n+-----------+\n| "2.2" + 3 |\n+-----------+\n|       5.2 |\n+-----------+\n\nSELECT 2.2 + 3;\n+---------+\n| 2.2 + 3 |\n+---------+\n| 5.2     |\n+---------+\n\nSELECT 2.2 / 3;\n+---------+\n| 2.2 / 3 |\n+---------+\n| 0.73333 |\n+---------+\n\nSELECT "2.2" / 3;\n+--------------------+\n| "2.2" / 3          |\n+--------------------+\n| 0.7333333333333334 |\n+--------------------+\n``\n\nURL: https://mariadb.com/docs/server/reference/sql-functions/string-functions/type-conversion', '', 'https://mariadb.com/docs/server/reference/sql-functions/string-functions/type-conversion');
INSERT INTO help_topic (help_topic_id, help_category_id, name, description, example, url) VALUES (480, 37, 'UCASE', 'Syntax\n------\n\nUCASE(str)\n\nDescription\n-----------\n\nUCASE() is a synonym for UPPER().\n\nURL: https://mariadb.com/docs/server/reference/sql-functions/string-functions/ucase', '', 'https://mariadb.com/docs/server/reference/sql-functions/string-functions/ucase');
INSERT INTO help_topic (help_topic_id, help_category_id, name, description, example, url) VALUES (481, 37, 'UNHEX', 'Syntax\n------\n\nUNHEX(str)\n\nDescription\n-----------\n\nPerforms 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\\\ncharacters are returned as a binary string.\n\nIf str is NULL, UNHEX() returns NULL.\n\nExamples\n--------\n\nSELECT HEX(''MariaDB'');\n+----------------+\n| HEX(''MariaDB'') |\n+----------------+\n| 4D617269614442 |\n+----------------+\n\nSELECT UNHEX(''4D617269614442'');\n+-------------------------+\n| UNHEX(''4D617269614442'') |\n+-------------------------+\n| MariaDB                 |\n+-------------------------+\n\nSELECT 0x4D617269614442;\n+------------------+\n| 0x4D617269614442 |\n+------------------+\n| MariaDB          |\n+------------------+\n\nSELECT UNHEX(HEX(''string''));\n+----------------------+\n| UNHEX(HEX(''string'')) |\n+----------------------+\n| string               |\n+----------------------+\n\nSELECT HEX(UNHEX(''1267''));\n+--------------------+\n| HEX(UNHEX(''1267'')) |\n+--------------------+\n| 1267               |\n+--------------------+\n\nURL: https://mariadb.com/docs/server/reference/sql-functions/string-functions/unhex', '', 'https://mariadb.com/docs/server/reference/sql-functions/string-functions/unhex');
INSERT INTO help_topic (help_topic_id, help_category_id, name, description, example, url) VALUES (482, 37, 'UPDATEXML', 'Syntax\n------\n\nUpdateXML(xml_target, xpath_expr, new_xml)\n\nDescription\n-----------\n\nThis function replaces a single portion of a given fragment of XML markupxml_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.\n\nExamples\n--------\n\nSELECT\n    UpdateXML(''<a><b>ccc</b><d></d></a>'', ''/a'', ''<e>fff</e>'') AS val1,\n    UpdateXML(''<a><b>ccc</b><d></d></a>'', ''/b'', ''<e>fff</e>'') AS val2,\n    UpdateXML(''<a><b>ccc</b><d></d></a>'', ''//b'', ''<e>fff</e>'') AS val3,\n    UpdateXML(''<a><b>ccc</b><d></d></a>'', ''/a/d'', ''<e>fff</e>'') AS val4,\n    UpdateXML(''<a><d></d><b>ccc</b><d></d></a>'', ''/a/d'', ''<e>fff</e>'') AS val5\n    \\G\n************************ 1. row ************************\nval1: <e>fff</e>\nval2: <a><b>ccc</b><d></d></a>\nval3: <a><e>fff</e><d></d></a>\nval4: <a><b>ccc</b><e>fff</e></a>\nval5: <a><d></d><b>ccc</b><d></d></a>\n1 row in set (0.00 sec)\n\nURL: https://mariadb.com/docs/server/reference/sql-functions/string-functions/updatexml', '', 'https://mariadb.com/docs/server/reference/sql-functions/string-functions/updatexml');
INSERT INTO help_topic (help_topic_id, help_category_id, name, description, example, url) VALUES (483, 37, 'UPPER', 'Syntax\n------\n\nUPPER(str)\nUCASE(str)\n\nDescription\n-----------\n\nReturns the string str with all characters changed to uppercase according to the current character set mapping. The default is latin1 (cp1252 West European).\nThe result may depend on the collation and character set used.\nUCASE is a synonym.\n\n``sql\nSELECT UPPER(surname), givenname FROM users ORDER BY surname;\n+----------------+------------+\n| UPPER(surname) | givenname  |\n+----------------+------------+\n| ABEL           | Jacinto    |\n| CASTRO         | Robert     |\n| COSTA          | Phestos    |\n| MOSCHELLA      | Hippolytos |\n+----------------+------------+\n`\n\nUPPER()` is ineffective when applied to binary strings (BINARY, VARBINARY, BLOB). The description of LOWER() shows how to perform lettercase conversion of binary strings.\n\nURL: https://mariadb.com/docs/server/reference/sql-functions/string-functions/upper', '', 'https://mariadb.com/docs/server/reference/sql-functions/string-functions/upper');
INSERT INTO help_topic (help_topic_id, help_category_id, name, description, example, url) VALUES (484, 37, 'WEIGHT\\_STRING', 'Syntax\n------\n\nWEIGHT_STRING(str [AS {CHAR|BINARY}(N)] [LEVEL levels] [flags])\n  levels: N [ASC|DESC|REVERSE] [, N [ASC|DESC|REVERSE]] ...\n\nDescription\n-----------\n\nReturns a binary string representing the string''s sorting and comparison value. A string with a lower result means that for sorting purposes the string appears before a string with a higher result.\n\nWEIGHT_STRING() is particularly useful when adding new collations, for testing purposes.\n\nIf str is a non-binary string (CHAR, VARCHAR or TEXT), WEIGHT_STRING returns the string''s collation weight. If str is a binary string (BINARY, VARBINARY or BLOB), the return value is simply the input value, since the weight for each byte in a binary string is the byte value.\n\nWEIGHT_STRING() returns NULL if given a NULL input.\n\nThe optional AS clause permits casting the input string to a binary or non-binary string, as well as to a particular length.\n\nAS BINARY(N) measures the length in bytes rather than characters, and right pads with 0x00 bytes to the desired length.\n\nAS CHAR(N) measures the length in characters, and right pads with spaces to the desired length.\n\nN has a minimum value of 1, and if it is less than the length of the input string, the string is truncated without warning.\n\nThe optional LEVEL clause specifies that the return value should contain weights for specific collation levels. The levels specifier can either be a single integer, a comma-separated list of integers, or a range of integers separated by a dash (whitespace is ignored). Integers can range from 1 to a maximum of 6, dependent on the collation, and need to be listed in ascending order.\n\nIf the LEVEL clause is no provided, a default of 1 to the maximum for the collation is assumed.\n\nIf the q is specified without using a range, an optional modifier is permitted.\n\nASC, the default, returns the weights without any modification.\n\nDESC returns bitwise-inverted weights.\n\nREVERSE returns the weights in reverse order.\n\nExamples\n--------\n\nSELECT HEX(WEIGHT_STRING(''x''));\n+-------------------------+\n| HEX(WEIGHT_STRING(''x'')) |\n+-------------------------+\n| 0058                    |\n+-------------------------+\n\nSELECT HEX(WEIGHT_STRING(''x'' AS BINARY(4)));\n+--------------------------------------+\n| HEX(WEIGHT_STRING(''x'' AS BINARY(4))) |\n+--------------------------------------+\n| 78000000                             |\n+--------------------------------------+\n\nSELECT HEX(WEIGHT_STRING(''x'' AS CHAR(4)));\n+------------------------------------+\n| HEX(WEIGHT_STRING(''x'' AS CHAR(4))) |\n+------------------------------------+\n| 0058002000200020                   |\n+------------------------------------+\n\nSELECT HEX(WEIGHT_STRING(0xaa22ee LEVEL 1));\n+--------------------------------------+\n| HEX(WEIGHT_STRING(0xaa22ee LEVEL 1)) |\n+--------------------------------------+\n| AA22EE                               |\n+--------------------------------------+\n\nSELECT HEX(WEIGHT_STRING(0xaa22ee LEVEL 1 DESC));\n+-------------------------------------------+\n| HEX(WEIGHT_STRING(0xaa22ee LEVEL 1 DESC)) |\n+-------------------------------------------+\n| 55DD11                                    |\n+-------------------------------------------+\n\nSELECT HEX(WEIGHT_STRING(0xaa22ee LEVEL 1 REVERSE));\n+----------------------------------------------+\n| HEX(WEIGHT_STRING(0xaa22ee LEVEL 1 REVERSE)) |\n+----------------------------------------------+\n| EE22AA                                       |\n+----------------------------------------------+\n\nURL: https://mariadb.com/docs/server/reference/sql-functions/string-functions/weight_string', '', 'https://mariadb.com/docs/server/reference/sql-functions/string-functions/weight_string');
INSERT INTO help_topic (help_topic_id, help_category_id, name, description, example, url) VALUES (485, 35, 'VEC\\_DISTANCE\\_COSINE', 'Syntax\n------\n\nVEC_DISTANCE_COSINE(v, s)\n\nDescription\n-----------\n\nVEC_Distance_Cosine is an SQL function that calculates the Cosine distance between two (not necessarily normalized) vectors.\n\nVectors must be of the same length. A distance between two vectors of different lengths is not defined, and VEC_Distance_Cosine will return NULL in such cases.\n\nIf the vector index was not built for the cosine function (see CREATE TABLE with Vectors), the index is not used — a full table scan is performed instead. The VEC_DISTANCE function is a generic function that behaves either as VEC_DISTANCE_EUCLIDEAN or VEC_DISTANCE_COSINE, depending on the underlying index type.\n\nExamples\n--------\n\nSELECT VEC_DISTANCE_COSINE(vec_fromtext(''[1,2,3]''), vec_fromtext(''[3,5,7]''));\n+-----------------------------------------------------------------------+\n| VEC_DISTANCE_COSINE(vec_fromtext(''[1,2,3]''), vec_fromtext(''[3,5,7]'')) |\n+-----------------------------------------------------------------------+\n|                                                   0.00258509695694209 |\n+-----------------------------------------------------------------------+\n\nURL: https://mariadb.com/docs/server/reference/sql-functions/vector-functions/vec_distance_cosine', '', 'https://mariadb.com/docs/server/reference/sql-functions/vector-functions/vec_distance_cosine');
INSERT INTO help_topic (help_topic_id, help_category_id, name, description, example, url) VALUES (486, 35, 'VEC\\_DISTANCE\\_EUCLIDEAN', 'Syntax\n------\n\nVEC_DISTANCE_EUCLIDEAN(v, s)\n\nDescription\n-----------\n\nVEC_Distance_Euclidean is an SQL function that calculates a Euclidean (L2) distance between two points.\n\nVectors must be of the same length, a distance between two vectors of different lengths is not defined and VEC_Distance_Euclidean returns NULL in such cases.\n\nIf the vector index was not built for the euclidean function (see CREATE TABLE with Vectors), the index is not used, and a full table scan performed instead. The VEC_DISTANCE function is a generic function that behaves either as VEC_DISTANCE_EUCLIDEAN or VEC_DISTANCE_COSINE, depending on the underlying index type.\n\nExamples\n--------\n\nINSERT INTO v VALUES \n     (1, x''e360d63ebe554f3fcdbc523f4522193f5236083d''),\n     (2, x''f511303f72224a3fdd05fe3eb22a133ffae86a3f''),\n     (3,x''f09baa3ea172763f123def3e0c7fe53e288bf33e''),\n     (4,x''b97a523f2a193e3eb4f62e3f2d23583e9dd60d3f''),\n     (5,x''f7c5df3e984b2b3e65e59d3d7376db3eac63773e''),\n     (6,x''de01453ffa486d3f10aa4d3fdd66813c71cb163f''),\n     (7,x''76edfc3e4b57243f10f8423fb158713f020bda3e''),\n     (8,x''56926c3fdf098d3e2c8c5e3d1ad4953daa9d0b3e''),\n     (9,x''7b713f3e5258323f80d1113d673b2b3f66e3583f''),\n     (10,x''6ca1d43e9df91b3fe580da3e1c247d3f147cf33e'');\n\nSELECT id FROM v \n  ORDER BY VEC_Distance_Euclidean(v, x''6ca1d43e9df91b3fe580da3e1c247d3f147cf33e'');\n+----+\n| id |\n+----+\n| 10 |\n|  7 |\n|  3 |\n|  9 |\n|  2 |\n|  1 |\n|  5 |\n|  4 |\n|  6 |\n|  8 |\n+----+\n\nURL: https://mariadb.com/docs/server/reference/sql-functions/vector-functions/vec_distance_euclidean', '', 'https://mariadb.com/docs/server/reference/sql-functions/vector-functions/vec_distance_euclidean');
INSERT INTO help_topic (help_topic_id, help_category_id, name, description, example, url) VALUES (487, 35, 'VEC\\_FromText', 'Syntax\n------\n\nVEC_FromText(s)\n\nDescription\n-----------\n\nVEC_FromText converts a text representation of the vector (json array of numbers) to a vector (little-endian IEEE float sequence of bytes, 4 bytes per float).\n\nExamples\n--------\n\nSELECT HEX(vec_fromtext(''[1,2,3]'')); \n+------------------------------+\n| HEX(vec_fromtext(''[1,2,3]'')) |\n+------------------------------+\n| 0000803F0000004000004040     |\n+------------------------------+\n\nURL: https://mariadb.com/docs/server/reference/sql-functions/vector-functions/vec_fromtext', '', 'https://mariadb.com/docs/server/reference/sql-functions/vector-functions/vec_fromtext');
INSERT INTO help_topic (help_topic_id, help_category_id, name, description, example, url) VALUES (488, 35, 'VEC\\_ToText', 'Syntax\n------\n\nVEC_ToText(v)\n\nDescription\n-----------\n\nVEC_ToText converts a binary vector into a json array of numbers (floats). Returns NULL and throws a warning Error 4201 if given an invalid vector.\n\nExamples\n--------\n\nSELECT VEC_ToText(x''e360d63ebe554f3fcdbc523f4522193f5236083d'');\n+---------------------------------------------------------+\n| VEC_ToText(x''e360d63ebe554f3fcdbc523f4522193f5236083d'') |\n+---------------------------------------------------------+\n| [0.418708,0.809902,0.823193,0.598179,0.033255]          |\n+---------------------------------------------------------+\n\nURL: https://mariadb.com/docs/server/reference/sql-functions/vector-functions/vec_totext', '', 'https://mariadb.com/docs/server/reference/sql-functions/vector-functions/vec_totext');
INSERT INTO help_topic (help_topic_id, help_category_id, name, description, example, url) VALUES (489, 35, 'VEC\\_DISTANCE', 'Syntax\n------\n\nVEC_DISTANCE(v, s)\n\nDescription\n-----------\n\nVEC_DISTANCE is a generic function that behaves either as VEC_DISTANCE_EUCLIDEAN, calculating the Euclidean (L2) distance between two points. Or VEC_DISTANCE_COSINE, calculating the Cosine distance between two vectors, depending on the underlying index type.\n\nIf the underlying index cannot be determined, an error 4206 is returned:\n\n``sql\nERROR 4206 (HY000): Cannot determine distance type for VEC_DISTANCE, index is not found\n``\n\nExamples\n--------\n\nINSERT INTO v VALUES \n     (1, x''e360d63ebe554f3fcdbc523f4522193f5236083d''),\n     (2, x''f511303f72224a3fdd05fe3eb22a133ffae86a3f''),\n     (3,x''f09baa3ea172763f123def3e0c7fe53e288bf33e''),\n     (4,x''b97a523f2a193e3eb4f62e3f2d23583e9dd60d3f''),\n     (5,x''f7c5df3e984b2b3e65e59d3d7376db3eac63773e''),\n     (6,x''de01453ffa486d3f10aa4d3fdd66813c71cb163f''),\n     (7,x''76edfc3e4b57243f10f8423fb158713f020bda3e''),\n     (8,x''56926c3fdf098d3e2c8c5e3d1ad4953daa9d0b3e''),\n     (9,x''7b713f3e5258323f80d1113d673b2b3f66e3583f''),\n     (10,x''6ca1d43e9df91b3fe580da3e1c247d3f147cf33e'');\n\nSELECT id FROM v \n  ORDER BY VEC_DISTANCE(v, x''6ca1d43e9df91b3fe580da3e1c247d3f147cf33e'');\n+----+\n| id |\n+----+\n| 10 |\n|  7 |\n|  3 |\n|  9 |\n|  2 |\n|  1 |\n|  5 |\n|  4 |\n|  6 |\n|  8 |\n+----+\n\nURL: https://mariadb.com/docs/server/reference/sql-functions/vector-functions/vector-functions-vec_distance', '', 'https://mariadb.com/docs/server/reference/sql-functions/vector-functions/vector-functions-vec_distance');
INSERT INTO help_topic (help_topic_id, help_category_id, name, description, example, url) VALUES (490, 35, 'SQL Statements', 'Description\n-----------\n\ndata-definition\n\ndata-manipulation\n\naccount-management-sql-statements\n\nadministrative-sql-statements\n\nsql-functions\n\nprepared-statements\n\nprogrammatic-compound-statements\n\nstored-routines\n\ntable-statements\n\ntransactions\n\ncomment-syntax.md\n\nhelp-command.md\n\nURL: https://mariadb.com/docs/server/reference/sql-statements/README', '', 'https://mariadb.com/docs/server/reference/sql-statements/README');








INSERT INTO help_topic (help_topic_id, help_category_id, name, description, example, url) VALUES (499, 10, 'SET DEFAULT ROLE', 'Description\n-----------\n\nThe SET DEFAULT ROLE statement sets a default role for a specified (or current) user. A default role is automatically enabled when a user connects (an implicit SET ROLE statement is executed immediately after a connection is established).\n\nTo be able to set a role as a default, the role must already have been granted to that user, and one needs the privileges to enable this role (if you cannot do SET ROLE X, you won''t be able to do SET DEFAULT ROLE X). To set a default role for another user one needs to have write access to the mysql database.\n\nTo remove a user''s default role, use SET DEFAULT ROLE NONE [ FOR user@host ]. The record of the default role is not removed if the role is dropped or revoked, so if the role is subsequently re-created or granted, it will again be the user''s default role.\n\nThe default role is stored in the default_role column in the mysql.user table/view, as well as in the Information Schema APPLICABLE_ROLES table, so these can be viewed to see which role has been assigned to a user as the default.\n\nExamples\n--------\n\nSET DEFAULT ROLE journalist;\n\nURL: https://mariadb.com/docs/server/reference/sql-statements/account-management-sql-statements/set-default-role', '', 'https://mariadb.com/docs/server/reference/sql-statements/account-management-sql-statements/set-default-role');

INSERT INTO help_topic (help_topic_id, help_category_id, name, description, example, url) VALUES (501, 10, 'SET ROLE', 'Description\n-----------\n\nOnly one role can be current at a time. Executing SET ROLE replaces the current role; it does not add to a list of current roles. This is SQL Standard compliant behavior which differs from MySQL, where you may have several current roles at a time.\n\nThe SET ROLE statement switches the current role for the session, enabling its associated permissions. To have no current role, set NONE.\n\nIf a role that doesn''t exist, or to which the user has not been assigned, is specified, an ERROR 1959 (OP000): Invalid role specification error occurs.\n\nAn automatic SET ROLE is implicitly performed when a user connects if that user has been assigned a default role. See SET DEFAULT ROLE.\n\nExamples\n--------\n\n--Checking the current role status\nSELECT CURRENT_ROLE;\n\nURL: https://mariadb.com/docs/server/reference/sql-statements/account-management-sql-statements/set-role', '', 'https://mariadb.com/docs/server/reference/sql-statements/account-management-sql-statements/set-role');
INSERT INTO help_topic (help_topic_id, help_category_id, name, description, example, url) VALUES (502, 26, 'ANALYZE FORMAT=JSON', 'Description\n-----------\n\nANALYZE FORMAT=JSON is a mix of the EXPLAIN FORMAT=JSON and ANALYZE statement features. The ANALYZE FORMAT=JSON $statement will execute $statement, and then print the output of EXPLAIN FORMAT=JSON, amended with data from the query execution.\n\nBasic Execution Data\n\nYou can get the following also from tabular ANALYZE statement form:\n\n r_rows is provided for any node that reads rows. It shows how many rows were read, on average.\n r_filtered is provided whenever there is a condition that is checked. It shows the percentage of rows left after checking the condition.\n\nAdvanced Execution Data\n\nThe most important data not available in the regular tabular ANALYZE statement are:\n\n r_loops field. This shows how many times the node was executed. Most query plan elements have this field.\n r_total_time_ms field. It shows how much time in total, in milliseconds, was spent executing this node. If the node has subnodes, their execution time is included.\n   For UPDATE and DELETE statements, top-level query_block.r_total_time_ms does include the time to make row deletions/updates but does NOT include the time to commit the changes.\n r_buffer_size field. Query plan nodes that make use of buffers report the size of buffer that was used.\n\nInnoDB engine statistics\n\nStarting from MariaDB 10.6.15, MariaDB 10.8.8, MariaDB 10.9.8, MariaDB 10.10.6, MariaDB 10.11.5, MariaDB 11.0.3, MariaDB 11.1.2 and MariaDB 11.2.1 (MDEV-31577), the following statistics are reported for InnoDB tables:\n\n``json\n"r_engine_stats": {\n        "pages_accessed":  integer,\n        "pages_updated": integer,\n        "pages_read_count": integer,\n        "pages_prefetch_read_count": integer,\n        "pages_read_time_ms": double,\n        "old_rows_read": integer\n      }\n`\n\nOnly non-zero members are printed.\n\n pages_accessed is the total number of buffer pool pages accessed when reading this table.\n pages_updated is the total number of buffer pool pages that were modified during the execution of the statement.\n pages_read_count is the number of pages that InnoDB had to read from disk for this table. If the query touches "hot" data in the InnoDB buffer pool, this value will be 0 and not present.\n pages_prefetch_read_count Number of pages for which read-ahead was initiated. Not all such pages will necessarily be accessed.\n pages_read_time_ms is the total time spent reading the table.\n old_rows_read is the number of old row versions that InnoDB had to read. Old row version is the version of the row that is not visible to this transaction.\n\nSHOW ANALYZE FORMAT=JSON\n\nMariaDB starting with 10.9\n\nSHOW ANALYZE FORMAT=JSON for <connection_id>\\\nextends ANALYZE [FORMAT=JSON] <select> to allow one to analyze a query currently running in another connection.\n\nData About Individual Query Plan Nodes\n\n filesort node reports whether sorting was done with LIMIT n parameter, and how many rows were in the sort result.\n block-nl-join node has r_loops field, which allows to tell whether Using join buffer was efficient.\n range-checked-for-each-record reports counters that show the result of the check.\n expression-cache is used for subqueries, and it reports how many times the cache was used, and what cache hit ratio was.\n* union_result node has r_rows` so one can see how many rows were produced after UNION operation and so forth.\n\nUse Cases\n\nSee Examples of ANALYZE FORMAT=JSON.\n\nURL: https://mariadb.com/docs/server/reference/sql-statements/administrative-sql-statements/analyze-and-explain-statements/analyze-format-json', '', 'https://mariadb.com/docs/server/reference/sql-statements/administrative-sql-statements/analyze-and-explain-statements/analyze-format-json');
INSERT INTO help_topic (help_topic_id, help_category_id, name, description, example, url) VALUES (503, 26, 'ANALYZE FORMAT=JSON Examples', 'Examples\n--------\n\nANALYZE FORMAT=JSON\nSELECT COUNT()\nFROM customer\nWHERE\n  (SELECT SUM(o_totalprice) FROM orders WHERE o_custkey=c_custkey) > 10001000;\n\nURL: https://mariadb.com/docs/server/reference/sql-statements/administrative-sql-statements/analyze-and-explain-statements/analyze-formatjson-examples', '', 'https://mariadb.com/docs/server/reference/sql-statements/administrative-sql-statements/analyze-and-explain-statements/analyze-formatjson-examples');
INSERT INTO help_topic (help_topic_id, help_category_id, name, description, example, url) VALUES (504, 26, 'ANALYZE: Interpreting rows and filtered members', 'Description\n-----------\n\nThis article describes how to interpret r_rows and r_filtered members in ANALYZE FORMAT=JSON when an index-based access method is used.\n\nIndex-based access method\n\nIndex-based access method may employ some or all of the following:\n\n Index Condition Pushdown\n Rowid Filtering\n attached_condition checking\n\nConsider a table access which does all three:\n\n``json\n"table": {\n    "table_name": "t1",\n    "access_type": "range",\n    "possible_keys": ...,\n    "key": "INDEX1",\n    ...\n    "rowid_filter": {\n      ...\n      "r_selectivity_pct": n.nnn,\n    },\n    ...\n    "rows": 123,\n    "r_rows": 125,\n    ...\n    "filtered": 8.476269722,\n    "r_filtered": 100,\n    "index_condition": "cond1",\n    "attached_condition": "cond2"\n  }\n`\n\nThe access is performed as follows:\n\nAccess diagram\n\n!index-read-diagram-3\n\nStatistics values in MariaDB before 11.5\n\nIn MariaDB versions before 11.5, the counters were counted as follows:\n\n!index-read-stats-old\n\nthat is,\n\n r_rows is counted after Index Condition Pushdown check and Rowid Filter check.\n r_filtered only counts selectivity of the attached_condition.\n selectivity of the Rowid Filter is in rowid_filter.r_selectivity_pct.\n\nStatistics values in MariaDB 11.5 and later versions\n\nStarting from MariaDB 11.5 (MDEV-18478), the row counters are:\n\n r_index_rows counts the number of enumerated index tuples, before any checks are made\n r_rows is the same as before - number of rows after index checks.\n\nThe selectivity counters are:\n\n r_icp_filtered is the percentage of records left after pushed index condition check.\n rowid_filter.r_selectivity_pct shows selectivity of Rowid Filter, as before.\n r_filtered is the selectivity of attached_condition check, as before.\n r_total_filtered is the combined selectivity of all checks.\n\n!index-read-stats-new\n\nANALYZE output members\n\nin ANALYZE FORMAT=JSON output these members are placed as follows:\n\n`json\n"table": {\n    "table_name": ...,\n\n    "rows": 426,\n    "r_index_rows": 349,\n    "r_rows": 34,\n`\n\nWhenever applicable, r_index_rows is shown. It is comparable with rows - both are numbers of rows to enumerate before any filtering is done.\\\nIf r_index_rows is not shown, r_rows shows the number of records enumerated.\n\nThen, filtering members:\n\n`json\n...\n    "filtered": 8.476269722,\n    "r_total_filtered": 9.742120344,\n`\n\nfiltered is comparable with r_total_filtered: both show total amount of filtering.\n\n`json\n...\n    "index_condition": "lineitem.l_quantity > 47",\n    "r_icp_filtered": 100,\n`\n\nICP and its observed filtering. The optimizer doesn''t compute an estimate for this currently.\n\n`json\n...\n    "attached_condition": "lineitem.l_shipDATE between ''1997-01-01'' and ''1997-06-30''",\n    "r_filtered": 100\n`\n\nattached_condition` and its observed filtering.\n\nURL: https://mariadb.com/docs/server/reference/sql-statements/administrative-sql-statements/analyze-and-explain-statements/analyze-interpreting-rows-and-filtered-members', '', 'https://mariadb.com/docs/server/reference/sql-statements/administrative-sql-statements/analyze-and-explain-statements/analyze-interpreting-rows-and-filtered-members');
INSERT INTO help_topic (help_topic_id, help_category_id, name, description, example, url) VALUES (505, 26, 'ANALYZE Statement', 'Description\n-----------\n\nThe ANALYZE statement is similar to the EXPLAIN statement. ANALYZE statement will invoke the optimizer, execute the statement, and then produce EXPLAIN output instead of the result set. The EXPLAIN output will be annotated with statistics from statement execution.\n\nThis lets one check how close the optimizer''s estimates about the query plan are to the reality. ANALYZE produces an overview, while the ANALYZE FORMAT=JSON command provides a more detailed view of the query plan and the query execution.\n\nThe syntax is\n\n``sql\nANALYZE explainable_statement;\n`\n\nwhere the statement is any statement for which one can run EXPLAIN.\n\nCommand Output\n\nConsider an example:\n\n`sql\nANALYZE SELECT  FROM tbl1 \nWHERE key1 \n  BETWEEN 10 AND 200 AND \n  col1 LIKE ''foo%''\\G\n`\n\n`\n*********************** 1. row ***********************\n           id: 1\n  select_type: SIMPLE\n        table: tbl1\n         type: range\npossible_keys: key1\n          key: key1\n      key_len: 5\n          ref: NULL\n         rows: 181\n       r_rows: 181\n     filtered: 100.00\n   r_filtered: 10.50\n        Extra: Using index condition; Using where\n`\n\nCompared to EXPLAIN, ANALYZE produces two extra columns:\n\n r_rows is an observation-based counterpart of the rows column. It shows how many rows were actually read from the table.\n r_filtered is an observation-based counterpart of the filtered column. It shows which fraction of rows was left after applying the WHERE condition.\n\n> These r_rows and r_filtered columns are also included in the EXPLAIN output written to the slow query log in MariaDB 10.1.0 and later. This explains why, even though they are not displayed by a standard EXPLAIN statement, some columns may appear in slow query log data.\n\nInterpreting the Output\n\nJoins\n\nLet''s consider a more complicated example.\n\n`sql\nANALYZE SELECT \nFROM orders, customer \nWHERE\n  customer.c_custkey=orders.o_custkey AND\n  customer.c_acctbal < 0 AND\n  orders.o_totalprice > 2001000\n`\n\n`\n+----+-------------+----------+------+---------------+-------------+---------+--------------------+--------+--------+----------+------------+-------------+\n| id | select_type | table    | type | possible_keys | key         | key_len | ref                | rows   | r_rows | filtered | r_filtered | Extra       |\n+----+-------------+----------+------+---------------+-------------+---------+--------------------+--------+--------+----------+------------+-------------+\n|  1 | SIMPLE      | customer | ALL  | PRIMARY,...   | NULL        | NULL    | NULL               | 149095 | 150000 |    18.08 |       9.13 | Using where |\n|  1 | SIMPLE      | orders   | ref  | i_o_custkey   | i_o_custkey | 5       | customer.c_custkey |      7 |     10 |   100.00 |      30.03 | Using where |\n+----+-------------+----------+------+---------------+-------------+---------+--------------------+--------+--------+----------+------------+-------------+\n`\n\nHere, one can see that\n\n For table customer, customer.rows=149095, customer.r_rows=150000. The estimate for number of rows we will read was fairly precise\n customer.filtered=18.08, customer.r_filtered=9.13. The optimizer somewhat overestimated the number of records that will match selectivity of condition attached to customer table (in general, when you have a full scan and r_filtered is less than 15%, it''s time to consider adding an appropriate index).\n For table orders, orders.rows=7, orders.r_rows=10. This means that on average, there are 7 orders for a given c_custkey, but in our case there were 10, which is close to the expectation (when this number is consistently far from the expectation, it may be time to run ANALYZE TABLE, or even edit the table statistics manually to get better query plans).\n orders.filtered=100, orders.r_filtered=30.03. The optimizer didn''t have any way to estimate which fraction of records will be left after it checks the condition that is attached to table orders (it''s orders.o_totalprice > 200\\1000). So, it used 100%. In reality, it is 30%. 30% is typically not selective enough to warrant adding new indexes. For joins with many tables, it might be worth to collect and use column statistics for columns in question, this may help the optimizer to pick a better query plan.\n\nMeaning of NULL in r_rows and r_filtered\n\nLet''s modify the previous example slightly\n\n`sql\nANALYZE SELECT  \nFROM orders, customer \nWHERE\n  customer.c_custkey=orders.o_custkey AND\n  customer.c_acctbal < -0 AND \n  customer.c_comment LIKE ''%foo%'' AND\n  orders.o_totalprice > 2001000;\n`\n\n`\n+----+-------------+----------+------+---------------+-------------+---------+--------------------+--------+--------+----------+------------+-------------+\n| id | select_type | table    | type | possible_keys | key         | key_len | ref                | rows   | r_rows | filtered | r_filtered | Extra       |\n+----+-------------+----------+------+---------------+-------------+---------+--------------------+--------+--------+----------+------------+-------------+\n|  1 | SIMPLE      | customer | ALL  | PRIMARY,...   | NULL        | NULL    | NULL               | 149095 | 150000 |    18.08 |       0.00 | Using where |\n|  1 | SIMPLE      | orders   | ref  | i_o_custkey   | i_o_custkey | 5       | customer.c_custkey |      7 |   NULL |   100.00 |       NULL | Using where |\n+----+-------------+----------+------+---------------+-------------+---------+--------------------+--------+--------+----------+------------+-------------+\n`\n\nThe output of orders.r_rows=NULL and orders.r_filtered=NULL shows that the table orders was never scanned. Indeed, we can also see customer.r_filtered=0.00. This shows that a part of WHERE attached to table customer was never satisfied (or, satisfied in less than 0.01% of cases).\n\nANALYZE FORMAT=JSON\n\nANALYZE FORMAT=JSON produces JSON output. It produces much more information than tabular ANALYZE.\n\nNotes\n\n ANALYZE UPDATE or ANALYZE DELETE will actually make updates/deletes (ANALYZE SELECT will perform the select operation and then discard the resultset).\n PostgreSQL has a similar command, EXPLAIN ANALYZE.\n* The EXPLAIN in the slow query log feature allows MariaDB to have ANALYZE` output of slow queries printed into the slow query log (see MDEV-6388).\n\nURL: https://mariadb.com/docs/server/reference/sql-statements/administrative-sql-statements/analyze-and-explain-statements/analyze-statement', '', 'https://mariadb.com/docs/server/reference/sql-statements/administrative-sql-statements/analyze-and-explain-statements/analyze-statement');
INSERT INTO help_topic (help_topic_id, help_category_id, name, description, example, url) VALUES (506, 26, 'EXPLAIN ANALYZE', 'Description\n-----------\n\nOutdated syntax\n\nThe syntax for the EXPLAIN ANALYZE feature was changed to ANALYZE statement, available since MariaDB 10.1.0. See ANALYZE statement.\n\nURL: https://mariadb.com/docs/server/reference/sql-statements/administrative-sql-statements/analyze-and-explain-statements/explain-analyze', '', 'https://mariadb.com/docs/server/reference/sql-statements/administrative-sql-statements/analyze-and-explain-statements/explain-analyze');
INSERT INTO help_topic (help_topic_id, help_category_id, name, description, example, url) VALUES (507, 26, 'EXPLAIN FORMAT=JSON', 'Description\n-----------\n\nSynopsis\n\nEXPLAIN FORMAT=JSON is a variant of EXPLAIN command that produces output in JSON form. The output always has one row which has only one column titled "JSON". The contents are a JSON representation of the query plan:\n\n``sql\nEXPLAIN FORMAT=JSON SELECT  FROM t1 WHERE col1=1\\G\n`\n\n`\n*********************** 1. row ***********************\nEXPLAIN: {\n  "query_block": {\n    "select_id": 1,\n    "table": {\n      "table_name": "t1",\n      "access_type": "ALL",\n      "rows": 1000,\n      "filtered": 100,\n      "attached_condition": "(t1.col1 = 1)"\n    }\n  }\n}\n`\n\nOutput is different from MySQL\n\nThe output of MariaDB''s EXPLAIN FORMAT=JSON is different from EXPLAIN FORMAT=JSON in MySQL. The reasons for that are:\n\n MySQL''s output has deficiencies.\n The output of MySQL''s EXPLAIN FORMAT=JSON` is not defined. Even MySQL Workbench has trouble parsing it (see this blog post).\n MariaDB has query optimizations that MySQL does not have. This means that MariaDB generates query plans that MySQL does not generate.\n\nOutput Format\n\nTODO: MariaDB''s output format description.\n\nURL: https://mariadb.com/docs/server/reference/sql-statements/administrative-sql-statements/analyze-and-explain-statements/explain-format-json', '', 'https://mariadb.com/docs/server/reference/sql-statements/administrative-sql-statements/analyze-and-explain-statements/explain-format-json');
INSERT INTO help_topic (help_topic_id, help_category_id, name, description, example, url) VALUES (508, 26, 'EXPLAIN', 'Syntax\n------\n\nEXPLAIN tbl_name [col_name | wildcard]\n\nDescription\n-----------\n\nThe EXPLAIN statement can be used either as a synonym for DESCRIBE, or as a way to obtain information about how MariaDB executes a SELECT, UPDATE or DELETE statement:\n\n ''EXPLAIN tbl_name'' is synonymous with DESCRIBE or SHOW COLUMNS ... FROM _mytable_.\n When you precede a SELECT, UPDATE or a DELETE statement with the keyword EXPLAIN, MariaDB displays information from the optimizer about the query execution plan. That is, MariaDB explains how it would process the SELECT, UPDATE or DELETE, including information about how tables are joined and in which order. EXPLAIN EXTENDED can be used to provide additional information.\n EXPLAIN PARTITIONS is useful only when examining queries involving partitioned tables. For details, see Partition pruning and selection.\n The ANALYZE statement is similar to EXPLAIN, but it runs the query rather than only estimating the execution path. Hence, the ANALYZE statement provides both estimated and real execution statistics. This includes the r_rows and r_filtered columns, which reflect the actual number of rows evaluated and filtered during query execution.\n EXPLAIN output can be printed in the slow query log. See EXPLAIN in the Slow Query Log for details.\n EXPLAIN FOR CONNECTION is an alias for SHOW EXPLAIN FOR.\n\nSHOW EXPLAIN shows the output of a running statement. In some cases, its output can be closer to reality than EXPLAIN.\n\nThe ANALYZE statement runs a statement and returns information about its execution plan. It also shows additional columns, to check how much the optimizer''s estimation about filtering and found rows are close to reality.\n\nThere is an online EXPLAIN Analyzer that you can use to share EXPLAIN and EXPLAIN EXTENDED output with others.\n\nEXPLAIN can acquire metadata locks in the same way that SELECT does, as it needs to know table metadata and, sometimes, data as well.\n\nColumns in EXPLAIN ... SELECT\n\n| Column name    | Description                                                                                         |\n| -------------- | --------------------------------------------------------------------------------------------------- |\n| id             | Sequence number that shows in which order tables are joined.                                        |\n| select_type   | What kind of SELECT the table comes from.                                                         |\n| table          | Alias name of table. Materialized temporary tables for sub queries are named <subquery#>          |\n| type           | How rows are found from the table (join type).                                                      |\n| possible_keys | keys in table that could be used to find rows in the table                                          |\n| key            | The name of the key that is used to retrieve rows. NULL means no key was used.                    |\n| key_len       | How many bytes of the key that was used (shows if we are using only parts of the multi-column key). |\n| ref            | The reference that is used as the key value.                                                        |\n| rows           | An estimate of how many rows we will find in the table for each key lookup.                         |\n| Extra          | Extra information about this join.                                                                  |\n\nHere are descriptions of the values for some of the more complex columns in EXPLAIN ... SELECT:\n\nSelect_type Column\n\nThe select_type column can have the following values:\n\n| Value                | Description                                                                                                                                                                                     | Comment                                                                                                                                                                              |\n| -------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |\n| DEPENDENT SUBQUERY   | The SUBQUERY is DEPENDENT.                                                                                                                                                                  |                                                                                                                                                                                      |\n| DEPENDENT UNION      | The UNION is DEPENDENT.                                                                                                                                                                     |                                                                                                                                                                                      |\n| DERIVED              | The SELECT is DERIVED from the PRIMARY.                                                                                                                                                   |                                                                                                                                                                                      |\n| MATERIALIZED         | The SUBQUERY is MATERIALIZED.                     | Materialized tables will be populated at first access and will be accessed by the primary key (= one key lookup). Number of rows in EXPLAIN shows the cost of populating the table |\n| PRIMARY              | The SELECT is in the outermost query, but there is also a SUBQUERY within it.                                                                                                               |                                                                                                                                                                                      |\n| SIMPLE               | It is a simple SELECT query without any SUBQUERY or UNION.                                                                                                                                |                                                                                                                                                                                      |\n| SUBQUERY             | The SELECT is a SUBQUERY of the PRIMARY.                                                                                                                                                  |                                                                                                                                                                                      |\n| UNCACHEABLE SUBQUERY | The SUBQUERY is UNCACHEABLE.                                                                                                                                                                |                                                                                                                                                                                      |\n| UNCACHEABLE UNION    | The UNION is UNCACHEABLE.                                                                                                                                                                   |                                                                                                                                                                                      |\n| UNION                | The SELECT is a UNION of the PRIMARY.                                                                                                                                                     |                                                                                                                                                                                      |\n| UNION RESULT         | The result of the UNION.                                                                                                                                                                      |                                                                                                                                                                                      |\n| LATERAL DERIVED      | The SELECT uses a Lateral Derived optimization |                                                                                                                                                                                      |\n\nType Column\n\nThis column contains information on how the table is accessed.\n\n| Value            | Description                                                                                                                                                                                                                      |\n| ---------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |\n| ALL              | A full table scan is done for the table (all rows are read). This is bad if the table is large and the table is joined against a previous table! This happens when the optimizer could not find any usable index to access rows. |\n| const            | There is only one possibly matching row in the table. The row is read before the optimization phase and all columns in the table are treated as constants.                                                                       |\n| eq_ref          | A unique index is used to find the rows. This is the best possible plan to find the row.                                                                                                                                         |\n| filter           | A second index is being used with the Rowid Filtering Optimization.                                                |\n| fulltext         | A fulltext index is used to access the rows.                                                                                                                                                                                     |\n| index_merge     | A ''range'' access is done for several index and the found rows are merged. The key column shows which keys are used.                                                                                                              |\n| index_subquery  | This is similar as ref, but used for sub queries that are transformed to key lookups.                                                                                                                                            |\n| index            | A full scan over the used index. Better than ALL but still bad if index is large and the table is joined against a previous table.                                                                                             |\n| range            | The table will be accessed with a key over one or more value ranges.                                                                                                                                                             |\n| ref_or_null    | Like ''ref'' but in addition another search for the ''null'' value is done if the first value was not found. This happens usually with sub queries.                                                                                  |\n| ref              | A non unique index or prefix of an unique index is used to find the rows. Good if the prefix doesn''t match many rows.                                                                                                            |\n| system           | The table has 0 or 1 rows.                                                                                                                                                                                                       |\n| unique_subquery | This is similar as eq_ref, but used for sub queries that are transformed to key lookups                                                                                                                                         |\n\nExtra Column\n\nThis column consists of one or more of the following values, separated by '';''\n\n_Note that some of these values are detected after the optimization phase._\n\nThe optimization phase can do the following changes to the WHERE clause:\n\n Add the expressions from the ON and USING clauses to the WHERE clause.\n Constant propagation: If there is column=constant, replace all column instances with this constant.\n Replace all columns from ''const'' tables with their values.\n Remove the used key columns from the WHERE (as this will be tested as part of the key lookup).\n Remove impossible constant sub expressions. For example WHERE ''(a=1 and a=2) OR b=1'' becomes ''b=1''.\n Replace columns with other columns that has identical values: Example: WHERE a=b and a=c may be treated as ''WHERE a=b and a=c and b=c''.\n Add extra conditions to detect impossible row conditions earlier. This happens mainly with OUTER JOIN where we in some cases add detection of NULL values in the WHERE (Part of ''Not exists'' optimization). This can cause an unexpected ''Using where'' in the Extra column.\n For each table level we remove expressions that have already been tested when we read the previous row. Example: When joining tables t1 with t2 using the following WHERE ''t1.a=1 and t1.a=t2.b'', we don''t have to test ''t1.a=1'' when checking rows in t2 as we already know that this expression is true.\n\n| Value                                                | Description                                                                                                                                                                                                                                                                                                                                                                                                                                                          |\n| ---------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |\n| const row not found\n\n[Truncated — full content at mariadb.com/docs]', '', 'https://mariadb.com/docs/server/reference/sql-statements/administrative-sql-statements/analyze-and-explain-statements/explain');
INSERT INTO help_topic (help_topic_id, help_category_id, name, description, example, url) VALUES (509, 26, 'Using Buffer UPDATE Algorithm', 'Description\n-----------\n\nThis article explains the UPDATE statement''s _Using Buffer_ algorithm.\n\nConsider the following table and query:\n\n| Name      | Salary |\n| --------- | ------ |\n| Babatunde | 1000   |\n| Jolana    | 1050   |\n| Pankaja   | 1300   |\n\n``sql\nUPDATE employees SET salary = salary+100 WHERE salary < 2000;\n`\n\nSuppose the _employees_ table has an index on the _salary_ column, and the optimizer decides to use a range scan on that index.\n\nThe optimizer starts a range scan on the _salary_ index. We find the first record _Babatunde, 1000_. If we do an on-the-fly update, we immediately instruct the storage engine to change this record to be _Babatunde, 1000+100=1100_.\n\nThen we proceed to search for the next record, and find _Jolana, 1050_. We instruct the storage engine to update it to be _Jolana, 1050+100=1150_.\n\nThen we proceed to search for the next record ... and what happens next depends on the storage engine. In some storage engines, data changes are visible immediately, so we will find the _Babatunde, 1100_ record that we wrote at the first step, modifying it again, giving Babatunde an undeserved raise. Then we will see Babatunde again and again, looping continually.\n\nIn order to prevent such situations, the optimizer checks whether the UPDATE statement is going to change key values for the keys it is using. In that case, it will use a different algorithm:\n\n1. Scan everyone with "salary<2000", remembering the rowids of the rows in a buffer.\n2. Read the buffer and apply the updates.\n\nThis way, each row will be updated only once.\n\nThe Using buffer` EXPLAIN output indicates that the buffer as described above will be used.\n\nURL: https://mariadb.com/docs/server/reference/sql-statements/administrative-sql-statements/analyze-and-explain-statements/using-buffer-update-algorithm', '', 'https://mariadb.com/docs/server/reference/sql-statements/administrative-sql-statements/analyze-and-explain-statements/using-buffer-update-algorithm');
INSERT INTO help_topic (help_topic_id, help_category_id, name, description, example, url) VALUES (510, 26, 'BACKUP LOCK', 'Description\n-----------\n\nBACKUP LOCK blocks a table from DDL statements. This is mainly intended to be used by tools like mariadb-backup that need to ensure there are no DDL[^1] statements on a table while the table files are opened. For example, for an Aria table that stores data in 3 files with extensions .frm, .MAI and .MAD. Normal read/write operations can continue as normal.\n\nSyntax\n\nTo lock a table:\n\n``sql\nBACKUP LOCK table_name\n`\n\nTo unlock a table:\n\n`sql\nBACKUP UNLOCK\n`\n\nUsage in a Backup Tool\n\n`sql\nBACKUP LOCK [database.]table_name;\n - Open all files related to a table (for example, t.frm, t.MAI and t.MYD)\nBACKUP UNLOCK;\n- Copy data\n- Close files\n`\n\nThis ensures that all files are from the same generation, that is created at the same time by the MariaDB server. This works, because the open files will point to the original table files which will not be affected if there is any ALTER TABLE while copying the files.\n\nPrivileges\n\nBACKUP LOCK requires the database LOCK TABLES privileges.\n\nBACKUP LOCK requires the RELOAD privilege.\n\nBACKUP LOCK requires the RELOAD privilege.\n\nNotes\n\n The idea is that the BACKUP LOCK should be held for as short a time as possible by the backup tool. The time to take an uncontested lock is very short! One can easily do 50,000 locks/unlocks per second on low end hardware.\n One should use different connections for BACKUP STAGE commands and BACKUP LOCK.\n\nImplementation\n\n* Internally, BACKUP LOCK is implemented by taking an MDLSHARED_HIGH_PRIO` MDL lock on the table object, which protects the table from any DDL operations.\n\nURL: https://mariadb.com/docs/server/reference/sql-statements/administrative-sql-statements/backup-commands/backup-lock', '', 'https://mariadb.com/docs/server/reference/sql-statements/administrative-sql-statements/backup-commands/backup-lock');
INSERT INTO help_topic (help_topic_id, help_category_id, name, description, example, url) VALUES (511, 26, 'BACKUP STAGE', 'Description\n-----------\n\nThe BACKUP STAGE commands are a set of commands to make it possible to make an efficient external backup tool.\n\nSyntax\n\n``sql\nBACKUP STAGE [START | FLUSH | BLOCK_DDL | BLOCK_COMMIT | END ]\n`\n\nIn the following text, a transactional table means InnoDB, or specifically an InnoDB-like engine with redo log that can lock redo purges and can be copied without locks by an outside process.\n\nGoals with BACKUP STAGE Commands\n\n To be able to do a majority of the backup with the minimum possible server locks. Especially for transactional tables (InnoDB, MyRocks etc) there is only need for a very short block of new commits while copying statistics and log tables.\n DDL are only needed to be blocked for a very short duration of the backup while mariadb-backup is copying the tables affected by DDL during the initial part of the backup.\n Most non transactional tables (those that are not in use) will be copied during BACKUP STAGE START. The exceptions are system statistic and log tables that are not blocked during the backup until BLOCK_COMMIT.\n Should work efficiently with backup tools that use disk snapshots.\n Should work as efficiently as possible for all table types that store data on the local disks.\n As little copying as possible under higher level stages/locks. For example, .frm (dictionary) and .trn (trigger) files should be copying while copying the table data.\n\nBACKUP STAGE Commands\n\nBACKUP STAGE START\n\nThe START stage is designed for the following tasks:\n\n Blocks purge of redo files for storage engines that needs this (Aria).\n Start logging of DDL commands into _datadir_/ddl.log. This may take a short time as the command has to wait until there are no active DDL commands.\n\nBACKUP STAGE FLUSH\n\nThe FLUSH stage is designed for the following tasks:\n\n FLUSH all changes for inactive non-transactional tables, except for statistics and log tables.\n Close all tables that are not in use, to ensure they are marked as closed for the backup.\n BLOCK all new write locks for all non transactional tables (except statistics and log tables). The command will not wait for tables that are in use by read-only transactions.\n\nDDLs don''t have to be blocked at this stage as they can''t cause the table to be in an inconsistent state. This is true also for non-transactional tables.\n\nBACKUP STAGE BLOCK_DDL\n\nThe BLOCK_DDL stage is designed for the following tasks:\n\n Wait for all statements using write locked non-transactional tables to end.\n Blocks CREATE TABLE, DROP TABLE, TRUNCATE TABLE, and RENAME TABLE.\n Blocks also start off a new ALTER TABLE and the final rename phase of ALTER TABLE. Running ALTER TABLES are not blocked.\n\nBACKUP STAGE BLOCK_COMMIT\n\nThe BLOCK_COMMIT stage is designed for the following tasks:\n\n Lock the binary log and commit/rollback to ensure that no changes are committed to any tables. If there are active commits or data to be copied to the binary log this will be allowed to finish. Active transactions will not affect BLOCK_COMMIT.\n This doesn''t lock temporary tables that are not used by replication. However these will be blocked when it''s time to write to the binary log.\n Lock system log tables and statistics tables, flush them and mark them closed.\n\nWhen the BLOCK_COMMIT''s stages return, this is the ''backup time''. Everything committed will be in the backup and everything not committed will roll back.\n\nTransactional engines will continue to do changes to the redo log during the BLOCK COMMIT stage, but this is not important as all of these will roll back later as the changes will not be committed.\n\nBACKUP STAGE END\n\nThe END stage is designed for the following tasks:\n\n End DDL logging\n Free resources\n\nUsing BACKUP STAGE Commands with Backup Tools\n\nUsing BACKUP STAGE Commands with mariadb-backup\n\nThe BACKUP STAGE statements are a set of statements that make it possible to make an efficient external backup tool.\n\nThe BACKUP STAGE statements are a set of statements that make it possible to make an efficient external backup tool. How mariadb-backup uses these statements depends on which version you are using. It depends on whether you are using the version that is bundled with MariaDB Community Server or the version that is bundled with MariaDB Enterprise Server.\n\nThe BACKUP STAGE statements are a set of statements that make it possible to make an efficient external backup tool. How mariadb-backup uses these statements depends on which version you are using. It depends on whether you are using the version that is bundled with MariaDB Community Server or the version that is bundled with MariaDB Enterprise Server.\n\nSee mariadb-backup and BACKUP STAGE Commands for some examples on how mariadb-backup uses these commands.\n\nUsing BACKUP STAGE Commands with Storage Snapshots\n\nThe BACKUP STAGE commands are a set of commands to make it possible to make an efficient external backup tool. These commands could even be used by tools that perform backups by taking a snapshot of a file system, SAN, or some other kind of storage device. See Storage Snapshots and BACKUP STAGE Commands for some examples on how to use each BACKUP STAGE command in an efficient way.\n\nPrivileges\n\nBACKUP STAGE requires the RELOAD privilege.\n\nNotes\n\n Only one connection can run BACKUP STAGE START. If a second connection tries, it will wait until the first one has executed BACKUP STAGE END.\n If the user skips a BACKUP STAGE, then all intermediate backup stages will automatically be run. This will allow us to add new stages within the BACKUP STAGE hierarchy in the future with even more precise locks without causing problems for tools using an earlier version of the BACKUP STAGE implementation.\n One can use the max_statement_time or lock_wait_timeout system variables to ensure that a BACKUP STAGE` command doesn''t block the server too long.\n DDL logging is available from MariaDB 10.11.8, MariaDB 11.0.6, MariaDB 11.1.5 and MariaDB 11.2.4, and in MariaDB Enterprise Server.\n A disconnect automatically releases backup stages.\n* There is no easy way to see what the current stage is.\n\nURL: https://mariadb.com/docs/server/reference/sql-statements/administrative-sql-statements/backup-commands/backup-stage', '', 'https://mariadb.com/docs/server/reference/sql-statements/administrative-sql-statements/backup-commands/backup-stage');
INSERT INTO help_topic (help_topic_id, help_category_id, name, description, example, url) VALUES (512, 26, 'Storage Snapshots and BACKUP STAGE Statements', 'Description\n-----------\n\nThe BACKUP STAGE statements are a set of statements to make it possible to make an efficient external backup tool. These commands could even be used by tools that perform backups by taking a snapshot of a file system, SAN, or some other kind of storage device.\n\nGeneric Backup Process with Storage Snapshots\n\nA tool that backs up MariaDB by taking a snapshot of a file system, SAN, or some other kind of storage device could use each BACKUP STAGE command in the following way:\n\n First, execute the following:\n\n``sql\nBACKUP STAGE START\nBACKUP STAGE BLOCK_COMMIT\n`\n\n Then, take the snapshot.\n* Then, execute the following:\n\n`sql\nBACKUP STAGE END\n`\n\nThe above ensures that all non-transactional tables are properly flushed to disk before the snapshot is done. Using BACKUP STAGE commands is also more efficient than using the FLUSH TABLES WITH READ LOCK command as the above set of commands will not block or be blocked by write operations to transactional tables.\n\nNote that when the backup is completed, one should delete all files with the "#sql" prefix, as these are files used by concurrent running ALTER TABLE`. Note that InnoDB will on server restart automatically delete any tables with the "#sql" prefix.\n\nURL: https://mariadb.com/docs/server/reference/sql-statements/administrative-sql-statements/backup-commands/storage-snapshots-and-backup-stage-commands', '', 'https://mariadb.com/docs/server/reference/sql-statements/administrative-sql-statements/backup-commands/storage-snapshots-and-backup-stage-commands');
INSERT INTO help_topic (help_topic_id, help_category_id, name, description, example, url) VALUES (513, 26, 'BINLOG', 'Syntax\n------\n\nBINLOG ''str''\n\nDescription\n-----------\n\nBINLOG is an internal-use statement. It is generated by the mariadb-binlog program as the printable representation of certain events in binary log files. The ''str'' value is a base 64-encoded\\\nstring that the server decodes to determine the data change indicated by the\\\ncorresponding event.\n\nThis statement requires the BINLOG REPLAY privilege.\n\nThis statement requires the SUPER privilege.\n\nURL: https://mariadb.com/docs/server/reference/sql-statements/administrative-sql-statements/binlog', '', 'https://mariadb.com/docs/server/reference/sql-statements/administrative-sql-statements/binlog');
INSERT INTO help_topic (help_topic_id, help_category_id, name, description, example, url) VALUES (514, 26, 'CACHE INDEX', 'Syntax\n------\n\nCACHE INDEX                      \n  tbl_index_list [, tbl_index_list] ...\n  IN key_cache_name                    \n\ntbl_index_list:\n  tbl_name [[INDEX|KEY] (index_name[, index_name] ...)]\n\nDescription\n-----------\n\nThe CACHE INDEX statement assigns table indexes to a specific key\\\ncache. It is used only for MyISAM tables.\n\nA default key cache exists and cannot be destroyed. To create more key caches, the key_buffer_size server system variable.\n\nThe associations between tables indexes and key caches are lost on server restart. To recreate them automatically, it is necessary to configure caches in a configuration file and include some CACHE INDEX (and optionally LOAD INDEX) statements in the init file.\n\nExamples\n--------\n\nCACHE INDEX t1, t2, t3 IN hot_cache;\n+---------+--------------------+----------+----------+\n| Table   | Op                 | Msg_type | Msg_text |\n+---------+--------------------+----------+----------+\n| test.t1 | assign_to_keycache | status   | OK       |\n| test.t2 | assign_to_keycache | status   | OK       |\n| test.t3 | assign_to_keycache | status   | OK       |\n+---------+--------------------+----------+----------+\n\nURL: https://mariadb.com/docs/server/reference/sql-statements/administrative-sql-statements/cache-index', '', 'https://mariadb.com/docs/server/reference/sql-statements/administrative-sql-statements/cache-index');
INSERT INTO help_topic (help_topic_id, help_category_id, name, description, example, url) VALUES (515, 26, 'DESCRIBE', 'Syntax\n------\n\n{DESCRIBE | DESC} tbl_name [col_name | wild]\n\nDescription\n-----------\n\nDESCRIBE provides information about the columns in a table.It is a shortcut for SHOW COLUMNS FROM.These statements also display information for views.\n\ncol_name can be a column name, or a string containing theSQL "%" and "_" wildcard characters toobtain output only for the columns with names matching the string. There is noneed to enclose the string within quotes unless it contains spaces or otherspecial characters.\n\n``sql\nDESCRIBE city;\n+------------+----------+------+-----+---------+----------------+\n| Field      | Type     | Null | Key | Default | Extra          |\n+------------+----------+------+-----+---------+----------------+\n| Id         | int(11)  | NO   | PRI | NULL    | auto_increment |\n| Name       | char(35) | YES  |     | NULL    |                |\n| Country    | char(3)  | NO   | UNI |         |                |\n| District   | char(20) | YES  | MUL |         |                |\n| Population | int(11)  | YES  |     | NULL    |                |\n+------------+----------+------+-----+---------+----------------+\n``\n\nThe description for SHOW COLUMNS providesmore information about the output columns.\n\nURL: https://mariadb.com/docs/server/reference/sql-statements/administrative-sql-statements/describe', '', 'https://mariadb.com/docs/server/reference/sql-statements/administrative-sql-statements/describe');
INSERT INTO help_topic (help_topic_id, help_category_id, name, description, example, url) VALUES (516, 26, 'FLUSH QUERY CACHE', 'Description\n-----------\n\nYou can defragment the query cache to better utilize its memory with the FLUSH QUERY CACHE statement. The statement does not remove any queries from the cache.\n\nThe RESET QUERY CACHE statement removes all query results from the query cache.\\\nThe FLUSH TABLES statement also does this.\n\nURL: https://mariadb.com/docs/server/reference/sql-statements/administrative-sql-statements/flush-commands/flush-query-cache', '', 'https://mariadb.com/docs/server/reference/sql-statements/administrative-sql-statements/flush-commands/flush-query-cache');
INSERT INTO help_topic (help_topic_id, help_category_id, name, description, example, url) VALUES (517, 26, 'FLUSH TABLES FOR EXPORT', 'Syntax\n------\n\nFLUSH TABLE[S] table_name [, table_name] FOR EXPORT\n\nDescription\n-----------\n\nFLUSH TABLES ... FOR EXPORT flushes changes to the specified tables to disk so that binary copies can be made while the server is still running. This works for Archive, Aria, CSV, InnoDB, MyISAM and MERGE tables.\n\nThe table is read locked until you issue UNLOCK TABLES.\n\nIf a storage engine does not support FLUSH TABLES FOR EXPORT, a 1031 error (SQLSTATE ''HY000'') is produced.\n\nIf FLUSH TABLES ... FOR EXPORT is in effect in the session, the following statements will produce an error if attempted:\n\n FLUSH TABLES WITH READ LOCK\n FLUSH TABLES ... WITH READ LOCK\n FLUSH TABLES ... FOR EXPORT\n Any statement trying to update any table\n\nIf any of the following statements is in effect in the session, attempting FLUSH TABLES ... FOR EXPORT will produce an error.\n\n FLUSH TABLES ... WITH READ LOCK\n FLUSH TABLES ... FOR EXPORT\n LOCK TABLES ... READ\n LOCK TABLES ... WRITE\n\nFLUSH FOR EXPORT is not written to the binary log.\n\nThis statement requires the RELOAD and the LOCK TABLES privileges.\n\nIf one of the specified tables cannot be locked, none of the tables will be locked.\n\nIf a table does not exist, an error like the following will be produced:\n\n``\nERROR 1146 (42S02): Table ''test.xxx'' doesn''t exist\n`\n\nIf a table is a view, an error like the following will be produced:\n\n`\nERROR 1347 (HY000): ''test.v'' is not BASE TABLE\n``\n\nExamples\n--------\n\nFLUSH TABLES test.t1 FOR EXPORT;\nCopy files related to the table (see below)\nUNLOCK TABLES;\n\nURL: https://mariadb.com/docs/server/reference/sql-statements/administrative-sql-statements/flush-commands/flush-tables-for-export', '', 'https://mariadb.com/docs/server/reference/sql-statements/administrative-sql-statements/flush-commands/flush-tables-for-export');
INSERT INTO help_topic (help_topic_id, help_category_id, name, description, example, url) VALUES (518, 26, 'FLUSH', 'Syntax\n------\n\nFLUSH [NO_WRITE_TO_BINLOG | LOCAL]\n    flush_option [, flush_option] ...\n\nDescription\n-----------\n\nThe FLUSH statement clears or reloads various internal caches used by MariaDB. To execute FLUSH, you must have the RELOAD privilege. See GRANT.\n\nThe RESET statement is similar to FLUSH. See RESET.\n\nYou cannot issue a FLUSH statement from within a stored function or a trigger. Doing so within a stored procedure is permitted, as long as it is not called by a stored function or trigger. See Stored Routine Limitations, Stored Function Limitations and Trigger Limitations.\n\nIf a listed table is a view, an error like the following will be produced:\n\n``\nERROR 1347 (HY000): ''test.v'' is not BASE TABLE\n`\n\nBy default, FLUSH statements are written to the binary log and will be replicated. The NO_WRITE_TO_BINLOG keyword (LOCAL is an alias) ensures that the statement is not written to the binary log. The different flush options are:\n\n| Option                                              | Description                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                         |\n| --------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |\n| CHANGED_PAGE_BITMAPS                              | XtraDB only. Internal command used for backup purposes. See the Information Schema CHANGED_PAGE_BITMAPS Table.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    |\n| CLIENT_STATISTICS                                  | Reset client statistics (see SHOW CLIENT_STATISTICS).                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                         |\n| DES_KEY_FILE                                      | Reloads the DES key file (Specified with the --des-key-file startup option).                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                     |\n| HOSTS                                               | Flush the hostname cache (used for converting ip to host names and for unblocking blocked hosts. See max_connect_errors and performance_schema.host_cache                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                |\n| INDEX_STATISTICS                                   | Reset index statistics (see SHOW INDEX_STATISTICS).                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            |\n| ERROR                                               | Closes and reopens the error log file to which the server is writing.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               |\n| \\[ERROR \\| ENGINE \\| GENERAL \\| SLOW \\| RELAY] LOGS | Close and reopen the specified log type, or all log types if none are specified. FLUSH RELAY LOGS [connection-name] can be used to flush the relay logs for a specific connection. Only one connection can be specified per FLUSH command. See multi-source replication. FLUSH ENGINE LOGS deletes all unneeded Aria redo logs. FLUSH BINARY LOGS DELETE_DOMAIN_ID=(list-of-domains) can be used to discard obsolete GTID domains from the server''s binary log state. In order for this to be successful, no event group from the listed GTID domains can be present in existing binary log files. If some still exist, then they must be purged prior to executing this statement. If the statement completes successfully,  it also rotates the binary log. |\n| BINARY LOGS                                         | FLUSH BINARY LOGS rotates the current binary log.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                             |\n| BINARY LOGS DELETE_DOMAIN_ID=_list-of-domains_    | FLUSH BINARY LOGS DELETE_DOMAIN_ID can be used to discard obsolete GTID domains from the server''s binary log state. In order for this to be successful, no event group from the listed GTID domains can be present in existing binary log files. If some still exist, then they must be purged prior to executing this command. If the command completes successfully, then it also rotates the binary log.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    |\n| MASTER                                              | Deprecated option, use RESET MASTER instead.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                         |\n| PRIVILEGES                                          | Reload all privileges from the privilege tables in the mysql database. If the server is started with --skip-grant-table option, this will activate the privilege tables again.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      |\n| QUERY CACHE                                         | Defragment the query cache to better utilize its memory. If you want to reset the query cache, you can do it with RESET QUERY CACHE.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                             |\n| QUERY_RESPONSE_TIME                               | See the QUERY_RESPONSE_TIME plugin.\n\n[Truncated — full content at mariadb.com/docs]', '', 'https://mariadb.com/docs/server/reference/sql-statements/administrative-sql-statements/flush-commands/flush');
INSERT INTO help_topic (help_topic_id, help_category_id, name, description, example, url) VALUES (519, 26, 'HELP Command', 'Syntax\n------\n\nHELP search_string\n\nDescription\n-----------\n\nThe HELP command can be used in any MariaDB client, such as the mariadb command-line client, to get basic syntax help and a short description for most commands and functions.\n\nIf you provide an argument to the HELP command, the mariadb client uses it as a search string to access server-side help. The proper operation of this command requires that the help tables in the mysql database be initialized with help topic information.\n\nIf there is no match for the search string, the search fails. Use HELP contents to see a list of the help categories:\n\n``sql\nHELP contents\nYou asked for help about help category: "Contents"\nFor more information, type ''help <item>'', where <item> is one of the following\ncategories:\n   Account Management\n   Administration\n   Compound Statements\n   Data Definition\n   Data Manipulation\n   Data Types\n   Functions\n   Functions and Modifiers for Use with GROUP BY\n   Geographic Features\n   Help Metadata\n   Language Structure\n   Plugins\n   Procedures\n   Sequences\n   Table Maintenance\n   Transactions\n   User-Defined Functions\n   Utility\n`\n\nIf a search string matches multiple items, MariaDB shows a list of matching topics:\n\n`sql\nHELP drop\nMany help items for your request exist.\nTo make a more specific request, please type ''help <item>'',\nwhere <item> is one of the following\ntopics:\n   ALTER TABLE\n   DROP DATABASE\n   DROP EVENT\n   DROP FUNCTION\n   DROP FUNCTION UDF\n   DROP INDEX\n   DROP PACKAGE\n   DROP PACKAGE BODY\n   DROP PROCEDURE\n   DROP ROLE\n   DROP SEQUENCE\n   DROP SERVER\n   DROP TABLE\n   DROP TRIGGER\n   DROP USER\n   DROP VIEW\n`\n\nThen you can enter a topic as the search string to see the help entry for that topic.\n\nThe help is provided with the MariaDB server and makes use of four help tables found in the mysql database: help_relation, help_topic, help_category and help_keyword. These tables are populated by the mariadb-install-db or fill_help_table.sql` scripts.\n\nURL: https://mariadb.com/docs/server/reference/sql-statements/administrative-sql-statements/help-command', '', 'https://mariadb.com/docs/server/reference/sql-statements/administrative-sql-statements/help-command');
INSERT INTO help_topic (help_topic_id, help_category_id, name, description, example, url) VALUES (520, 26, 'KILL', 'Syntax\n------\n\nKILL [HARD | SOFT] { {CONNECTION|QUERY} thread_id | QUERY ID query_id | USER user_name }\n\nDescription\n-----------\n\nEach connection to mariadbd runs in a separate thread. You can see which threads are running with the SHOW PROCESSLIST statement and kill a thread with the KILL thread_id statement.KILL allows the optional CONNECTION orQUERY modifier:\n\n KILL CONNECTION is the same as KILL with no modifier: It terminates the connection associated with the given thread or query id.\n KILL QUERY terminates the statement that the connection thread_id is currently executing, but leaves the connection itself intact.\n KILL QUERY ID terminates the query by query_id, leaving the connection intact.\n\nIf a connection is terminated that has an active transaction, the transaction  is rolled back. If only a query is killed, the current transaction stays active. See also idle_transaction_timeout.\n\nIf you have the PROCESS privilege, you can see all threads.\n\nIf you have the CONNECTION ADMIN privilege, you can kill all threads and statements. Otherwise, you can see and kill only your own threads and statements.\n\nIf you have the SUPER privilege, the CONNECTION ADMIN privilege, you can kill all threads and statements. Otherwise, you can see and kill only your own threads and statements.\n\nKilling queries that repair or create indexes on MyISAM and Aria tables may result in corrupted tables. Use the SOFT option to avoid this.\n\nThe HARD option (default) kills a statement as soon as possible. If you useSOFT,  critical operations that may leave a table in an inconsistent state are not interrupted. Such operations include REPAIR and INDEX creation for MyISAM and Aria tables (REPAIR TABLE, OPTIMIZE TABLE).\n\nKILL ... USER username kills all connections and queries for a given user. USER can be specified in one of the following ways:\n\n username (kill without regard to hostname)\n username@hostname\n CURRENT_USER or CURRENT_USER()\n\nIf you specify a thread id and that thread does not exist, you get the following error:\n\n``\nERROR 1094 (HY000): Unknown thread id: <thread_id>\n`\n\nIf you specify a query id that doesn''t exist, you get the following error:\n\n`\nERROR 1957 (HY000): Unknown query id: <query_id>\n`\n\nHowever, if you specify a user name, no error is issued for non-connected (or even non-existing) users. To check if the connection/query has been killed, you can use the ROW_COUNT() function.\n\nA client whose connection is killed receives the following error:\n\n`\nERROR 1317 (70100): Query execution was interrupted\n`\n\nTo obtain a list of existing sessions, use the SHOW PROCESSLIST statement or query the Information Schema PROCESSLIST table.\n\nYou cannot use KILL with the Embedded MariaDB Server library because the embedded server merely runs inside the threads of the host application. It does not create any connection threads of its own.\n\nNote: You can also use mariadb-admin kill thread_id [,thread_id...] to kill connections. To get a list of running queries,use mariadb-admin processlist`. See mariadb-admin.\n\nURL: https://mariadb.com/docs/server/reference/sql-statements/administrative-sql-statements/kill', '', 'https://mariadb.com/docs/server/reference/sql-statements/administrative-sql-statements/kill');
INSERT INTO help_topic (help_topic_id, help_category_id, name, description, example, url) VALUES (521, 26, 'INSTALL PLUGIN', 'Syntax\n------\n\nINSTALL PLUGIN [IF NOT EXISTS] plugin_name SONAME ''plugin_library''\n\nDescription\n-----------\n\nThis statement installs an individual plugin from the specified library. To install the whole library (which could be required), use INSTALL SONAME. See also Installing a Plugin.\n\nplugin_name is the name of the plugin as defined in theplugin declaration structure contained in the library file. Plugin names arenot case sensitive. For maximal compatibility, plugin names should be limitedto ASCII letters, digits, and underscore, because they are used in C sourcefiles, shell command lines, M4 and Bourne shell scripts, and SQL environments.\n\nplugin_library is the name of the shared library thatcontains the plugin code. The file name extension can be omitted (which makes the statement look the same on all architectures).\n\nThe shared library must be located in the plugin directory (that is,the directory named by the plugin_dir system variable). The library must be in the plugin directory itself, not in a subdirectory. Bydefault, plugin_dir is plugin directory under the directory named bythe pkglibdir configuration variable, but it can be changed by settingthe value of plugin_dir at server startup. For example, setits value in a my.cnf file:\n\n``ini\n[mariadbd]\nplugin_dir=/path/to/plugin/directory\n`\n\nIf the value of plugin_dir is a relative path name, it istaken to be relative to the base directory (the value of the basedir system variable).\n\nINSTALL PLUGIN adds a line to the mysql.plugin table thatdescribes the plugin. This table contains the plugin name and library filename.\n\nINSTALL PLUGIN causes the server to readoption (my.cnf) files just as during server startup. This enables the plugin topick up any relevant options from those files. It is possible to add pluginoptions to an option file even before loading a plugin (if the loose prefix isused). It is also possible to uninstall a plugin, edit my.cnf, and install theplugin again. Restarting the plugin this way enables it to the new optionvalues without a server restart.\n\nINSTALL PLUGIN also loads and initializes the plugin code tomake the plugin available for use. A plugin is initialized by executing itsinitialization function, which handles any setup that the plugin must performbefore it can be used.\n\nTo use INSTALL PLUGIN, you must have the INSERT privilege for the mysql.plugin table.\n\nAt server startup, the server loads and initializes any plugin that islisted in the mysql.plugin table. This means that a plugin is installedwith INSTALL PLUGIN only once, not every time the serverstarts. Plugin loading at startup does not occur if the server is started withthe --skip-grant-tables option.\n\nWhen the server shuts down, it executes the de-initialization functionfor each plugin that is loaded so that the plugin has a chance toperform any final cleanup.\n\nIf you need to load plugins for a single server startup when the--skip-grant-tables option is given (which tells the servernot to read system tables), use the--plugin-load mariadbd option.\n\nIF NOT EXISTS\n\nWhen the IF NOT EXISTS` clause is used, MariaDB will return a note instead of an error if the specified plugin already exists. See SHOW WARNINGS.\n\nExamples\n--------\n\nINSTALL PLUGIN sphinx SONAME ''ha_sphinx.so'';\n\nURL: https://mariadb.com/docs/server/reference/sql-statements/administrative-sql-statements/plugin-sql-statements/install-plugin', '', 'https://mariadb.com/docs/server/reference/sql-statements/administrative-sql-statements/plugin-sql-statements/install-plugin');
INSERT INTO help_topic (help_topic_id, help_category_id, name, description, example, url) VALUES (522, 26, 'INSTALL SONAME', 'Syntax\n------\n\nINSTALL SONAME ''plugin_library''\n\nDescription\n-----------\n\nThis statement is a variant of INSTALL PLUGIN. It installs all plugins from a given plugin_library. See INSTALL PLUGIN for details.\n\nplugin_library is the name of the shared library thatcontains the plugin code. The file name extension (forexample, libmyplugin.so or libmyplugin.dll) can be omitted (which makes the statement look the same on all architectures).\n\nThe shared library must be located in the plugin directory (that is,the directory named by the plugin_dir system variable). The library must be in the plugin directory itself, not in a subdirectory. Bydefault, plugin_dir is plugin directory under the directory named bythe pkglibdir configuration variable, but it can be changed by settingthe value of plugin_dir at server startup. For example, setits value in a my.cnf file:\n\n``ini\n[mariadbd]\nplugin_dir=/path/to/plugin/directory\n`\n\nIf the value of plugin_dir is a relative path name, it istaken to be relative to the MySQL base directory (the value of the basedirsystem variable).\n\nINSTALL SONAME adds one or more lines to the mysql.plugin table thatdescribes the plugin. This table contains the plugin name and library filename.\n\nINSTALL SONAME causes the server to readoption (my.cnf) files just as during server startup. This enables the plugin topick up any relevant options from those files. It is possible to add pluginoptions to an option file even before loading a plugin (if the loose prefix isused). It is also possible to uninstall a plugin, edit my.cnf, and install theplugin again. Restarting the plugin this way enables it to the new optionvalues without a server restart.\n\nINSTALL SONAME also loads and initializes the plugin code tomake the plugin available for use. A plugin is initialized by executing itsinitialization function, which handles any setup that the plugin must performbefore it can be used.\n\nTo use INSTALL SONAME, you must have the INSERT privilege for the mysql.plugin table.\n\nAt server startup, the server loads and initializes any plugin that islisted in the mysql.plugin table. This means that a plugin is installedwith INSTALL SONAME only once, not every time the serverstarts. Plugin loading at startup does not occur if the server is started withthe --skip-grant-tables option.\n\nWhen the server shuts down, it executes the de-initialization functionfor each plugin that is loaded so that the plugin has a chance toperform any final cleanup.\n\nIf you need to load plugins for a single server startup when the--skip-grant-tables option is given (which tells the servernot to read system tables), use the--plugin-load` mariadbd option.\n\nIf you need to install only one plugin from a library, use the INSTALL PLUGIN statement.\n\nExamples\n--------\n\nINSTALL SONAME ''locales'';\n\nURL: https://mariadb.com/docs/server/reference/sql-statements/administrative-sql-statements/plugin-sql-statements/install-soname', '', 'https://mariadb.com/docs/server/reference/sql-statements/administrative-sql-statements/plugin-sql-statements/install-soname');
INSERT INTO help_topic (help_topic_id, help_category_id, name, description, example, url) VALUES (523, 26, 'UNINSTALL PLUGIN', 'Syntax\n------\n\nUNINSTALL PLUGIN [IF EXISTS] plugin_name\n\nDescription\n-----------\n\nThis statement removes a single installed plugin. To uninstall the whole library which contains the plugin, use UNINSTALL SONAME. You cannot uninstall a plugin if any table that uses it is open.\n\nplugin_name must be the name of some plugin that is listedin the mysql.plugin table. The server executes the plugin''s deinitializationfunction and removes the row for the plugin from the mysql.plugintable, so that subsequent server restarts will not load and initializethe plugin. UNINSTALL PLUGIN does not remove the plugin''sshared library file.\n\nTo use UNINSTALL PLUGIN, you must have the DELETE privilege for the mysql.plugin table.\n\nIF EXISTS\n\nIf the IF EXISTS clause is used, MariaDB will return a note instead of an error if the plugin does not exist. See SHOW WARNINGS.\n\nExamples\n--------\n\nUNINSTALL PLUGIN example;\n\nURL: https://mariadb.com/docs/server/reference/sql-statements/administrative-sql-statements/plugin-sql-statements/uninstall-plugin', '', 'https://mariadb.com/docs/server/reference/sql-statements/administrative-sql-statements/plugin-sql-statements/uninstall-plugin');
INSERT INTO help_topic (help_topic_id, help_category_id, name, description, example, url) VALUES (524, 26, 'UNINSTALL SONAME', 'Syntax\n------\n\nUNINSTALL SONAME  [IF EXISTS] ''plugin_library''\n\nDescription\n-----------\n\nThis statement is a variant of UNINSTALL PLUGIN statement, that removes all plugins belonging to a specified plugin_library. See UNINSTALL PLUGIN for details.\n\nplugin_library is the name of the shared library thatcontains the plugin code. The file name extension (forexample, libmyplugin.so or libmyplugin.dll) can be omitted (which makes the statement look the same on all architectures).\n\nTo use UNINSTALL SONAME, you must have the DELETE privilege for the mysql.plugin table.\n\nIF EXISTS\n\nIf the IF EXISTS clause is used, MariaDB will return a note instead of an error if the plugin library does not exist. See SHOW WARNINGS.\n\nExamples\n--------\n\nUNINSTALL SONAME ''ha_xtradb'';\n\nURL: https://mariadb.com/docs/server/reference/sql-statements/administrative-sql-statements/plugin-sql-statements/uninstall-soname', '', 'https://mariadb.com/docs/server/reference/sql-statements/administrative-sql-statements/plugin-sql-statements/uninstall-soname');
INSERT INTO help_topic (help_topic_id, help_category_id, name, description, example, url) VALUES (525, 26, 'PURGE BINARY LOGS', 'Syntax\n------\n\nPURGE { BINARY | MASTER } LOGS\n    { TO ''log_name'' | BEFORE datetime_expr }\n\nDescription\n-----------\n\nThe PURGE BINARY LOGS statement deletes all the binary log files listed in the log index file prior to the specified log file name ordate. BINARY and MASTER are synonyms.Deleted log files also are removed from the list recorded in the index file, sothat the given log file becomes the first in the list.\n\nThe datetime expression is in the format ''YYYY-MM-DD hh:mm:ss''.\n\nIf a slave is active but has yet to read from a binary log file you attempt to delete, the statement will fail with an error. However, if the slave is not connected and has yet to read from a log file you delete, the file will be deleted, but the slave will be unable to continue replicating once it connects again.\n\nThis statement has no effect if the server was not started with the --log-bin option to enable binary logging.\n\nTo list the binary log files on the server, use SHOW BINARY LOGS. To see which files they are reading, use SHOW SLAVE STATUS. You can only delete the files that are older than the oldest file that is used by the slaves.\n\nTo list the binary log files on the server, use SHOW BINARY LOGS. To see which files they are reading, use SHOW SLAVE STATUS. You can only delete the files that are older than the oldest file that is used by the slaves.\n\nTo delete all binary log files, use RESET MASTER.To move to a new log file (for example if you want to remove the current log file), use FLUSH LOGS before you execute PURGE LOGS.\n\nIf the expire_logs_days server system variable is not set to 0, the server automatically deletes binary log files after the given number of days. From MariaDB 10.6, the binlog_expire_logs_seconds variable allows more precise control over binlog deletion, and takes precedence if both are non-zero.\n\nRequires the BINLOG ADMIN privilege.\n\nRequires the SUPER privilege.\n\nExamples\n--------\n\nPURGE BINARY LOGS TO ''mariadb-bin.000063'';\n\nURL: https://mariadb.com/docs/server/reference/sql-statements/administrative-sql-statements/purge-binary-logs', '', 'https://mariadb.com/docs/server/reference/sql-statements/administrative-sql-statements/purge-binary-logs');
INSERT INTO help_topic (help_topic_id, help_category_id, name, description, example, url) VALUES (526, 26, 'Replication Statements', 'Description\n-----------\n\nThe terms _master_ and _slave_ have historically been used in replication, and MariaDB has begun the process of adding _primary_ and _replica_ synonyms. The old terms will continue to be used to maintain backward compatibility - see MDEV-18777 to follow progress on this effort.\n\nchange-master-to.md\n\nreset-master.md\n\nreset-replica.md\n\nset-global-sql_slave_skip_counter.md\n\nstart-replica.md\n\nstop-replica.md\n\nlegacy-replication-statements\n\nURL: https://mariadb.com/docs/server/reference/sql-statements/administrative-sql-statements/replication-statements/README', '', 'https://mariadb.com/docs/server/reference/sql-statements/administrative-sql-statements/replication-statements/README');

INSERT INTO help_topic (help_topic_id, help_category_id, name, description, example, url) VALUES (528, 26, 'RESET REPLICA', 'Description\n-----------\n\nAlias for RESET SLAVE\n\nURL: https://mariadb.com/docs/server/reference/sql-statements/administrative-sql-statements/replication-statements/legacy-replication-statements/legacy-commands-reset-slave', '', 'https://mariadb.com/docs/server/reference/sql-statements/administrative-sql-statements/replication-statements/legacy-replication-statements/legacy-commands-reset-slave');
INSERT INTO help_topic (help_topic_id, help_category_id, name, description, example, url) VALUES (529, 26, 'SHOW REPLICA HOSTS', 'Description\n-----------\n\nAlias for SHOW SLAVE HOSTS\n\nURL: https://mariadb.com/docs/server/reference/sql-statements/administrative-sql-statements/replication-statements/legacy-replication-statements/legacy-commands-show-slave-hosts', '', 'https://mariadb.com/docs/server/reference/sql-statements/administrative-sql-statements/replication-statements/legacy-replication-statements/legacy-commands-show-slave-hosts');
INSERT INTO help_topic (help_topic_id, help_category_id, name, description, example, url) VALUES (530, 26, 'SHOW REPLICA STATUS', 'Description\n-----------\n\nAlias for SHOW SLAVE STATUS\n\nURL: https://mariadb.com/docs/server/reference/sql-statements/administrative-sql-statements/replication-statements/legacy-replication-statements/legacy-commands-show-slave-status', '', 'https://mariadb.com/docs/server/reference/sql-statements/administrative-sql-statements/replication-statements/legacy-replication-statements/legacy-commands-show-slave-status');
INSERT INTO help_topic (help_topic_id, help_category_id, name, description, example, url) VALUES (531, 26, 'START REPLICA', 'Description\n-----------\n\nAlias for START SLAVE\n\nURL: https://mariadb.com/docs/server/reference/sql-statements/administrative-sql-statements/replication-statements/legacy-replication-statements/legacy-commands-start-slave', '', 'https://mariadb.com/docs/server/reference/sql-statements/administrative-sql-statements/replication-statements/legacy-replication-statements/legacy-commands-start-slave');
INSERT INTO help_topic (help_topic_id, help_category_id, name, description, example, url) VALUES (532, 26, 'STOP REPLICA', 'Description\n-----------\n\nAlias for STOP SLAVE\n\nURL: https://mariadb.com/docs/server/reference/sql-statements/administrative-sql-statements/replication-statements/legacy-replication-statements/legacy-commands-stop-slave', '', 'https://mariadb.com/docs/server/reference/sql-statements/administrative-sql-statements/replication-statements/legacy-replication-statements/legacy-commands-stop-slave');
INSERT INTO help_topic (help_topic_id, help_category_id, name, description, example, url) VALUES (533, 26, 'RESET MASTER', 'Description\n-----------\n\n``sql\nRESET MASTER [TO #]\n`\n\nDeletes all binary log files listed in the index file, resets the binary log index file to be empty, and creates a new binary log file with a suffix of .000001.\n\nIf TO #` is given, then the first new binary log file will start from number #.\n\nThis statement is for use only when the master is started for the first time and should never be used if any slaves are actively replicating from the binary log.\n\nURL: https://mariadb.com/docs/server/reference/sql-statements/administrative-sql-statements/replication-statements/reset-master', '', 'https://mariadb.com/docs/server/reference/sql-statements/administrative-sql-statements/replication-statements/reset-master');

INSERT INTO help_topic (help_topic_id, help_category_id, name, description, example, url) VALUES (535, 26, 'SET GLOBAL SQL\\_SLAVE\\_SKIP\\_COUNTER', 'Syntax\n------\n\nSET GLOBAL sql_slave_skip_counter = N\n\nDescription\n-----------\n\nThis statement skips the next N events from the master. This is useful for recovering from replication stops caused by a statement.\n\nIf multi-source replication is used, this statement applies to the default connection. It could be necessary to change the value of the default_master_connection system variable.\n\nNote that, if the event is a transaction, the whole transaction will be skipped. With non-transactional engines, an event is always a single statement.\n\nThis statement is valid only when the slave threads are not running. Otherwise, it produces an error.\n\nThe statement does not automatically restart the slave threads.\n\nExamples\n--------\n\nSHOW SLAVE STATUS \\G\n...\nSET GLOBAL sql_slave_skip_counter = 1;\nSTART SLAVE;\n\nURL: https://mariadb.com/docs/server/reference/sql-statements/administrative-sql-statements/replication-statements/set-global-sql_slave_skip_counter', '', 'https://mariadb.com/docs/server/reference/sql-statements/administrative-sql-statements/replication-statements/set-global-sql_slave_skip_counter');

INSERT INTO help_topic (help_topic_id, help_category_id, name, description, example, url) VALUES (537, 26, 'STOP SLAVE', 'Syntax\n------\n\nSTOP { SLAVE | REPLICA } ["connection_name"] [thread_type [, thread_type] ... ] \n[FOR CHANNEL "connection_name"]\n\nSTOP ALL { SLAVES | REPLICAS } [thread_type [, thread_type]]\n\nSTOP { SLAVE | REPLICA } ["connection_name"] [thread_type [, thread_type] ... ]\n\nSTOP ALL { SLAVES | REPLICAS } [thread_type [, thread_type]] \n\nthread_type: IO_THREAD | SQL_THREAD\n\nDescription\n-----------\n\nStops the slave threads. STOP SLAVE requires the SUPER privilege, or, from MariaDB 10.5.2, the REPLICATION SLAVE ADMIN privilege.\n\nLike START SLAVE, this statement may be used with the IO_THREAD andSQL_THREAD options to name the thread or threads to be stopped. In almost all cases, one never need to use the thread_type options.\n\nSTOP SLAVE waits until any current replication event group affecting one or more non-transactional tables has finished executing (if there is any such replication group), or until the user issues a KILL QUERY or KILL CONNECTION statement.\n\nNote that STOP SLAVE doesn''t delete the connection permanently. Next time you execute START SLAVE or the MariaDB server restarts, the slave connection is restored with it''s original arguments. If you want to delete a connection, you should execute RESET SLAVE.\n\nSTOP ALL SLAVES\n\nSTOP ALL SLAVES stops all your running slaves. It will give you a note for every stopped connection. You can check the notes with SHOW WARNINGS.\n\nconnection_name\n\nThe connection_name option is used for multi-source replication.\n\nIf there is only one nameless master, or the default master (as specified by the default_master_connection system variable) is intended, connection_name can be omitted. If provided, the STOP SLAVE statement will apply to the specified master. connection_name is case-insensitive.\n\nMariaDB starting with 10.7.0\n\nThe FOR CHANNEL keyword is available for MySQL compatibility. This is identical as using the channel_name directly after STOP SLAVE.\n\nThe FOR CHANNEL keyword is not available.\n\nURL: https://mariadb.com/docs/server/reference/sql-statements/administrative-sql-statements/replication-statements/stop-replica', '', 'https://mariadb.com/docs/server/reference/sql-statements/administrative-sql-statements/replication-statements/stop-replica');
INSERT INTO help_topic (help_topic_id, help_category_id, name, description, example, url) VALUES (538, 26, 'RESET', 'Syntax\n------\n\nRESET reset_option [, reset_option] ...\n\nDescription\n-----------\n\nThe RESET statement is used to clear the state of various server operations. You must have the RELOAD privilege to executeRESET.\n\nRESET acts as a stronger version of the FLUSH statement.\n\nThe different RESET options are:\n\n| Option                                           | Description                                                                                                                                                                                                                                                                                                                                                                                           |\n| ------------------------------------------------ | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |\n| SLAVE \\["connection_name"] \\[ALL]               | Deletes all relay logs from the slave and reset the replication position in the master binary log.                                                                                                                                                      |\n| MASTER | Deletes all old binary logs, makes the binary index file (--log-bin-index) empty and creates a new binary log file. This is useful when you want to reset the master to an initial state. If you want to just delete old, not used binary logs, you should use the PURGE BINARY LOGS command. |\n| QUERY CACHE                                      | Removes all queries from the query cache. See also FLUSH QUERY CACHE.                                                                                                                                                                                         |\n\nURL: https://mariadb.com/docs/server/reference/sql-statements/administrative-sql-statements/reset', '', 'https://mariadb.com/docs/server/reference/sql-statements/administrative-sql-statements/reset');
INSERT INTO help_topic (help_topic_id, help_category_id, name, description, example, url) VALUES (539, 26, 'SET Statements', 'Description\n-----------\n\nset.md\n\nset-character-set.md\n\nset-global-sql_slave_skip_counter.md\n\nset-names.md\n\nset-password.md\n\nset-role.md\n\nset-sql_log_bin.md\n\nset-statement.md\n\nset-transaction.md\n\nset-variable.md\n\nURL: https://mariadb.com/docs/server/reference/sql-statements/administrative-sql-statements/set-commands/README', '', 'https://mariadb.com/docs/server/reference/sql-statements/administrative-sql-statements/set-commands/README');
INSERT INTO help_topic (help_topic_id, help_category_id, name, description, example, url) VALUES (540, 26, 'SET PATH', 'Syntax\n------\n\nSET PATH ''db1 [, db2 [, ...]]''\n\nDescription\n-----------\n\nSets the list of schemas (databases) that MariaDB uses to search for stored routines to invoke. Such a search happens in the CALL statement and when stored function are used in expressions.\n\nThe value of the path is a string which contains comma-separated schema names. A schema name can be quoted with backticks (or double quotes, as appropriate). A special name CURRENT_SCHEMA means to look in the current schema. Spaces are ignored, unless they are part of a quoted schema name. A path cannot contain two equivalent schema names.\n\nThe following two commands invoke the same stored procedure:\n\n``sql\nCALL sys.optimizer_switch_on();\n`\nand\n`sql\nSET PATH ''sys'';\nCALL optimizer_switch_on();\n`\n\nA default value of the path is ''CURRENT_SCHEMA'' which provides the traditional behavior — stored routines must be in the current database.\n\nAlso the path is used to look up packages in package routine invocations. Assuming there is a package UTL_ENCODE in the sys schema, and it contains the function BASE64_DECODE(), one can write\n\n`sql\nSELECT sys.UTL_ENCODE.BASE64_DECODE(''data'');\n`\nor\n`sql\nSET PATH=''sys''; \nSELECT UTL_ENCODE.BASE64_DECODE(''data'');\n`\n\nNotes\n\n This functionality introduces the @@path system variable (session and global).\n The SET PATH statement sets the @@session.path variable. It is also possible to assign a new value to the @@path variable directory, using a statement like this: SET @@path=''sys''`.\n* Prepared statements, stored routines, and views remember the value of the path when they are created. The value of the path at the time of the execution does not apply.\n\nURL: https://mariadb.com/docs/server/reference/sql-statements/administrative-sql-statements/set-commands/set-path', '', 'https://mariadb.com/docs/server/reference/sql-statements/administrative-sql-statements/set-commands/set-path');
INSERT INTO help_topic (help_topic_id, help_category_id, name, description, example, url) VALUES (541, 26, 'SET SQL\\_LOG\\_BIN', 'Syntax\n------\n\nSET [SESSION] sql_log_bin = {0|1}\n\nDescription\n-----------\n\nSets the sql_log_bin system variable, which disables or enables binary logging for the current connection, if the client has the SUPER privilege. The statement is refused with an error if the client does not have that privilege.\n\nNote that setting sql_log_bin=1 has no effect if log_bin variable, which enables global binary logging, is not set.\n\nYou cannot set sql_log_bin as a global variable.\n\nYou can set sql_log_bin as a global variable. This is considered dangerous, though, as it can damage replication.\n\nURL: https://mariadb.com/docs/server/reference/sql-statements/administrative-sql-statements/set-commands/set-sql_log_bin', '', 'https://mariadb.com/docs/server/reference/sql-statements/administrative-sql-statements/set-commands/set-sql_log_bin');
INSERT INTO help_topic (help_topic_id, help_category_id, name, description, example, url) VALUES (542, 26, 'SET STATEMENT', 'Syntax\n------\n\nSET STATEMENT var1=value1 [, var2=value2, ...] \n  FOR <statement>\n\nDescription\n-----------\n\nSET STATEMENT var1=value1 FOR stmt\n\nis roughly equivalent to\n\n``sql\nSET @save_value=@@var1;\nSET SESSION var1=value1;\nstmt;\nSET SESSION var1=@save_value;\n``\n\nThe server parses the whole statement before executing it, so any variables set in this fashion that affect the parser may not have the expected effect. Examples include the charset variables, sql_mode=ansi_quotes, etc.\n\nExamples\n--------\n\nSET STATEMENT max_statement_time=1000 FOR SELECT ... ;\n\nURL: https://mariadb.com/docs/server/reference/sql-statements/administrative-sql-statements/set-commands/set-statement', '', 'https://mariadb.com/docs/server/reference/sql-statements/administrative-sql-statements/set-commands/set-statement');
INSERT INTO help_topic (help_topic_id, help_category_id, name, description, example, url) VALUES (543, 26, 'SET', 'Syntax\n------\n\nSET variable_assignment [, variable_assignment] ...\n\nvariable_assignment:\n      user_var_name = expr\n    | [GLOBAL | SESSION] system_var_name = expr\n    | [@@global. | @@session. | @@]system_var_name = expr\n\nDescription\n-----------\n\nThe SET statement assigns values to different types of variables that affect the operation of the server or your client.\n\nThe SET statement assigns values to different types of variables that affect the operation of the server or your client. Older versions of MySQL employed SET OPTION, but this syntax was deprecated in favor of SET without OPTION.\n\nChanging a system variable by using the SET statement does not make the change permanently. To do so, the change must be made in a configuration file.\n\nFor setting variables on a per-query basis, see SET STATEMENT.\n\nSee SHOW VARIABLES for documentation on viewing server system variables.\n\nSee Server System Variables for a list of all the system variables.\n\nGLOBAL / SESSION\n\nWhen setting a system variable, the scope can be specified as either GLOBAL or SESSION.\n\nA global variable change affects all new sessions. It does not affect any currently open sessions, including the one that made the change.\n\nA session variable change affects the current session only.\n\nIf the variable has a session value, not specifying either GLOBAL or SESSION will be the same as specifying SESSION. If the variable only has a global value, not specifying GLOBAL or SESSION will apply to the change to the global value.\n\nDEFAULT\n\nSetting a global variable to DEFAULT will restore it to the server default, and setting a session variable to DEFAULT will restore it to the current global value.\n\nExamples\n--------\n\nSELECT VARIABLE_NAME, SESSION_VALUE, GLOBAL_VALUE FROM\n INFORMATION_SCHEMA.SYSTEM_VARIABLES WHERE \n  VARIABLE_NAME IN (''max_error_count'', ''skip_parallel_replication'', ''innodb_sync_spin_loops'');\n+---------------------------+---------------+--------------+\n| VARIABLE_NAME             | SESSION_VALUE | GLOBAL_VALUE |\n+---------------------------+---------------+--------------+\n| MAX_ERROR_COUNT           | 64            | 64           |\n| SKIP_PARALLEL_REPLICATION | OFF           | NULL         |\n| INNODB_SYNC_SPIN_LOOPS    | NULL          | 30           |\n+---------------------------+---------------+--------------+\n\nURL: https://mariadb.com/docs/server/reference/sql-statements/administrative-sql-statements/set-commands/set', '', 'https://mariadb.com/docs/server/reference/sql-statements/administrative-sql-statements/set-commands/set');
INSERT INTO help_topic (help_topic_id, help_category_id, name, description, example, url) VALUES (544, 26, 'About SHOW', 'Description\n-----------\n\nSHOW provides information about various aspects of MariaDB Server. A list of the various SHOW statements is here.\n\nThe general syntax is:\n\n``sql\nSHOW LIKE ''pattern'' | WHERE expr\n`\n\nThe LIKE and WHERE clauses make sense only for particular SHOW statements, though. See Extended SHOW for what SHOW statements benefit from using those clauses.\n\nIf the syntax for a given SHOW statement includes LIKE ''pattern'' , ''pattern'' is a\\\nstring that can contain the SQL % and _` wildcard characters. The pattern is useful for\\\nrestricting statement output to matching values.\n\nURL: https://mariadb.com/docs/server/reference/sql-statements/administrative-sql-statements/show/about-show', '', 'https://mariadb.com/docs/server/reference/sql-statements/administrative-sql-statements/show/about-show');
INSERT INTO help_topic (help_topic_id, help_category_id, name, description, example, url) VALUES (545, 26, 'Extended SHOW', 'Description\n-----------\n\nThe following SHOW statements can be extended using a WHERE clause and a LIKE clause to refine the results:\n\n SHOW CHARACTER SET\n SHOW COLLATION\n SHOW COLUMNS\n SHOW DATABASES\n SHOW FUNCTION STATUS\n SHOW INDEX\\\\\n SHOW OPEN TABLES\n SHOW PACKAGE STATUS\n SHOW PACKAGE BODY STATUS\n SHOW INDEX\n SHOW PROCEDURE STATUS\n SHOW STATUS\n SHOW TABLE STATUS\n SHOW TABLES\n SHOW TRIGGERS\n SHOW VARIABLES\n\nAs with a regular SELECT, the WHERE clause can be used for the specific columns returned, and the LIKE clause with the regular wildcards.\n\nExamples\n--------\n\nSHOW TABLES;\n+----------------------+\n| Tables_in_test       |\n+----------------------+\n| animal_count         |\n| animals              |\n| are_the_mooses_loose |\n| aria_test2           |\n| t1                   |\n| view1                |\n+----------------------+\n\nURL: https://mariadb.com/docs/server/reference/sql-statements/administrative-sql-statements/show/extended-show', '', 'https://mariadb.com/docs/server/reference/sql-statements/administrative-sql-statements/show/extended-show');
INSERT INTO help_topic (help_topic_id, help_category_id, name, description, example, url) VALUES (546, 26, 'SHOW ANALYZE', 'Syntax\n------\n\nSHOW ANALYZE [FORMAT=JSON] FOR <connection_id>;\n\nDescription\n-----------\n\nSHOW ANALYZE allows one to retrieve ANALYZE-like output from a currently running statement. The statement\n\n``sql\nSHOW ANALYZE [FORMAT=JSON] FOR <connection_id>;\n`\n\nconnects to the query running in connection connection_id, gets information about the query plan it is executing, _also gets information about the runtime statistics of the execution so far_ and returns it in a format similar to ANALYZE [FORMAT=JSON] output.\n\nThis is similar to the SHOW EXPLAIN command, the difference being that SHOW ANALYZE also produces runtime statistics information.\n\nUse Case\n\nYou''re trying to troubleshoot a query that never finishes. Since it doesn''t finish, it is not possible to get ANALYZE output for it. With SHOW ANALYZE`, you can get the runtime statistics without waiting for the query to finish.\n\nExamples\n--------\n\nEXPLAIN format=json\nSELECT sum(orders.amount)\nFROM\n  customer JOIN orders ON customer.cust_id=orders.cust_id\nWHERE\n  customer.status=''GOLD'';\n\nURL: https://mariadb.com/docs/server/reference/sql-statements/administrative-sql-statements/show/show-analyze', '', 'https://mariadb.com/docs/server/reference/sql-statements/administrative-sql-statements/show/show-analyze');
INSERT INTO help_topic (help_topic_id, help_category_id, name, description, example, url) VALUES (547, 26, 'SHOW AUTHORS', 'Syntax\n------\n\nSHOW AUTHORS\n\nDescription\n-----------\n\nThe SHOW AUTHORS statement displays information about the people who work on MariaDB. For each author, it displays Name, Location, and Comment values. All columns are encoded as latin1.\n\nThese include:\n\n First the active people in MariaDB are listed.\n Then the active people in MySQL.\n Last the people that have contributed to MariaDB/MySQL in the past.\n\nThe order is somewhat related to importance of the contribution given to the MariaDB project, but this is not 100% accurate. There is still room for improvement and debate...\n\nExamples\n--------\n\nSHOW AUTHORS\\G\n*********************** 1. row *********************\n    Name: Michael (Monty) Widenius\nLocation: Tusby, Finland\n Comment: Lead developer and main author\n********************* 2. row *********************\n    Name: Sergei Golubchik\nLocation: Kerpen, Germany\n Comment: Architect, Full-text search, precision math, plugin framework, merges etc\n********************* 3. row *********************\n    Name: Igor Babaev\nLocation: Bellevue, USA\n Comment: Optimizer, keycache, core work\n********************* 4. row *********************\n    Name: Sergey Petrunia\nLocation: St. Petersburg, Russia\n Comment: Optimizer\n********************* 5. row *********************\n    Name: Oleksandr Byelkin\nLocation: Lugansk, Ukraine\n Comment: Query Cache (4.0), Subqueries (4.1), Views (5.0)\n********************* 6. row *********************\n    Name: Timour Katchaounov\nLocation: Sofia , Bulgaria\n Comment: Optimizer\n********************* 7. row *********************\n    Name: Kristian Nielsen\nLocation: Copenhagen, Denmark\n Comment: Replication, Async client prototocol, General buildbot stuff\n********************* 8. row *********************\n    Name: Alexander (Bar) Barkov\nLocation: Izhevsk, Russia\n Comment: Unicode and character sets\n********************* 9. row *********************\n    Name: Alexey Botchkov (Holyfoot)\nLocation: Izhevsk, Russia\n Comment: GIS extensions, embedded server, precision math\n********************* 10. row *********************\n    Name: Daniel Bartholomew\nLocation: Raleigh, USA\n Comment: MariaDB documentation, Buildbot, releases\n********************* 11. row *********************\n    Name: Colin Charles\nLocation: Selangor, Malesia\n Comment: MariaDB documentation, talks at a LOT of conferences\n********************* 12. row *********************\n    Name: Sergey Vojtovich\nLocation: Izhevsk, Russia\n Comment: initial implementation of plugin architecture, maintained native storage engines (MyISAM, MEMORY, ARCHIVE, etc), rewrite of table cache\n********************* 13. row *********************\n    Name: Vladislav Vaintroub\nLocation: Mannheim, Germany\n Comment: MariaDB Java connector, new thread pool, Windows optimizations\n********************* 14. row *********************\n    Name: Elena Stepanova\nLocation: Sankt Petersburg, Russia\n Comment: QA, test cases\n********************* 15. row *********************\n    Name: Georg Richter\nLocation: Heidelberg, Germany\n Comment: New LGPL C connector, PHP connector\n********************* 16. row *********************\n    Name: Jan Lindström\nLocation: Ylämylly, Finland\n Comment: Working on InnoDB\n********************* 17. row *********************\n    Name: Lixun Peng\nLocation: Hangzhou, China\n Comment: Multi Source replication\n********************* 18. row *********************\n    Name: Olivier Bertrand\nLocation: Paris, France\n Comment: CONNECT storage engine\n********************* 19. row *********************\n    Name: Kentoku Shiba\nLocation: Tokyo, Japan\n Comment: Spider storage engine, metadata_lock_info Information schema\n********************* 20. row *********************\n    Name: Percona\nLocation: CA, USA\n Comment: XtraDB, microslow patches, extensions to slow log\n********************* 21. row *********************\n    Name: Vicentiu Ciorbaru\nLocation: Bucharest, Romania\n Comment: Roles\n********************* 22. row *********************\n    Name: Sudheera Palihakkara\nLocation: \n Comment: PCRE Regular Expressions\n********************* 23. row *********************\n    Name: Pavel Ivanov\nLocation: USA\n Comment: Some patches and bug fixes\n********************* 24. row *********************\n    Name: Konstantin Osipov\nLocation: Moscow, Russia\n Comment: Prepared statements (4.1), Cursors (5.0), GET_LOCK (10.0)\n********************* 25. row *********************\n    Name: Ian Gilfillan\nLocation: South Africa\n Comment: MariaDB documentation\n********************* 26. row *********************\n    Name: Federico Razolli\nLocation: Italy\n Comment: MariaDB documentation Italian translation\n********************* 27. row *********************\n    Name: Guilhem Bichot\nLocation: Bordeaux, France\n Comment: Replication (since 4.0)\n********************* 28. row *********************\n    Name: Andrei Elkin\nLocation: Espoo, Finland\n Comment: Replication\n********************* 29. row *********************\n    Name: Dmitri Lenev\nLocation: Moscow, Russia\n Comment: Time zones support (4.1), Triggers (5.0)\n********************* 30. row *********************\n    Name: Marc Alff\nLocation: Denver, CO, USA\n Comment: Signal, Resignal, Performance schema\n********************* 31. row *********************\n    Name: Mikael Ronström\nLocation: Stockholm, Sweden\n Comment: NDB Cluster, Partitioning, online alter table\n********************* 32. row *********************\n    Name: Ingo Strüwing\nLocation: Berlin, Germany\n Comment: Bug fixing in MyISAM, Merge tables etc\n********************* 33. row ************************\n    Name: Marko Mäkelä\nLocation: Helsinki, Finland\n Comment: InnoDB core developer\n...\n\nURL: https://mariadb.com/docs/server/reference/sql-statements/administrative-sql-statements/show/show-authors', '', 'https://mariadb.com/docs/server/reference/sql-statements/administrative-sql-statements/show/show-authors');
INSERT INTO help_topic (help_topic_id, help_category_id, name, description, example, url) VALUES (548, 26, 'SHOW BINARY LOGS', 'Syntax\n------\n\nSHOW BINARY LOGS\nSHOW MASTER LOGS\n\nDescription\n-----------\n\nLists the binary log files on the server. This statement is used as part of the procedure described in PURGE BINARY LOGS, that shows how to determine which logs can be purged.\n\nThis statement requires the BINLOG MONITOR privilege.\n\nThis statement requires the SUPER privilege and the REPLICATION_CLIENT privilege.\n\nExamples\n--------\n\nSHOW BINARY LOGS;\n+--------------------+-----------+\n| Log_name           | File_size |\n+--------------------+-----------+\n| mariadb-bin.000001 |     19039 |\n| mariadb-bin.000002 |    717389 |\n| mariadb-bin.000003 |       300 |\n| mariadb-bin.000004 |       333 |\n| mariadb-bin.000005 |       899 |\n| mariadb-bin.000006 |       125 |\n| mariadb-bin.000007 |     18907 |\n| mariadb-bin.000008 |     19530 |\n| mariadb-bin.000009 |       151 |\n| mariadb-bin.000010 |       151 |\n| mariadb-bin.000011 |       125 |\n| mariadb-bin.000012 |       151 |\n| mariadb-bin.000013 |       151 |\n| mariadb-bin.000014 |       125 |\n| mariadb-bin.000015 |       151 |\n| mariadb-bin.000016 |       314 |\n+--------------------+-----------+\n\nURL: https://mariadb.com/docs/server/reference/sql-statements/administrative-sql-statements/show/show-binary-logs', '', 'https://mariadb.com/docs/server/reference/sql-statements/administrative-sql-statements/show/show-binary-logs');
INSERT INTO help_topic (help_topic_id, help_category_id, name, description, example, url) VALUES (549, 26, 'SHOW BINLOG EVENTS', 'Syntax\n------\n\nSHOW BINLOG EVENTS\n   [IN ''log_name''] [FROM pos] [LIMIT [offset,] row_count]\n\nDescription\n-----------\n\nShows the events in the binary log. If you do not specify log_name, the first binary log is displayed.\n\nThis statement requires the BINLOG MONITOR privilege.\n\nThis statement requires the REPLICATION SLAVE privilege.\n\nExamples\n--------\n\nSHOW BINLOG EVENTS IN ''mysql_sandbox10019-bin.000002'';\n+-------------------------------+-----+-------------------+-----------+-------------+------------------------------------------------+\n| Log_name                      | Pos | Event_type        | Server_id | End_log_pos | Info                                           |\n+-------------------------------+-----+-------------------+-----------+-------------+------------------------------------------------+\n| mysql_sandbox10019-bin.000002 |   4 | Format_desc       |         1 |         248 | Server ver: 10.0.19-MariaDB-log, Binlog ver: 4 |\n| mysql_sandbox10019-bin.000002 | 248 | Gtid_list         |         1 |         273 | []                                             |\n| mysql_sandbox10019-bin.000002 | 273 | Binlog_checkpoint |         1 |         325 | mysql_sandbox10019-bin.000002                  |\n| mysql_sandbox10019-bin.000002 | 325 | Gtid              |         1 |         363 | GTID 0-1-1                                     |\n| mysql_sandbox10019-bin.000002 | 363 | Query             |         1 |         446 | CREATE DATABASE blog                           |\n| mysql_sandbox10019-bin.000002 | 446 | Gtid              |         1 |         484 | GTID 0-1-2                                     |\n| mysql_sandbox10019-bin.000002 | 484 | Query             |         1 |         571 | use blog; CREATE TABLE bb (id INT)           |\n+-------------------------------+-----+-------------------+-----------+-------------+------------------------------------------------+\n\nURL: https://mariadb.com/docs/server/reference/sql-statements/administrative-sql-statements/show/show-binlog-events', '', 'https://mariadb.com/docs/server/reference/sql-statements/administrative-sql-statements/show/show-binlog-events');
INSERT INTO help_topic (help_topic_id, help_category_id, name, description, example, url) VALUES (550, 26, 'SHOW MASTER STATUS', 'Syntax\n------\n\nSHOW [MASTER | BINLOG] STATUS\n\nDescription\n-----------\n\nProvides status information about the binary log files of the master.\n\nThis statement requires the BINLOG MONITOR privilege.\n\nThis statement requires the SUPER privilege and the REPLICATION_CLIENT privilege.\n\nThe following improved functionality is available from MariaDB 12.3.\n\nTo see information about the current GTIDs in the binary log, use the gtid_binlog_pos variable. It is enabled by default, and helps find the current state of the master server. (Previously, this required two statements, SHOW MASTER STATUS and SELECT @@global.gtid_binlog_pos.)\n\nExamples\n--------\n\nSHOW BINLOG STATUS;\n+--------------------+----------+--------------+------------------+\n| File               | Position | Binlog_Do_DB | Binlog_Ignore_DB |\n+--------------------+----------+--------------+------------------+\n| mariadb-bin.000016 |      475 |              |                  |\n+--------------------+----------+--------------+------------------+\nSELECT @@global.gtid_binlog_pos;\n+--------------------------+\n| @@global.gtid_binlog_pos |\n+--------------------------+\n| 0-1-2                    |\n+--------------------------+\n\nURL: https://mariadb.com/docs/server/reference/sql-statements/administrative-sql-statements/show/show-binlog-status', '', 'https://mariadb.com/docs/server/reference/sql-statements/administrative-sql-statements/show/show-binlog-status');
INSERT INTO help_topic (help_topic_id, help_category_id, name, description, example, url) VALUES (551, 26, 'SHOW CHARACTER SET', 'Syntax\n------\n\nSHOW CHARACTER SET\n    [LIKE ''pattern'' | WHERE expr]\n\nDescription\n-----------\n\nThe SHOW CHARACTER SET statement shows all available character sets. The LIKE clause, if present on its own, indicates which character set names to match. The WHERE and LIKE clauses can be given to select rows using more general conditions, as discussed in Extended SHOW.\n\nThe same information can be queried from the Information Schema CHARACTER_SETS table.\n\nSee Setting Character Sets and Collations for details on specifying the character set at the server, database, table and column levels.\n\nExamples\n--------\n\nSHOW CHARACTER SET LIKE ''latin%'';\n+---------+-----------------------------+-------------------+--------+\n| Charset | Description                 | Default collation | Maxlen |\n+---------+-----------------------------+-------------------+--------+\n| latin1  | cp1252 West European        | latin1_swedish_ci |      1 |\n| latin2  | ISO 8859-2 Central European | latin2_general_ci |      1 |\n| latin5  | ISO 8859-9 Turkish          | latin5_turkish_ci |      1 |\n| latin7  | ISO 8859-13 Baltic          | latin7_general_ci |      1 |\n+---------+-----------------------------+-------------------+--------+\n\nURL: https://mariadb.com/docs/server/reference/sql-statements/administrative-sql-statements/show/show-character-set', '', 'https://mariadb.com/docs/server/reference/sql-statements/administrative-sql-statements/show/show-character-set');
INSERT INTO help_topic (help_topic_id, help_category_id, name, description, example, url) VALUES (552, 26, 'SHOW CLIENT\\_STATISTICS', 'Syntax\n------\n\nSHOW CLIENT_STATISTICS\n\nDescription\n-----------\n\nThe SHOW CLIENT_STATISTICS statement has effectively been replaced by the generic SHOW TABLE STATISTICS statement. The information_schema.CLIENT_STATISTICS table holds statistics about client connections.\n\nThe SHOW CLIENT_STATISTICS statement is part of the User Statistics feature. The information_schema.CLIENT_STATISTICS table holds statistics about client connections.\n\nThe userstat system variable must be set to 1 to activate this feature. See the User Statistics and information_schema.CLIENT_STATISTICS articles for more information.\n\nExamples\n--------\n\nSHOW CLIENT_STATISTICS\\G\n************************ 1. row ************************\n                Client: localhost\n     Total_connections: 35\nConcurrent_connections: 0\n        Connected_time: 708\n             Busy_time: 2.5557979999999985\n              Cpu_time: 0.04123740000000002\n        Bytes_received: 3883\n            Bytes_sent: 21595\n  Binlog_bytes_written: 0\n             Rows_read: 18\n             Rows_sent: 115\n          Rows_deleted: 0\n         Rows_inserted: 0\n          Rows_updated: 0\n       Select_commands: 70\n       Update_commands: 0\n        Other_commands: 0\n   Commit_transactions: 1\n Rollback_transactions: 0\n    Denied_connections: 0\n      Lost_connections: 0\n         Access_denied: 0\n         Empty_queries: 35\n\nURL: https://mariadb.com/docs/server/reference/sql-statements/administrative-sql-statements/show/show-client-statistics', '', 'https://mariadb.com/docs/server/reference/sql-statements/administrative-sql-statements/show/show-client-statistics');
INSERT INTO help_topic (help_topic_id, help_category_id, name, description, example, url) VALUES (553, 26, 'SHOW COLLATION', 'Syntax\n------\n\nSHOW COLLATION\n    [LIKE ''pattern'' | WHERE expr]\n\nDescription\n-----------\n\nThe output from SHOW COLLATION includes all available collations. The LIKE clause, if present on its own, indicates which collation names to match. The WHERE and LIKE clauses can be given to select rows using more general conditions, as discussed in Extended SHOW.\n\nSimilar information, including some extra information, can be queried from the Information Schema COLLATIONS table.\n\nNo similar information or extra information can be queried from the Information Schema COLLATIONS table.\n\nSee Setting Character Sets and Collations for details on specifying the collation at the server, database, table and column levels.\n\nThe pad_attribute column (not shown in the examples below) has a value of NO PAD or PAD SPACE. This attribute affects whether trailing spaces are significant in string comparisons. See the INFORMATION_SCHEMA.COLLATIONS table description for more information.\n\n``sql\nSHOW COLLATION LIKE ''utf8mb4_bin''; \n+-------------+---------+------+---------+----------+---------+---------------+ \n| Collation   | Charset | Id   | Default | Compiled | Sortlen | Pad_attribute | \n+-------------+---------+------+---------+----------+---------+---------------+ \n| utf8mb4_bin | utf8mb4 | 46   |         | Yes      | 1       | PAD SPACE     | \n+-------------+---------+------+---------+----------+---------+---------------+\n`\n\nThe pad_attribute` column is not available.\n\nExamples\n--------\n\nSHOW COLLATION LIKE ''latin1%'';\n+-------------------------+---------+------+---------+----------+---------+\n| Collation               | Charset | Id   | Default | Compiled | Sortlen |\n+-------------------------+---------+------+---------+----------+---------+\n| latin1_german1_ci       | latin1  |    5 |         | Yes      |       1 |\n| latin1_swedish_ci       | latin1  |    8 | Yes     | Yes      |       1 |\n| latin1_danish_ci        | latin1  |   15 |         | Yes      |       1 |\n| latin1_german2_ci       | latin1  |   31 |         | Yes      |       2 |\n| latin1_bin              | latin1  |   47 |         | Yes      |       1 |\n| latin1_general_ci       | latin1  |   48 |         | Yes      |       1 |\n| latin1_general_cs       | latin1  |   49 |         | Yes      |       1 |\n| latin1_spanish_ci       | latin1  |   94 |         | Yes      |       1 |\n| latin1_swedish_nopad_ci | latin1  | 1032 |         | Yes      |       1 |\n| latin1_nopad_bin        | latin1  | 1071 |         | Yes      |       1 |\n+-------------------------+---------+------+---------+----------+---------+\n\nURL: https://mariadb.com/docs/server/reference/sql-statements/administrative-sql-statements/show/show-collation', '', 'https://mariadb.com/docs/server/reference/sql-statements/administrative-sql-statements/show/show-collation');
INSERT INTO help_topic (help_topic_id, help_category_id, name, description, example, url) VALUES (554, 26, 'SHOW COLUMNS', 'Syntax\n------\n\nSHOW [FULL] {COLUMNS | FIELDS} FROM tbl_name [FROM db_name]\n    [LIKE ''pattern'' | WHERE expr]\n\nDescription\n-----------\n\nSHOW COLUMNS displays information about the columns in a given table. It also works for views. The LIKE clause, if present on its own, indicates which column names to match. The WHERE and LIKE clauses can be given to select rows using more general conditions, as discussed in Extended SHOW.\n\nIf the data types differ from what you expect them to be based on aCREATE TABLE statement, note that MariaDB sometimes changes data types when you create or alter a table. The conditions under which this occurs are described in the Silent Column Changes article.\n\nThe FULL keyword causes the output to include the column collation and comments, as well as the privileges you have for each column.\n\nYou can use db_name.tbl_name as an alternative to thetbl_name FROM db_name syntax. In other words, these two statements are equivalent:\n\n``sql\nSHOW COLUMNS FROM mytable FROM mydb;\nSHOW COLUMNS FROM mydb.mytable;\n`\n\nSHOW COLUMNS displays the following values for each table column:\n\nField indicates the column name.\n\nType indicates the column data type.\n\nCollation indicates the collation for non-binary string columns, or NULL for other columns. This value is displayed only if you use the FULL keyword.\n\nThe Null field contains YES if NULL values can be stored in the column, NO if not.\n\nThe Key field indicates whether the column is indexed:\n\n If Key is empty, the column either is not indexed or is indexed only as a secondary column in a multiple-column, non-unique index.\n If Key is PRI, the column is a PRIMARY KEY or is one of the columns in a multiple-column PRIMARY KEY.\n If Key is UNI, the column is the first column of a unique-valued index that cannot contain NULL values.\n If Key is MUL, multiple occurrences of a given value are allowed within the column. The column is the first column of a non-unique index or a unique-valued index that can contain NULL values.\n\nIf more than one of the Key values applies to a given column of a table, Key displays the one with the highest priority, in the order PRI, UNI, MUL.\n\nA UNIQUE index may be displayed as PRI if it cannot contain NULL values and there is noPRIMARY KEY in the table. A UNIQUE index may display as MUL if several columns form a compositeUNIQUE index; although the combination of the columns is unique, each column can still hold multiple occurrences of a given value.\n\nThe Default field indicates the default value that is assigned to the column.\n\nThe Extra field contains any additional information that is available about a given column.\n\n| Value                        | Description                                                                          |\n| ---------------------------- | ------------------------------------------------------------------------------------ |\n| AUTO_INCREMENT              | The column was created with the AUTO_INCREMENT keyword.                             |\n| PERSISTENT                   | The column was created with the PERSISTENT keyword.                                  |\n| VIRTUAL                      | The column was created with the VIRTUAL keyword.                                     |\n| on update CURRENT_TIMESTAMP | The column is a TIMESTAMP column that is automatically updated on INSERT and UPDATE. |\n\nPrivileges indicates the privileges you have for the column. This value is displayed only if you use the FULL keyword.\n\nComment indicates any comment the column has. This value is displayed only if you use the FULL keyword.\n\nSHOW FIELDS is a synonym forSHOW COLUMNS. Also DESCRIBE and EXPLAIN can be used as shortcuts.\n\nYou can also list a table''s columns with:\n\n`\nmariadb-show db_name tbl_name\n`\n\nSee the mariadb-show command for more details.\n\nThe DESCRIBE statement provides information similar to SHOW COLUMNS`. The information_schema.COLUMNS table provides similar, but more complete, information.\n\nThe SHOW CREATE TABLE, SHOW TABLE STATUS, and SHOW INDEX statements also provide information about tables.\n\nExamples\n--------\n\nSHOW COLUMNS FROM city;\n+------------+----------+------+-----+---------+----------------+\n| Field      | Type     | Null | Key | Default | Extra          |\n+------------+----------+------+-----+---------+----------------+\n| Id         | int(11)  | NO   | PRI | NULL    | auto_increment |\n| Name       | char(35) | NO   |     |         |                |\n| Country    | char(3)  | NO   | UNI |         |                |\n| District   | char(20) | YES  | MUL |         |                |\n| Population | int(11)  | NO   |     | 0       |                |\n+------------+----------+------+-----+---------+----------------+\n\nURL: https://mariadb.com/docs/server/reference/sql-statements/administrative-sql-statements/show/show-columns', '', 'https://mariadb.com/docs/server/reference/sql-statements/administrative-sql-statements/show/show-columns');
INSERT INTO help_topic (help_topic_id, help_category_id, name, description, example, url) VALUES (555, 26, 'SHOW CONTRIBUTORS', 'Syntax\n------\n\nSHOW CONTRIBUTORS\n\nDescription\n-----------\n\nThe SHOW CONTRIBUTORS statement displays information about the companies and people who financially contribute to MariaDB. For each contributor, it displays Name, Location, and Comment values. All columns are encoded as latin1.\n\nIt displays all members and sponsors of the MariaDB Foundation as well as other financial contributors.\n\nExamples\n--------\n\nSHOW CONTRIBUTORS;\n+---------------------+-------------------------------+-------------------------------------------------------------+\n| Name                | Location                      | Comment                                                     |\n+---------------------+-------------------------------+-------------------------------------------------------------+\n| Alibaba Cloud       | https://www.alibabacloud.com/ | Platinum Sponsor of the MariaDB Foundation                  |\n| Tencent Cloud       | https://cloud.tencent.com     | Platinum Sponsor of the MariaDB Foundation                  |\n| Microsoft           | https://microsoft.com/        | Platinum Sponsor of the MariaDB Foundation                  |\n| MariaDB Corporation | https://mariadb.com           | Founding member, Platinum Sponsor of the MariaDB Foundation |\n| ServiceNow          | https://servicenow.com        | Platinum Sponsor of the MariaDB Foundation                  |\n| Intel               | https://www.intel.com         | Platinum Sponsor of the MariaDB Foundation                  |\n| SIT                 | https://sit.org               | Platinum Sponsor of the MariaDB Foundation                  |\n| Visma               | https://visma.com             | Gold Sponsor of the MariaDB Foundation                      |\n| DBS                 | https://dbs.com               | Gold Sponsor of the MariaDB Foundation                      |\n| IBM                 | https://www.ibm.com           | Gold Sponsor of the MariaDB Foundation                      |\n| Automattic          | https://automattic.com        | Silver Sponsor of the MariaDB Foundation                    |\n| Percona             | https://www.percona.com/      | Sponsor of the MariaDB Foundation                           |\n| Galera Cluster      | https://galeracluster.com     | Sponsor of the MariaDB Foundation                           |\n| Google              | USA                           | Sponsoring encryption, parallel replication and GTID        |\n| Facebook            | USA                           | Sponsoring non-blocking API, LIMIT ROWS EXAMINED etc        |\n| Ronald Bradford     | Brisbane, Australia           | EFF contribution for UC2006 Auction                         |\n| Sheeri Kritzer      | Boston, Mass. USA             | EFF contribution for UC2006 Auction                         |\n| Mark Shuttleworth   | London, UK.                   | EFF contribution for UC2006 Auction                         |\n+---------------------+-------------------------------+-------------------------------------------------------------+\n\nURL: https://mariadb.com/docs/server/reference/sql-statements/administrative-sql-statements/show/show-contributors', '', 'https://mariadb.com/docs/server/reference/sql-statements/administrative-sql-statements/show/show-contributors');
INSERT INTO help_topic (help_topic_id, help_category_id, name, description, example, url) VALUES (556, 26, 'SHOW CREATE DATABASE', 'Syntax\n------\n\nSHOW CREATE {DATABASE | SCHEMA} db_name\n\nDescription\n-----------\n\nShows the CREATE DATABASE statement that creates the given database. SHOW CREATE SCHEMA is a synonym for SHOW CREATE DATABASE. SHOW CREATE DATABASE quotes database names according to the value of the sql_quote_show_create server system variable.\n\nExamples\n--------\n\nSHOW CREATE DATABASE test;\n+----------+-----------------------------------------------------------------+\n| Database | Create Database                                                 |\n+----------+-----------------------------------------------------------------+\n| test     | CREATE DATABASE test /!40100 DEFAULT CHARACTER SET latin1 / |\n+----------+-----------------------------------------------------------------+\n\nSHOW CREATE SCHEMA test;\n+----------+-----------------------------------------------------------------+\n| Database | Create Database                                                 |\n+----------+-----------------------------------------------------------------+\n| test     | CREATE DATABASE test /!40100 DEFAULT CHARACTER SET latin1 / |\n+----------+-----------------------------------------------------------------+\n\nURL: https://mariadb.com/docs/server/reference/sql-statements/administrative-sql-statements/show/show-create-database', '', 'https://mariadb.com/docs/server/reference/sql-statements/administrative-sql-statements/show/show-create-database');
INSERT INTO help_topic (help_topic_id, help_category_id, name, description, example, url) VALUES (557, 26, 'SHOW CREATE EVENT', 'Syntax\n------\n\nSHOW CREATE EVENT event_name\n\nDescription\n-----------\n\nThis statement displays the CREATE EVENT statement that creates a given event, as well as the SQL_MODE that was used when the trigger was created, and the character set used by the connection. To find out which events are present, use SHOW EVENTS.\n\nSHOW CREATE EVENT quotes identifiers according to the value of the sql_quote_show_create system variable.\n\nSHOW CREATE EVENT quotes identifiers according to the value of the sql_quote_show_create system variable. Note, however, that the output of this statement is unreliably affected by the sql_quote_show_create system variable.\n\nThe information_schema.EVENTS table provides similar, but more complete, information.\n\nExamples\n--------\n\nSHOW CREATE EVENT test.e_daily\\G\n************************ 1. row ***********************\n               Event: e_daily\n            sql_mode: \n           time_zone: SYSTEM\n        Create Event: CREATE EVENT e_daily\n                        ON SCHEDULE EVERY 1 DAY\n                        STARTS CURRENT_TIMESTAMP + INTERVAL 6 HOUR\n                        ON COMPLETION NOT PRESERVE\n                        ENABLE\n                        COMMENT ''Saves total number of sessions then\n                                clears the table each day''\n                        DO BEGIN\n                          INSERT INTO site_activity.totals (time, total)\n                            SELECT CURRENT_TIMESTAMP, COUNT() \n                            FROM site_activity.sessions;\n                          DELETE FROM site_activity.sessions;\n                        END\ncharacter_set_client: latin1\ncollation_connection: latin1_swedish_ci\n  Database Collation: latin1_swedish_ci\n\nURL: https://mariadb.com/docs/server/reference/sql-statements/administrative-sql-statements/show/show-create-event', '', 'https://mariadb.com/docs/server/reference/sql-statements/administrative-sql-statements/show/show-create-event');
INSERT INTO help_topic (help_topic_id, help_category_id, name, description, example, url) VALUES (558, 26, 'SHOW CREATE FUNCTION', 'Syntax\n------\n\nSHOW CREATE FUNCTION func_name\n\nDescription\n-----------\n\nThis statement is similar to SHOW CREATE PROCEDURE but for stored functions.\n\nSHOW CREATE FUNCTION quotes identifiers, according to the value of the sql_quote_show_create system variable.\n\nSHOW CREATE FUNCTION quotes identifiers, according to the value of the sql_quote_show_create system variable. However, the output of this statement is unreliably affected by the sql_quote_show_create system variable.\n\nExamples\n--------\n\nSHOW CREATE FUNCTION VatCents\\G\n************************ 1. row ***********************\n            Function: VatCents\n            sql_mode: \n     Create Function: CREATE DEFINER=root@localhost FUNCTION VatCents(price DECIMAL(10,2)) RETURNS int(11)\n    DETERMINISTIC\nBEGIN\n DECLARE x INT;\n SET x = price  114;\n RETURN x;\nEND\ncharacter_set_client: utf8\ncollation_connection: utf8_general_ci\n  Database Collation: latin1_swedish_ci\n\nURL: https://mariadb.com/docs/server/reference/sql-statements/administrative-sql-statements/show/show-create-function', '', 'https://mariadb.com/docs/server/reference/sql-statements/administrative-sql-statements/show/show-create-function');
INSERT INTO help_topic (help_topic_id, help_category_id, name, description, example, url) VALUES (559, 26, 'SHOW CREATE PACKAGE BODY', 'Syntax\n------\n\nSHOW CREATE PACKAGE BODY  [ db_name . ] package_name\n\nDescription\n-----------\n\nThe SHOW CREATE PACKAGE BODY statement shows the CREATE PACKAGE BODY statement that creates the given package body (that is, the implementation of the package).\n\nThe SHOW CREATE PACKAGE BODY statement shows the CREATE PACKAGE BODY statement that creates the given package body (that is, the implementation of the package). CREATE PACKAGE BODY can be used when Oracle SQL_MODE is set.\n\nSHOW CREATE PACKAGE BODY quotes identifiers according to the value of the sql_quote_show_create system variable.\n\nExamples\n--------\n\nSHOW CREATE PACKAGE BODY employee_tools\\G\n************************ 1. row ************************\n        Package body: employee_tools\n            sql_mode: PIPES_AS_CONCAT,ANSI_QUOTES,IGNORE_SPACE,ORACLE,NO_KEY_OPTIONS,NO_TABLE_OPTIONS,NO_FIELD_OPTIONS,NO_AUTO_CREATE_USER\n Create Package Body: CREATE DEFINER="root"@"localhost" PACKAGE BODY "employee_tools" AS\n  \n  stdRaiseAmount DECIMAL(10,2):=500;\n  \n  PROCEDURE log (eid INT, ecmnt TEXT) AS\n  BEGIN\n    INSERT INTO employee_log (id, cmnt) VALUES (eid, ecmnt);\n  END;\n  \n  PROCEDURE hire(ename TEXT, esalary DECIMAL(10,2)) AS\n    eid INT;\n  BEGIN\n    INSERT INTO employee (name, salary) VALUES (ename, esalary);\n    eid:= last_insert_id();\n    log(eid, ''hire '' || ename);\n  END;\n\n  FUNCTION getSalary(eid INT) RETURN DECIMAL(10,2) AS\n    nSalary DECIMAL(10,2);\n  BEGIN\n    SELECT salary INTO nSalary FROM employee WHERE id=eid;\n    log(eid, ''getSalary id='' || eid || '' salary='' || nSalary);\n    RETURN nSalary;\n  END;\n\n  PROCEDURE raiseSalary(eid INT, amount DECIMAL(10,2)) AS\n  BEGIN\n    UPDATE employee SET salary=salary+amount WHERE id=eid;\n    log(eid, ''raiseSalary id='' || eid || '' amount='' || amount);\n  END;\n\n  PROCEDURE raiseSalaryStd(eid INT) AS\n  BEGIN\n    raiseSalary(eid, stdRaiseAmount);\n    log(eid, ''raiseSalaryStd id='' || eid);\n  END;\n\nBEGIN  \n  log(0, ''Session '' || connection_id() || '' '' || current_user || '' started'');\nEND\ncharacter_set_client: utf8\ncollation_connection: utf8_general_ci\n  Database Collation: latin1_swedish_ci\n\nURL: https://mariadb.com/docs/server/reference/sql-statements/administrative-sql-statements/show/show-create-package-body', '', 'https://mariadb.com/docs/server/reference/sql-statements/administrative-sql-statements/show/show-create-package-body');
INSERT INTO help_topic (help_topic_id, help_category_id, name, description, example, url) VALUES (560, 26, 'SHOW CREATE PACKAGE', 'Syntax\n------\n\nSHOW CREATE PACKAGE  [ db_name . ] package_name\n\nDescription\n-----------\n\nThe SHOW CREATE PACKAGE statement can be used when Oracle SQL_MODE is set. It shows the CREATE statement that creates the given package specification.\n\nSHOW CREATE PACKAGE quotes identifiers according to the value of the sql_quote_show_create system variable.\n\nExamples\n--------\n\nSHOW CREATE PACKAGE employee_tools\\G\n************************ 1. row ************************\n             Package: employee_tools\n            sql_mode: PIPES_AS_CONCAT,ANSI_QUOTES,IGNORE_SPACE,ORACLE,NO_KEY_OPTIONS,NO_TABLE_OPTIONS,NO_FIELD_OPTIONS,NO_AUTO_CREATE_USER\n      Create Package: CREATE DEFINER="root"@"localhost" PACKAGE "employee_tools" AS\n  FUNCTION getSalary(eid INT) RETURN DECIMAL(10,2);\n  PROCEDURE raiseSalary(eid INT, amount DECIMAL(10,2));\n  PROCEDURE raiseSalaryStd(eid INT);\n  PROCEDURE hire(ename TEXT, esalary DECIMAL(10,2));\nEND\ncharacter_set_client: utf8\ncollation_connection: utf8_general_ci\n  Database Collation: latin1_swedish_ci\n\nURL: https://mariadb.com/docs/server/reference/sql-statements/administrative-sql-statements/show/show-create-package', '', 'https://mariadb.com/docs/server/reference/sql-statements/administrative-sql-statements/show/show-create-package');
INSERT INTO help_topic (help_topic_id, help_category_id, name, description, example, url) VALUES (561, 26, 'SHOW CREATE PROCEDURE', 'Syntax\n------\n\nSHOW CREATE PROCEDURE proc_name\n\nDescription\n-----------\n\nThis statement is a MariaDB extension. It returns the exact string that can be used to re-create the named stored procedure, as well as the SQL_MODE that was used when the trigger has been created and the character set used by the connection.. A similar statement, SHOW CREATE FUNCTION, displays information about stored functions.\n\nBoth statements require that:\n\n you are the owner of the routine;\n you have the SHOW CREATE ROUTINE privilege (from MariaDB 11.3.0); or\n you have the SELECT privilege on the mysql.proc table.\n\nWhen none of the above statements are true, the statements display NULL for the Create Procedure or Create Function field.\n\nUsers with SELECT privileges on mysql.proc or USAGE privileges on . can view the text of routines, even when they do not have privileges for the function or procedure itself.\n\nSHOW CREATE PROCEDURE quotes identifiers, according to the value of the sql_quote_show_create system variable.\n\nSHOW CREATE PROCEDURE quotes identifiers, according to the value of the sql_quote_show_create system variable. The output of this statement is unreliably affected by the sql_quote_show_create system variable.\n\nExamples\n--------\n\nSHOW CREATE PROCEDURE test.simpleproc\\G\n*********************** 1. row ***********************\n           Procedure: simpleproc\n            sql_mode: \n    Create Procedure: CREATE PROCEDURE simpleproc(OUT param1 INT)\n                      BEGIN\n                      SELECT COUNT() INTO param1 FROM t;\n                      END\ncharacter_set_client: latin1\ncollation_connection: latin1_swedish_ci\n  Database Collation: latin1_swedish_ci\n\nSHOW CREATE FUNCTION test.hello\\G\n************************ 1. row ************************\n            Function: hello\n            sql_mode:\n     Create Function: CREATE FUNCTION hello(s CHAR(20))\n                      RETURNS CHAR(50)\n                      RETURN CONCAT(''Hello, '',s,''!'')\ncharacter_set_client: latin1\ncollation_connection: latin1_swedish_ci\n  Database Collation: latin1_swedish_ci\n\nURL: https://mariadb.com/docs/server/reference/sql-statements/administrative-sql-statements/show/show-create-procedure', '', 'https://mariadb.com/docs/server/reference/sql-statements/administrative-sql-statements/show/show-create-procedure');
INSERT INTO help_topic (help_topic_id, help_category_id, name, description, example, url) VALUES (562, 26, 'SHOW CREATE SEQUENCE', 'Syntax\n------\n\nSHOW CREATE SEQUENCE sequence_name;\n\nDescription\n-----------\n\nShows the CREATE SEQUENCE statement that creates the given sequence. The statement requires the SELECT privilege for the table.\n\nSHOW CREATE SEQUENCE quotes identifiers according to the value of the sql_quote_show_create system variable.\n\nExamples\n--------\n\nCREATE SEQUENCE s1 START WITH 50;\nSHOW CREATE SEQUENCE s1\\G;\n************************ 1. row ************************\n       Table: s1\nCreate Table: CREATE SEQUENCE s1 start with 50 minvalue 1 maxvalue 9223372036854775806 \n  increment by 1 cache 1000 nocycle ENGINE=InnoDB\n\nURL: https://mariadb.com/docs/server/reference/sql-statements/administrative-sql-statements/show/show-create-sequence', '', 'https://mariadb.com/docs/server/reference/sql-statements/administrative-sql-statements/show/show-create-sequence');

INSERT INTO help_topic (help_topic_id, help_category_id, name, description, example, url) VALUES (564, 26, 'SHOW CREATE TABLE', 'Syntax\n------\n\nSHOW CREATE TABLE tbl_name\n\nDescription\n-----------\n\nShows the CREATE TABLE statement that creates the given table. The statement requires the SELECT privilege for the table. This statement also works with views and SEQUENCE.\n\nSHOW CREATE TABLE quotes table and column names according to the value of the sql_quote_show_create server system variable.\n\nCertain SQL_MODE values can result in parts of the original CREATE statement not being included in the output. MariaDB-specific table options, column options, and index options are not included in the output of this statement if the NO_TABLE_OPTIONS, NO_FIELD_OPTIONS and NO_KEY_OPTIONS SQL_MODE flags are used. All MariaDB-specific table attributes are also not shown when a non-MariaDB/MySQL emulation mode is used, which includes ANSI, DB2, POSTGRESQL, MSSQL, MAXDB or ORACLE.\n\nInvalid table options, column options and index options are normally commented out (note, that it is possible to create a table with invalid options, by altering a table of a different engine, where these options were valid). To have them uncommented, enable the IGNORE_BAD_TABLE_OPTIONS SQL_MODE. Remember that replaying a CREATE TABLE statement with uncommented invalid options will fail with an error, unless the IGNORE_BAD_TABLE_OPTIONS SQL_MODE is in effect.\n\nNote that SHOW CREATE TABLE is not meant to provide metadata about a table. It provides information about how the table was declared, but the real table structure could differ a bit. For example, if an index has been declared as HASH, the CREATE TABLE statement returned by SHOW CREATE TABLE will declare that index as HASH; however, it is possible that the index is in fact a BTREE, because the storage engine does not support HASH.\n\nMariaDB permits TEXT and BLOB data types to be assigned a DEFAULT value. As a result, SHOW CREATE TABLE will append a DEFAULT NULL to nullable TEXT or BLOB fields if no specific default is provided.\n\nNumbers are quoted in the DEFAULT clause in SHOW CREATE statement.\n\nNumbers are not quoted in the DEFAULT clause in SHOW CREATE statement.\n\nIndex Order\n\nIndexes are sorted and displayed in the following order, which may differ from the order of the CREATE TABLE statement.\n\n PRIMARY KEY\n UNIQUE keys where all column are NOT NULL\n UNIQUE keys that don''t contain partial segments\n Other UNIQUE keys\n LONG UNIQUE keys\n Normal keys\n Fulltext keys\n\nSee sql/sql_table.cc for details.\n\nExamples\n--------\n\nSHOW CREATE TABLE t\\G\n*********************** 1. row ************************\n       Table: t\nCreate Table: CREATE TABLE t (\n  id int(11) NOT NULL AUTO_INCREMENT,\n  s char(60) DEFAULT NULL,\n  PRIMARY KEY (id)\n) ENGINE=InnoDB DEFAULT CHARSET=latin1\n\nURL: https://mariadb.com/docs/server/reference/sql-statements/administrative-sql-statements/show/show-create-table', '', 'https://mariadb.com/docs/server/reference/sql-statements/administrative-sql-statements/show/show-create-table');
INSERT INTO help_topic (help_topic_id, help_category_id, name, description, example, url) VALUES (565, 26, 'SHOW CREATE TRIGGER', 'Syntax\n------\n\nSHOW CREATE TRIGGER trigger_name\n\nDescription\n-----------\n\nThis statement shows a CREATE TRIGGER statement that creates the given trigger, as well as the SQL_MODE that was used when the trigger has been created and the character set used by the connection.\n\nThe TRIGGER privilege is required on the table the trigger is defined for to execute this statement.\n\nSHOW CREATE TRIGGER quotes identifiers, according to the value of the sql_quote_show_create system variable.\n\nSHOW CREATE TRIGGER quotes identifiers, according to the value of the sql_quote_show_create system variable. However, the output of this statement is unreliably affected by the sql_quote_show_create system variable.\n\nExamples\n--------\n\nSHOW CREATE TRIGGER example\\G\n************************ 1. row ***********************\n               Trigger: example\n              sql_mode: ONLY_FULL_GROUP_BY,STRICT_TRANS_TABLES,STRICT_ALL_TABLES\n,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_\nENGINE_SUBSTITUTION\nSQL Original Statement: CREATE DEFINER=root@localhost TRIGGER example BEFORE\n INSERT ON t FOR EACH ROW\nBEGIN\n        SET NEW.c = NEW.c  2;\nEND\n  character_set_client: cp850\n  collation_connection: cp850_general_ci\n  Database Collation: utf8_general_ci\n  Created: 2016-09-29 13:53:34.35\n\nURL: https://mariadb.com/docs/server/reference/sql-statements/administrative-sql-statements/show/show-create-trigger', '', 'https://mariadb.com/docs/server/reference/sql-statements/administrative-sql-statements/show/show-create-trigger');

INSERT INTO help_topic (help_topic_id, help_category_id, name, description, example, url) VALUES (567, 26, 'SHOW CREATE VIEW', 'Syntax\n------\n\nSHOW CREATE VIEW [view-name]\n\nDescription\n-----------\n\nThis statement shows a CREATE VIEW statement that creates the given view, as well as the character set used by the connection when the view was created. This statement also works with views.\n\nSHOW CREATE VIEW quotes table, column and stored function names according to the value of the sql_quote_show_create server system variable.\n\nExamples\n--------\n\nSHOW CREATE VIEW example\\G\n************************ 1. row ************************\n                View: example\n         Create View: CREATE ALGORITHM=UNDEFINED DEFINER=root@localhost SQL\nSECURITY DEFINER VIEW example AS (select t.id AS id,t.s AS s from\nt)\ncharacter_set_client: cp850\ncollation_connection: cp850_general_ci\n\nURL: https://mariadb.com/docs/server/reference/sql-statements/administrative-sql-statements/show/show-create-view', '', 'https://mariadb.com/docs/server/reference/sql-statements/administrative-sql-statements/show/show-create-view');
INSERT INTO help_topic (help_topic_id, help_category_id, name, description, example, url) VALUES (568, 26, 'SHOW DATABASES', 'Syntax\n------\n\nSHOW {DATABASES | SCHEMAS}\n    [LIKE ''pattern'' | WHERE expr]\n\nDescription\n-----------\n\nSHOW DATABASES lists the databases on the MariaDB server host.SHOW SCHEMAS is a synonym forSHOW DATABASES. The LIKE clause, if present on its own, indicates which database names to match. The WHERE and LIKE clauses can be given to select rows using more general conditions, as discussed in Extended SHOW.\n\nYou see only those databases for which you have some kind of privilege, unless you have the global SHOW DATABASES privilege. You can also get this list using the mariadb-show command.\n\nIf the server was started with the --skip-show-database option, you cannot use this statement at all unless you have the SHOW DATABASES privilege.\n\nThe list of results returned by SHOW DATABASES is based on directories in the data directory, which is how MariaDB implements databases. It''s possible that output includes directories that do not correspond to actual databases.\n\nThe Information Schema SCHEMATA table also contains database information.\n\nExamples\n--------\n\nSHOW DATABASES;\n+--------------------+\n| Database           |\n+--------------------+\n| information_schema |\n| mysql              |\n| performance_schema |\n| test               |\n+--------------------+\n\nURL: https://mariadb.com/docs/server/reference/sql-statements/administrative-sql-statements/show/show-databases', '', 'https://mariadb.com/docs/server/reference/sql-statements/administrative-sql-statements/show/show-databases');
INSERT INTO help_topic (help_topic_id, help_category_id, name, description, example, url) VALUES (569, 26, 'SHOW ENGINE INNODB STATUS', 'Description\n-----------\n\nSyntax\n\n``sql\nSHOW ENGINE INNODB STATUS\n`\n\nSHOW ENGINE INNODB STATUS is a specific form of the SHOW ENGINE statement that displays the InnoDB Monitor output, which is extensive InnoDB information which can be useful in diagnosing problems.\n\nThe following sections are displayed\n\n Status: Shows the timestamp, monitor name and the number of seconds, or the elapsed time between the current time and the time the InnoDB Monitor output was last displayed. The per-second averages are based upon this time.\n BACKGROUND THREAD: srv_master_thread lines show work performed by the main background thread.\n SEMAPHORES: Threads waiting for a semaphore and stats on how the number of times threads have needed a spin or a wait on a mutex or rw-lock semaphore. If this number of threads is large, there may be I/O or contention issues. Reducing the size of the innodb_thread_concurrency system variable may help if contention is related to thread scheduling. Spin rounds per wait shows the number of spinlock rounds per OS wait for a mutex.\n LATEST FOREIGN KEY ERROR: Only shown if there has been a foreign key constraint error, it displays the failed statement and information about the constraint and the related tables.\n LATEST DETECTED DEADLOCK: Only shown if there has been a deadlock, it displays the transactions involved in the deadlock and the statements being executed, held and required locked and the transaction rolled back to.\n TRANSACTIONS: The output of this section can help identify lock contention, as well as reasons for the deadlocks.\n FILE I/O: InnoDB thread information as well as pending I/O operations and I/O performance statistics.\n INSERT BUFFER AND ADAPTIVE HASH INDEX: InnoDB insert buffer (old name for the change buffer) and adaptive hash index status information, including the number of each type of operation performed, and adaptive hash index performance.\n LOG: InnoDB log information, including current log sequence number, how far the log has been flushed to disk, the position at which InnoDB last took a checkpoint, pending writes and write performance statistics.\n BUFFER POOL AND MEMORY: Information on buffer pool pages read and written, which allows you to see the number of data file I/O operations performed by your queries. See InnoDB Buffer Pool for more. Similar information is also available from the INFORMATION_SCHEMA.INNODB_BUFFER_POOL_STATS table.\n* ROW OPERATIONS:Information about the main thread, including the number and performance rate for each type of row operation.\n\nIf the innodb_status_output_locks system variable is set to 1, extended lock information will be displayed.\n\nExample output:\n\n`sql\n=====================================\n2019-09-06 12:44:13 0x7f93cc236700 INNODB MONITOR OUTPUT\n=====================================\nPer second averages calculated from the last 4 seconds\n-----------------\nBACKGROUND THREAD\n-----------------\nsrv_master_thread loops: 2 srv_active, 0 srv_shutdown, 83698 srv_idle\nsrv_master_thread log flush and writes: 83682\n----------\nSEMAPHORES\n----------\nOS WAIT ARRAY INFO: reservation count 15\nOS WAIT ARRAY INFO: signal count 8\nRW-shared spins 0, rounds 20, OS waits 7\nRW-excl spins 0, rounds 0, OS waits 0\nRW-sx spins 0, rounds 0, OS waits 0\nSpin rounds per wait: 20.00 RW-shared, 0.00 RW-excl, 0.00 RW-sx\n------------\nTRANSACTIONS\n------------\nTrx id counter 236\nPurge done for trx''s n:o < 236 undo n:o < 0 state: running\nHistory list length 22\nLIST OF TRANSACTIONS FOR EACH SESSION:\n---TRANSACTION 421747401994584, not started\n0 lock struct(s), heap size 1136, 0 row lock(s)\n---TRANSACTION 421747401990328, not started\n0 lock struct(s), heap size 1136, 0 row lock(s)\n--------\nFILE I/O\n--------\nI/O thread 0 state: waiting for completed aio requests (insert buffer thread)\nI/O thread 1 state: waiting for completed aio requests (log thread)\nI/O thread 2 state: waiting for completed aio requests (read thread)\nI/O thread 3 state: waiting for completed aio requests (read thread)\nI/O thread 4 state: waiting for completed aio requests (read thread)\nI/O thread 5 state: waiting for completed aio requests (read thread)\nI/O thread 6 state: waiting for completed aio requests (write thread)\nI/O thread 7 state: waiting for completed aio requests (write thread)\nI/O thread 8 state: waiting for completed aio requests (write thread)\nI/O thread 9 state: waiting for completed aio requests (write thread)\nPending normal aio reads: [0, 0, 0, 0] , aio writes: [0, 0, 0, 0] ,\n ibuf aio reads:, log i/o''s:, sync i/o''s:\nPending flushes (fsync) log: 0; buffer pool: 0\n286 OS file reads, 171 OS file writes, 22 OS fsyncs\n0.00 reads/s, 0 avg bytes/read, 0.00 writes/s, 0.00 fsyncs/s\n-------------------------------------\nINSERT BUFFER AND ADAPTIVE HASH INDEX\n-------------------------------------\nIbuf: size 1, free list len 0, seg size 2, 0 merges\nmerged operations:\n insert 0, delete mark 0, delete 0\ndiscarded operations:\n insert 0, delete mark 0, delete 0\nHash table size 34679, node heap has 0 buffer(s)\nHash table size 34679, node heap has 0 buffer(s)\nHash table size 34679, node heap has 0 buffer(s)\nHash table size 34679, node heap has 0 buffer(s)\nHash table size 34679, node heap has 0 buffer(s)\nHash table size 34679, node heap has 0 buffer(s)\nHash table size 34679, node heap has 0 buffer(s)\nHash table size 34679, node heap has 0 buffer(s)\n0.00 hash searches/s, 0.00 non-hash searches/s\n---\nLOG\n---\nLog sequence number 445926\nLog flushed up to   445926\nPages flushed up to 445926\nLast checkpoint at  445917\n0 pending log flushes, 0 pending chkp writes\n18 log i/o''s done, 0.00 log i/o''s/second\n----------------------\nBUFFER POOL AND MEMORY\n----------------------\nTotal large memory allocated 167772160\nDictionary memory allocated 50768\nBuffer pool size   8012\nFree buffers       7611\nDatabase pages     401\nOld database pages 0\nModified db pages  0\nPercent of dirty pages(LRU & free pages): 0.000\nMax dirty pages percent: 75.000\nPending reads 0\nPending writes: LRU 0, flush list 0, single page 0\nPages made young 0, not young 0\n0.00 youngs/s, 0.00 non-youngs/s\nPages read 264, created 137, written 156\n0.00 reads/s, 0.00 creates/s, 0.00 writes/s\nNo buffer pool page gets since the last printout\nPages read ahead 0.00/s, evicted without access 0.00/s, Random read ahead 0.00/s\nLRU len: 401, unzip_LRU len: 0\nI/O sum[0]:cur[0], unzip sum[0]:cur[0]\n--------------\nROW OPERATIONS\n--------------\n0 queries inside InnoDB, 0 queries in queue\n0 read views open inside InnoDB\nProcess ID=4267, Main thread ID=140272021272320, state: sleeping\nNumber of rows inserted 1, updated 0, deleted 0, read 1\n0.00 inserts/s, 0.00 updates/s, 0.00 deletes/s, 0.00 reads/s\nNumber of system rows inserted 0, updated 0, deleted 0, read 0\n0.00 inserts/s, 0.00 updates/s, 0.00 deletes/s, 0.00 reads/s\n----------------------------\nEND OF INNODB MONITOR OUTPUT\n============================\n``\n\nURL: https://mariadb.com/docs/server/reference/sql-statements/administrative-sql-statements/show/show-engine-innodb-status', '', 'https://mariadb.com/docs/server/reference/sql-statements/administrative-sql-statements/show/show-engine-innodb-status');
INSERT INTO help_topic (help_topic_id, help_category_id, name, description, example, url) VALUES (570, 26, 'SHOW ENGINE', 'Syntax\n------\n\nSHOW ENGINE [engine-name] {STATUS | MUTEX}\n\nDescription\n-----------\n\nSHOW ENGINE displays operational information about a storage engine. The following statements currently are supported:\n\n``sql\nSHOW ENGINE INNODB STATUS\nSHOW ENGINE INNODB MUTEX\nSHOW ENGINE PERFORMANCE_SCHEMA STATUS\nSHOW ENGINE ROCKSDB STATUS\n`\n\nIf the Sphinx Storage Engine is installed, the following is also supported:\n\n`sql\nSHOW ENGINE SPHINX STATUS\n`\n\nSHOW ENGINE INNODB STATUS\n\nSHOW ENGINE INNODB STATUS displays extensive information from the standard InnoDB Monitor about the state of the InnoDB storage engine. See SHOW ENGINE INNODB STATUS for more.\n\nSHOW ENGINE INNODB MUTEX\n\nSHOW ENGINE INNODB MUTEX displays InnoDB mutex statistics.\n\nThe statement displays the following output fields:\n\n Type: Always InnoDB.\n Name: The source file where the mutex is implemented, and the line number in the file where the mutex is created. The line number is dependent on the MariaDB version.\n Status: This field displays the following values if UNIV_DEBUG was defined at compilation time (for example, in include/univ.h in the InnoDB part of the source tree). Only the os_waits value is displayed if UNIV_DEBUG was not defined. Without UNIV_DEBUG, the information on which the output is based is insufficient to distinguish regular mutexes and mutexes that protect rw-locks (which allow multiple readers or a single writer). Consequently, the output may appear to contain multiple rows for the same mutex.\n   count indicates how many times the mutex was requested.\n   spin_waits indicates how many times the spinlock had to run.\n   spin_rounds indicates the number of spinlock rounds. (spin_rounds divided by spin_waits provides the average round count.)\n   os_waits indicates the number of operating system waits. This occurs when the spinlock did not work (the mutex was not locked during the spinlock and it was necessary to yield to the operating system and wait).\n   os_yields indicates the number of times a the thread trying to lock a mutex gave up its timeslice and yielded to the operating system (on the presumption that allowing other threads to run will free the mutex so that it can be locked).\n   os_wait_times indicates the amount of time (in ms) spent in operating system waits, if the timed_mutexes system variable is 1 (ON). If timed_mutexes is 0 (OFF), timing is disabled, so os_wait_times is 0. timed_mutexes is off by default.\n\nInformation from this statement can be used to diagnose system problems. For example, large values of spin_waits and spin_rounds may indicate scalability problems.\n\nThe information_schema.INNODB_MUTEXES table provides similar information.\n\nSHOW ENGINE PERFORMANCE_SCHEMA STATUS\n\nThis statement shows how much memory is used for performance_schema tables and internal buffers.\n\nThe output contains the following fields:\n\n Type: Always performance_schema.\n Name: The name of a table, the name of an internal buffer, or the performance_schema word, followed by a dot and an attribute. Internal buffers names are enclosed by parenthesis. performance_schema means that the attribute refers to the whole database (it is a total).\n Status: The value for the attribute.\n\nThe following attributes are shown, in this order, for all tables:\n\n row_size: The memory used for an individual record. This value will never change.\n row_count: The number of rows in the table or buffer. For some tables, this value depends on a server system variable.\n memory: For tables and performance_schema, this is the result of row_size \\ row_count`.\n\nFor internal buffers, the attributes are:\n\n count\n size\n\nSHOW ENGINE ROCKSDB STATUS\n\nSee also MyRocks Performance Troubleshooting\n\nURL: https://mariadb.com/docs/server/reference/sql-statements/administrative-sql-statements/show/show-engine', '', 'https://mariadb.com/docs/server/reference/sql-statements/administrative-sql-statements/show/show-engine');
INSERT INTO help_topic (help_topic_id, help_category_id, name, description, example, url) VALUES (571, 26, 'SHOW ENGINES', 'Syntax\n------\n\nSHOW [STORAGE] ENGINES\n\nDescription\n-----------\n\nSHOW ENGINES displays status information about the server''s storage engines. This is particularly useful for checking whether a storage engine is supported, or to see what the default engine is.SHOW TABLE TYPES is a deprecated synonym.\n\nThe information_schema.ENGINES table provides the same information.\n\nSince storage engines are plugins, different information about them is also shown in the information_schema.PLUGINS table and by the SHOW PLUGINS statement.\n\nNote that both MySQL''s InnoDB and Percona''s XtraDB replacement are labeled as InnoDB. However, if XtraDB is in use, it will be specified in the COMMENT field. See XtraDB and InnoDB. The same applies to FederatedX.\n\nThe output consists of the following columns:\n\n Engine indicates the engine''s name.\n Support indicates whether the engine is installed, and whether it is the default engine for the current session.\n Comment is a brief description.\n Transactions, XA and Savepoints indicate whether transactions, XA transactions and transaction savepoints are supported by the engine.\n\nExamples\n--------\n\nSHOW ENGINES\\G\n************************ 1. row *********************\n      Engine: InnoDB\n     Support: DEFAULT\n     Comment: Supports transactions, row-level locking, and foreign keys\nTransactions: YES\n          XA: YES\n  Savepoints: YES\n********************* 2. row *********************\n      Engine: CSV\n     Support: YES\n     Comment: CSV storage engine\nTransactions: NO\n          XA: NO\n  Savepoints: NO\n********************* 3. row *********************\n      Engine: MyISAM\n     Support: YES\n     Comment: MyISAM storage engine\nTransactions: NO\n          XA: NO\n  Savepoints: NO\n********************* 4. row *********************\n      Engine: BLACKHOLE\n     Support: YES\n     Comment: /dev/null storage engine (anything you write to it disappears)\nTransactions: NO\n          XA: NO\n  Savepoints: NO\n********************* 5. row *********************\n      Engine: FEDERATED\n     Support: YES\n     Comment: FederatedX pluggable storage engine\nTransactions: YES\n          XA: NO\n  Savepoints: YES\n********************* 6. row *********************\n      Engine: MRG_MyISAM\n     Support: YES\n     Comment: Collection of identical MyISAM tables\nTransactions: NO\n          XA: NO\n  Savepoints: NO\n********************* 7. row *********************\n      Engine: ARCHIVE\n     Support: YES\n     Comment: Archive storage engine\nTransactions: NO\n          XA: NO\n  Savepoints: NO\n********************* 8. row *********************\n      Engine: MEMORY\n     Support: YES\n     Comment: Hash based, stored in memory, useful for temporary tables\nTransactions: NO\n          XA: NO\n  Savepoints: NO\n********************* 9. row *********************\n      Engine: PERFORMANCE_SCHEMA\n     Support: YES\n     Comment: Performance Schema\nTransactions: NO\n          XA: NO\n  Savepoints: NO\n********************* 10. row ************************\n      Engine: Aria\n     Support: YES\n     Comment: Crash-safe tables with MyISAM heritage\nTransactions: NO\n          XA: NO\n  Savepoints: NO\n10 rows in set (0.00 sec)\n\nURL: https://mariadb.com/docs/server/reference/sql-statements/administrative-sql-statements/show/show-engines', '', 'https://mariadb.com/docs/server/reference/sql-statements/administrative-sql-statements/show/show-engines');
INSERT INTO help_topic (help_topic_id, help_category_id, name, description, example, url) VALUES (572, 26, 'SHOW ERRORS', 'Syntax\n------\n\nSHOW ERRORS [LIMIT [offset,] row_count]\nSHOW ERRORS [LIMIT row_count OFFSET offset]\nSHOW COUNT() ERRORS\n\nDescription\n-----------\n\nThis statement is similar to SHOW WARNINGS, except that instead of displaying errors, warnings, and notes, it displays only errors.\n\nThe LIMIT clause has the same syntax as for the SELECT statement.\n\nThe SHOW COUNT() ERRORS statement displays the number of errors. You can also retrieve this number from the error_count variable.\n\n``sql\nSHOW COUNT() ERRORS;\nSELECT @@error_count;\n``\n\nThe value of error_count might be greater than the number of messages displayed by SHOW WARNINGS if the max_error_count system variable is set so low that not all messages are stored.\n\nFor a list of MariaDB error codes, see MariaDB Error Codes.\n\nExamples\n--------\n\nSELECT f();\nERROR 1305 (42000): FUNCTION f does not exist\n\nSHOW COUNT() ERRORS;\n+-----------------------+\n| @@session.error_count |\n+-----------------------+\n|                     1 |\n+-----------------------+\n\nSHOW ERRORS;\n+-------+------+---------------------------+\n| Level | Code | Message                   |\n+-------+------+---------------------------+\n| Error | 1305 | FUNCTION f does not exist |\n+-------+------+---------------------------+\n\nURL: https://mariadb.com/docs/server/reference/sql-statements/administrative-sql-statements/show/show-errors', '', 'https://mariadb.com/docs/server/reference/sql-statements/administrative-sql-statements/show/show-errors');
INSERT INTO help_topic (help_topic_id, help_category_id, name, description, example, url) VALUES (573, 26, 'SHOW EVENTS', 'Syntax\n------\n\nSHOW EVENTS [{FROM | IN} schema_name]\n    [LIKE ''pattern'' | WHERE expr]\n\nDescription\n-----------\n\nShows information about Event Manager events (created with CREATE EVENT). Requires the EVENT privilege. Without any arguments, SHOW EVENTS lists all of the events in the current schema:\n\n``sql\nSELECT CURRENT_USER(), SCHEMA();\n+----------------+----------+\n| CURRENT_USER() | SCHEMA() |\n+----------------+----------+\n| jon@ghidora    | myschema |\n+----------------+----------+\n\nSHOW EVENTS\\G\n************************ 1. row ************************\n                  Db: myschema\n                Name: e_daily\n             Definer: jon@ghidora\n           Time zone: SYSTEM\n                Type: RECURRING\n          Execute at: NULL\n      Interval value: 10\n      Interval field: SECOND\n              Starts: 2006-02-09 10:41:23\n                Ends: NULL\n              Status: ENABLED\n          Originator: 0\ncharacter_set_client: latin1\ncollation_connection: latin1_swedish_ci\n  Database Collation: latin1_swedish_ci\n`\n\nTo see the event action, use SHOW CREATE EVENT instead, or look at the information_schema.EVENTS table.\n\nTo see events for a specific schema, use the FROM clause. For example, to see events for the test schema, use the following statement:\n\n`sql\nSHOW EVENTS FROM test;\n`\n\nThe LIKE clause, if present, indicates which event names to match. The WHERE` clause can be given to select rows using more general conditions, as discussed in Extended Show.\n\nURL: https://mariadb.com/docs/server/reference/sql-statements/administrative-sql-statements/show/show-events', '', 'https://mariadb.com/docs/server/reference/sql-statements/administrative-sql-statements/show/show-events');
INSERT INTO help_topic (help_topic_id, help_category_id, name, description, example, url) VALUES (574, 26, 'SHOW EXPLAIN', 'Syntax\n------\n\nSHOW EXPLAIN [FORMAT=JSON] FOR <connection_id>;\nEXPLAIN [FORMAT=JSON] FOR CONNECTION <connection_id>;\n\nDescription\n-----------\n\nThe SHOW EXPLAIN command allows one to get an EXPLAIN (that is, a description of a query plan) of a query running in a certain connection.\n\n``sql\nSHOW EXPLAIN FOR <connection_id>;\n`\n\nwill produce an EXPLAIN output for the query that connection number connection_id is running. The connection id can be obtained with SHOW PROCESSLIST.\n\n`sql\nSHOW EXPLAIN FOR 1;\n+------+-------------+-------+-------+---------------+------+---------+------+---------+-------------+\n| id   | select_type | table | type  | possible_keys | key  | key_len | ref  | rows    | Extra       |\n+------+-------------+-------+-------+---------------+------+---------+------+---------+-------------+\n|    1 | SIMPLE      | tbl   | index | NULL          | a    | 5       | NULL | 1000107 | Using index |\n+------+-------------+-------+-------+---------------+------+---------+------+---------+-------------+\n1 row in set, 1 warning (0.00 sec)\n`\n\nThe output is always accompanied with a warning which shows the query the target connection is running (this shows what the EXPLAIN is for):\n\n`sql\nSHOW WARNINGS;\n+-------+------+------------------------+\n| Level | Code | Message                |\n+-------+------+------------------------+\n| Note  | 1003 | select sum(a) from tbl |\n+-------+------+------------------------+\n1 row in set (0.00 sec)\n`\n\nEXPLAIN FOR CONNECTION\n\nThe EXPLAIN FOR CONNECTION syntax was added for MySQL compatibility.\n\nFORMAT=JSON\n\nSHOW EXPLAIN [FORMAT=JSON] FOR <connection_id> extends SHOW EXPLAIN to return more detailed JSON output.\n\nEXPLAIN FOR CONNECTION and FORMAT=JSON are not available.\n\nPossible Errors\n\nThe output can be only produced if the target connection is _currently_ running a query, which has a ready query plan. If this is not the case, the output will be:\n\n`sql\nSHOW EXPLAIN FOR 2;\nERROR 1932 (HY000): Target is not running an EXPLAINable command\n`\n\nYou will get this error when:\n\n The target connection is not running a command for which one can run EXPLAIN;\n The target connection is running a command for which one can run EXPLAIN, but there is no query plan yet (for example, tables are open and locks are acquired before the query plan is produced).\n\nDifferences Between SHOW EXPLAIN and EXPLAIN Outputs\n\nBackground\n\nIn MySQL, EXPLAIN execution takes a slightly different route from the way the real query (typically the SELECT) is optimized. This is unfortunate, and has caused a number of bugs in EXPLAIN. (For example, see MDEV-326, MDEV-410, and lp:1013343.lp:992942 is not directly about EXPLAIN, but it also would not have existed if MySQL didn''t try to delete parts of a query plan in the middle of the query)\n\nSHOW EXPLAIN examines a running SELECT, and hence its output may be slightly different from what EXPLAIN SELECT would produce. We did our best to make sure that either the difference is negligible, or SHOW EXPLAIN''s output is closer to reality than EXPLAIN''s output.\n\nList of Recorded Differences\n\n SHOW EXPLAIN may have Extra=''no matching row in const table'', where EXPLAIN would produce Extra=''Impossible WHERE ...''\n For queries with subqueries, SHOW EXPLAIN may print select_type==PRIMARY where regular EXPLAIN used to print select_type==SIMPLE, or vice versa.\n\nRequired Permissions\n\nRunning SHOW EXPLAIN` requires the same permissions as running SHOW PROCESSLIST would.\n\nURL: https://mariadb.com/docs/server/reference/sql-statements/administrative-sql-statements/show/show-explain', '', 'https://mariadb.com/docs/server/reference/sql-statements/administrative-sql-statements/show/show-explain');
INSERT INTO help_topic (help_topic_id, help_category_id, name, description, example, url) VALUES (575, 26, 'SHOW FUNCTION CODE', 'Syntax\n------\n\nSHOW FUNCTION CODE func_name\n\nDescription\n-----------\n\nSHOW FUNCTION CODE shows a representation of the internal implementation of the stored function.\n\nIt is similar to SHOW PROCEDURE CODE but for stored functions.\n\nURL: https://mariadb.com/docs/server/reference/sql-statements/administrative-sql-statements/show/show-function-code', '', 'https://mariadb.com/docs/server/reference/sql-statements/administrative-sql-statements/show/show-function-code');
INSERT INTO help_topic (help_topic_id, help_category_id, name, description, example, url) VALUES (576, 26, 'SHOW FUNCTION STATUS', 'Syntax\n------\n\nSHOW FUNCTION STATUS\n    [LIKE ''pattern'' | WHERE expr]\n\nDescription\n-----------\n\nThis statement is similar to SHOW PROCEDURE STATUS but for stored functions.\n\nThe LIKE clause, if present on its own, indicates which function names to match.\n\nThe WHERE and LIKE clauses can be given to select rows using more general conditions, as discussed in Extended SHOW.\n\nThe information_schema.ROUTINES table contains more detailed information.\n\nExamples\n--------\n\nSHOW FUNCTION STATUS\\G\n************************ 1. row ************************\n                  Db: test\n                Name: VatCents\n                Type: FUNCTION\n             Definer: root@localhost\n            Modified: 2013-06-01 12:40:31\n             Created: 2013-06-01 12:40:31\n       Security_type: DEFINER\n             Comment: \ncharacter_set_client: utf8\ncollation_connection: utf8_general_ci\n  Database Collation: latin1_swedish_ci\n\nURL: https://mariadb.com/docs/server/reference/sql-statements/administrative-sql-statements/show/show-function-status', '', 'https://mariadb.com/docs/server/reference/sql-statements/administrative-sql-statements/show/show-function-status');
INSERT INTO help_topic (help_topic_id, help_category_id, name, description, example, url) VALUES (577, 26, 'SHOW GRANTS', 'Syntax\n------\n\nSHOW GRANTS [FOR user|role]\n\nDescription\n-----------\n\nThe SHOW GRANTS statement lists privileges granted to a particular user or role.\n\nUsers\n\nThe statement lists the GRANT statement or statements that must be issued to duplicate the privileges that are granted to a MariaDB user account. The account is named using the same format as for theGRANT statement; for example, ''jeffrey''@''localhost''. If you specify only the user name part of the account name, a host name part of ''%'' is used. For additional information about specifying account names, see GRANT.\n\n``sql\nSHOW GRANTS FOR ''root''@''localhost'';\n+---------------------------------------------------------------------+\n| Grants for root@localhost                                           |\n+---------------------------------------------------------------------+\n| GRANT ALL PRIVILEGES ON . TO ''root''@''localhost'' WITH GRANT OPTION |\n+---------------------------------------------------------------------+\n`\n\nTo list the privileges granted to the account that you are using to connect to the server, you can use any of the following statements:\n\n`sql\nSHOW GRANTS;\nSHOW GRANTS FOR CURRENT_USER;\nSHOW GRANTS FOR CURRENT_USER();\n`\n\nIf SHOW GRANTS FOR CURRENT_USER (or any of the equivalent syntaxes) is used in DEFINER context (such as within a stored procedure that is defined withSQL SECURITY DEFINER), the grants displayed are those of the definer and not the invoker.\n\nRoles\n\nSHOW GRANTS can also be used to view the privileges granted to a role.\n\nExamples\n--------\n\nSHOW GRANTS FOR journalist;\n+------------------------------------------+\n| Grants for journalist                    |\n+------------------------------------------+\n| GRANT USAGE ON . TO ''journalist''       |\n| GRANT DELETE ON test`.* TO ''journalist'' |\n+------------------------------------------+\n\nURL: https://mariadb.com/docs/server/reference/sql-statements/administrative-sql-statements/show/show-grants', '', 'https://mariadb.com/docs/server/reference/sql-statements/administrative-sql-statements/show/show-grants');
INSERT INTO help_topic (help_topic_id, help_category_id, name, description, example, url) VALUES (578, 26, 'SHOW INDEX\\_STATISTICS', 'Syntax\n------\n\nSHOW INDEX_STATISTICS\n\nDescription\n-----------\n\nThe information_schema.INDEX_STATISTICS table shows statistics on index usage and makes it possible to do such things as locating unused indexes and generating the commands to remove them.\n\nSHOW INDEX_STATISTICS is replaced by the generic SHOW TABLE STATISTICS statement.\n\nThe SHOW INDEX_STATISTICS statement was introduced in MariaDB 5.2 as part of the User Statistics feature. It was removed as a separate statement in MariaDB 10.1.1, but effectively replaced by the generic SHOW TABLE STATISTICS statement.\n\nThe userstat system variable must be set to 1 to activate this feature. See the User Statistics and information_schema.INDEX_STATISTICS table for more information.\n\nExamples\n--------\n\nSHOW INDEX_STATISTICS;\n+--------------+-------------------+------------+-----------+\n| Table_schema | Table_name        | Index_name | Rows_read |\n+--------------+-------------------+------------+-----------+\n| test         | employees_example | PRIMARY    |         1 |\n+--------------+-------------------+------------+-----------+\n\nURL: https://mariadb.com/docs/server/reference/sql-statements/administrative-sql-statements/show/show-index-statistics', '', 'https://mariadb.com/docs/server/reference/sql-statements/administrative-sql-statements/show/show-index-statistics');
INSERT INTO help_topic (help_topic_id, help_category_id, name, description, example, url) VALUES (579, 26, 'SHOW INDEX', 'Syntax\n------\n\nSHOW {INDEX | INDEXES | KEYS} \n FROM tbl_name [FROM db_name]\n [WHERE expr]\n\nDescription\n-----------\n\nSHOW INDEX returns table index information. The format resembles that of the SQLStatistics call in ODBC.\n\nYou can use db_name.tbl_name as an alternative to thetbl_name FROM db_name syntax. These two statements are equivalent:\n\n``sql\nSHOW INDEX FROM mytable FROM mydb;\nSHOW INDEX FROM mydb.mytable;\n`\n\nSHOW KEYS and SHOW INDEXES are synonyms for SHOW INDEX.\n\nYou can also list a table''s indexes with the mariadb-show command:\n\n`sql\nmariadb-show -k db_name tbl_name\n`\n\nThe information_schema.STATISTICS table stores similar information.\n\nThe following fields are returned by SHOW INDEX.\n\n| Field          | Description                                                                                                                                                                                                                                                                              |\n| -------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |\n| Table          | Table name                                                                                                                                                                                                                                                                               |\n| Non_unique    | 1 if the index permits duplicate values, 0 if values must be unique.                                                                                                                                                                                                                     |\n| Key_name      | Index name. The primary key is always named PRIMARY.                                                                                                                                                                                                                                     |\n| Seq_in_index | The column''s sequence in the index, beginning with 1.                                                                                                                                                                                                                                    |\n| Column_name   | Column name.                                                                                                                                                                                                                                                                             |\n| Collation      | Either A, if the column is sorted in ascending order in the index, or NULL if it''s not sorted.                                                                                                                                                                                           |\n| Cardinality    | Estimated number of unique values in the index. The cardinality statistics are calculated at various times, and can help the optimizer make improved decisions.                                                                                                                          |\n| Sub_part      | NULL if the entire column is included in the index, or the number of included characters if not.                                                                                                                                                                                         |\n| Packed         | NULL if the index is not packed, otherwise how the index is packed.                                                                                                                                                                                                                      |\n| Null           | NULL if NULL values are permitted in the column, an empty string if NULLs are not permitted.                                                                                                                                                                                             |\n| Index_type    | The index type, which can be BTREE, FULLTEXT, HASH or RTREE. See Storage Engine Index Types.                                                                            |\n| Comment        | Other information, such as whether the index is disabled.                                                                                                                                                                                                                                |\n| Index_comment | Contents of the COMMENT attribute when the index was created.                                                                                                                                                                                                                            |\n| Ignored        | Whether or not an index will be ignored by the optimizer. See Ignored Indexes. From MariaDB 10.6.0. |\n\nThe WHERE and LIKE clauses can be given to select rows using more general conditions, as discussed in Extended SHOW.\n\nExamples\n--------\n\nCREATE TABLE IF NOT EXISTS employees_example (\n  id INT(11) NOT NULL AUTO_INCREMENT,\n  first_name VARCHAR(30) NOT NULL,\n  last_name VARCHAR(40) NOT NULL,\n  position VARCHAR(25) NOT NULL,\n  home_address VARCHAR(50) NOT NULL,\n  home_phone VARCHAR(12) NOT NULL,\n  employee_code VARCHAR(25) NOT NULL,\n  PRIMARY KEY (id),\n  UNIQUE KEY employee_code (employee_code),\n  KEY first_name (first_name,last_name)\n) ENGINE=Aria;\n\nINSERT INTO employees_example (first_name, last_name, position, home_address, home_phone, employee_code`)\n  VALUES\n  (''Mustapha'', ''Mond'', ''Chief Executive Officer'', ''692 Promiscuous Plaza'', ''326-555-3492'', ''MM1''),\n  (''Henry'', ''Foster'', ''Store Manager'', ''314 Savage Circle'', ''326-555-3847'', ''HF1''),\n  (''Bernard'', ''Marx'', ''Cashier'', ''1240 Ambient Avenue'', ''326-555-8456'', ''BM1''),\n  (''Lenina'', ''Crowne'', ''Cashier'', ''281 Bumblepuppy Boulevard'', ''328-555-2349'', ''LC1''),\n  (''Fanny'', ''Crowne'', ''Restocker'', ''1023 Bokanovsky Lane'', ''326-555-6329'', ''FC1''),\n  (''Helmholtz'', ''Watson'', ''Janitor'', ''944 Soma Court'', ''329-555-2478'', ''HW1'');\n\nURL: https://mariadb.com/docs/server/reference/sql-statements/administrative-sql-statements/show/show-index', '', 'https://mariadb.com/docs/server/reference/sql-statements/administrative-sql-statements/show/show-index');
INSERT INTO help_topic (help_topic_id, help_category_id, name, description, example, url) VALUES (580, 26, 'SHOW INNODB STATUS (removed)', 'Syntax\n------\n\nSHOW INNODB STATUS\n\nDescription\n-----------\n\nThis is a deprecated synonym for SHOW ENGINE INNODB STATUS. It was removed in MariaDB and MySQL 5.5.\n\nURL: https://mariadb.com/docs/server/reference/sql-statements/administrative-sql-statements/show/show-innodb-status-removed', '', 'https://mariadb.com/docs/server/reference/sql-statements/administrative-sql-statements/show/show-innodb-status-removed');
INSERT INTO help_topic (help_topic_id, help_category_id, name, description, example, url) VALUES (581, 26, 'SHOW LOCALES', 'Syntax\n------\n\nSHOW LOCALES\n\nDescription\n-----------\n\nSHOW LOCALES was introduced as part of the Information Schema plugin extension.\n\nSHOW LOCALES is used to return locales information as part of the Locales plugin. It requires this plugin to be installed to work.\n\nWhile the information_schema.LOCALES table has 8 columns, the SHOW LOCALES statement will only display 4 of them:\n\nExamples\n--------\n\nSHOW LOCALES;\n+-----+-------+-------------------------------------+------------------------+\n| Id  | Name  | Description                         | Error_Message_Language |\n+-----+-------+-------------------------------------+------------------------+\n|   0 | en_US | English - United States             | english                |\n|   1 | en_GB | English - United Kingdom            | english                |\n|   2 | ja_JP | Japanese - Japan                    | japanese               |\n|   3 | sv_SE | Swedish - Sweden                    | swedish                |\n...\n\nURL: https://mariadb.com/docs/server/reference/sql-statements/administrative-sql-statements/show/show-locales', '', 'https://mariadb.com/docs/server/reference/sql-statements/administrative-sql-statements/show/show-locales');
INSERT INTO help_topic (help_topic_id, help_category_id, name, description, example, url) VALUES (582, 26, 'SHOW OPEN TABLES', 'Syntax\n------\n\nSHOW OPEN TABLES [FROM db_name]\n    [LIKE ''pattern'' | WHERE expr]\n\nDescription\n-----------\n\nSHOW OPEN TABLES lists the non-TEMPORARY tables that are currently open in the table cache. See table-cache.html.\n\nThe FROM and LIKE clauses may be used.\n\nThe FROM clause, if present, restricts the tables shown to those present in thedb_name database.\n\nThe LIKE clause, if present on its own, indicates which table names to match. The WHERE and LIKE clauses can be given to select rows using more general conditions, as discussed in Extended SHOW.\n\nThe following information is returned:\n\n| Column       | Description                                                                         |\n| ------------ | ----------------------------------------------------------------------------------- |\n| Database     | Database name.                                                                      |\n| Name         | Table name.                                                                         |\n| In_use      | Number of table instances being used.                                               |\n| Name_locked | 1 if the table is name-locked, e.g. if it is being dropped or renamed, otherwise 0. |\n\nLOCK TABLE... WRITE acquires a strong MDL lock, and concurrent connections will wait on this MDL lock, so any subsequent LOCK TABLE... WRITE will not increment In_use.\n\nBefore MariaDB 5.5, each use of, for example, LOCK TABLE ... WRITE would increment In_use for that table. With the implementation of the metadata locking improvements in MariaDB 5.5, LOCK TABLE... WRITE acquires a strong MDL lock, and concurrent connections will wait on this MDL lock, so any subsequent LOCK TABLE... WRITE will not increment In_use.\n\nExamples\n--------\n\nSHOW OPEN TABLES;\n+----------+---------------------------+--------+-------------+\n| Database | Table                     | In_use | Name_locked |\n+----------+---------------------------+--------+-------------+\n...\n| test     | xjson                     |      0 |           0 |\n| test     | jauthor                   |      0 |           0 |\n| test     | locks                     |      1 |           0 |\n...\n+----------+---------------------------+--------+-------------+\n\nURL: https://mariadb.com/docs/server/reference/sql-statements/administrative-sql-statements/show/show-open-tables', '', 'https://mariadb.com/docs/server/reference/sql-statements/administrative-sql-statements/show/show-open-tables');
INSERT INTO help_topic (help_topic_id, help_category_id, name, description, example, url) VALUES (583, 26, 'SHOW PACKAGE BODY STATUS', 'Syntax\n------\n\nSHOW PACKAGE BODY STATUS\n    [LIKE ''pattern'' | WHERE expr]\n\nDescription\n-----------\n\nThe SHOW PACKAGE BODY STATUS statement returns characteristics of stored package bodies (implementations), such as the database, name, type, creator, creation and modification dates, and character set information. A similar statement, SHOW PACKAGE STATUS, displays information about stored package specifications.\n\nThe LIKE clause, if present, indicates which package names to match. The WHERE and LIKE clauses can be given to select rows using more general conditions, as discussed in Extended SHOW.\n\nThe ROUTINES table in the INFORMATION_SCHEMA database contains more detailed information.\n\nExamples\n--------\n\nSHOW PACKAGE BODY STATUS LIKE ''pkg1''\\G\n************************ 1. row ************************\n                  Db: test\n                Name: pkg1\n                Type: PACKAGE BODY\n             Definer: root@localhost\n            Modified: 2018-02-27 14:44:14\n             Created: 2018-02-27 14:44:14\n       Security_type: DEFINER\n             Comment: This is my first package body\ncharacter_set_client: utf8\ncollation_connection: utf8_general_ci\n  Database Collation: latin1_swedish_ci\n\nURL: https://mariadb.com/docs/server/reference/sql-statements/administrative-sql-statements/show/show-package-body-status', '', 'https://mariadb.com/docs/server/reference/sql-statements/administrative-sql-statements/show/show-package-body-status');
INSERT INTO help_topic (help_topic_id, help_category_id, name, description, example, url) VALUES (584, 26, 'SHOW PACKAGE STATUS', 'Syntax\n------\n\nSHOW PACKAGE STATUS\n    [LIKE ''pattern'' | WHERE expr]\n\nDescription\n-----------\n\nThe SHOW PACKAGE STATUS statement returns characteristics of stored package specifications, such as the database, name, type, creator, creation and modification dates, and character set information. A similar statement, SHOW PACKAGE BODY STATUS, displays information about stored package bodies (i.e. implementations).\n\nThe LIKE clause, if present, indicates which package names to match. The WHERE and LIKE clauses can be given to select rows using more general conditions, as discussed in Extended SHOW.\n\nThe ROUTINES table in the INFORMATION_SCHEMA database contains more detailed information.\n\nExamples\n--------\n\nSHOW PACKAGE STATUS LIKE ''pkg1''\\G\n************************ 1. row ************************\n                  Db: test\n                Name: pkg1\n                Type: PACKAGE\n             Definer: root@localhost\n            Modified: 2018-02-27 14:38:15\n             Created: 2018-02-27 14:38:15\n       Security_type: DEFINER\n             Comment: This is my first package\ncharacter_set_client: utf8\ncollation_connection: utf8_general_ci\n  Database Collation: latin1_swedish_ci\n\nURL: https://mariadb.com/docs/server/reference/sql-statements/administrative-sql-statements/show/show-package-status', '', 'https://mariadb.com/docs/server/reference/sql-statements/administrative-sql-statements/show/show-package-status');
INSERT INTO help_topic (help_topic_id, help_category_id, name, description, example, url) VALUES (585, 5, 'SHOW PLUGINS SONAME', 'Syntax\n------\n\nSHOW PLUGINS SONAME { library | LIKE ''pattern'' | WHERE expr };\n\nDescription\n-----------\n\nSHOW PLUGINS SONAME displays information about compiled-in and all server plugins in the plugin_dir directory, including plugins that haven''t been installed.\n\nExamples\n--------\n\nSHOW PLUGINS SONAME ''ha_example.so'';\n+----------+---------------+----------------+---------------+---------+\n| Name     | Status        | Type           | Library       | License |\n+----------+---------------+----------------+---------------+---------+\n| EXAMPLE  | NOT INSTALLED | STORAGE ENGINE | ha_example.so | GPL     |\n| UNUSABLE | NOT INSTALLED | DAEMON         | ha_example.so | GPL     |\n+----------+---------------+----------------+---------------+---------+\n\nURL: https://mariadb.com/docs/server/reference/sql-statements/administrative-sql-statements/show/show-plugins-soname', '', 'https://mariadb.com/docs/server/reference/sql-statements/administrative-sql-statements/show/show-plugins-soname');
INSERT INTO help_topic (help_topic_id, help_category_id, name, description, example, url) VALUES (586, 5, 'SHOW PLUGINS', 'Syntax\n------\n\nSHOW PLUGINS;\n\nDescription\n-----------\n\nSHOW PLUGINS displays information about installed plugins. The Library column indicates the plugin library - if it is NULL, the plugin is built-in and cannot be uninstalled.\n\nThe PLUGINS table in the information_schema database contains more detailed information.\n\nFor specific information about storage engines (a particular type of plugin), see the information_schema.ENGINES table and the SHOW ENGINES statement.\n\nExamples\n--------\n\nSHOW PLUGINS;\n+----------------------------+----------+--------------------+-------------+---------+\n| Name                       | Status   | Type               | Library     | License |\n+----------------------------+----------+--------------------+-------------+---------+\n| binlog                     | ACTIVE   | STORAGE ENGINE     | NULL        | GPL     |\n| mysql_native_password      | ACTIVE   | AUTHENTICATION     | NULL        | GPL     |\n| mysql_old_password         | ACTIVE   | AUTHENTICATION     | NULL        | GPL     |\n| MRG_MyISAM                 | ACTIVE   | STORAGE ENGINE     | NULL        | GPL     |\n| MyISAM                     | ACTIVE   | STORAGE ENGINE     | NULL        | GPL     |\n| CSV                        | ACTIVE   | STORAGE ENGINE     | NULL        | GPL     |\n| MEMORY                     | ACTIVE   | STORAGE ENGINE     | NULL        | GPL     |\n| FEDERATED                  | ACTIVE   | STORAGE ENGINE     | NULL        | GPL     |\n| PERFORMANCE_SCHEMA         | ACTIVE   | STORAGE ENGINE     | NULL        | GPL     |\n| Aria                       | ACTIVE   | STORAGE ENGINE     | NULL        | GPL     |\n| InnoDB                     | ACTIVE   | STORAGE ENGINE     | NULL        | GPL     |\n| INNODB_TRX                 | ACTIVE   | INFORMATION SCHEMA | NULL        | GPL     |\n...\n| INNODB_SYS_FOREIGN         | ACTIVE   | INFORMATION SCHEMA | NULL        | GPL     |\n| INNODB_SYS_FOREIGN_COLS    | ACTIVE   | INFORMATION SCHEMA | NULL        | GPL     |\n| SPHINX                     | ACTIVE   | STORAGE ENGINE     | NULL        | GPL     |\n| ARCHIVE                    | ACTIVE   | STORAGE ENGINE     | NULL        | GPL     |\n| BLACKHOLE                  | ACTIVE   | STORAGE ENGINE     | NULL        | GPL     |\n| FEEDBACK                   | DISABLED | INFORMATION SCHEMA | NULL        | GPL     |\n| partition                  | ACTIVE   | STORAGE ENGINE     | NULL        | GPL     |\n| pam                        | ACTIVE   | AUTHENTICATION     | auth_pam.so | GPL     |\n+----------------------------+----------+--------------------+-------------+---------+\n\nURL: https://mariadb.com/docs/server/reference/sql-statements/administrative-sql-statements/show/show-plugins', '', 'https://mariadb.com/docs/server/reference/sql-statements/administrative-sql-statements/show/show-plugins');

INSERT INTO help_topic (help_topic_id, help_category_id, name, description, example, url) VALUES (588, 26, 'SHOW PROCEDURE CODE', 'Syntax\n------\n\nSHOW PROCEDURE CODE proc_name\n\nDescription\n-----------\n\nThis statement is a MariaDB extension that is available only for servers that have been built with debugging support. It displays a representation of the internal implementation of the named stored procedure. A similar statement, SHOW FUNCTION CODE, displays information about stored functions.\n\nBoth statements require that you be the owner of the routine or have SELECT access to the mysql.proc table.\n\nIf the named routine is available, each statement produces a result set. Each row in the result set corresponds to one "instruction" in the routine. The first column is Pos, which is an ordinal number beginning with 0. The second column is Instruction, which contains an SQL statement (usually changed from the original source), or a directive which has meaning only to the stored-routine handler.\n\nExamples\n--------\n\nDELIMITER //\n\nCREATE PROCEDURE p1 ()\n  BEGIN\n    DECLARE fanta INT DEFAULT 55;\n    DROP TABLE t2;\n    LOOP\n      INSERT INTO t3 VALUES (fanta);\n      END LOOP;\n  END//\nQuery OK, 0 rows affected (0.00 sec)\n\nSHOW PROCEDURE CODE p1//\n+-----+----------------------------------------+\n| Pos | Instruction                            |\n+-----+----------------------------------------+\n|   0 | set fanta@0 55                         |\n|   1 | stmt 9 "DROP TABLE t2"                 |\n|   2 | stmt 5 "INSERT INTO t3 VALUES (fanta)" |\n|   3 | jump 2                                 |\n+-----+----------------------------------------+\n\nURL: https://mariadb.com/docs/server/reference/sql-statements/administrative-sql-statements/show/show-procedure-code', '', 'https://mariadb.com/docs/server/reference/sql-statements/administrative-sql-statements/show/show-procedure-code');
INSERT INTO help_topic (help_topic_id, help_category_id, name, description, example, url) VALUES (589, 26, 'SHOW PROCEDURE STATUS', 'Syntax\n------\n\nSHOW PROCEDURE STATUS\n    [LIKE ''pattern'' | WHERE expr]\n\nDescription\n-----------\n\nThis statement is a MariaDB extension. It returns characteristics of a stored procedure, such as the database, name, type, creator, creation and modification dates, and character set information. A similar statement, SHOW FUNCTION STATUS, displays information about stored functions.\n\nThe LIKE clause, if present, indicates which procedure or function names to match. The WHERE and LIKE clauses can be given to select rows using more general conditions, as discussed in Extended SHOW.\n\nThe ROUTINES table in the INFORMATION_SCHEMA database contains more detailed information.\n\nExamples\n--------\n\nSHOW PROCEDURE STATUS LIKE ''p1''\\G\n************************ 1. row ************************\n                  Db: test\n                Name: p1\n                Type: PROCEDURE\n             Definer: root@localhost\n            Modified: 2010-08-23 13:23:03\n             Created: 2010-08-23 13:23:03\n       Security_type: DEFINER\n             Comment: \ncharacter_set_client: latin1\ncollation_connection: latin1_swedish_ci\n  Database Collation: latin1_swedish_ci\n\nURL: https://mariadb.com/docs/server/reference/sql-statements/administrative-sql-statements/show/show-procedure-status', '', 'https://mariadb.com/docs/server/reference/sql-statements/administrative-sql-statements/show/show-procedure-status');
INSERT INTO help_topic (help_topic_id, help_category_id, name, description, example, url) VALUES (590, 26, 'SHOW PROCESSLIST', 'Syntax\n------\n\nSHOW [FULL] PROCESSLIST\n\nDescription\n-----------\n\nSHOW PROCESSLIST shows which threads are running. You can also get this information from the information_schema.PROCESSLIST table or the mariadb-admin processlist command. If you have the PROCESS privilege, you can see all threads. Otherwise, you can see only your own threads (that is, threads associated with the MariaDB account that you are using). If you do not use the FULL keyword, only the first 100 characters of each statement are shown in the Info field.\n\nThe columns shown in SHOW PROCESSLIST are:\n\n| Name     | Description                                                                                                                                                |\n| -------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------- |\n| Id       | The client''s thread ID.                                                                                                                                    |\n| User     | The username associated with the process.                                                                                                                  |\n| Host     | The host the client is connected to.                                                                                                                       |\n| db       | The default database of the process (NULL if no default).                                                                                                |\n| Command  | The command type. See Thread Command Values. |\n| Time     | The amount of time, in seconds, the process has been in its current state.                                                                                 |\n| State    | See Thread States.                                     |\n| Info     | The statement being executed.                                                                                                                              |\n| Progress | The total progress of the process (0-100%) (see Progress Reporting).                                                                |\n\nThe information_schema.PROCESSLIST table contains a number of additional columns. See TIME_MS column in information_schema.PROCESSLIST for differences in the TIME column between MariaDB and MySQL.\n\nNote that the PROGRESS field from the information schema, and the PROGRESS field from SHOW PROCESSLIST display different results. SHOW PROCESSLIST shows the total progress, while the information schema shows the progress for the current stage only.\n\nThreads can be killed using their thread_id or their query_id, with the KILL statement.\n\nSince queries on this table are locking, if the performance_schema is enabled, you may want to query the THREADS table instead.\n\nExamples\n--------\n\nSHOW PROCESSLIST;\n+----+-----------------+-----------+------+---------+------+------------------------+------------------+----------+\n| Id | User            | Host      | db   | Command | Time | State                  | Info             | Progress |\n+----+-----------------+-----------+------+---------+------+------------------------+------------------+----------+\n|  2 | event_scheduler | localhost | NULL | Daemon  | 2693 | Waiting on empty queue | NULL             |    0.000 |\n|  4 | root            | localhost | NULL | Query   |    0 | Table lock             | SHOW PROCESSLIST |    0.000 |\n+----+-----------------+-----------+------+---------+------+------------------------+------------------+----------+\n\nURL: https://mariadb.com/docs/server/reference/sql-statements/administrative-sql-statements/show/show-processlist', '', 'https://mariadb.com/docs/server/reference/sql-statements/administrative-sql-statements/show/show-processlist');
INSERT INTO help_topic (help_topic_id, help_category_id, name, description, example, url) VALUES (591, 26, 'SHOW PROFILE', 'Syntax\n------\n\nSHOW PROFILE [type [, type] ... ]\n    [FOR QUERY n]\n    [LIMIT row_count [OFFSET offset]]\n\ntype:\n    ALL\n  | BLOCK IO\n  | CONTEXT SWITCHES\n  | CPU\n  | IPC\n  | MEMORY\n  | PAGE FAULTS\n  | SOURCE\n  | SWAPS\n\nDescription\n-----------\n\nThe SHOW PROFILE and SHOW PROFILES statements display profiling information that indicates resource usage for statements executed during the course of the current session.\n\nProfiling is controlled by the profiling session variable, which has a default value of 0 (OFF). Profiling is enabled by setting profiling to 1 or ON:\n\n``sql\nSET profiling = 1;\n`\n\nSHOW PROFILES displays a list of the most recent statements sent to the master. The size of the list is controlled by the profiling_history_size session variable, which has a default value of 15. The maximum value is 100. Setting the value to 0 has the practical effect of disabling profiling.\n\nAll statements are profiled except SHOW PROFILES andSHOW PROFILE, so you will find neither of those statements in the profile list. Malformed statements are profiled. For example,SHOW PROFILING is an illegal statement, and a syntax error occurs if you try to execute it, but it will show up in the profiling list.\n\nSHOW PROFILE displays detailed information about a single statement. Without the FOR QUERY n clause, the output pertains to the most recently executed statement. IfFOR QUERY n is included,SHOW PROFILE displays information for statement _n_. The values of _n_ correspond to the Query_ID values displayed by SHOW PROFILES.\n\nThe LIMIT row_count clause may be given to limit the output to _row_count_ rows. If LIMIT is given,OFFSET offset may be added to begin the output offset rows into the full set of rows.\n\nBy default, SHOW PROFILE displays Status and Duration columns. The Status values are like the State values displayed by SHOW PROCESSLIST (see General Thread States), although there might be some minor differences in interpretation for the two statements for some status values.\n\nOptional type values may be specified to display specific additional types of information:\n\n ALL displays all information\n BLOCK IO displays counts for block input and output operations\n CONTEXT SWITCHES displays counts for voluntary and involuntary context switches\n CPU displays user and system CPU usage times\n IPC displays counts for messages sent and received\n MEMORY is not currently implemented\n PAGE FAULTS displays counts for major and minor page faults\n SOURCE displays the names of functions from the source code, together with the name and line number of the file in which the function occurs\n* SWAPS` displays swap counts\n\nProfiling is enabled per session. When a session ends, its profiling information is lost.\n\nThe information_schema.PROFILING table contains similar information.\n\nExamples\n--------\n\nSELECT @@profiling;\n+-------------+\n| @@profiling |\n+-------------+\n|           0 |\n+-------------+\n\nSET profiling = 1;\n\nUSE test;\n\nDROP TABLE IF EXISTS t1;\n\nCREATE TABLE T1 (id INT);\n\nSHOW PROFILES;\n+----------+------------+--------------------------+\n| Query_ID | Duration   | Query                    |\n+----------+------------+--------------------------+\n|        1 | 0.00009200 | SELECT DATABASE()        |\n|        2 | 0.00023800 | show databases           |\n|        3 | 0.00018900 | show tables              |\n|        4 | 0.00014700 | DROP TABLE IF EXISTS t1  |\n|        5 | 0.24476900 | CREATE TABLE T1 (id INT) |\n+----------+------------+--------------------------+\n\nSHOW PROFILE;\n+----------------------+----------+\n| Status               | Duration |\n+----------------------+----------+\n| starting             | 0.000042 |\n| checking permissions | 0.000044 |\n| creating table       | 0.244645 |\n| After create         | 0.000013 |\n| query end            | 0.000003 |\n| freeing items        | 0.000016 |\n| logging slow query   | 0.000003 |\n| cleaning up          | 0.000003 |\n+----------------------+----------+\n\nSHOW PROFILE FOR QUERY 4;\n+--------------------+----------+\n| Status             | Duration |\n+--------------------+----------+\n| starting           | 0.000126 |\n| query end          | 0.000004 |\n| freeing items      | 0.000012 |\n| logging slow query | 0.000003 |\n| cleaning up        | 0.000002 |\n+--------------------+----------+\n\nSHOW PROFILE CPU FOR QUERY 5;\n+----------------------+----------+----------+------------+\n| Status               | Duration | CPU_user | CPU_system |\n+----------------------+----------+----------+------------+\n| starting             | 0.000042 | 0.000000 |   0.000000 |\n| checking permissions | 0.000044 | 0.000000 |   0.000000 |\n| creating table       | 0.244645 | 0.000000 |   0.000000 |\n| After create         | 0.000013 | 0.000000 |   0.000000 |\n| query end            | 0.000003 | 0.000000 |   0.000000 |\n| freeing items        | 0.000016 | 0.000000 |   0.000000 |\n| logging slow query   | 0.000003 | 0.000000 |   0.000000 |\n| cleaning up          | 0.000003 | 0.000000 |   0.000000 |\n+----------------------+----------+----------+------------+\n\nURL: https://mariadb.com/docs/server/reference/sql-statements/administrative-sql-statements/show/show-profile', '', 'https://mariadb.com/docs/server/reference/sql-statements/administrative-sql-statements/show/show-profile');
INSERT INTO help_topic (help_topic_id, help_category_id, name, description, example, url) VALUES (592, 26, 'SHOW PROFILES', 'Syntax\n------\n\nSHOW PROFILES\n\nDescription\n-----------\n\nThe SHOW PROFILES statement displays profiling information that indicates resource usage for statements executed during the course of the current session. It is used together with SHOW PROFILE.\n\nURL: https://mariadb.com/docs/server/reference/sql-statements/administrative-sql-statements/show/show-profiles', '', 'https://mariadb.com/docs/server/reference/sql-statements/administrative-sql-statements/show/show-profiles');
INSERT INTO help_topic (help_topic_id, help_category_id, name, description, example, url) VALUES (593, 26, 'SHOW QUERY\\_RESPONSE\\_TIME', 'Syntax\n------\n\nSHOW QUERY_RESPONSE_TIME\n\nDescription\n-----------\n\nIt is possible to use SHOW QUERY_RESPONSE_TIME as an alternative for retrieving information from the QUERY_RESPONSE_TIME plugin.\n\nThis was introduced as part of the Information Schema plugin extension.\n\nExamples\n--------\n\nSHOW QUERY_RESPONSE_TIME;\n+----------------+-------+----------------+\n| Time           | Count | Total          |\n+----------------+-------+----------------+\n|       0.000001 |     0 |       0.000000 |\n|       0.000010 |    17 |       0.000094 |\n|       0.000100 |  4301         0.236555 |\n|       0.001000 |  1499 |       0.824450 |\n|       0.010000 | 14851 |      81.680502 |\n|       0.100000 |  8066 |     443.635693 |\n|       1.000000 |     0 |       0.000000 |\n|      10.000000 |     0 |       0.000000 |\n|     100.000000 |     1 |      55.937094 |\n|    1000.000000 |     0 |       0.000000 |\n|   10000.000000 |     0 |       0.000000 |\n|  100000.000000 |     0 |       0.000000 |\n| 1000000.000000 |     0 |       0.000000 |\n| TOO LONG       |     0 | TOO LONG       |\n+----------------+-------+----------------+\n\nURL: https://mariadb.com/docs/server/reference/sql-statements/administrative-sql-statements/show/show-query_response_time', '', 'https://mariadb.com/docs/server/reference/sql-statements/administrative-sql-statements/show/show-query_response_time');
INSERT INTO help_topic (help_topic_id, help_category_id, name, description, example, url) VALUES (594, 26, 'SHOW RELAYLOG EVENTS', 'Syntax\n------\n\nSHOW RELAYLOG [''connection_name''] EVENTS\n    [IN ''log_name''] [FROM pos] [LIMIT [offset,] row_count]\n    [ FOR CHANNEL ''channel_name'']\n\nDescription\n-----------\n\nOn slaves, this command shows the events in the relay log. If ''log_name'' is not specified, the first relay log is shown.\n\nSyntax for the LIMIT clause is the same as for SELECT ... LIMIT.\n\nUsing the LIMIT clause is highly recommended because the SHOW RELAYLOG EVENTS command returns the complete contents of the relay log, which can be quite large.\n\nThis command does not return events related to setting user and system variables. If you need those, use mariadb-binlog.\n\nOn the master, this command does nothing.\n\nRequires the SLAVE MONITOR privilege.\n\nRequires the SLAVE MONITOR privilege (>= MariaDB 10.5.9), the REPLICATION SLAVE ADMIN privilege (>= MariaDB 10.5.2) or the REPLICATION SLAVE privilege (<= MariaDB 10.5.1).\n\nconnection_name\n\nIf there is only one nameless master, or the default master (as specified by the default_master_connection system variable) is intended, connection_name can be omitted. If provided, the SHOW RELAYLOG statement will apply to the specified master. connection_name is case-insensitive.\n\nThe FOR CHANNEL keyword was added for MySQL compatibility. This is identical as using the channel_name directly after SHOW RELAYLOG.\n\nFOR CHANNEL is not available.\n\nURL: https://mariadb.com/docs/server/reference/sql-statements/administrative-sql-statements/show/show-relaylog-events', '', 'https://mariadb.com/docs/server/reference/sql-statements/administrative-sql-statements/show/show-relaylog-events');
INSERT INTO help_topic (help_topic_id, help_category_id, name, description, example, url) VALUES (595, 26, 'SHOW SLAVE HOSTS', 'Syntax\n------\n\nSHOW { SLAVE | REPLICA } HOSTS\n\nDescription\n-----------\n\nThis command is run on the master and displays a list of slaves that are currently registered with it. The output looks like this:\n\n``sql\nSHOW SLAVE HOSTS;\n+------------+-----------+------+-----------+\n| Server_id  | Host      | Port | Master_id |\n+------------+-----------+------+-----------+\n|  192168010 | iconnect2 | 3306 | 192168011 |\n| 1921680101 | athena    | 3306 | 192168011 |\n+------------+-----------+------+-----------+\n`\n\nServer_id: The unique server ID of the slave server, as configured in the server''s option file, or on the command line with --server-id=value.\n\nHost: The host name of the slave server, as configured in the server''s option file, or on the command line with --report-host=host_name (note that this can differ from the machine name as configured in the operating system). If a slave doesn''t configure --report-host explicitly, the value for the Host column is automatically extracted using the network connection''s host name or IP address.\n\nHost: The host name of the slave server, as configured in the server''s option file, or on the command line with --report-host=host_name (note that this can differ from the machine name as configured in the operating system). If a slave doesn''t configure --report-host explicitly, the value for the Host column is automatically extracted using the network connection''s host name or IP address. The Host value is left blank if a slave''s --report-host parameter is not configured.\n\nPort: The port the slave server is listening on.\n\nMaster_id: The unique server ID of the master server that the slave server is replicating from.\n\nRequires the REPLICATION MASTER ADMIN privilege.\n\nRequires the REPLICATION SLAVE privilege.\n\nSHOW REPLICA HOSTS\n\nSHOW REPLICA HOSTS is an alias for SHOW SLAVE HOSTS .\n\nSHOW REPLICA HOSTS is not available, use SHOW SLAVE HOSTS` instead.\n\nURL: https://mariadb.com/docs/server/reference/sql-statements/administrative-sql-statements/show/show-replica-hosts', '', 'https://mariadb.com/docs/server/reference/sql-statements/administrative-sql-statements/show/show-replica-hosts');

INSERT INTO help_topic (help_topic_id, help_category_id, name, description, example, url) VALUES (597, 26, 'SHOW STATUS', 'Syntax\n------\n\nSHOW [GLOBAL | SESSION] STATUS\n    [LIKE ''pattern'' | WHERE expr]\n\nDescription\n-----------\n\nSHOW STATUS provides server status information. This information also can be obtained using the mariadb-admin extended-status command, or by querying the Information Schema GLOBAL_STATUS and SESSION_STATUS tables. The LIKE clause, if present, indicates which variable names to match. The WHERE clause can be given to select rows using more general conditions.\n\nWith the GLOBAL modifier, SHOW STATUS displays the status values for all connections to MariaDB. WithSESSION, it displays the status values for the current connection. If no modifier is present, the default isSESSION. LOCAL is a synonym forSESSION. If you see a lot of 0 values, the reason is probably that you have used SHOW STATUS with a new connection instead of SHOW GLOBAL STATUS.\n\nSome status variables have only a global value. For these, you get the same value for both GLOBAL and SESSION.\n\nSee Server Status Variables for a full list, scope and description of the variables that can be viewed with SHOW STATUS.\n\nThe LIKE clause, if present on its own, indicates which variable name to match.\n\nThe WHERE and LIKE clauses can be given to select rows using more general conditions, as discussed in Extended SHOW.\n\nExamples\n--------\n\nSHOW GLOBAL STATUS;\n+--------------------------------------------------------------+----------------------------------------+\n| Variable_name                                                | Value                                  |\n+--------------------------------------------------------------+----------------------------------------+\n| Aborted_clients                                              | 0                                      |\n| Aborted_connects                                             | 0                                      |\n| Access_denied_errors                                         | 0                                      |\n| Acl_column_grants                                            | 0                                      |\n| Acl_database_grants                                          | 2                                      |\n| Acl_function_grants                                          | 0                                      |\n| Acl_procedure_grants                                         | 0                                      |\n| Acl_proxy_users                                              | 2                                      |\n| Acl_role_grants                                              | 0                                      |\n| Acl_roles                                                    | 0                                      |\n| Acl_table_grants                                             | 0                                      |\n| Acl_users                                                    | 6                                      |\n| Aria_pagecache_blocks_not_flushed                            | 0                                      |\n| Aria_pagecache_blocks_unused                                 | 15706                                  |\n...\n| wsrep_local_index                                            | 18446744073709551615                   |\n| wsrep_provider_name                                          |                                        |\n| wsrep_provider_vendor                                        |                                        |\n| wsrep_provider_version                                       |                                        |\n| wsrep_ready                                                  | OFF                                    |\n| wsrep_thread_count                                           | 0                                      |\n+--------------------------------------------------------------+----------------------------------------+\n516 rows in set (0.00 sec)\n\nURL: https://mariadb.com/docs/server/reference/sql-statements/administrative-sql-statements/show/show-status', '', 'https://mariadb.com/docs/server/reference/sql-statements/administrative-sql-statements/show/show-status');
INSERT INTO help_topic (help_topic_id, help_category_id, name, description, example, url) VALUES (598, 26, 'SHOW TABLE\\_STATISTICS', 'Syntax\n------\n\nSHOW TABLE_STATISTICS\n\nDescription\n-----------\n\nThe SHOW TABLE_STATISTICS statement is part of the User Statistics feature. It was effectively replaced by the generic SHOW TABLE STATISTICS statement. The information_schema.TABLE_STATISTICS table shows statistics on table usage.\n\nThe SHOW TABLE_STATISTICS statement is part of the User Statistics feature. The information_schema.TABLE_STATISTICS table shows statistics on table usage.\n\nThe userstat system variable must be set to 1 to activate this feature. See the User Statistics and information_schema.TABLE_STATISTICS articles for more information.\n\nExamples\n--------\n\nSHOW TABLE_STATISTICS\\G\n************************ 1. row *********************\n           Table_schema: mysql\n             Table_name: proxies_priv\n              Rows_read: 2\n           Rows_changed: 0\nRows_changed_x_#indexes: 0\n********************* 2. row *********************\n           Table_schema: test\n             Table_name: employees_example\n              Rows_read: 7\n           Rows_changed: 0\nRows_changed_x_#indexes: 0\n********************* 3. row *********************\n           Table_schema: mysql\n             Table_name: user\n              Rows_read: 16\n           Rows_changed: 0\nRows_changed_x_#indexes: 0\n********************* 4. row ************************\n           Table_schema: mysql\n             Table_name: db\n              Rows_read: 2\n           Rows_changed: 0\nRows_changed_x_#indexes: 0\n\nURL: https://mariadb.com/docs/server/reference/sql-statements/administrative-sql-statements/show/show-table-statistics', '', 'https://mariadb.com/docs/server/reference/sql-statements/administrative-sql-statements/show/show-table-statistics');
INSERT INTO help_topic (help_topic_id, help_category_id, name, description, example, url) VALUES (599, 26, 'SHOW TABLE STATUS', 'Syntax\n------\n\nSHOW TABLE STATUS [{FROM | IN} db_name]\n    [LIKE ''pattern'' | WHERE expr]\n\nDescription\n-----------\n\nSHOW TABLE STATUS works like SHOW TABLES, but provides more extensive information about each table.\n\nSHOW TABLE STATUS works like SHOW TABLES, but provides more extensive information about each table. Only non-TEMPORARY tables are shown.\n\nThe LIKE clause, if present on its own, indicates which table names to match. The WHERE and LIKE clauses can be given to select rows using more general conditions, as discussed in Extended SHOW.\n\nThe following information is returned:\n\n| Column             | Description                                                                                                                                                                                                                                                                                                                                                                                                                            |\n| ------------------ | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |\n| Name               | Table name.                                                                                                                                                                                                                                                                                                                                                                                                                            |\n| Engine             | Table storage engine.                                                                                                                                                                                                                                                                                                                                                                     |\n| Version            | Version number from the table''s .frm file.                                                                                                                                                                                                                                                                                                                                                                                             |\n| Row_format        | Row format (see InnoDB, Aria and MyISAM row formats).                                                                                                        |\n| Rows               | Number of rows in the table. Some engines, such as InnoDB may store an estimate.                                                                                                                                                                                                                                                                                                   |\n| Avg_row_length   | Average row length in the table.                                                                                                                                                                                                                                                                                                                                                                                                       |\n| Data_length       | For InnoDB, the index size, in pages, multiplied by the page size. For Aria and MyISAM, length of the data file, in bytes. For MEMORY, the approximate allocated memory.                 |\n| Max_data_length  | Maximum length of the data file, ie the total number of bytes that could be stored in the table. Not used in InnoDB.                                                                                                                                                                                                                                                               |\n| Index_length      | Length of the index file.                                                                                                                                                                                                                                                                                                                                                                                                              |\n| Data_free         | Bytes allocated but unused. For InnoDB tables in a shared tablespace, the free space of the shared tablespace with small safety margin. An estimate in the case of partitioned tables - see the PARTITIONS table.                                                                                                        |\n| Auto_increment    | Next AUTO_INCREMENT value.                                                                                                                                                                                                                                                                                                                                                                   |\n| Create_time       | Time the table was created. Some engines just return the ctime information from the file system layer here, in that case the value is not necessarily the table creation time but rather the time the file system metadata for it had last changed.                                                                                                                                                                                    |\n| Update_time       | Time the table was last updated. On Windows, the timestamp is not updated on update, so MyISAM values will be inaccurate. In InnoDB, if shared tablespaces are used, will be NULL, while buffering can also delay the update, so the value will differ from the actual time of the last UPDATE, INSERT or DELETE.                                                                  |\n| Check_time        | Time the table was last checked. Not kept by all storage engines, in which case will be NULL.                                                                                                                                                                                                                                                                                                                                          |\n| Collation          | Character set and collation.                                                                                                                                                                                                                                                                                                                                                  |\n| Checksum           | Live checksum value, if any.                                                                                                                                                                                                                                                                                                                                                                                                           |\n| Create_options    | Extra CREATE TABLE options.                                                                                                                                                                                                                                                                                                                                                            |\n| Comment            | Table comment provided when MariaDB created the table.                                                                                                                                                                                                                                                                                                                                                                                 |\n| Max_index_length | Maximum index length (supported by MyISAM and Aria tables).                                                                                                                                                                                                                                                                                                                                                                            |\n| Temporary          | Until MariaDB 11.2.0, placeholder to signal that a table is a temporary table and always "N", except "Y" for generated information_schema tables and NULL for views. From MariaDB 11.2.0, will also be set to "Y" for local temporary tables. |\n\nSimilar information can be found in the information_schema.TABLES table as well as by using mariadb-show:\n\n``bash\nmariadb-show --status db_name\n`\n\nViews\n\nFor views, all columns in SHOW TABLE STATUS are NULL` except ''Name'' and ''Comment''\n\nExamples\n--------\n\nSHOW TABLE STATUS\\G\n************************ 1. row ************************\n           Name: bus_routes\n         Engine: InnoDB\n        Version: 10\n     Row_format: Dynamic\n           Rows: 5\n Avg_row_length: 3276\n    Data_length: 16384\nMax_data_length: 0\n   Index_length: 0\n      Data_free: 0\n Auto_increment: NULL\n    Create_time: 2017-05-24 11:17:46\n    Update_time: NULL\n     Check_time: NULL\n      Collation: latin1_swedish_ci\n       Checksum: NULL\n Create_options: \n        Comment:\n\nURL: https://mariadb.com/docs/server/reference/sql-statements/administrative-sql-statements/show/show-table-status', '', 'https://mariadb.com/docs/server/reference/sql-statements/administrative-sql-statements/show/show-table-status');
INSERT INTO help_topic (help_topic_id, help_category_id, name, description, example, url) VALUES (600, 26, 'SHOW TABLES', 'Syntax\n------\n\nSHOW [FULL] TABLES [FROM db_name]\n    [LIKE ''pattern'' | WHERE expr]\n\nDescription\n-----------\n\nSHOW TABLES lists the tables, sequences and views in a given database.\n\nSHOW TABLES lists the tables (only non-TEMPORARY tables are shown), sequences and views in a given database.\n\nThe LIKE clause, if present on its own, indicates which table names to match. The WHERE and LIKE clauses can be given to select rows using more general conditions, as discussed in Extended SHOW. For example, when searching for tables in the test database, the column name for use in the WHERE and LIKE clauses will be Tables_in_test\n\nThe FULL modifier is supported such that SHOW FULL TABLES displays a second output column. Values for the second column, Table_type, are BASE TABLE for a table, VIEW for a view and SEQUENCE for a sequence.\n\nYou can also get this information using:\n\n``bash\nmariadb-show db_name\n`\n\nSee mariadb-show for more details.\n\nIf you have no privileges for a base table or view, it does not show up in the output from SHOW TABLES or mariadb-show db_name`.\n\nThe information_schema.TABLES table, as well as the SHOW TABLE STATUS statement, provide extended information about tables.\n\nExamples\n--------\n\nSHOW TABLES;\n+----------------------+\n| Tables_in_test       |\n+----------------------+\n| animal_count         |\n| animals              |\n| are_the_mooses_loose |\n| aria_test2           |\n| t1                   |\n| view1                |\n+----------------------+\n\nURL: https://mariadb.com/docs/server/reference/sql-statements/administrative-sql-statements/show/show-tables', '', 'https://mariadb.com/docs/server/reference/sql-statements/administrative-sql-statements/show/show-tables');
INSERT INTO help_topic (help_topic_id, help_category_id, name, description, example, url) VALUES (601, 26, 'SHOW TRIGGERS', 'Syntax\n------\n\nSHOW TRIGGERS [FROM db_name]\n    [LIKE ''pattern'' | WHERE expr]\n\nDescription\n-----------\n\nSHOW TRIGGERS lists the triggers currently defined for tables in a database (the default database unless a FROM clause is given). This statement requires the TRIGGER privilege.\n\nSHOW TRIGGERS lists the triggers currently defined for tables in a database (the default database unless a FROM clause is given). This statement requires the SUPER privilege.\n\nThe LIKE clause, if present on its own, indicates which table names to match and causes the statement to display triggers for those tables. The WHERE and LIKE clauses can be given to select rows using more general conditions, as discussed in Extended SHOW.\n\nSimilar information is stored in the information_schema.TRIGGERS table.\n\nIf there are multiple triggers for the same action, then the triggers are shown in action order.\n\nExamples\n--------\n\nSHOW triggers Like ''animals'' \\G\n************************ 1. row ************************\n             Trigger: the_mooses_are_loose\n               Event: INSERT\n               Table: animals\n           Statement: BEGIN\n IF NEW.name = ''Moose'' THEN\n  UPDATE animal_count SET animal_count.animals = animal_count.animals+100;\n ELSE \n  UPDATE animal_count SET animal_count.animals = animal_count.animals+1;\n END IF;\nEND\n              Timing: AFTER\n             Created: 2016-09-29 13:53:34.35\n            sql_mode: \n             Definer: root@localhost\ncharacter_set_client: utf8\ncollation_connection: utf8_general_ci\n  Database Collation: latin1_swedish_ci\n\nURL: https://mariadb.com/docs/server/reference/sql-statements/administrative-sql-statements/show/show-triggers', '', 'https://mariadb.com/docs/server/reference/sql-statements/administrative-sql-statements/show/show-triggers');
INSERT INTO help_topic (help_topic_id, help_category_id, name, description, example, url) VALUES (602, 26, 'SHOW USER\\_STATISTICS', 'Syntax\n------\n\nSHOW USER_STATISTICS\n\nDescription\n-----------\n\nThe SHOW USER_STATISTICS statement is part of the User Statistics feature. It was effectively replaced by the generic SHOW information_schema_table statement. The information_schema.USER_STATISTICS table holds statistics about user activity. You can use this table to find out such things as which user is causing the most load and which users are being abusive. You can also use this table to measure how close to capacity the server may be.\n\nThe SHOW USER_STATISTICS statement is part of the User Statistics feature. The information_schema.USER_STATISTICS table holds statistics about user activity. You can use this table to find out such things as which user is causing the most load and which users are being abusive. You can also use this table to measure how close to capacity the server may be.\n\nThe userstat system variable must be set to 1 to activate this feature. See the User Statistics and information_schema.USER_STATISTICS table for more information.\n\nExamples\n--------\n\nSHOW USER_STATISTICS\\G\n************************ 1. row ************************\n                  User: root\n     Total_connections: 1\nConcurrent_connections: 0\n        Connected_time: 3297\n             Busy_time: 0.14113400000000006\n              Cpu_time: 0.017637000000000003\n        Bytes_received: 969\n            Bytes_sent: 22355\n  Binlog_bytes_written: 0\n             Rows_read: 10\n             Rows_sent: 67\n          Rows_deleted: 0\n         Rows_inserted: 0\n          Rows_updated: 0\n       Select_commands: 7\n       Update_commands: 0\n        Other_commands: 0\n   Commit_transactions: 1\n Rollback_transactions: 0\n    Denied_connections: 0\n      Lost_connections: 0\n         Access_denied: 0\n         Empty_queries: 7\n\nURL: https://mariadb.com/docs/server/reference/sql-statements/administrative-sql-statements/show/show-user-statistics', '', 'https://mariadb.com/docs/server/reference/sql-statements/administrative-sql-statements/show/show-user-statistics');
INSERT INTO help_topic (help_topic_id, help_category_id, name, description, example, url) VALUES (603, 26, 'SHOW USER\\_VARIABLES', 'Description\n-----------\n\nSee the User Variables Plugin for details.\n\nURL: https://mariadb.com/docs/server/reference/sql-statements/administrative-sql-statements/show/show-user_variables', '', 'https://mariadb.com/docs/server/reference/sql-statements/administrative-sql-statements/show/show-user_variables');
INSERT INTO help_topic (help_topic_id, help_category_id, name, description, example, url) VALUES (604, 26, 'SHOW VARIABLES', 'Syntax\n------\n\nSHOW [GLOBAL | SESSION] VARIABLES\n    [LIKE ''pattern'' | WHERE expr]\n\nDescription\n-----------\n\nSHOW VARIABLES shows the values of MariaDB system variables. This does not include user-defined variables - see here for details on viewing those.\n\nSystem variable information can also be obtained using the mariadb-admin variables command. The LIKE clause, if present, indicates which variable names to match. The WHERE clause can be given to select rows using more general conditions.\n\nWith the GLOBAL modifier, SHOW VARIABLES displays the values that are used for new connections to MariaDB. With SESSION, it displays the values that are in effect for the current connection. If no modifier is present, the default is SESSION. LOCAL is a synonym for SESSION. With a LIKE clause, the statement displays only rows for those variables with names that match the pattern. To obtain the row for a specific variable, use a LIKE clause as shown:\n\n``sql\nSHOW VARIABLES LIKE ''maria_group_commit'';\nSHOW SESSION VARIABLES LIKE ''maria_group_commit'';\n`\n\nTo get a list of variables whose name match a pattern, use the "%" wildcard character in a LIKE clause:\n\n`sql\nSHOW VARIABLES LIKE ''%maria%'';\nSHOW GLOBAL VARIABLES LIKE ''%maria%'';\n`\n\nWildcard characters can be used in any position within the pattern to be matched. Strictly speaking, because "_" is a wildcard that matches any single character, you should escape it as "_" to match it literally. In practice, this is rarely necessary.\n\nThe WHERE and LIKE` clauses can be given to select rows using more general conditions, as discussed in Extended SHOW.\n\nSee SET for information on setting server system variables.\n\nSee Server System Variables for a list of all the variables that can be set.\n\nYou can also see the server variables by querying the Information Schema GLOBAL_VARIABLES and SESSION_VARIABLES tables.\n\nExamples\n--------\n\nSHOW VARIABLES LIKE ''aria%'';\n+------------------------------------------+---------------------+\n| Variable_name                            | Value               |\n+------------------------------------------+---------------------+\n| aria_block_size                          | 8192                |\n| aria_checkpoint_interval                 | 30                  |\n| aria_checkpoint_log_activity             | 1048576             |\n| aria_force_start_after_recovery_failures | 0                   |\n| aria_group_commit                        | none                |\n| aria_group_commit_interval               | 0                   |\n| aria_log_file_size                       | 1073741824          |\n| aria_log_purge_type                      | immediate           |\n| aria_max_sort_file_size                  | 9223372036853727232 |\n| aria_page_checksum                       | ON                  |\n| aria_pagecache_age_threshold             | 300                 |\n| aria_pagecache_buffer_size               | 134217728           |\n| aria_pagecache_division_limit            | 100                 |\n| aria_recover                             | NORMAL              |\n| aria_repair_threads                      | 1                   |\n| aria_sort_buffer_size                    | 134217728           |\n| aria_stats_method                        | nulls_unequal       |\n| aria_sync_log_dir                        | NEWFILE             |\n| aria_used_for_temp_tables                | ON                  |\n+------------------------------------------+---------------------+\n\nURL: https://mariadb.com/docs/server/reference/sql-statements/administrative-sql-statements/show/show-variables', '', 'https://mariadb.com/docs/server/reference/sql-statements/administrative-sql-statements/show/show-variables');
INSERT INTO help_topic (help_topic_id, help_category_id, name, description, example, url) VALUES (605, 26, 'SHOW WARNINGS', 'Syntax\n------\n\nSHOW WARNINGS [LIMIT [offset,] row_count]\nSHOW ERRORS [LIMIT row_count OFFSET offset]\nSHOW COUNT() WARNINGS\n\nDescription\n-----------\n\nSHOW WARNINGS shows the error, warning, and note messages that resulted from the last statement that generated messages in the current session. It shows nothing if the last statement used a table and generated no messages. (That is, a statement that uses a table but generates no messages clears the message list.) Statements that do not use tables and do not generate messages have no effect on the message list.\n\nA note is different to a warning in that it only appears if the sql_notes variable is set to 1 (the default), and is not converted to an error if strict mode is enabled.\n\nA related statement, SHOW ERRORS, shows only the errors.\n\nThe SHOW COUNT() WARNINGS statement displays the total number of errors, warnings, and notes. You can also retrieve this number from the warning_count variable:\n\n``sql\nSHOW COUNT() WARNINGS;\nSELECT @@warning_count;\n`\n\nThe value of warning_count might be greater than the number of messages displayed by SHOW WARNINGS if the max_error_count system variable is set so low that not all messages are stored.\n\nThe LIMIT clause has the same syntax as for the SELECT statement.\n\nSHOW WARNINGS can be used after EXPLAIN EXTENDED to see how a query is internally rewritten by MariaDB.\n\nIf the sql_notes server variable is set to 1, Notes are included in the output of SHOW WARNINGS; if it is set to 0, this statement will not show (or count) Notes.\n\nThe results of SHOW WARNINGS and SHOW COUNT() WARNINGS are directly sent to the client. If you need to access those information in a stored program, you can use the GET DIAGNOSTICS statement instead.\n\nThe mariadb client also has a number of options related to warnings. The \\W command will show warnings after every statement, while \\w will disable this. Starting the client with the --show-warnings option will show warnings after every statement.\n\nMariaDB implements a stored routine error stack trace. SHOW WARNINGS` can also be used to show more information. See the example below.\n\nExamples\n--------\n\nSELECT 1/0;\n+------+\n| 1/0  |\n+------+\n| NULL |\n+------+\n\nSHOW COUNT(*) WARNINGS;\n+-------------------------+\n| @@session.warning_count |\n+-------------------------+\n|                       1 |\n+-------------------------+\n\nSHOW WARNINGS;\n+---------+------+---------------+\n| Level   | Code | Message       |\n+---------+------+---------------+\n| Warning | 1365 | Division by 0 |\n+---------+------+---------------+\n\nURL: https://mariadb.com/docs/server/reference/sql-statements/administrative-sql-statements/show/show-warnings', '', 'https://mariadb.com/docs/server/reference/sql-statements/administrative-sql-statements/show/show-warnings');
INSERT INTO help_topic (help_topic_id, help_category_id, name, description, example, url) VALUES (606, 26, 'SHOW WSREP\\_MEMBERSHIP', 'Syntax\n------\n\nSHOW WSREP_MEMBERSHIP\n\nDescription\n-----------\n\nThe SHOW WSREP_MEMBERSHIP statement returns Galera node cluster membership information. It returns the same information as found in the information_schema.WSREP_MEMBERSHIP table. Only users with the SUPER privilege can access this information.\n\nExamples\n--------\n\nSHOW WSREP_MEMBERSHIP;\n+-------+--------------------------------------+----------+-----------------+\n| Index | Uuid                                 | Name     | Address         |\n+-------+--------------------------------------+----------+-----------------+\n|     0 | 19058073-8940-11e4-8570-16af7bf8fced | my_node1 | 10.0.2.15:16001 |\n|     1 | 19f2b0e0-8942-11e4-9cb8-b39e8ee0b5dd | my_node3 | 10.0.2.15:16003 |\n|     2 | d85e62db-8941-11e4-b1ef-4bc9980e476d | my_node2 | 10.0.2.15:16002 |\n+-------+--------------------------------------+----------+-----------------+\n\nURL: https://mariadb.com/docs/server/reference/sql-statements/administrative-sql-statements/show/show-wsrep_membership', '', 'https://mariadb.com/docs/server/reference/sql-statements/administrative-sql-statements/show/show-wsrep_membership');
INSERT INTO help_topic (help_topic_id, help_category_id, name, description, example, url) VALUES (607, 26, 'SHOW WSREP\\_STATUS', 'Syntax\n------\n\nSHOW WSREP_STATUS\n\nDescription\n-----------\n\nThe SHOW WSREP_STATUS statement returns Galera node and cluster status information. It returns the same information as found in the information_schema.WSREP_STATUS table. Only users with the SUPER privilege can access this information.\n\nExamples\n--------\n\nSHOW WSREP_STATUS;\n+------------+-------------+----------------+--------------+\n| Node_Index | Node_Status | Cluster_Status | Cluster_Size |\n+------------+-------------+----------------+--------------+\n|          0 | Synced      | Primary        |            3 |\n+------------+-------------+----------------+--------------+\n\nURL: https://mariadb.com/docs/server/reference/sql-statements/administrative-sql-statements/show/show-wsrep_status', '', 'https://mariadb.com/docs/server/reference/sql-statements/administrative-sql-statements/show/show-wsrep_status');
INSERT INTO help_topic (help_topic_id, help_category_id, name, description, example, url) VALUES (608, 26, 'SHUTDOWN', 'Syntax\n------\n\nSHUTDOWN [WAIT FOR ALL { SLAVES | REPLICAS } ]\n\nDescription\n-----------\n\nThe SHUTDOWN command shuts the server down.\n\nWAIT FOR ALL SLAVES / REPLICAS\n\nThe WAIT FOR ALL REPLICAS statement can be used throughout.\n\nThe WAIT FOR ALL SLAVES option was first added in MariaDB 10.4.4.\n\nWhen a master server is shutdown and it goes through the normal shutdown process, the master kills client threads in random order. By default, the master also considers its binary log dump threads to be regular client threads. As a consequence, the binary log dump threads can be killed while client threads still exist, and this means that data can be written on the master during a normal shutdown that won''t be replicated. This is true even if semi-synchronous replication is being used.\n\nThis problem can be solved by shutting down the server with the SHUTDOWN command and by providing the WAIT FOR ALL SLAVES/WAIT FOR ALL REPLICAS option to the command. For example:\n\n``sql\nSHUTDOWN WAIT FOR ALL SLAVES;\n`\n\nWhen the WAIT FOR ALL SLAVES option is provided, the server only kills its binary log dump threads after all client threads have been killed, and it only completes the shutdown after the last binary log has been sent to all connected slaves.\n\nSee Replication Threads: Binary Log Dump Threads and the Shutdown Process for more information.\n\nRequired Permissions\n\nOne must have a SHUTDOWN privilege (see GRANT) to use this command. It is the same privilege one needs to use the mariadb-admin shutdown command.\n\nShutdown for Upgrades\n\nIf you are doing a shutdown to migrate to another major version of MariaDB, please ensure that the innodb_fast_shutdown variable is not 2 (fast crash shutdown). The default of this variable is 1.\n\nExamples\n--------\n\nCREATE EVENT test.shutd`\n    ON SCHEDULE\n        EVERY 1 DAY\n        STARTS ''2014-01-01 20:00:00''\n    COMMENT ''Shutdown Maria when the office is closed''\nDO BEGIN\n    SHUTDOWN;\nEND;\n\nURL: https://mariadb.com/docs/server/reference/sql-statements/administrative-sql-statements/shutdown', '', 'https://mariadb.com/docs/server/reference/sql-statements/administrative-sql-statements/shutdown');
INSERT INTO help_topic (help_topic_id, help_category_id, name, description, example, url) VALUES (609, 26, 'USE \\[DATABASE]', 'Syntax\n------\n\nUSE db_name\n\nDescription\n-----------\n\nThe ''USE db_name'' statement tells MariaDB to use the db_name database as the default (current) database for subsequent statements. The database remains the default until the end of the session, or until another USE statement is issued:\n\n``sql\nUSE db1;\nSELECT COUNT() FROM mytable;   # selects FROM db1.mytable\nUSE db2;\nSELECT COUNT() FROM mytable;   # selects FROM db2.mytable\n`\n\nThe DATABASE() function (SCHEMA() is a synonym) returns the default database.\n\nAnother way to set the default database is by specifying its name when starting the mariadb command line client:\n\n`\nmariadb db1    # starts the mariadb command-line client with db1 as the current database\n`\n\nOne cannot use USE` to a database one has no privileges to. The reason is that a user with no privileges to a database should not be able to know if a database exists or not.\n\nURL: https://mariadb.com/docs/server/reference/sql-statements/administrative-sql-statements/use-database', '', 'https://mariadb.com/docs/server/reference/sql-statements/administrative-sql-statements/use-database');
INSERT INTO help_topic (help_topic_id, help_category_id, name, description, example, url) VALUES (610, 35, 'Comment Syntax', 'Description\n-----------\n\nThere are three supported comment styles in MariaDB:\n\n1. From a hash sign (#) to the end of a line:\n\n``sql\nSELECT  FROM users; \n\nThis is a comment\n\n`\n\n1. From a double dash (--) to the end of a line. The space after the two dashes is required (as in MySQL).\n\n`sql\nSELECT  FROM users; -- This is a comment\n`\n\n1. C style comments from an opening ''/'' to a closing ''/''. Comments of this form can span multiple lines:\n\n`sql\nSELECT  FROM users; / This is a\nmulti-line\ncomment /\n`\n\nNested comments are possible in some situations, but they are not supported or recommended.\n\nExecutable Comments\n\nAs an aid to portability between different databases, MariaDB supports executable comments. These special comments allow you to embed SQL code which will not execute when run on other databases, but will execute when run on MariaDB.\n\nMariaDB supports both MySQL''s executable comment format, and a slightly modified version specific to MariaDB. This way, if you have SQL code that works on MySQL and MariaDB, but not other databases, you can wrap it in a MySQL executable comment, and if you have code that specifically takes advantage of features only available in MariaDB you can use the MariaDB specific format to\\\nhide the code from MySQL.\n\nExecutable Comment Syntax\n\nMySQL and MariaDB executable comment syntax:\n\n`sql\n/! MySQL or MariaDB-specific code /\n`\n\nCode that should be executed only starting from a specific MySQL or MariaDB version:\n\n`sql\n/!##### MySQL or MariaDB-specific code /\n`\n\nThe numbers, represented by ''######'' in the syntax examples above specify the specific the minimum versions of MySQL and MariaDB that should execute the comment. The first number is the major version, the second 2 numbers are the minor version and the last 2 is the patch level.\n\nFor example, if you want to embed some code that should only execute on MySQL or MariaDB starting from 5.1.0, you would do the following:\n\n`sql\n/!50100 MySQL and MariaDB 5.1.0 (and above) code goes here. /\n`\n\nMariaDB-only executable comment syntax (starting from MariaDB 5.3.1):\n\n`sql\n/M! MariaDB-specific code /\n/M!###### MariaDB-specific code /\n`\n\nMariaDB ignores MySQL-style executable comments that have a version number in the range 50700..99999. This is needed to skip features introduced in MySQL-5.7 that are not ported to MariaDB 10.x yet.\n\n`sql\n/!50701 MariaDB-10.x ignores MySQL-5.7 specific code /\n`\n\nNote: comments which have a version number in the range 50700..99999 that use MariaDB-style executable comment syntax are still executed.\n\n`sql\n/M!50701 MariaDB-10.x does not ignore this /\n``\n\nStatement delimiters cannot be used within executable comments.\n\nExamples\n--------\n\nSELECT 2 / +1 /;\nSELECT 1 /! +1 /;\nSELECT 1 /!50101 +1 /;\nSELECT 2 /M! +1 /;\nSELECT 2 /M!50301 +1 */;\n\nURL: https://mariadb.com/docs/server/reference/sql-statements/comment-syntax', '', 'https://mariadb.com/docs/server/reference/sql-statements/comment-syntax');
