Commit f0f9dc86 authored by Sergei Golubchik's avatar Sergei Golubchik

enable main.func_sformat in --view

parent 63ac87c1
...@@ -23,10 +23,8 @@ select sformat('{} {}', 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...@@ -23,10 +23,8 @@ 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, 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, 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, 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, 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, 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, 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, 0, 0, 0, 0, 0); 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0) as x;
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, x
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,
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
select sformat('{{{}}}', 0); select sformat('{{{}}}', 0);
sformat('{{{}}}', 0) sformat('{{{}}}', 0)
...@@ -78,10 +76,8 @@ select sformat('{} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} { ...@@ -78,10 +76,8 @@ select sformat('{} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {
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, 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, 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, 102, 103, 104, 105, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105,
106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120); 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120) as x;
sformat('{} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} x
{} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {}
{} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {}
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 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 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 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
...@@ -97,10 +93,8 @@ select sformat('{} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} { ...@@ -97,10 +93,8 @@ select sformat('{} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {
'69', '70', '71', '72', '73', '74', '75', '76', '77', '78', '79', '80', '81', '82', '83', '84', '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', '85', '86', '87', '88', '89', '90', '91', '92', '93', '94', '95', '96', '97', '98', '99', '100',
'101', '102', '103', '104', '105', '106', '107', '108', '109', '110', '111', '112', '113', '114', '101', '102', '103', '104', '105', '106', '107', '108', '109', '110', '111', '112', '113', '114',
'115', '116', '117', '118', '119', '120'); '115', '116', '117', '118', '119', '120') as x;
sformat('{} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} x
{} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {}
{} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {}
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 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 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 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
...@@ -159,8 +153,8 @@ insert into t2 values (0.0025, 25, 'A', DATE('2020-06-29')), ...@@ -159,8 +153,8 @@ insert into t2 values (0.0025, 25, 'A', DATE('2020-06-29')),
(0.0005, 5, 'B', DATE('2020-6-29')), (0.0005, 5, 'B', DATE('2020-6-29')),
(5.5555, -5, 'C', DATE('200629')), (5.5555, -5, 'C', DATE('200629')),
(-9, -9, 'D', DATE('20*06*29')); (-9, -9, 'D', DATE('20*06*29'));
select sformat('p1 {:.4f} p2 {} p3 {} p4 {}', param1, param2, param3, param4) from t2; select sformat('p1 {:.4f} p2 {} p3 {} p4 {}', param1, param2, param3, param4) x from t2;
sformat('p1 {:.4f} p2 {} p3 {} p4 {}', param1, param2, param3, param4) x
p1 0.0025 p2 25 p3 A p4 2020-06-29 p1 0.0025 p2 25 p3 A p4 2020-06-29
p1 0.0005 p2 5 p3 B p4 2020-06-29 p1 0.0005 p2 5 p3 B p4 2020-06-29
p1 5.5555 p2 -5 p3 C p4 2020-06-29 p1 5.5555 p2 -5 p3 C p4 2020-06-29
...@@ -279,14 +273,14 @@ sformat('{: f}; {: f}', 3.14, -3.14) ...@@ -279,14 +273,14 @@ sformat('{: f}; {: f}', 3.14, -3.14)
select sformat('{:-f}; {:-f}', 3.14, -3.14); select sformat('{:-f}; {:-f}', 3.14, -3.14);
sformat('{:-f}; {:-f}', 3.14, -3.14) sformat('{:-f}; {:-f}', 3.14, -3.14)
3.140000; -3.140000 3.140000; -3.140000
select sformat('The temperature is between {: } and {: } degrees celsius.', -3, 7); select sformat('The temperature is between {: } and {: } degrees celsius.', -3, 7) x;
sformat('The temperature is between {: } and {: } degrees celsius.', -3, 7) x
The temperature is between -3 and 7 degrees celsius. The temperature is between -3 and 7 degrees celsius.
select sformat('The temperature is between {:-} and {:-} degrees celsius.', -3, 7); select sformat('The temperature is between {:-} and {:-} degrees celsius.', -3, 7) x;
sformat('The temperature is between {:-} and {:-} degrees celsius.', -3, 7) x
The temperature is between -3 and 7 degrees celsius. The temperature is between -3 and 7 degrees celsius.
select sformat('The temperature is between {:+} and {:+} degrees celsius.', -3, 7); select sformat('The temperature is between {:+} and {:+} degrees celsius.', -3, 7) x;
sformat('The temperature is between {:+} and {:+} degrees celsius.', -3, 7) x
The temperature is between -3 and +7 degrees celsius. The temperature is between -3 and +7 degrees celsius.
select sformat('We have {:<8} chickens.', 49); select sformat('We have {:<8} chickens.', 49);
sformat('We have {:<8} chickens.', 49) sformat('We have {:<8} chickens.', 49)
...@@ -427,8 +421,8 @@ set names utf8; ...@@ -427,8 +421,8 @@ set names utf8;
select sformat(_ucs2 x'003D007B007D003D', _ucs2 x'0442043504410442'); select sformat(_ucs2 x'003D007B007D003D', _ucs2 x'0442043504410442');
sformat(_ucs2 x'003D007B007D003D', _ucs2 x'0442043504410442') sformat(_ucs2 x'003D007B007D003D', _ucs2 x'0442043504410442')
=тест= =тест=
select hex(sformat(_ucs2 x'003D007B007D003D', _ucs2 x'0442043504410442')); select hex(sformat(_ucs2 x'003D007B007D003D', _ucs2 x'0442043504410442')) x;
hex(sformat(_ucs2 x'003D007B007D003D', _ucs2 x'0442043504410442')) x
003D0442043504410442003D 003D0442043504410442003D
create table t1 as select sformat(_ucs2 x'003D007B007D003D', _ucs2 x'0442043504410442') as x; create table t1 as select sformat(_ucs2 x'003D007B007D003D', _ucs2 x'0442043504410442') as x;
show create table t1; show create table t1;
......
...@@ -14,14 +14,11 @@ select sformat(0); ...@@ -14,14 +14,11 @@ select sformat(0);
select sformat('C'); select sformat('C');
select sformat(-4.2); select sformat(-4.2);
select sformat(5, 5, 5); select sformat(5, 5, 5);
#enable after fix MDEV-27871
--disable_view_protocol
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, 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,
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, 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,
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, 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,
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, 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,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0); 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0) as x;
--enable_view_protocol
select sformat('{{{}}}', 0); select sformat('{{{}}}', 0);
select sformat('{{{}{{', 0); select sformat('{{{}{{', 0);
select sformat('{{{{{}{{', 'param1'); select sformat('{{{{{}{{', 'param1');
...@@ -29,18 +26,13 @@ select sformat(' {{ {{ {} {{ ', 'param1'); ...@@ -29,18 +26,13 @@ select sformat(' {{ {{ {} {{ ', 'param1');
select sformat(' {{ {} {}', 'param1', 'param2'); select sformat(' {{ {} {}', 'param1', 'param2');
select sformat('A{}C{}E{}', 'B', 'D', 'F'); select sformat('A{}C{}E{}', 'B', 'D', 'F');
select sformat('{} {}', FALSE, TRUE); select sformat('{} {}', FALSE, TRUE);
#enable after fix MDEV-29601
--disable_service_connection
select sformat('Add € != {} != {}?', '$', '£'); select sformat('Add € != {} != {}?', '$', '£');
select sformat('Check {} != {} != {}?', '€', '$', '£'); select sformat('Check {} != {} != {}?', '€', '$', '£');
--enable_service_connection
select sformat('{}{}{}', 1, 2, 3); select sformat('{}{}{}', 1, 2, 3);
select sformat('Float {} Boolean {} Number {}', 3.14159, True, -50); select sformat('Float {} Boolean {} Number {}', 3.14159, True, -50);
select sformat('SUM {} + {} = {}', 2, 3, 2+3); select sformat('SUM {} + {} = {}', 2, 3, 2+3);
select sformat('Numbers {} {} {}', 1, 1.11, 1.111); select sformat('Numbers {} {} {}', 1, 1.11, 1.111);
select sformat('what {} is {}?', 'time', 'it'); select sformat('what {} is {}?', 'time', 'it');
#enable after fix MDEV-27871
--disable_view_protocol
select sformat('{} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} select sformat('{} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {}
{} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {}
{} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {}
...@@ -49,7 +41,7 @@ select sformat('{} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} { ...@@ -49,7 +41,7 @@ select sformat('{} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {
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, 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, 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, 102, 103, 104, 105, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105,
106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120); 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120) as x;
select sformat('{} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} select sformat('{} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {}
{} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {}
{} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {}
...@@ -61,8 +53,7 @@ select sformat('{} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} { ...@@ -61,8 +53,7 @@ select sformat('{} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {
'69', '70', '71', '72', '73', '74', '75', '76', '77', '78', '79', '80', '81', '82', '83', '84', '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', '85', '86', '87', '88', '89', '90', '91', '92', '93', '94', '95', '96', '97', '98', '99', '100',
'101', '102', '103', '104', '105', '106', '107', '108', '109', '110', '111', '112', '113', '114', '101', '102', '103', '104', '105', '106', '107', '108', '109', '110', '111', '112', '113', '114',
'115', '116', '117', '118', '119', '120'); '115', '116', '117', '118', '119', '120') as x;
--enable_view_protocol
echo #; echo #;
echo # Error Test Cases; echo # Error Test Cases;
...@@ -92,10 +83,7 @@ insert into t2 values (0.0025, 25, 'A', DATE('2020-06-29')), ...@@ -92,10 +83,7 @@ insert into t2 values (0.0025, 25, 'A', DATE('2020-06-29')),
(0.0005, 5, 'B', DATE('2020-6-29')), (0.0005, 5, 'B', DATE('2020-6-29')),
(5.5555, -5, 'C', DATE('200629')), (5.5555, -5, 'C', DATE('200629')),
(-9, -9, 'D', DATE('20*06*29')); (-9, -9, 'D', DATE('20*06*29'));
#enable after fix MDEV-27871 select sformat('p1 {:.4f} p2 {} p3 {} p4 {}', param1, param2, param3, param4) x from t2;
--disable_view_protocol
select sformat('p1 {:.4f} p2 {} p3 {} p4 {}', param1, param2, param3, param4) from t2;
--enable_view_protocol
drop table t2; drop table t2;
set names utf8; set names utf8;
...@@ -127,10 +115,7 @@ echo #; ...@@ -127,10 +115,7 @@ echo #;
echo # Format Test Cases; echo # Format Test Cases;
echo #; echo #;
select sformat('Num {:L}', 13800000000); select sformat('Num {:L}', 13800000000);
#enable after fix MDEV-29646
--disable_view_protocol
select sformat('Num [{:20}]', 42); select sformat('Num [{:20}]', 42);
--enable_view_protocol
select sformat('Number: {:*^{}}', 4, 5); select sformat('Number: {:*^{}}', 4, 5);
select sformat('{:02} - {:02} - {:02}', 1, 2, 3); select sformat('{:02} - {:02} - {:02}', 1, 2, 3);
select sformat('Character {:c}', 104); select sformat('Character {:c}', 104);
...@@ -141,10 +126,7 @@ select sformat('Float {:.2f}', 42.0); ...@@ -141,10 +126,7 @@ select sformat('Float {:.2f}', 42.0);
select sformat('Float {:f}', 42.0); select sformat('Float {:f}', 42.0);
select sformat('Number {:d}', 42); select sformat('Number {:d}', 42);
select sformat('Number {:{}}', 5, 5); select sformat('Number {:{}}', 5, 5);
#enable after fix MDEV-29646
--disable_view_protocol
select sformat('Number [{:10}]', 9999); select sformat('Number [{:10}]', 9999);
--enable_view_protocol
select sformat('Number {:.3}', 3.1416); select sformat('Number {:.3}', 3.1416);
select sformat('int: {0:d}; hex: {0:x}; oct: {0:o}', 42); select sformat('int: {0:d}; hex: {0:x}; oct: {0:o}', 42);
select sformat('int: {0:d}; hex: {0:#x}; oct: {0:#o}', 42); select sformat('int: {0:d}; hex: {0:#x}; oct: {0:#o}', 42);
...@@ -155,16 +137,10 @@ select sformat('The binary version of {0} is {0:b}', 5); ...@@ -155,16 +137,10 @@ select sformat('The binary version of {0} is {0:b}', 5);
select sformat('{:+f}; {:+f}', 3.14, -3.14); select sformat('{:+f}; {:+f}', 3.14, -3.14);
select sformat('{: f}; {: f}', 3.14, -3.14); select sformat('{: f}; {: f}', 3.14, -3.14);
select sformat('{:-f}; {:-f}', 3.14, -3.14); select sformat('{:-f}; {:-f}', 3.14, -3.14);
#enable after fix MDEV-27871 select sformat('The temperature is between {: } and {: } degrees celsius.', -3, 7) x;
--disable_view_protocol select sformat('The temperature is between {:-} and {:-} degrees celsius.', -3, 7) x;
select sformat('The temperature is between {: } and {: } degrees celsius.', -3, 7); select sformat('The temperature is between {:+} and {:+} degrees celsius.', -3, 7) x;
select sformat('The temperature is between {:-} and {:-} degrees celsius.', -3, 7);
select sformat('The temperature is between {:+} and {:+} degrees celsius.', -3, 7);
--enable_view_protocol
#check after fix MDEV-29646
--disable_view_protocol
select sformat('We have {:<8} chickens.', 49); select sformat('We have {:<8} chickens.', 49);
--enable_view_protocol
select sformat('Center alimgn [{:*^10}]', 'data'); select sformat('Center alimgn [{:*^10}]', 'data');
select sformat('Center aling [{:^10}].', 'data'); select sformat('Center aling [{:^10}].', 'data');
select sformat('Right aling [{:>10}].', 'data'); select sformat('Right aling [{:>10}].', 'data');
...@@ -219,10 +195,7 @@ echo #; ...@@ -219,10 +195,7 @@ echo #;
select sformat('={}=', _ucs2 x'006100620063'); select sformat('={}=', _ucs2 x'006100620063');
set names utf8; set names utf8;
select sformat(_ucs2 x'003D007B007D003D', _ucs2 x'0442043504410442'); select sformat(_ucs2 x'003D007B007D003D', _ucs2 x'0442043504410442');
#enable after fix MDEV-27871 select hex(sformat(_ucs2 x'003D007B007D003D', _ucs2 x'0442043504410442')) x;
--disable_view_protocol
select hex(sformat(_ucs2 x'003D007B007D003D', _ucs2 x'0442043504410442'));
--enable_view_protocol
create table t1 as select sformat(_ucs2 x'003D007B007D003D', _ucs2 x'0442043504410442') as x; create table t1 as select sformat(_ucs2 x'003D007B007D003D', _ucs2 x'0442043504410442') as x;
show create table t1; show create table t1;
drop table t1; drop table t1;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment