summaryrefslogtreecommitdiff
path: root/mysql-test/main/parser_not_embedded.test
blob: 3af1260f4ad2a193c2c7d5b2a08bf80104bad27d (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
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
--source include/not_embedded.inc

###########################################################################
--echo #
--echo # Bug#39559: dump of stored procedures / functions with C-style 
--echo #     comment can't be read back
--echo #

--write_file $MYSQLTEST_VARDIR/tmp/bug39559.sql
select 2 as expected, /*!01000/**/*/ 2 as result;
select 1 as expected, /*!999998/**/*/ 1 as result;
select 3 as expected, /*!01000 1 + */ 2 as result;
select 2 as expected, /*!999990 1 + */ 2 as result;
select 7 as expected, /*!01000 1 + /* 8 + */ 2 + */ 4 as result;
select 8 as expected, /*!999998 1 + /* 2 + */ 4 + */ 8 as result;
select 7 as expected, /*!01000 1 + /*!01000 8 + */ 2 + */ 4 as result;
select 7 as expected, /*!01000 1 + /*!999998 8 + */ 2 + */ 4 as result;
select 4 as expected, /*!999998 1 + /*!999998 8 + */ 2 + */ 4 as result;
select 4 as expected, /*!999998 1 + /*!01000 8 + */ 2 + */ 4 as result;
select 7 as expected, /*!01000 1 + /*!01000 8 + /*!01000 error */ 16 + */ 2 + */ 4 as result;
select 4 as expected, /* 1 + /*!01000 8 + */ 2 + */ 4;
EOF

--exec $MYSQL --comments --force --table test <$MYSQLTEST_VARDIR/tmp/bug39559.sql
--remove_file $MYSQLTEST_VARDIR/tmp/bug39559.sql

--echo # Bug#46527 "COMMIT AND CHAIN RELEASE does not make sense"
--echo #
--error ER_PARSE_ERROR
COMMIT AND CHAIN RELEASE;

COMMIT AND NO CHAIN RELEASE;
disconnect default;
connect(default, localhost, root,,);

COMMIT RELEASE;
disconnect default;
connect(default, localhost, root,,);

--error ER_PARSE_ERROR
COMMIT CHAIN RELEASE;

--error ER_PARSE_ERROR
COMMIT NO CHAIN RELEASE;

--error ER_PARSE_ERROR
COMMIT AND NO RELEASE;
--error ER_PARSE_ERROR
COMMIT AND RELEASE;

COMMIT NO RELEASE;
--error ER_PARSE_ERROR
COMMIT CHAIN NO RELEASE;
--error ER_PARSE_ERROR
COMMIT NO CHAIN NO RELEASE;

--error ER_PARSE_ERROR
COMMIT AND RELEASE CHAIN;

COMMIT AND NO CHAIN NO RELEASE;

--error ER_PARSE_ERROR
ROLLBACK AND CHAIN RELEASE;

ROLLBACK AND NO CHAIN RELEASE;
disconnect default;
connect(default, localhost, root,,);

ROLLBACK RELEASE;
disconnect default;
connect(default, localhost, root,,);

--error ER_PARSE_ERROR
ROLLBACK CHAIN RELEASE;

--error ER_PARSE_ERROR
ROLLBACK NO CHAIN RELEASE;
disconnect default;
connect(default, localhost, root,,);

--error ER_PARSE_ERROR
ROLLBACK AND NO RELEASE;

--error ER_PARSE_ERROR
ROLLBACK AND RELEASE;

ROLLBACK NO RELEASE;

--error ER_PARSE_ERROR
ROLLBACK CHAIN NO RELEASE;

--error ER_PARSE_ERROR
ROLLBACK NO CHAIN NO RELEASE;
--error ER_PARSE_ERROR
ROLLBACK AND RELEASE CHAIN;

ROLLBACK AND NO CHAIN NO RELEASE;

--echo #
--echo # End of 5.5 tests
--echo #