You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

181 lines
4.8 KiB

Review of code pushed since last 5.0 pull: Ensure that ccache is also used for C programs mysql: Ensure that 'delimiter' works the same way in batch mode as in normal mode mysqldump: Change to use ;; (instead of //) as a stored procedure/trigger delimiter Fixed test cases by adding missing DROP's and rename views to be of type 'v#' Removed MY_UNIX_PATH from fn_format() Removed current_db_used from TABLE_LIST Removed usage of 'current_thd' in Item_splocal Removed some compiler warnings A bit faster longlong2str code BUILD/FINISH.sh: Ensure that ccache is also used for C programs BUILD/SETUP.sh: Ensure that ccache is also used for C programs client/mysql.cc: More debugging Ensure that 'delimiter' works the same way in batch mode as in normal mode. Compare 'delimiter' command case-insensitive. The above fixes the delimiter bugs so that we can now use ;; as a trigger/SP function delimiter in mysqldump. client/mysqldump.c: Indentation fixes Use ;; as a delmimiter for stored procedures and triggers instead of // client/mysqltest.c: Indentation fixes include/my_sys.h: Remove not needed MY_UNIX_PATH parameter mysql-test/r/alter_table.result: Better to reuse mysqltest database (test didn't properly delete mysqltest1 at start) mysql-test/r/func_str.result: More testing of CONV() (to ensure that longlong2str() works correctly) mysql-test/r/information_schema.result: Drop all used tables and views Rename view tables to 'v#' to ensure that if this test fails, not a lot of other test fails mysql-test/r/information_schema_inno.result: Drop all used tables mysql-test/r/multi_statement.result: Drop used tables mysql-test/r/mysql.result: Add error messages to result mysql-test/r/mysqldump.result: ;; is now used as SP/trigger delimiter mysql-test/r/mysqlshow.result: Drop used tables mysql-test/r/temp_table.result: Drop used views Rename views to v# mysql-test/t/alter_table.test: Better to reuse mysqltest database (test didn't properly delete mysqltest1 at start) mysql-test/t/func_str.test: More testing of CONV() (to ensure that longlong2str() works correctly) mysql-test/t/information_schema.test: Drop all used tables and views Rename view tables to 'v#' to ensure that if this test fails, not a lot of other test fails mysql-test/t/information_schema_inno.test: Drop all used tables mysql-test/t/multi_statement.test: Drop used tables mysql-test/t/mysql.test: Add error messages to result mysql-test/t/mysqlshow.test: Drop used tables mysql-test/t/temp_table.test: Drop used views Rename views to v# mysys/mf_format.c: Remove not needed MY_UNIX_PATH parameter (This goes against how fn_format() is supposed to work and also conflicts with other options like MY_RETURN_REAL_PATH) sql/ha_federated.cc: Removed extra empty line sql/item.cc: Use 'str_value' instead of 'str_value_ptr' to hold result for Item_splocal Remove some calls to 'thd' in Item_splocal by making 'thd' a class variable One doesn't have to set 'null_value' when calling 'is_null()' sql/item.h: Add THD as a class variable to Item_splocal Use 'str_value' instead of 'str_value_ptr' to hold temp result Fixed bug in Item_hex when used in CAST() sql/item_func.cc: Optimize new code sql/log_event.cc: Move 'to_unix_path()' out of fn_format() sql/opt_range.cc: Simplify code sql/sp_head.cc: Ensure that Item_splocal has thd set before we call '->this_item()' sql/sql_class.cc: Return error if Statement::insert() fails in either hash_insert() sql/sql_parse.cc: Remove 'current_db_used' as we can trivially check if db table qualifier was used without this. Simplify code sql/sql_prepare.cc: Use enum instead of const int, to avoid ugly code for VC++ sql/structs.h: Remove compiler warnings when using STRING_WITH_LEN() with constant strings. sql/table.cc: Fixed indentation sql/table.h: Remove not needed current_db_used strings/decimal.c: Simplify code strings/longlong2str-x86.s: A bit faster longlong2str. (Took some ideas from Peter Gulutzan's code) strings/my_strtoll10.c: Simplify code for MetroWerks compiler
21 years ago
  1. drop table if exists t1;
  2. create table t1(a int);
  3. insert into t1 values(1);
  4. ERROR at line 9: DELIMITER must be followed by a 'delimiter' character or string
  5. Test default delimiter ;
  6. a
  7. 1
  8. Test delimiter without arg
  9. Test delimiter :
  10. a
  11. 1
  12. Test delimiter :
  13. a
  14. 1
  15. Test delimiter :;
  16. a
  17. 1
  18. Test delimiter //
  19. a
  20. 1
  21. Test delimiter MySQL
  22. a
  23. 1
  24. Test delimiter delimiter
  25. a
  26. 1
  27. Tables_in_test
  28. t1
  29. t2
  30. t3
  31. Tables_in_test
  32. t1
  33. _
  34. Test delimiter : from command line
  35. a
  36. 1
  37. _
  38. Test delimiter :; from command line
  39. a
  40. 1
  41. _
  42. Test 'go' command(vertical output) G
  43. *************************** 1. row ***************************
  44. a: 1
  45. _
  46. Test 'go' command g
  47. a
  48. 1
  49. drop table t1;
  50. create table t1(a int);
  51. lock tables t1 write;
  52. database()
  53. test
  54. unlock tables;
  55. drop table t1;
  56. +----------------------+------------+--------+
  57. | concat('>',col1,'<') | col2 | col3 |
  58. +----------------------+------------+--------+
  59. | >a < | b | 123421 |
  60. | >a < | 0123456789 | 4 |
  61. | >abcd< | | 4 |
  62. +----------------------+------------+--------+
  63. +-------------------+
  64. | __tañgè Ñãmé |
  65. +-------------------+
  66. | John Doe |
  67. +-------------------+
  68. +-------------------+
  69. | John Doe |
  70. +-------------------+
  71. | __tañgè Ñãmé |
  72. +-------------------+
  73. +------+------+---------------------------+
  74. | i | j | k |
  75. +------+------+---------------------------+
  76. | 1 | NULL | NULL |
  77. | NULL | NULL | <-----------------------> |
  78. | NULL | NULL | <----- |
  79. | NULL | NULL | Τη γλώσσα |
  80. | NULL | NULL | ᛖᚴ ᚷᛖᛏ |
  81. +------+------+---------------------------+
  82. i j k
  83. NULL 1 NULL
  84. Field Type Null Key Default Extra
  85. i int(11) YES NULL
  86. j int(11) NO NULL
  87. k int(11) YES NULL
  88. +------+---+------+
  89. | i | j | k |
  90. +------+---+------+
  91. | NULL | 1 | NULL |
  92. +------+---+------+
  93. +-------+---------+------+-----+---------+-------+
  94. | Field | Type | Null | Key | Default | Extra |
  95. +-------+---------+------+-----+---------+-------+
  96. | i | int(11) | YES | | NULL | |
  97. | j | int(11) | NO | | NULL | |
  98. | k | int(11) | YES | | NULL | |
  99. +-------+---------+------+-----+---------+-------+
  100. i s1
  101. 1 x
  102. 2 NULL
  103. 3
  104. +------+------+
  105. | i | s1 |
  106. +------+------+
  107. | 1 | x |
  108. | 2 | NULL |
  109. | 3 | |
  110. +------+------+
  111. unhex('zz')
  112. NULL
  113. +-------------+
  114. | unhex('zz') |
  115. +-------------+
  116. | NULL |
  117. +-------------+
  118. create table t1(a int, b varchar(255), c int);
  119. Field Type Null Key Default Extra
  120. a int(11) YES NULL
  121. b varchar(255) YES NULL
  122. c int(11) YES NULL
  123. Field Type Null Key Default Extra
  124. a int(11) YES NULL
  125. b varchar(255) YES NULL
  126. c int(11) YES NULL
  127. drop table t1;
  128. 1
  129. 1
  130. ERROR 1064 (42000) at line 3: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '' at line 1
  131. ERROR at line 1: USE must be followed by a database name
  132. \
  133. \\
  134. ';
  135. ';
  136. create table t17583 (a int);
  137. insert into t17583 (a) values (0),(1),(2),(3),(4),(5),(6),(7),(8),(9);
  138. insert into t17583 select a from t17583;
  139. insert into t17583 select a from t17583;
  140. insert into t17583 select a from t17583;
  141. insert into t17583 select a from t17583;
  142. insert into t17583 select a from t17583;
  143. insert into t17583 select a from t17583;
  144. insert into t17583 select a from t17583;
  145. select count(*) from t17583;
  146. count(*)
  147. 1280
  148. drop table t17583;
  149. Test connect without db- or host-name => reconnect
  150. Test connect with dbname only => new dbname, old hostname
  151. ERROR 1064 (42000) at line 1: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'connecttest' at line 1
  152. Test connect with _invalid_ dbname only => new invalid dbname, old hostname
  153. ERROR 1049 (42000) at line 1: Unknown database 'invalid'
  154. ERROR 1049 (42000) at line 1: Unknown database 'invalid'
  155. Test connect with dbname + hostname
  156. Test connect with dbname + _invalid_ hostname
  157. ERROR 2005 (HY000) at line 1: Unknown MySQL server host 'invalid_hostname' (errno)
  158. ERROR 2005 (HY000) at line 1: Unknown MySQL server host 'invalid_hostname' (errno)
  159. The commands reported in the bug report
  160. ERROR 2005 (HY000) at line 1: Unknown MySQL server host 'cyril has found a bug :)XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX' (errno)
  161. Too long dbname
  162. ERROR 1049 (42000) at line 1: Unknown database 'test_really_long_dbnamexxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx'
  163. Too long hostname
  164. ERROR 2005 (HY000) at line 1: Unknown MySQL server host 'cyrils_superlonghostnameXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX' (errno)
  165. 1
  166. 1
  167. ERROR at line 1: DELIMITER cannot contain a backslash character
  168. ERROR at line 1: DELIMITER cannot contain a backslash character
  169. 1
  170. 1
  171. 1
  172. 1
  173. End of 5.0 tests