-------------------------------------------------------------- begin mysqldump -------------------------------------------------------------- -- MySQL dump 10.2 -- -- Host: localhost Database: --------------------------------------------------------- -- Server version 4.1.0-alpha -- -- Current Database: another_test -- CREATE DATABASE /*!32312 IF NOT EXISTS*/ another_test; USE another_test; -- -- Table structure for table 'blah' -- DROP TABLE IF EXISTS blah; CREATE TABLE blah ( thingy int(11) default NULL ) TYPE=MyISAM CHARSET=latin1; -- -- Dumping data for table 'blah' -- /*!40000 ALTER TABLE blah DISABLE KEYS */; LOCK TABLES blah WRITE; UNLOCK TABLES; /*!40000 ALTER TABLE blah ENABLE KEYS */; -- -- Current Database: mysql -- CREATE DATABASE /*!32312 IF NOT EXISTS*/ mysql; USE mysql; -- -- Table structure for table 'columns_priv' -- DROP TABLE IF EXISTS columns_priv; CREATE TABLE columns_priv ( Host char(60) binary NOT NULL default '', Db char(64) binary NOT NULL default '', User char(16) binary NOT NULL default '', Table_name char(64) binary NOT NULL default '', Column_name char(64) binary NOT NULL default '', Timestamp timestamp NOT NULL, Column_priv set('Select','Insert','Update','References') NOT NULL default '', PRIMARY KEY (Host,Db,User,Table_name,Column_name) ) TYPE=MyISAM CHARSET=latin1 COMMENT='Column privileges'; -- -- Dumping data for table 'columns_priv' -- /*!40000 ALTER TABLE columns_priv DISABLE KEYS */; LOCK TABLES columns_priv WRITE; UNLOCK TABLES; /*!40000 ALTER TABLE columns_priv ENABLE KEYS */; -- -- Table structure for table 'db' -- DROP TABLE IF EXISTS db; CREATE TABLE db ( Host char(60) binary NOT NULL default '', Db char(64) binary NOT NULL default '', User char(16) binary NOT NULL default '', Select_priv enum('N','Y') NOT NULL default 'N', Insert_priv enum('N','Y') NOT NULL default 'N', Update_priv enum('N','Y') NOT NULL default 'N', Delete_priv enum('N','Y') NOT NULL default 'N', Create_priv enum('N','Y') NOT NULL default 'N', Drop_priv enum('N','Y') NOT NULL default 'N', Grant_priv enum('N','Y') NOT NULL default 'N', References_priv enum('N','Y') NOT NULL default 'N', Index_priv enum('N','Y') NOT NULL default 'N', Alter_priv enum('N','Y') NOT NULL default 'N', Create_tmp_table_priv enum('N','Y') NOT NULL default 'N', Lock_tables_priv enum('N','Y') NOT NULL default 'N', PRIMARY KEY (Host,Db,User), KEY User (User) ) TYPE=MyISAM CHARSET=latin1 COMMENT='Database privileges'; -- -- Dumping data for table 'db' -- /*!40000 ALTER TABLE db DISABLE KEYS */; LOCK TABLES db WRITE; INSERT INTO db VALUES ('localhost','test','apache','Y','N','N','N','N','N','N','N','N','N','N','N'),('localhost','another_test','apache','Y','N','N','N','N','N','N','N','N','N','N','N'); UNLOCK TABLES; /*!40000 ALTER TABLE db ENABLE KEYS */; -- -- Table structure for table 'func' -- DROP TABLE IF EXISTS func; CREATE TABLE func ( name char(64) binary NOT NULL default '', ret tinyint(1) NOT NULL default '0', dl char(128) NOT NULL default '', type enum('function','aggregate') NOT NULL default 'function', PRIMARY KEY (name) ) TYPE=MyISAM CHARSET=latin1 COMMENT='User defined functions'; -- -- Dumping data for table 'func' -- /*!40000 ALTER TABLE func DISABLE KEYS */; LOCK TABLES func WRITE; UNLOCK TABLES; /*!40000 ALTER TABLE func ENABLE KEYS */; -- -- Table structure for table 'help_category' -- DROP TABLE IF EXISTS help_category; CREATE TABLE help_category ( help_category_id smallint(5) unsigned NOT NULL auto_increment, name varchar(64) NOT NULL default '', url varchar(128) NOT NULL default '', PRIMARY KEY (help_category_id), UNIQUE KEY name (name) ) TYPE=MyISAM CHARSET=latin1; -- -- Dumping data for table 'help_category' -- /*!40000 ALTER TABLE help_category DISABLE KEYS */; LOCK TABLES help_category WRITE; INSERT INTO help_category VALUES (1,'Non-Type-Specific Operators and Functions',''),(2,'Parentheses',''),(3,'Comparison Operators',''),(4,'Logical Operators',''),(5,'Control Flow Functions',''),(6,'String Functions',''),(7,'String Comparison Functions',''),(8,'Case-Sensitivity',''),(9,'Numeric Functions',''),(10,'Arithmetic Operations',''),(11,'Mathematical Functions',''),(12,'Date and Time Functions',''); UNLOCK TABLES; /*!40000 ALTER TABLE help_category ENABLE KEYS */; -- -- Table structure for table 'help_relation' -- DROP TABLE IF EXISTS help_relation; CREATE TABLE help_relation ( help_topic_id int(10) unsigned NOT NULL default '0', help_category_id smallint(5) unsigned NOT NULL default '0', PRIMARY KEY (help_category_id,help_topic_id) ) TYPE=MyISAM CHARSET=latin1; -- -- Dumping data for table 'help_relation' -- /*!40000 ALTER TABLE help_relation DISABLE KEYS */; LOCK TABLES help_relation WRITE; INSERT INTO help_relation VALUES (1,3),(2,3),(3,3),(4,3),(5,3),(6,3),(7,3),(8,3),(9,3),(10,3),(11,3),(12,3),(13,3),(14,3),(15,3),(16,4),(17,4),(18,4),(19,5),(20,5),(21,5),(22,5),(23,6),(24,6),(25,6),(26,6),(27,6),(28,6),(29,6),(30,6),(31,6),(32,6),(33,6),(34,6),(35,6),(36,6),(37,6),(38,6),(39,6),(40,6),(41,6),(42,6),(43,6),(44,6),(45,6),(46,6),(47,6),(48,6),(49,6),(50,6),(51,6),(52,6),(53,6),(54,6),(55,6),(56,6),(57,6),(58,6),(59,6),(60,6),(61,6),(62,7),(63,7),(64,7),(65,7),(66,7),(67,7),(68,8),(69,8),(70,10),(71,10),(72,10),(73,10),(74,11),(75,11),(76,11),(77,11),(78,11),(79,11),(80,11),(81,11),(82,11),(83,11),(84,11),(85,11),(86,11),(87,11),(88,11),(89,11),(90,11),(91,11),(92,11),(93,11),(94,11),(95,11),(96,11),(97,11),(98,11),(99,11),(100,11),(101,11),(102,11),(103,12),(104,12),(105,12),(106,12),(107,12),(108,12),(109,12),(110,12),(111,12),(112,12),(113,12),(114,12),(115,12),(116,12),(117,12); UNLOCK TABLES; /*!40000 ALTER TABLE help_relation ENABLE KEYS */; -- -- Table structure for table 'help_topic' -- DROP TABLE IF EXISTS help_topic; CREATE TABLE help_topic ( help_topic_id int(10) unsigned NOT NULL auto_increment, name varchar(64) NOT NULL default '', description text NOT NULL, example text NOT NULL, url varchar(128) NOT NULL default '', PRIMARY KEY (help_topic_id), UNIQUE KEY name (name) ) TYPE=MyISAM CHARSET=latin1; -- -- Dumping data for table 'help_topic' -- /*!40000 ALTER TABLE help_topic DISABLE KEYS */; LOCK TABLES help_topic WRITE; INSERT INTO help_topic VALUES (1,'=',' =\nEqual:','mysql> SELECT 1 = 0;\n -> 0\nmysql> SELECT \'0\' = 0;\n -> 1\nmysql> SELECT \'0.0\' = 0;\n -> 1\nmysql> SELECT \'0.01\' = 0;\n -> 0\nmysql> SELECT \'.01\' = 0.01;\n -> 1',''),(2,'!=',' <>\n !=\nNot equal:','mysql> SELECT \'.01\' <> \'0.01\';\n -> 1\nmysql> SELECT .01 <> \'0.01\';\n -> 0\nmysql> SELECT \'zapp\' <> \'zappp\';\n -> 1',''),(3,'<=',' <=\nLess than or equal:','mysql> SELECT 0.1 <= 2;\n -> 1',''),(4,'<',' <\nLess than:','mysql> SELECT 2 < 2;\n -> 0',''),(5,'>=',' >=\nGreater than or equal:','mysql> SELECT 2 >= 2;\n -> 1',''),(6,'>',' >\nGreater than:','mysql> SELECT 2 > 2;\n -> 0',''),(7,'<=>',' <=>\nNULL safe equal:','mysql> SELECT 1 <=> 1, NULL <=> NULL, 1 <=> NULL;\n -> 1 1 0',''),(8,'IS NOT NULL',' IS NULL\n IS NOT NULL\nTest whether a value is or is not NULL:','mysql> SELECT 1 IS NULL, 0 IS NULL, NULL IS NULL;\n -> 0 0 1\nmysql> SELECT 1 IS NOT NULL, 0 IS NOT NULL, NULL IS NOT NULL;\n -> 1 1 0',''),(9,'BETWEEN ... AND',' expr BETWEEN min AND max\nIf expr is greater than or equal to min and expr is\nless than or equal to max, BETWEEN returns 1,\notherwise it returns 0. This is equivalent to the expression\n(min <= expr AND expr <= max) if all the arguments are of the\nsame type. Otherwise type conversion takes place, according to the rules\nabove, but applied to all the three arguments. Note that before\n4.0.5 arguments were converted to the type of expr instead.','mysql> SELECT 1 BETWEEN 2 AND 3;\n -> 0\nmysql> SELECT \'b\' BETWEEN \'a\' AND \'c\';\n -> 1\nmysql> SELECT 2 BETWEEN 2 AND \'3\';\n -> 1\nmysql> SELECT 2 BETWEEN 2 AND \'x-3\';\n -> 0',''),(10,'NOT BETWEEN',' expr NOT BETWEEN min AND max\nSame as NOT (expr BETWEEN min AND max).','',''),(11,'IN',' expr IN (value,...)\nReturns 1 if expr is any of the values in the IN list,\nelse returns 0. If all values are constants, then all values are\nevaluated according to the type of expr and sorted. The search for the\nitem is then done using a binary search. This means IN is very quick\nif the IN value list consists entirely of constants. If expr\nis a case-sensitive string expression, the string comparison is performed in\ncase-sensitive fashion:','mysql> SELECT 2 IN (0,3,5,\'wefwf\');\n -> 0\nmysql> SELECT \'wefwf\' IN (0,3,5,\'wefwf\');\n -> 1',''),(12,'NOT IN',' expr NOT IN (value,...)\nSame as NOT (expr IN (value,...)).','',''),(13,'ISNULL',' ISNULL(expr)\nIf expr is NULL, ISNULL() returns 1, otherwise\nit returns 0:','mysql> SELECT ISNULL(1+1);\n -> 0\nmysql> SELECT ISNULL(1/0);\n -> 1',''),(14,'COALESCE',' COALESCE(list)\nReturns first non-NULL element in list:','mysql> SELECT COALESCE(NULL,1);\n -> 1\nmysql> SELECT COALESCE(NULL,NULL,NULL);\n -> NULL',''),(15,'INTERVAL',' INTERVAL(N,N1,N2,N3,...)\nReturns 0 if N < N1, 1 if N < N2\nand so on. All arguments are treated as integers. It is required that\nN1 < N2 < N3 < ... < Nn for this function\nto work correctly. This is because a binary search is used (very fast):','mysql> SELECT INTERVAL(23, 1, 15, 17, 30, 44, 200);\n -> 3\nmysql> SELECT INTERVAL(10, 1, 10, 100, 1000);\n -> 2\nmysql> SELECT INTERVAL(22, 23, 30, 44, 200);\n -> 0',''),(16,'!',' NOT\n !\nLogical NOT.\nEvaluates to 1 if the operand is 0,\nto 0 if the operand is non-zero,\nand NOT NULL returns NULL.','mysql> SELECT NOT 10;\n -> 0\nmysql> SELECT NOT 0;\n -> 1\nmysql> SELECT NOT NULL;\n -> NULL\nmysql> SELECT ! (1+1);\n -> 0\nmysql> SELECT ! 1+1;\n -> 1',''),(17,'&&',' AND\n &&\nLogical AND.\nEvaluates to 1 if all operands are non-zero and not NULL,\nto 0 if one or more operands are 0,\notherwise NULL is returned.','mysql> SELECT 1 && 1;\n -> 1\nmysql> SELECT 1 && 0;\n -> 0\nmysql> SELECT 1 && NULL;\n -> NULL\nmysql> SELECT 0 && NULL;\n -> 0\nmysql> SELECT NULL && 0;\n -> 0',''),(18,'||',' OR\n ||\nLogical OR.\nEvaluates to 1 if any operand is non-zero,\nto NULL if any operand is NULL,\notherwise 0 is returned.','mysql> SELECT 1 || 1;\n -> 1\nmysql> SELECT 1 || 0;\n -> 1\nmysql> SELECT 0 || 0;\n -> 0\nmysql> SELECT 0 || NULL;\n -> NULL\nmysql> SELECT 1 || NULL;\n -> 1',''),(19,'IFNULL',' IFNULL(expr1,expr2)\nIf expr1 is not NULL, IFNULL() returns expr1,\nelse it returns expr2. IFNULL() returns a numeric or string\nvalue, depending on the context in which it is used:','mysql> SELECT IFNULL(1,0);\n -> 1\nmysql> SELECT IFNULL(NULL,10);\n -> 10\nmysql> SELECT IFNULL(1/0,10);\n -> 10\nmysql> SELECT IFNULL(1/0,\'yes\');\n -> \'yes\'',''),(20,'NULLIF',' NULLIF(expr1,expr2)\nIf expr1 = expr2 is true, return NULL else return expr1.\nThis is the same as CASE WHEN x = y THEN NULL ELSE x END:','mysql> SELECT NULLIF(1,1);\n -> NULL\nmysql> SELECT NULLIF(1,2);\n -> 1',''),(21,'IF',' IF(expr1,expr2,expr3)\nIf expr1 is TRUE (expr1 <> 0 and expr1 <> NULL) then\nIF() returns expr2, else it returns expr3.\nIF() returns a numeric or string value, depending on the context\nin which it is used:','mysql> SELECT IF(1>2,2,3);\n -> 3\nmysql> SELECT IF(1<2,\'yes\',\'no\');\n -> \'yes\'\nmysql> SELECT IF(STRCMP(\'test\',\'test1\'),\'no\',\'yes\');\n -> \'no\'',''),(22,'CASE',' CASE value WHEN [compare-value] THEN result [WHEN [compare-value] THEN result ...] [ELSE result] END\n CASE WHEN [condition] THEN result [WHEN [condition] THEN result ...] [ELSE result] END\n\nThe first version returns the result where\nvalue=compare-value. The second version returns the result for\nthe first condition, which is true. If there was no matching result\nvalue, then the result after ELSE is returned. If there is no\nELSE part then NULL is returned:','mysql> SELECT CASE 1 WHEN 1 THEN \"one\"\n WHEN 2 THEN \"two\" ELSE \"more\" END;\n -> \"one\"\nmysql> SELECT CASE WHEN 1>0 THEN \"true\" ELSE \"false\" END;\n -> \"true\"\nmysql> SELECT CASE BINARY \"B\" WHEN \"a\" THEN 1 WHEN \"b\" THEN 2 END;\n -> NULL',''),(23,'ASCII',' ASCII(str)\nReturns the ASCII code value of the leftmost character of the string\nstr. Returns 0 if str is the empty string. Returns\nNULL if str is NULL:','mysql> SELECT ASCII(\'2\');\n -> 50\nmysql> SELECT ASCII(2);\n -> 50\nmysql> SELECT ASCII(\'dx\');\n -> 100',''),(24,'ORD',' ORD(str)\nIf the leftmost character of the string str is a multi-byte character,\nreturns the code for that character, calculated from the ASCII code values\nof its constituent characters using this formula:\n((first byte ASCII code)*256+(second byte ASCII code))[*256+third byte ASCII code...].\nIf the leftmost character is not a multi-byte character, returns the same\nvalue that the ASCII() function does:','mysql> SELECT ORD(\'2\');\n -> 50',''),(25,'CONV',' CONV(N,from_base,to_base)\nConverts numbers between different number bases. Returns a string\nrepresentation of the number N, converted from base from_base\nto base to_base. Returns NULL if any argument is NULL.\nThe argument N is interpreted as an integer, but may be specified as\nan integer or a string. The minimum base is 2 and the maximum base is\n36. If to_base is a negative number, N is regarded as a\nsigned number. Otherwise, N is treated as unsigned. CONV works\nwith 64-bit precision:','mysql> SELECT CONV(\"a\",16,2);\n -> \'1010\'\nmysql> SELECT CONV(\"6E\",18,8);\n -> \'172\'\nmysql> SELECT CONV(-17,10,-18);\n -> \'-H\'\nmysql> SELECT CONV(10+\"10\"+\'10\'+0xa,10,10);\n -> \'40\'',''),(26,'BIN',' BIN(N)\nReturns a string representation of the binary value of N, where\nN is a longlong (BIGINT) number. This is equivalent to\nCONV(N,10,2). Returns NULL if N is NULL:','mysql> SELECT BIN(12);\n -> \'1100\'',''),(27,'OCT',' OCT(N)\nReturns a string representation of the octal value of N, where\nN is a longlong number. This is equivalent to CONV(N,10,8).\nReturns NULL if N is NULL:','mysql> SELECT OCT(12);\n -> \'14\'',''),(28,'HEX',' HEX(N_or_S)\n\nIf N_OR_S is a number, returns a string representation of the hexadecimal\nvalue of N, where N is a longlong (BIGINT) number.\nThis is equivalent to CONV(N,10,16).\n\nIf N_OR_S is a string, returns a hexadecimal string of N_OR_S where each\ncharacter in N_OR_S is converted to 2 hexadecimal digits. This is the\ninvers of the 0xff strings.','mysql> SELECT HEX(255);\n -> \'FF\'\nmysql> SELECT HEX(\"abc\");\n -> 616263\nmysql> SELECT 0x616263;\n -> \"abc\"',''),(29,'CHAR',' CHAR(N,...)\nCHAR() interprets the arguments as integers and returns a string\nconsisting of the characters given by the ASCII code values of those\nintegers. NULL values are skipped:','mysql> SELECT CHAR(77,121,83,81,\'76\');\n -> \'MySQL\'\nmysql> SELECT CHAR(77,77.3,\'77.3\');\n -> \'MMM\'',''),(30,'CONCAT',' CONCAT(str1,str2,...)\nReturns the string that results from concatenating the arguments. Returns\nNULL if any argument is NULL. May have more than 2 arguments.\nA numeric argument is converted to the equivalent string form:','mysql> SELECT CONCAT(\'My\', \'S\', \'QL\');\n -> \'MySQL\'\nmysql> SELECT CONCAT(\'My\', NULL, \'QL\');\n -> NULL\nmysql> SELECT CONCAT(14.3);\n -> \'14.3\'',''),(31,'CONCAT_WS',' CONCAT_WS(separator, str1, str2,...)\n\nCONCAT_WS() stands for CONCAT With Separator and is a special form of\nCONCAT(). The first argument is the separator for the rest of the\narguments. The separator can be a string as well as the rest of the\narguments. If the separator is NULL, the result will be NULL.\nThe function will skip any NULLs and empty strings, after the\nseparator argument. The separator will be added between the strings to be\nconcatenated:','mysql> SELECT CONCAT_WS(\",\",\"First name\",\"Second name\",\"Last Name\");\n -> \'First name,Second name,Last Name\'\nmysql> SELECT CONCAT_WS(\",\",\"First name\",NULL,\"Last Name\");\n -> \'First name,Last Name\'',''),(32,'CHARACTER_LENGTH',' LENGTH(str)\n OCTET_LENGTH(str)\n CHAR_LENGTH(str)\n CHARACTER_LENGTH(str)\nReturns the length of the string str:','mysql> SELECT LENGTH(\'text\');\n -> 4\nmysql> SELECT OCTET_LENGTH(\'text\');\n -> 4',''),(33,'BIT_LENGTH',' BIT_LENGTH(str)\nReturns the length of the string str in bits:','mysql> SELECT BIT_LENGTH(\'text\');\n -> 32',''),(34,'POSITION',' LOCATE(substr,str)\n POSITION(substr IN str)\nReturns the position of the first occurrence of substring substr\nin string str. Returns 0 if substr is not in str:','mysql> SELECT LOCATE(\'bar\', \'foobarbar\');\n -> 4\nmysql> SELECT LOCATE(\'xbar\', \'foobar\');\n -> 0',''),(35,'LOCATE',' LOCATE(substr,str,pos)\nReturns the position of the first occurrence of substring substr in\nstring str, starting at position pos.\nReturns 0 if substr is not in str:','mysql> SELECT LOCATE(\'bar\', \'foobarbar\',5);\n -> 7',''),(36,'INSTR',' INSTR(str,substr)\nReturns the position of the first occurrence of substring substr in\nstring str. This is the same as the two-argument form of\nLOCATE(), except that the arguments are swapped:','mysql> SELECT INSTR(\'foobarbar\', \'bar\');\n -> 4\nmysql> SELECT INSTR(\'xbar\', \'foobar\');\n -> 0',''),(37,'LPAD',' LPAD(str,len,padstr)\nReturns the string str, left-padded with the string padstr\nuntil str is len characters long. If str is longer\nthan len\' then it will be shortened to len characters.','mysql> SELECT LPAD(\'hi\',4,\'??\');\n -> \'??hi\'',''),(38,'RPAD',' RPAD(str,len,padstr)\nReturns the string str, right-padded with the string\npadstr until str is len characters long. If\nstr is longer than len\' then it will be shortened to\nlen characters.','mysql> SELECT RPAD(\'hi\',5,\'?\');\n -> \'hi???\'',''),(39,'LEFT',' LEFT(str,len)\nReturns the leftmost len characters from the string str:','mysql> SELECT LEFT(\'foobarbar\', 5);\n -> \'fooba\'',''),(40,'RIGHT',' RIGHT(str,len)\nReturns the rightmost len characters from the string str:','mysql> SELECT RIGHT(\'foobarbar\', 4);\n -> \'rbar\'',''),(41,'MID',' SUBSTRING(str,pos,len)\n SUBSTRING(str FROM pos FOR len)\n MID(str,pos,len)\nReturns a substring len characters long from string str,\nstarting at position pos.\nThe variant form that uses FROM is ANSI SQL92 syntax:','mysql> SELECT SUBSTRING(\'Quadratically\',5,6);\n -> \'ratica\'',''),(42,'SUBSTRING',' SUBSTRING(str,pos)\n SUBSTRING(str FROM pos)\nReturns a substring from string str starting at position pos:','mysql> SELECT SUBSTRING(\'Quadratically\',5);\n -> \'ratically\'\nmysql> SELECT SUBSTRING(\'foobarbar\' FROM 4);\n -> \'barbar\'',''),(43,'SUBSTRING_INDEX',' SUBSTRING_INDEX(str,delim,count)\nReturns the substring from string str before count\noccurrences of the delimiter delim.\nIf count is positive, everything to the left of the final delimiter\n(counting from the left) is returned.\nIf count is negative, everything to the right of the final delimiter\n(counting from the right) is returned:','mysql> SELECT SUBSTRING_INDEX(\'www.mysql.com\', \'.\', 2);\n -> \'www.mysql\'\nmysql> SELECT SUBSTRING_INDEX(\'www.mysql.com\', \'.\', -2);\n -> \'mysql.com\'',''),(44,'LTRIM',' LTRIM(str)\nReturns the string str with leading space characters removed:','mysql> SELECT LTRIM(\' barbar\');\n -> \'barbar\'',''),(45,'RTRIM',' RTRIM(str)\nReturns the string str with trailing space characters removed:','mysql> SELECT RTRIM(\'barbar \');\n -> \'barbar\'',''),(46,'TRIM',' TRIM([[BOTH | LEADING | TRAILING] [remstr] FROM] str)\nReturns the string str with all remstr prefixes and/or suffixes\nremoved. If none of the specifiers BOTH, LEADING or\nTRAILING are given, BOTH is assumed. If remstr is not\nspecified, spaces are removed:','mysql> SELECT TRIM(\' bar \');\n -> \'bar\'\nmysql> SELECT TRIM(LEADING \'x\' FROM \'xxxbarxxx\');\n -> \'barxxx\'\nmysql> SELECT TRIM(BOTH \'x\' FROM \'xxxbarxxx\');\n -> \'bar\'\nmysql> SELECT TRIM(TRAILING \'xyz\' FROM \'barxxyz\');\n -> \'barx\'',''),(47,'SOUNDEX',' SOUNDEX(str)\nReturns a soundex string from str. Two strings that sound almost the\nsame should have identical soundex strings. A standard soundex string\nis 4 characters long, but the SOUNDEX() function returns an\narbitrarily long string. You can use SUBSTRING() on the result to get\na standard soundex string. All non-alphanumeric characters are ignored\nin the given string. All international alpha characters outside the A-Z range\nare treated as vowels:','mysql> SELECT SOUNDEX(\'Hello\');\n -> \'H400\'\nmysql> SELECT SOUNDEX(\'Quadratically\');\n -> \'Q36324\'',''),(48,'SPACE',' SPACE(N)\nReturns a string consisting of N space characters:','mysql> SELECT SPACE(6);\n -> \' \'',''),(49,'REPLACE',' REPLACE(str,from_str,to_str)\nReturns the string str with all occurrences of the string\nfrom_str replaced by the string to_str:','mysql> SELECT REPLACE(\'www.mysql.com\', \'w\', \'Ww\');\n -> \'WwWwWw.mysql.com\'',''),(50,'REPEAT',' REPEAT(str,count)\nReturns a string consisting of the string str repeated count\ntimes. If count <= 0, returns an empty string. Returns NULL if\nstr or count are NULL:','mysql> SELECT REPEAT(\'MySQL\', 3);\n -> \'MySQLMySQLMySQL\'',''),(51,'REVERSE',' REVERSE(str)\nReturns the string str with the order of the characters reversed:','mysql> SELECT REVERSE(\'abc\');\n -> \'cba\'',''),(52,'INSERT',' INSERT(str,pos,len,newstr)\nReturns the string str, with the substring beginning at position\npos and len characters long replaced by the string\nnewstr:','mysql> SELECT INSERT(\'Quadratic\', 3, 4, \'What\');\n -> \'QuWhattic\'',''),(53,'ELT',' ELT(N,str1,str2,str3,...)\nReturns str1 if N = 1, str2 if N =\n2, and so on. Returns NULL if N is less than 1\nor greater than the number of arguments. ELT() is the complement of\nFIELD():','mysql> SELECT ELT(1, \'ej\', \'Heja\', \'hej\', \'foo\');\n -> \'ej\'\nmysql> SELECT ELT(4, \'ej\', \'Heja\', \'hej\', \'foo\');\n -> \'foo\'',''),(54,'FIELD',' FIELD(str,str1,str2,str3,...)\nReturns the index of str in the str1, str2,\nstr3, ... list.\nReturns 0 if str is not found.\nFIELD() is the complement of ELT():','mysql> SELECT FIELD(\'ej\', \'Hej\', \'ej\', \'Heja\', \'hej\', \'foo\');\n -> 2\nmysql> SELECT FIELD(\'fo\', \'Hej\', \'ej\', \'Heja\', \'hej\', \'foo\');\n -> 0',''),(55,'FIND_IN_SET',' FIND_IN_SET(str,strlist)\nReturns a value 1 to N if the string str is in the list\nstrlist consisting of N substrings. A string list is a string\ncomposed of substrings separated by , characters. If the first\nargument is a constant string and the second is a column of type SET,\nthe FIND_IN_SET() function is optimised to use bit arithmetic!\nReturns 0 if str is not in strlist or if strlist\nis the empty string. Returns NULL if either argument is NULL.\nThis function will not work properly if the first argument contains a\n,:','mysql> SELECT FIND_IN_SET(\'b\',\'a,b,c,d\');\n -> 2',''),(56,'MAKE_SET',' MAKE_SET(bits,str1,str2,...)\nReturns a set (a string containing substrings separated by ,\ncharacters) consisting of the strings that have the corresponding bit in\nbits set. str1 corresponds to bit 0, str2 to bit 1,\netc. NULL strings in str1, str2, ...\nare not appended to the result:','mysql> SELECT MAKE_SET(1,\'a\',\'b\',\'c\');\n -> \'a\'\nmysql> SELECT MAKE_SET(1 | 4,\'hello\',\'nice\',\'world\');\n -> \'hello,world\'\nmysql> SELECT MAKE_SET(0,\'a\',\'b\',\'c\');\n -> \'\'',''),(57,'EXPORT_SET',' EXPORT_SET(bits,on,off,[separator,[number_of_bits]])\nReturns a string where for every bit set in \'bit\', you get an \'on\' string\nand for every reset bit you get an \'off\' string. Each string is separated\nwith \'separator\' (default \',\') and only \'number_of_bits\' (default 64) of\n\'bits\' is used:','mysql> SELECT EXPORT_SET(5,\'Y\',\'N\',\',\',4)\n -> Y,N,Y,N',''),(58,'LOWER',' LCASE(str)\n LOWER(str)\nReturns the string str with all characters changed to lowercase\naccording to the current character set mapping (the default is ISO-8859-1\nLatin1):','mysql> SELECT LCASE(\'QUADRATICALLY\');\n -> \'quadratically\'',''),(59,'UPPER',' UCASE(str)\n UPPER(str)\nReturns the string str with all characters changed to uppercase\naccording to the current character set mapping (the default is ISO-8859-1\nLatin1):','mysql> SELECT UCASE(\'Hej\');\n -> \'HEJ\'',''),(60,'LOAD_FILE',' LOAD_FILE(file_name)\nReads the file and returns the file contents as a string. The file\nmust be on the server, you must specify the full pathname to the\nfile, and you must have the FILE privilege. The file must\nbe readable by all and be smaller than max_allowed_packet.\n\nIf the file doesn\'t exist or can\'t be read due to one of the above reasons,\nthe function returns NULL:','mysql> UPDATE tbl_name\n SET blob_column=LOAD_FILE(\"/tmp/picture\")\n WHERE id=1;',''),(61,'QUOTE',' QUOTE(str)\nQuotes a string to produce a result that can be used as a properly-escaped\ndata value in a SQL statement. The string is returned surrounded by single\nquotes and with each instance of single quote (\'), backslash (\\),\nASCII NUL, and Control-Z preceded by a backslash. If the argument is\nNULL, the return value is the word ````NULL\'\' without surrounding\nsingle quotes.\n\nThe QUOTE function was added in MySQL version 4.0.3.','mysql> SELECT QUOTE(\"Don\'t\");\n -> \'Don\\\'t!\'\nmysql> SELECT QUOTE(NULL);\n -> NULL',''),(62,'LIKE',' expr LIKE pat [ESCAPE \'escape-char\']\nPattern matching using\nSQL simple regular expression comparison. Returns 1 (TRUE) or 0\n(FALSE). With LIKE you can use the following two wildcard characters\nin the pattern:\n\n Char Description\n % Matches any number of characters, even zero characters\n _ Matches exactly one character\n ','mysql> SELECT \'David!\' LIKE \'David_\';\n -> 1\nmysql> SELECT \'David!\' LIKE \'%D%v%\';\n -> 1',''),(63,'NOT LIKE',' expr NOT LIKE pat [ESCAPE \'escape-char\']\nSame as NOT (expr LIKE pat [ESCAPE \'escape-char\']).','',''),(64,'SOUNDS LIKE',' expr SOUNDS LIKE expr\nSame as SOUNDEX(expr)=SOUNDEX(expr) (available only in version 4.1 or later). \n\n ','',''),(65,'RLIKE',' expr REGEXP pat\n expr RLIKE pat\nPerforms a pattern match of a string expression expr against a pattern\npat. The pattern can be an extended regular expression.\nSee also : [Regexp]. Returns 1 if expr matches pat, otherwise\nreturns 0. RLIKE is a synonym for REGEXP, provided for\nmSQL compatibility. Note: Because MySQL uses the C escape\nsyntax in strings (for example, \\n), you must double any \\ that\nyou use in your REGEXP strings. As of MySQL Version 3.23.4,\nREGEXP is case-insensitive for normal (not binary) strings:','mysql> SELECT \'Monty!\' REGEXP \'m%y%%\';\n -> 0\nmysql> SELECT \'Monty!\' REGEXP \'.*\';\n -> 1\nmysql> SELECT \'new*\\n*line\' REGEXP \'new\\\\*.\\\\*line\';\n -> 1\nmysql> SELECT \"a\" REGEXP \"A\", \"a\" REGEXP BINARY \"A\";\n -> 1 0\nmysql> SELECT \"a\" REGEXP \"^[a-d]\";\n -> 1',''),(66,'NOT REGEXP',' expr NOT REGEXP pat\n expr NOT RLIKE pat\nSame as NOT (expr REGEXP pat).','',''),(67,'STRCMP',' STRCMP(expr1,expr2)\nSTRCMP()\nreturns 0 if the strings are the same, -1 if the first\nargument is smaller than the second according to the current sort order,\nand 1 otherwise:','mysql> SELECT STRCMP(\'text\', \'text2\');\n -> -1\nmysql> SELECT STRCMP(\'text2\', \'text\');\n -> 1\nmysql> SELECT STRCMP(\'text\', \'text\');\n -> 0',''),(68,'MATCH ... AGAINST',' MATCH (col1,col2,...) AGAINST (expr)\n MATCH (col1,col2,...) AGAINST (expr IN BOOLEAN MODE)\nMATCH ... AGAINST() is used for full-text search and returns\nrelevance - similarity measure between the text in columns\n(col1,col2,...) and the query expr. Relevance is a\npositive floating-point number. Zero relevance means no similarity.\nMATCH ... AGAINST() is available in MySQL version\n3.23.23 or later. IN BOOLEAN MODE extension was added in version\n4.0.1. For details and usage examples, see [Fulltext Search].\n \n\n ','',''),(69,'BINARY',' BINARY\nThe BINARY operator casts the string following it to a binary string.\nThis is an easy way to force a column comparison to be case-sensitive even\nif the column isn\'t defined as BINARY or BLOB:','mysql> SELECT \"a\" = \"A\";\n -> 1\nmysql> SELECT BINARY \"a\" = \"A\";\n -> 0',''),(70,'+',' +\nAddition:','mysql> SELECT 3+5;\n -> 8',''),(71,'-',' -\nSubtraction:','mysql> SELECT 3-5;\n -> -2',''),(72,'*',' *\nMultiplication:','mysql> SELECT 3*5;\n -> 15\nmysql> SELECT 18014398509481984*18014398509481984.0;\n -> 324518553658426726783156020576256.0\nmysql> SELECT 18014398509481984*18014398509481984;\n -> 0',''),(73,'/',' /\nDivision:','mysql> SELECT 3/5;\n -> 0.60',''),(74,'ABS',' ABS(X)\nReturns the absolute value of X:','mysql> SELECT ABS(2);\n -> 2\nmysql> SELECT ABS(-32);\n -> 32',''),(75,'SIGN',' SIGN(X)\nReturns the sign of the argument as -1, 0, or 1, depending\non whether X is negative, zero, or positive:','mysql> SELECT SIGN(-32);\n -> -1\nmysql> SELECT SIGN(0);\n -> 0\nmysql> SELECT SIGN(234);\n -> 1',''),(76,'%',' MOD(N,M)\n %\nModulo (like the % operator in C).\nReturns the remainder of N divided by M:','mysql> SELECT MOD(234, 10);\n -> 4\nmysql> SELECT 253 % 7;\n -> 1\nmysql> SELECT MOD(29,9);\n -> 2\nmysql> SELECT 29 MOD 9;\n -> 2',''),(77,'FLOOR',' FLOOR(X)\nReturns the largest integer value not greater than X:','mysql> SELECT FLOOR(1.23);\n -> 1\nmysql> SELECT FLOOR(-1.23);\n -> -2',''),(78,'CEILING',' CEILING(X)\nReturns the smallest integer value not less than X:','mysql> SELECT CEILING(1.23);\n -> 2\nmysql> SELECT CEILING(-1.23);\n -> -1',''),(79,'ROUND',' ROUND(X)\n ROUND(X,D)\nReturns the argument X, rounded to the nearest integer.\nWith two arguments rounded to a number to D decimals.','mysql> SELECT ROUND(-1.23);\n -> -1\nmysql> SELECT ROUND(-1.58);\n -> -2\nmysql> SELECT ROUND(1.58);\n -> 2\nmysql> SELECT ROUND(1.298, 1);\n -> 1.3\nmysql> SELECT ROUND(1.298, 0);\n -> 1',''),(80,'DIV',' DIV\nInteger division.\nSimilar to FLOOR() but safe with BIGINT values.','mysql> SELECT 5 DIV 2\n -> 2',''),(81,'EXP',' EXP(X)\nReturns the value of e (the base of natural logarithms) raised to\nthe power of X:','mysql> SELECT EXP(2);\n -> 7.389056\nmysql> SELECT EXP(-2);\n -> 0.135335',''),(82,'LN',' LN(X)\nReturns the natural logarithm of X:','mysql> SELECT LN(2);\n -> 0.693147\nmysql> SELECT LN(-2);\n -> NULL',''),(83,'LOG',' LOG(X)\n LOG(B,X)\nIf called with one parameter, this function returns the natural logarithm\nof X:','mysql> SELECT LOG(2);\n -> 0.693147\nmysql> SELECT LOG(-2);\n -> NULL',''),(84,'LOG2',' LOG2(X)\nReturns the base-2 logarithm of X:','mysql> SELECT LOG2(65536);\n -> 16.000000\nmysql> SELECT LOG2(-100);\n -> NULL',''),(85,'LOG10',' LOG10(X)\nReturns the base-10 logarithm of X:','mysql> SELECT LOG10(2);\n -> 0.301030\nmysql> SELECT LOG10(100);\n -> 2.000000\nmysql> SELECT LOG10(-100);\n -> NULL',''),(86,'POWER',' POW(X,Y)\n POWER(X,Y)\nReturns the value of X raised to the power of Y:','mysql> SELECT POW(2,2);\n -> 4.000000\nmysql> SELECT POW(2,-2);\n -> 0.250000',''),(87,'SQRT',' SQRT(X)\nReturns the non-negative square root of X:','mysql> SELECT SQRT(4);\n -> 2.000000\nmysql> SELECT SQRT(20);\n -> 4.472136',''),(88,'PI',' PI()\nReturns the value of PI. The default shown number of decimals is 5, but\nMySQL internally uses the full double precession for PI.','mysql> SELECT PI();\n -> 3.141593\nmysql> SELECT PI()+0.000000000000000000;\n -> 3.141592653589793116',''),(89,'COS',' COS(X)\nReturns the cosine of X, where X is given in radians:','mysql> SELECT COS(PI());\n -> -1.000000',''),(90,'SIN',' SIN(X)\nReturns the sine of X, where X is given in radians:','mysql> SELECT SIN(PI());\n -> 0.000000',''),(91,'TAN',' TAN(X)\nReturns the tangent of X, where X is given in radians:','mysql> SELECT TAN(PI()+1);\n -> 1.557408',''),(92,'ACOS',' ACOS(X)\nReturns the arc cosine of X, that is, the value whose cosine is\nX. Returns NULL if X is not in the range -1 to\n1:','mysql> SELECT ACOS(1);\n -> 0.000000\nmysql> SELECT ACOS(1.0001);\n -> NULL\nmysql> SELECT ACOS(0);\n -> 1.570796',''),(93,'ASIN',' ASIN(X)\nReturns the arc sine of X, that is, the value whose sine is\nX. Returns NULL if X is not in the range -1 to\n1:','mysql> SELECT ASIN(0.2);\n -> 0.201358\nmysql> SELECT ASIN(\'foo\');\n -> 0.000000',''),(94,'ATAN',' ATAN(X)\nReturns the arc tangent of X, that is, the value whose tangent is\nX:','mysql> SELECT ATAN(2);\n -> 1.107149\nmysql> SELECT ATAN(-2);\n -> -1.107149',''),(95,'ATAN2',' ATAN(Y,X)\n ATAN2(Y,X)\nReturns the arc tangent of the two variables X and Y. It is\nsimilar to calculating the arc tangent of Y / X, except that the\nsigns of both arguments are used to determine the quadrant of the\nresult:','mysql> SELECT ATAN(-2,2);\n -> -0.785398\nmysql> SELECT ATAN2(PI(),0);\n -> 1.570796',''),(96,'COT',' COT(X)\nReturns the cotangent of X:','mysql> SELECT COT(12);\n -> -1.57267341\nmysql> SELECT COT(0);\n -> NULL',''),(97,'RAND',' RAND()\n RAND(N)\nReturns a random floating-point value in the range 0 to 1.0.\nIf an integer argument N is specified, it is used as the seed value\n(producing a repeatable sequence):','mysql> SELECT RAND();\n -> 0.9233482386203\nmysql> SELECT RAND(20);\n -> 0.15888261251047\nmysql> SELECT RAND(20);\n -> 0.15888261251047\nmysql> SELECT RAND();\n -> 0.63553050033332\nmysql> SELECT RAND();\n -> 0.70100469486881',''),(98,'LEAST',' LEAST(X,Y,...)\nWith two or more arguments, returns the smallest (minimum-valued) argument.\nThe arguments are compared using the following rules:\n\n \n \nIf the return value is used in an INTEGER context, or all arguments\nare integer-valued, they are compared as integers.\n\n \nIf the return value is used in a REAL context, or all arguments are\nreal-valued, they are compared as reals.\n\n \nIf any argument is a case-sensitive string, the arguments are compared\nas case-sensitive strings.\n\n \nIn other cases, the arguments are compared as case-insensitive strings:\n ','mysql> SELECT LEAST(2,0);\n -> 0\nmysql> SELECT LEAST(34.0,3.0,5.0,767.0);\n -> 3.0\nmysql> SELECT LEAST(\"B\",\"A\",\"C\");\n -> \"A\"',''),(99,'GREATEST',' GREATEST(X,Y,...)\nReturns the largest (maximum-valued) argument.\nThe arguments are compared using the same rules as for LEAST:','mysql> SELECT GREATEST(2,0);\n -> 2\nmysql> SELECT GREATEST(34.0,3.0,5.0,767.0);\n -> 767.0\nmysql> SELECT GREATEST(\"B\",\"A\",\"C\");\n -> \"C\"',''),(100,'DEGREES',' DEGREES(X)\nReturns the argument X, converted from radians to degrees:','mysql> SELECT DEGREES(PI());\n -> 180.000000',''),(101,'RADIANS',' RADIANS(X)\nReturns the argument X, converted from degrees to radians:','mysql> SELECT RADIANS(90);\n -> 1.570796',''),(102,'TRUNCATE',' TRUNCATE(X,D)\nReturns the number X, truncated to D decimals. If D\nis 0, the result will have no decimal point or fractional part:','mysql> SELECT TRUNCATE(1.223,1);\n -> 1.2\nmysql> SELECT TRUNCATE(1.999,1);\n -> 1.9\nmysql> SELECT TRUNCATE(1.999,0);\n -> 1\nmysql> SELECT TRUNCATE(-1.999,1);\n -> -1.9',''),(103,'DAYOFWEEK',' DAYOFWEEK(date)\nReturns the weekday index\n\nfor date (1 = Sunday, 2 = Monday, ... 7 =\nSaturday). These index values correspond to the ODBC standard.','mysql> SELECT DAYOFWEEK(\'1998-02-03\');\n -> 3',''),(104,'WEEKDAY',' WEEKDAY(date)\nReturns the weekday index for\ndate (0 = Monday, 1 = Tuesday, ... 6 = Sunday):','mysql> SELECT WEEKDAY(\'1998-02-03 22:23:00\');\n -> 1\nmysql> SELECT WEEKDAY(\'1997-11-05\');\n -> 2',''),(105,'DAYOFMONTH',' DAYOFMONTH(date)\nReturns the day of the month for date, in the range 1 to\n31:','mysql> SELECT DAYOFMONTH(\'1998-02-03\');\n -> 3',''),(106,'DAYOFYEAR',' DAYOFYEAR(date)\nReturns the day of the year for date, in the range 1 to\n366:','mysql> SELECT DAYOFYEAR(\'1998-02-03\');\n -> 34',''),(107,'MONTH',' MONTH(date)\nReturns the month for date, in the range 1 to 12:','mysql> SELECT MONTH(\'1998-02-03\');\n -> 2',''),(108,'DAYNAME',' DAYNAME(date)\nReturns the name of the weekday for date:','mysql> SELECT DAYNAME(\"1998-02-05\");\n -> \'Thursday\'',''),(109,'MONTHNAME',' MONTHNAME(date)\nReturns the name of the month for date:','mysql> SELECT MONTHNAME(\"1998-02-05\");\n -> \'February\'',''),(110,'QUARTER',' QUARTER(date)\nReturns the quarter of the year for date, in the range 1\nto 4:','mysql> SELECT QUARTER(\'98-04-01\');\n -> 2',''),(111,'WEEK',' WEEK(date)\n WEEK(date,first)\nWith a single argument, returns the week for date, in the range\n0 to 53 (yes, there may be the beginnings of a week 53),\nfor locations where Sunday is the first day of the week. The\ntwo-argument form of WEEK() allows you to specify whether the\nweek starts on Sunday or Monday and whether the return value should be in\nthe range 0-53 or 1-52.\n\nHere is a table for how the second argument works:\n\n Value Meaning\n 0 Week starts on Sunday and return value is in range 0-53\n 1 Week starts on Monday and return value is in range 0-53\n 2 Week starts on Sunday and return value is in range 1-53\n 3 Week starts on Monday and return value is in range 1-53 (ISO 8601)\n ','mysql> SELECT WEEK(\'1998-02-20\');\n -> 7\nmysql> SELECT WEEK(\'1998-02-20\',0);\n -> 7\nmysql> SELECT WEEK(\'1998-02-20\',1);\n -> 8\nmysql> SELECT WEEK(\'1998-12-31\',1);\n -> 53',''),(112,'YEAR',' YEAR(date)\nReturns the year for date, in the range 1000 to 9999:','mysql> SELECT YEAR(\'98-02-03\');\n -> 1998',''),(113,'HOUR',' HOUR(time)\nReturns the hour for time, in the range 0 to 23:','mysql> SELECT HOUR(\'10:05:03\');\n -> 10',''),(114,'MINUTE',' MINUTE(time)\nReturns the minute for time, in the range 0 to 59:','mysql> SELECT MINUTE(\'98-02-03 10:05:03\');\n -> 5',''),(115,'SECOND',' SECOND(time)\nReturns the second for time, in the range 0 to 59:','mysql> SELECT SECOND(\'10:05:03\');\n -> 3',''),(116,'PERIOD_ADD',' PERIOD_ADD(P,N)\nAdds N months to period P (in the format YYMM or\nYYYYMM). Returns a value in the format YYYYMM.\n\nNote that the period argument P is not a date value:','mysql> SELECT PERIOD_ADD(9801,2);\n -> 199803',''),(117,'PERIOD_DIFF',' PERIOD_DIFF(P1,P2)\nReturns the number of months between periods P1 and P2.\nP1 and P2 should be in the format YYMM or YYYYMM.\n\nNote that the period arguments P1 and P2 are not\ndate values:','mysql> SELECT PERIOD_DIFF(9802,199703);\n -> 11',''); UNLOCK TABLES; /*!40000 ALTER TABLE help_topic ENABLE KEYS */; -- -- Table structure for table 'host' -- DROP TABLE IF EXISTS host; CREATE TABLE host ( Host char(60) binary NOT NULL default '', Db char(64) binary NOT NULL default '', Select_priv enum('N','Y') NOT NULL default 'N', Insert_priv enum('N','Y') NOT NULL default 'N', Update_priv enum('N','Y') NOT NULL default 'N', Delete_priv enum('N','Y') NOT NULL default 'N', Create_priv enum('N','Y') NOT NULL default 'N', Drop_priv enum('N','Y') NOT NULL default 'N', Grant_priv enum('N','Y') NOT NULL default 'N', References_priv enum('N','Y') NOT NULL default 'N', Index_priv enum('N','Y') NOT NULL default 'N', Alter_priv enum('N','Y') NOT NULL default 'N', Create_tmp_table_priv enum('N','Y') NOT NULL default 'N', Lock_tables_priv enum('N','Y') NOT NULL default 'N', PRIMARY KEY (Host,Db) ) TYPE=MyISAM CHARSET=latin1 COMMENT='Host privileges; Merged with database privileges'; -- -- Dumping data for table 'host' -- /*!40000 ALTER TABLE host DISABLE KEYS */; LOCK TABLES host WRITE; UNLOCK TABLES; /*!40000 ALTER TABLE host ENABLE KEYS */; -- -- Table structure for table 'tables_priv' -- DROP TABLE IF EXISTS tables_priv; CREATE TABLE tables_priv ( Host char(60) binary NOT NULL default '', Db char(64) binary NOT NULL default '', User char(16) binary NOT NULL default '', Table_name char(60) binary NOT NULL default '', Grantor char(77) NOT NULL default '', Timestamp timestamp NOT NULL, Table_priv set('Select','Insert','Update','Delete','Create','Drop','Grant','References','Index','Alter') NOT NULL default '', Column_priv set('Select','Insert','Update','References') NOT NULL default '', PRIMARY KEY (Host,Db,User,Table_name), KEY Grantor (Grantor) ) TYPE=MyISAM CHARSET=latin1 COMMENT='Table privileges'; -- -- Dumping data for table 'tables_priv' -- /*!40000 ALTER TABLE tables_priv DISABLE KEYS */; LOCK TABLES tables_priv WRITE; INSERT INTO tables_priv VALUES ('localhost','another_test','apache','blah','root@localhost','2003-07-17 14:34:08','Insert',''); UNLOCK TABLES; /*!40000 ALTER TABLE tables_priv ENABLE KEYS */; -- -- Table structure for table 'user' -- DROP TABLE IF EXISTS user; CREATE TABLE user ( Host varchar(60) binary NOT NULL default '', User varchar(16) binary NOT NULL default '', Password varchar(45) binary NOT NULL default '', Select_priv enum('N','Y') NOT NULL default 'N', Insert_priv enum('N','Y') NOT NULL default 'N', Update_priv enum('N','Y') NOT NULL default 'N', Delete_priv enum('N','Y') NOT NULL default 'N', Create_priv enum('N','Y') NOT NULL default 'N', Drop_priv enum('N','Y') NOT NULL default 'N', Reload_priv enum('N','Y') NOT NULL default 'N', Shutdown_priv enum('N','Y') NOT NULL default 'N', Process_priv enum('N','Y') NOT NULL default 'N', File_priv enum('N','Y') NOT NULL default 'N', Grant_priv enum('N','Y') NOT NULL default 'N', References_priv enum('N','Y') NOT NULL default 'N', Index_priv enum('N','Y') NOT NULL default 'N', Alter_priv enum('N','Y') NOT NULL default 'N', Show_db_priv enum('N','Y') NOT NULL default 'N', Super_priv enum('N','Y') NOT NULL default 'N', Create_tmp_table_priv enum('N','Y') NOT NULL default 'N', Lock_tables_priv enum('N','Y') NOT NULL default 'N', Execute_priv enum('N','Y') NOT NULL default 'N', Repl_slave_priv enum('N','Y') NOT NULL default 'N', Repl_client_priv enum('N','Y') NOT NULL default 'N', ssl_type enum('','ANY','X509','SPECIFIED') NOT NULL default '', ssl_cipher blob NOT NULL, x509_issuer blob NOT NULL, x509_subject blob NOT NULL, max_questions int(11) unsigned NOT NULL default '0', max_updates int(11) unsigned NOT NULL default '0', max_connections int(11) unsigned NOT NULL default '0', PRIMARY KEY (Host,User) ) TYPE=MyISAM CHARSET=latin1 COMMENT='Users and global privileges'; -- -- Dumping data for table 'user' -- /*!40000 ALTER TABLE user DISABLE KEYS */; LOCK TABLES user WRITE; INSERT INTO user VALUES ('localhost','root','','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','','','','',0,0,0),('localhost','apache','','N','N','N','N','N','N','N','N','N','N','N','N','N','N','N','N','N','N','N','N','N','','','','',0,0,0); UNLOCK TABLES; /*!40000 ALTER TABLE user ENABLE KEYS */; -- -- Current Database: test -- CREATE DATABASE /*!32312 IF NOT EXISTS*/ test; USE test; -- -- Table structure for table 't1' -- DROP TABLE IF EXISTS t1; CREATE TABLE t1 ( pk int(11) NOT NULL default '0', fk int(11) default NULL, PRIMARY KEY (pk) ) TYPE=MyISAM CHARSET=latin1; -- -- Dumping data for table 't1' -- /*!40000 ALTER TABLE t1 DISABLE KEYS */; LOCK TABLES t1 WRITE; INSERT INTO t1 VALUES (1,5),(2,10),(3,15); UNLOCK TABLES; /*!40000 ALTER TABLE t1 ENABLE KEYS */; -- -- Table structure for table 't2' -- DROP TABLE IF EXISTS t2; CREATE TABLE t2 ( pk int(11) NOT NULL default '0', data int(11) default NULL, PRIMARY KEY (pk) ) TYPE=MyISAM CHARSET=latin1; -- -- Dumping data for table 't2' -- /*!40000 ALTER TABLE t2 DISABLE KEYS */; LOCK TABLES t2 WRITE; INSERT INTO t2 VALUES (1,100),(5,200),(10,300),(50,400); UNLOCK TABLES; /*!40000 ALTER TABLE t2 ENABLE KEYS */; -------------------------------------------------------------- end mysqldump -------------------------------------------------------------- begin my.cnf -------------------------------------------------------------- # Example mysql config file for small systems. # # This is for a system with little memory (<= 64M) where MySQL is only used # from time to time and it's important that the mysqld deamon # doesn't use much resources. # # You can copy this file to # /etc/my.cnf to set global options, # mysql-data-dir/my.cnf to set server-specific options (in this # installation this directory is /usr/local/mysql/var) or # ~/.my.cnf to set user-specific options. # # One can in this file use all long options that the program supports. # If you want to know which options a program support, run the program # with --help option. # The following options will be passed to all MySQL clients [client] #password = your_password #port = 3306 socket = /tmp/mysql.sock # Here follows entries for some specific programs # The MySQL server [mysqld] #port = 3306 socket = /tmp/mysql.sock skip-locking set-variable = key_buffer=16K set-variable = max_allowed_packet=1M set-variable = thread_stack=64K set-variable = table_cache=4 set-variable = sort_buffer=64K set-variable = net_buffer_length=2K server-id = 1 safe-show-database safe-user-create local-infile = 0 user = mysql skip-networking skip-symlink # Uncomment the following if you want to log updates #log-bin # Uncomment the following if you are NOT using BDB tables #skip-bdb # Uncomment the following if you are using InnoDB tables #innodb_data_home_dir = /usr/local/mysql/var/ #innodb_data_file_path = ibdata1:10M:autoextend #innodb_log_group_home_dir = /usr/local/mysql/var/ #innodb_log_arch_dir = /usr/local/mysql/var/ # You can set .._buffer_pool_size up to 50 - 80 % # of RAM but beware of setting memory usage too high #set-variable = innodb_buffer_pool_size=16M #set-variable = innodb_additional_mem_pool_size=2M # Set .._log_file_size to 25 % of buffer pool size #set-variable = innodb_log_file_size=5M #set-variable = innodb_log_buffer_size=8M #innodb_flush_log_at_trx_commit=1 #set-variable = innodb_lock_wait_timeout=50 [mysqldump] quick set-variable = max_allowed_packet=16M [mysql] no-auto-rehash # Remove the next comment character if you are not familiar with SQL #safe-updates [isamchk] set-variable = key_buffer=8M set-variable = sort_buffer=8M [myisamchk] set-variable = key_buffer=8M set-variable = sort_buffer=8M [mysqlhotcopy] interactive-timeout -------------------------------------------------------------- end my.cnf -------------------------------------------------------------- begin statment resulting in error -------------------------------------------------------------- select t1.pk , data from t1 join ( select pk , data from t2 ) as sq on t1.fk = sq.pk; -------------------------------------------------------------- end statment resulting in error -------------------------------------------------------------- begin ls -l /usr/local/mysql/var -------------------------------------------------------------- total 20596 drwx------ 2 mysql mysql 4096 Jul 17 14:27 another_test/ -rw-rw---- 1 mysql mysql 25088 Jun 12 07:09 ib_arch_log_0000000000 -rw-rw---- 1 mysql mysql 5242880 Jul 17 15:17 ib_logfile0 -rw-rw---- 1 mysql mysql 5242880 Jun 12 07:09 ib_logfile1 -rw-rw---- 1 mysql mysql 10485760 Jul 17 15:16 ibdata1 -rw-rw---- 1 mysql root 29550 Jul 17 15:17 lilblue.err -rw-rw---- 1 mysql mysql 4 Jul 17 15:17 lilblue.pid drwx------ 2 mysql root 4096 Jun 12 07:11 mysql/ drwx------ 2 mysql mysql 4096 Jul 17 14:05 test/ -------------------------------------------------------------- end ls -l /usr/local/mysql/var --------------------------------------------------------------