@@ -14,25 +14,33 @@ select sformat(0);
1414select sformat('C');
1515select sformat(-4.2);
1616select sformat(5, 5, 5);
17+ #enable after fix MDEV-27871
18+ --disable_view_protocol
1719select 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,
1820 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,
1921 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,
2022 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,
2123 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0);
24+ --enable_view_protocol
2225select sformat('{{{}}}', 0);
2326select sformat('{{{}{{', 0);
2427select sformat('{{{{{}{{', 'param1');
2528select sformat(' {{ {{ {} {{ ', 'param1');
2629select sformat(' {{ {} {}', 'param1', 'param2');
2730select sformat('A{}C{}E{}', 'B', 'D', 'F');
2831select sformat('{} {}', FALSE, TRUE);
32+ #enable after fix MDEV-29601
33+ --disable_service_connection
2934select sformat('Add € != {} != {}?', '$', '£');
3035select sformat('Check {} != {} != {}?', '€', '$', '£');
36+ --enable_service_connection
3137select sformat('{}{}{}', 1, 2, 3);
3238select sformat('Float {} Boolean {} Number {}', 3.14159, True, -50);
3339select sformat('SUM {} + {} = {}', 2, 3, 2+3);
3440select sformat('Numbers {} {} {}', 1, 1.11, 1.111);
3541select sformat('what {} is {}?', 'time', 'it');
42+ #enable after fix MDEV-27871
43+ --disable_view_protocol
3644select sformat('{} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {}
3745 {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {}
3846 {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {}
@@ -54,6 +62,7 @@ select sformat('{} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {
5462 '85', '86', '87', '88', '89', '90', '91', '92', '93', '94', '95', '96', '97', '98', '99', '100',
5563 '101', '102', '103', '104', '105', '106', '107', '108', '109', '110', '111', '112', '113', '114',
5664 '115', '116', '117', '118', '119', '120');
65+ --enable_view_protocol
5766
5867echo #;
5968echo # Error Test Cases;
@@ -83,7 +92,10 @@ insert into t2 values (0.0025, 25, 'A', DATE('2020-06-29')),
8392 (0.0005, 5, 'B', DATE('2020-6-29')),
8493 (5.5555, -5, 'C', DATE('200629')),
8594 (-9, -9, 'D', DATE('20*06*29'));
95+ #enable after fix MDEV-27871
96+ --disable_view_protocol
8697select sformat('p1 {:.4f} p2 {} p3 {} p4 {}', param1, param2, param3, param4) from t2;
98+ --enable_view_protocol
8799drop table t2;
88100
89101set names utf8;
@@ -115,7 +127,10 @@ echo #;
115127echo # Format Test Cases;
116128echo #;
117129select sformat('Num {:L}', 13800000000);
130+ #enable after fix MDEV-29646
131+ --disable_view_protocol
118132select sformat('Num [{:20}]', 42);
133+ --enable_view_protocol
119134select sformat('Number: {:*^{}}', 4, 5);
120135select sformat('{:02} - {:02} - {:02}', 1, 2, 3);
121136select sformat('Character {:c}', 104);
@@ -126,7 +141,10 @@ select sformat('Float {:.2f}', 42.0);
126141select sformat('Float {:f}', 42.0);
127142select sformat('Number {:d}', 42);
128143select sformat('Number {:{}}', 5, 5);
144+ #enable after fix MDEV-29646
145+ --disable_view_protocol
129146select sformat('Number [{:10}]', 9999);
147+ --enable_view_protocol
130148select sformat('Number {:.3}', 3.1416);
131149select sformat('int: {0:d}; hex: {0:x}; oct: {0:o}', 42);
132150select 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);
137155select sformat('{:+f}; {:+f}', 3.14, -3.14);
138156select sformat('{: f}; {: f}', 3.14, -3.14);
139157select sformat('{:-f}; {:-f}', 3.14, -3.14);
158+ #enable after fix MDEV-27871
159+ --disable_view_protocol
140160select sformat('The temperature is between {: } and {: } degrees celsius.', -3, 7);
141161select sformat('The temperature is between {:-} and {:-} degrees celsius.', -3, 7);
142162select sformat('The temperature is between {:+} and {:+} degrees celsius.', -3, 7);
163+ --enable_view_protocol
164+ #check after fix MDEV-29646
165+ --disable_view_protocol
143166select sformat('We have {:<8} chickens.', 49);
167+ --enable_view_protocol
144168select sformat('Center alimgn [{:*^10}]', 'data');
145169select sformat('Center aling [{:^10}].', 'data');
146170select sformat('Right aling [{:>10}].', 'data');
@@ -195,7 +219,10 @@ echo #;
195219select sformat('={}=', _ucs2 x'006100620063');
196220set names utf8;
197221select sformat(_ucs2 x'003D007B007D003D', _ucs2 x'0442043504410442');
222+ #enable after fix MDEV-27871
223+ --disable_view_protocol
198224select hex(sformat(_ucs2 x'003D007B007D003D', _ucs2 x'0442043504410442'));
225+ --enable_view_protocol
199226create table t1 as select sformat(_ucs2 x'003D007B007D003D', _ucs2 x'0442043504410442') as x;
200227show create table t1;
201228drop table t1;
0 commit comments