@@ -14,25 +14,33 @@ select sformat(0);
14
14
select sformat('C');
15
15
select sformat(-4.2);
16
16
select sformat(5, 5, 5);
17
+ #enable after fix MDEV-27871
18
+ --disable_view_protocol
17
19
select sformat('{} {}', 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
18
20
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
19
21
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
20
22
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
21
23
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0);
24
+ --enable_view_protocol
22
25
select sformat('{{{}}}', 0);
23
26
select sformat('{{{}{{', 0);
24
27
select sformat('{{{{{}{{', 'param1');
25
28
select sformat(' {{ {{ {} {{ ', 'param1');
26
29
select sformat(' {{ {} {}', 'param1', 'param2');
27
30
select sformat('A{}C{}E{}', 'B', 'D', 'F');
28
31
select sformat('{} {}', FALSE, TRUE);
32
+ #enable after fix MDEV-29601
33
+ --disable_service_connection
29
34
select sformat('Add € != {} != {}?', '$', '£');
30
35
select sformat('Check {} != {} != {}?', '€', '$', '£');
36
+ --enable_service_connection
31
37
select sformat('{}{}{}', 1, 2, 3);
32
38
select sformat('Float {} Boolean {} Number {}', 3.14159, True, -50);
33
39
select sformat('SUM {} + {} = {}', 2, 3, 2+3);
34
40
select sformat('Numbers {} {} {}', 1, 1.11, 1.111);
35
41
select sformat('what {} is {}?', 'time', 'it');
42
+ #enable after fix MDEV-27871
43
+ --disable_view_protocol
36
44
select sformat('{} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {}
37
45
{} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {}
38
46
{} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {}
@@ -54,6 +62,7 @@ select sformat('{} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {
54
62
'85', '86', '87', '88', '89', '90', '91', '92', '93', '94', '95', '96', '97', '98', '99', '100',
55
63
'101', '102', '103', '104', '105', '106', '107', '108', '109', '110', '111', '112', '113', '114',
56
64
'115', '116', '117', '118', '119', '120');
65
+ --enable_view_protocol
57
66
58
67
echo #;
59
68
echo # Error Test Cases;
@@ -83,7 +92,10 @@ insert into t2 values (0.0025, 25, 'A', DATE('2020-06-29')),
83
92
(0.0005, 5, 'B', DATE('2020-6-29')),
84
93
(5.5555, -5, 'C', DATE('200629')),
85
94
(-9, -9, 'D', DATE('20*06*29'));
95
+ #enable after fix MDEV-27871
96
+ --disable_view_protocol
86
97
select sformat('p1 {:.4f} p2 {} p3 {} p4 {}', param1, param2, param3, param4) from t2;
98
+ --enable_view_protocol
87
99
drop table t2;
88
100
89
101
set names utf8;
@@ -115,7 +127,10 @@ echo #;
115
127
echo # Format Test Cases;
116
128
echo #;
117
129
select sformat('Num {:L}', 13800000000);
130
+ #enable after fix MDEV-29646
131
+ --disable_view_protocol
118
132
select sformat('Num [{:20}]', 42);
133
+ --enable_view_protocol
119
134
select sformat('Number: {:*^{}}', 4, 5);
120
135
select sformat('{:02} - {:02} - {:02}', 1, 2, 3);
121
136
select sformat('Character {:c}', 104);
@@ -126,7 +141,10 @@ select sformat('Float {:.2f}', 42.0);
126
141
select sformat('Float {:f}', 42.0);
127
142
select sformat('Number {:d}', 42);
128
143
select sformat('Number {:{}}', 5, 5);
144
+ #enable after fix MDEV-29646
145
+ --disable_view_protocol
129
146
select sformat('Number [{:10}]', 9999);
147
+ --enable_view_protocol
130
148
select sformat('Number {:.3}', 3.1416);
131
149
select sformat('int: {0:d}; hex: {0:x}; oct: {0:o}', 42);
132
150
select sformat('int: {0:d}; hex: {0:#x}; oct: {0:#o}', 42);
@@ -137,10 +155,16 @@ select sformat('The binary version of {0} is {0:b}', 5);
137
155
select sformat('{:+f}; {:+f}', 3.14, -3.14);
138
156
select sformat('{: f}; {: f}', 3.14, -3.14);
139
157
select sformat('{:-f}; {:-f}', 3.14, -3.14);
158
+ #enable after fix MDEV-27871
159
+ --disable_view_protocol
140
160
select sformat('The temperature is between {: } and {: } degrees celsius.', -3, 7);
141
161
select sformat('The temperature is between {:-} and {:-} degrees celsius.', -3, 7);
142
162
select sformat('The temperature is between {:+} and {:+} degrees celsius.', -3, 7);
163
+ --enable_view_protocol
164
+ #check after fix MDEV-29646
165
+ --disable_view_protocol
143
166
select sformat('We have {:<8} chickens.', 49);
167
+ --enable_view_protocol
144
168
select sformat('Center alimgn [{:*^10}]', 'data');
145
169
select sformat('Center aling [{:^10}].', 'data');
146
170
select sformat('Right aling [{:>10}].', 'data');
@@ -195,7 +219,10 @@ echo #;
195
219
select sformat('={}=', _ucs2 x'006100620063');
196
220
set names utf8;
197
221
select sformat(_ucs2 x'003D007B007D003D', _ucs2 x'0442043504410442');
222
+ #enable after fix MDEV-27871
223
+ --disable_view_protocol
198
224
select hex(sformat(_ucs2 x'003D007B007D003D', _ucs2 x'0442043504410442'));
225
+ --enable_view_protocol
199
226
create table t1 as select sformat(_ucs2 x'003D007B007D003D', _ucs2 x'0442043504410442') as x;
200
227
show create table t1;
201
228
drop table t1;
0 commit comments