Skip to content

Commit cee61e3

Browse files
MDEV-27691: make working view-protocol
Update tests for version 10.7
1 parent 410a072 commit cee61e3

File tree

5 files changed

+37
-0
lines changed

5 files changed

+37
-0
lines changed

mysql-test/main/func_sformat.test

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,25 +14,33 @@ select sformat(0);
1414
select sformat('C');
1515
select sformat(-4.2);
1616
select sformat(5, 5, 5);
17+
#enable after fix MDEV-27871
18+
--disable_view_protocol
1719
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,
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
2225
select sformat('{{{}}}', 0);
2326
select sformat('{{{}{{', 0);
2427
select sformat('{{{{{}{{', 'param1');
2528
select sformat(' {{ {{ {} {{ ', 'param1');
2629
select sformat(' {{ {} {}', 'param1', 'param2');
2730
select sformat('A{}C{}E{}', 'B', 'D', 'F');
2831
select sformat('{} {}', FALSE, TRUE);
32+
#enable after fix MDEV-29601
33+
--disable_service_connection
2934
select sformat('Add € != {} != {}?', '$', '£');
3035
select sformat('Check {} != {} != {}?', '€', '$', '£');
36+
--enable_service_connection
3137
select sformat('{}{}{}', 1, 2, 3);
3238
select sformat('Float {} Boolean {} Number {}', 3.14159, True, -50);
3339
select sformat('SUM {} + {} = {}', 2, 3, 2+3);
3440
select sformat('Numbers {} {} {}', 1, 1.11, 1.111);
3541
select sformat('what {} is {}?', 'time', 'it');
42+
#enable after fix MDEV-27871
43+
--disable_view_protocol
3644
select 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

5867
echo #;
5968
echo # 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
8697
select sformat('p1 {:.4f} p2 {} p3 {} p4 {}', param1, param2, param3, param4) from t2;
98+
--enable_view_protocol
8799
drop table t2;
88100

89101
set names utf8;
@@ -115,7 +127,10 @@ echo #;
115127
echo # Format Test Cases;
116128
echo #;
117129
select sformat('Num {:L}', 13800000000);
130+
#enable after fix MDEV-29646
131+
--disable_view_protocol
118132
select sformat('Num [{:20}]', 42);
133+
--enable_view_protocol
119134
select sformat('Number: {:*^{}}', 4, 5);
120135
select sformat('{:02} - {:02} - {:02}', 1, 2, 3);
121136
select sformat('Character {:c}', 104);
@@ -126,7 +141,10 @@ select sformat('Float {:.2f}', 42.0);
126141
select sformat('Float {:f}', 42.0);
127142
select sformat('Number {:d}', 42);
128143
select sformat('Number {:{}}', 5, 5);
144+
#enable after fix MDEV-29646
145+
--disable_view_protocol
129146
select sformat('Number [{:10}]', 9999);
147+
--enable_view_protocol
130148
select sformat('Number {:.3}', 3.1416);
131149
select sformat('int: {0:d}; hex: {0:x}; oct: {0:o}', 42);
132150
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);
137155
select sformat('{:+f}; {:+f}', 3.14, -3.14);
138156
select sformat('{: f}; {: f}', 3.14, -3.14);
139157
select sformat('{:-f}; {:-f}', 3.14, -3.14);
158+
#enable after fix MDEV-27871
159+
--disable_view_protocol
140160
select sformat('The temperature is between {: } and {: } degrees celsius.', -3, 7);
141161
select sformat('The temperature is between {:-} and {:-} degrees celsius.', -3, 7);
142162
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
143166
select sformat('We have {:<8} chickens.', 49);
167+
--enable_view_protocol
144168
select sformat('Center alimgn [{:*^10}]', 'data');
145169
select sformat('Center aling [{:^10}].', 'data');
146170
select sformat('Right aling [{:>10}].', 'data');
@@ -195,7 +219,10 @@ echo #;
195219
select sformat('={}=', _ucs2 x'006100620063');
196220
set names utf8;
197221
select sformat(_ucs2 x'003D007B007D003D', _ucs2 x'0442043504410442');
222+
#enable after fix MDEV-27871
223+
--disable_view_protocol
198224
select hex(sformat(_ucs2 x'003D007B007D003D', _ucs2 x'0442043504410442'));
225+
--enable_view_protocol
199226
create table t1 as select sformat(_ucs2 x'003D007B007D003D', _ucs2 x'0442043504410442') as x;
200227
show create table t1;
201228
drop table t1;

mysql-test/main/json_equals.test

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,11 +15,14 @@ select json_equals('{"a":[1, 2, 3]}', '{"a":[1, 2, 3, 4]}');
1515

1616
select json_equals('{"a":[1, 2, 3]}', '{"a":[1, 2, 3]}');
1717

18+
#enable after fix MDEV-27871
19+
--disable_view_protocol
1820
select json_equals('{"țanțoș":[1, 2, "ț", {"some uâ߀":"uâßr"}]}',
1921
'{"țanțoș":[1, 2, "ț", {"some uâ߀":"uâßr"}]}');
2022

2123
select json_equals('{"a" : [0.123456789123456789], "b" : [1, 2, 3]}',
2224
'{"b" : [1, 2, 3], "a" : [0.123456789123456789]}');
25+
--enable_view_protocol
2326

2427
--echo #
2528
--echo # Test max json depth for json_equals.

mysql-test/main/type_decimal.test

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -675,7 +675,10 @@ DROP TABLE t1dec102;
675675

676676
SELECT CAST('0e111111111' AS DECIMAL(38,0)) AS a;
677677
SELECT CAST('0e1111111111' AS DECIMAL(38,0)) AS a;
678+
#enable after fix MDEV-29647
679+
--disable_view_protocol
678680
SELECT CAST('.00000000000000000000000000000000000001e111111111111111111111' AS DECIMAL(38,0)) AS a;
681+
--disable_view_protocol
679682

680683
CREATE TABLE t1 (str VARCHAR(128), comment VARCHAR(128));
681684
INSERT INTO t1 VALUES

mysql-test/main/type_enum.test

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -575,11 +575,13 @@ CREATE OR REPLACE TABLE t2 AS SELECT COALESCE(c_int, c_enum) FROM t1;
575575
SHOW CREATE TABLE t2;
576576
DROP TABLE t2;
577577

578+
--disable_view_protocol
578579
--disable_ps_protocol
579580
--enable_metadata
580581
SELECT c_int FROM t1 UNION SELECT c_enum FROM t1;
581582
SELECT COALESCE(c_int, c_enum) FROM t1;
582583
--disable_metadata
583584
--enable_ps_protocol
585+
--enable_view_protocol
584586

585587
DROP TABLE t1;

mysql-test/main/type_set.test

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -281,11 +281,13 @@ CREATE OR REPLACE TABLE t2 AS SELECT COALESCE(c_int, c_set) FROM t1;
281281
SHOW CREATE TABLE t2;
282282
DROP TABLE t2;
283283

284+
--disable_view_protocol
284285
--disable_ps_protocol
285286
--enable_metadata
286287
SELECT c_int FROM t1 UNION SELECT c_set FROM t1;
287288
SELECT COALESCE(c_int, c_set) FROM t1;
288289
--disable_metadata
289290
--enable_ps_protocol
291+
--enable_view_protocol
290292

291293
DROP TABLE t1;

0 commit comments

Comments
 (0)