summaryrefslogtreecommitdiff
path: root/mysql-test/r/mysql_comments.result
blob: 366ceeb5bbfa87d30388ca482d8548cb6ca0ef11 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
drop table if exists t1;
drop function if exists foofct;
drop procedure if exists empty;
drop procedure if exists foosp;
drop procedure if exists nicesp;
drop trigger if exists t1_empty;
drop trigger if exists t1_bi;
"Pass 1 : --disable-comments"
1
1
2
2
foofct("call 1")
call 1
Function	sql_mode	Create Function
foofct		CREATE DEFINER=`root`@`localhost` FUNCTION `foofct`(x char(20)) RETURNS char(20) CHARSET latin1\nreturn\n\n\n\nx
foofct("call 2")
call 2
Function	sql_mode	Create Function
foofct		CREATE DEFINER=`root`@`localhost` FUNCTION `foofct`(x char(20)) RETURNS char(20) CHARSET latin1\nbegin\n  \n  \n  \n\n  \n\n  \n  return x;\nend
Procedure	sql_mode	Create Procedure
empty		CREATE DEFINER=`root`@`localhost` PROCEDURE `empty`()\nbegin\nend
id	data
foo	42
Procedure	sql_mode	Create Procedure
foosp		CREATE DEFINER=`root`@`localhost` PROCEDURE `foosp`()\ninsert into test.t1\n\n\n\n\n  \n\n  \n  values ("foo", 42)
Procedure	sql_mode	Create Procedure
nicesp		CREATE DEFINER=`root`@`localhost` PROCEDURE `nicesp`(a int)\nbegin\n  \n  declare b int;\n  declare c float;\n\n  \n  \n\n  \nend
"Pass 2 : --enable-comments"
1
1
2
2
foofct("call 1")
call 1
Function	sql_mode	Create Function
foofct		CREATE DEFINER=`root`@`localhost` FUNCTION `foofct`(x char(20)) RETURNS char(20) CHARSET latin1\nreturn\n-- comment 1a\n# comment 1b\n/* comment 1c */\nx # after body, on same line
foofct("call 2")
call 2
Function	sql_mode	Create Function
foofct		CREATE DEFINER=`root`@`localhost` FUNCTION `foofct`(x char(20)) RETURNS char(20) CHARSET latin1\nbegin\n  -- comment 1a\n  # comment 1b\n  /*\n     comment 1c\n  */\n\n  -- empty line below\n\n  -- empty line above\n  return x;\nend
Procedure	sql_mode	Create Procedure
empty		CREATE DEFINER=`root`@`localhost` PROCEDURE `empty`()\nbegin\nend
id	data
foo	42
Procedure	sql_mode	Create Procedure
foosp		CREATE DEFINER=`root`@`localhost` PROCEDURE `foosp`()\ninsert into test.t1\n## These comments are part of the procedure body, and should be kept.\n# Comment 2a\n-- Comment 2b\n/* Comment 2c */\n  -- empty line below\n\n  -- empty line above\n  values ("foo", 42) # comment 3, still part of the body
Procedure	sql_mode	Create Procedure
nicesp		CREATE DEFINER=`root`@`localhost` PROCEDURE `nicesp`(a int)\nbegin\n  -- declare some variables here\n  declare b int;\n  declare c float;\n\n  -- do more stuff here\n  -- commented nicely and so on\n\n  -- famous last words ...\nend
End of 5.0 tests