Skip to content

Commit afccf81

Browse files
author
Catalin Besleaga
committed
WL9015: fix tests run with ps-protocol and query_cache
1 parent 54335b2 commit afccf81

File tree

4 files changed

+18
-15
lines changed

4 files changed

+18
-15
lines changed

mysql-test/r/func_bitwise_ops.result

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1375,15 +1375,6 @@ Warning 1292 Truncated incorrect INTEGER value: ''
13751375
Warning 1292 Truncated incorrect INTEGER value: '\xCA\xFE\xBA\xBE\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'
13761376
Warning 1292 Truncated incorrect INTEGER value: ''
13771377
Warning 1292 Truncated incorrect INTEGER value: ''
1378-
INSERT INTO at(_bin) (SELECT _bin ^ x'cafebabe' FROM at);
1379-
ERROR 22007: Truncated incorrect INTEGER value: '\xCA\xFE\xBA\xBE\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'
1380-
#Turn strict mode OFF
1381-
Warnings:
1382-
Warning 3135 'NO_ZERO_DATE', 'NO_ZERO_IN_DATE' and 'ERROR_FOR_DIVISION_BY_ZERO' sql modes should be used with strict mode. They will be merged with strict mode in a future release.
1383-
INSERT INTO at(_bin) (SELECT _bin ^ x'cafebabe' FROM at);
1384-
Warnings:
1385-
Warning 1287 Bitwise operations on BINARY will change behaviour in a future version, check the 'Bit functions' section in the manual.
1386-
Warning 1292 Truncated incorrect INTEGER value: '\xCA\xFE\xBA\xBE\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'
13871378
DROP TABLE at;
13881379
#
13891380
# Test of bitwise aggregate functions on BINARY

mysql-test/r/varbinary.result

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -273,6 +273,7 @@ Warning 1287 Bitwise operations on BINARY will change behaviour in a future vers
273273
Warning 1287 Bitwise operations on BINARY will change behaviour in a future version, check the 'Bit functions' section in the manual.
274274
Warning 1287 Bitwise operations on BINARY will change behaviour in a future version, check the 'Bit functions' section in the manual.
275275
Warning 1287 Bitwise operations on BINARY will change behaviour in a future version, check the 'Bit functions' section in the manual.
276+
RESET QUERY CACHE;
276277
CALL test_bin_op();
277278
b & c b & 0x31393838 b & NULL b & 0b1011 0x31393838 & b NULL & b 0b1011 & b b | c b | 0x31393838 b | NULL b | 0b1011 0x31393838 | b NULL | b 0b1011 | b b ^ c b ^ 0x31393838 b ^ NULL b ^ 0b1011 0x31393838 ^ b NULL ^ b 0b1011 ^ b BIT_COUNT(b) ~b b << 1 b >> 1
278279
941 56 NULL 9 56 NULL 9 2047 825835453 NULL 1983 825835453 NULL 1983 1106 825835397 NULL 1974 825835397 NULL 1974 9 18446744073709549634 3962 990
@@ -321,6 +322,7 @@ Warnings:
321322
Warning 1287 Bitwise operations on BINARY will change behaviour in a future version, check the 'Bit functions' section in the manual.
322323
Warning 1287 Bitwise operations on BINARY will change behaviour in a future version, check the 'Bit functions' section in the manual.
323324
Warning 1287 Bitwise operations on BINARY will change behaviour in a future version, check the 'Bit functions' section in the manual.
325+
RESET QUERY CACHE;
324326
CALL test_bin_op();
325327
BIT_AND(b) BIT_OR(b) BIT_XOR(b)
326328
1981 1981 1981
@@ -342,6 +344,7 @@ Warnings:
342344
Warning 1287 Bitwise operations on BINARY will change behaviour in a future version, check the 'Bit functions' section in the manual.
343345
Warning 1287 Bitwise operations on BINARY will change behaviour in a future version, check the 'Bit functions' section in the manual.
344346
Warning 1287 Bitwise operations on BINARY will change behaviour in a future version, check the 'Bit functions' section in the manual.
347+
RESET QUERY CACHE;
345348
CALL test_bin_op();
346349
BIT_AND(b) BIT_OR(b) BIT_XOR(b)
347350
1920 2047 127
@@ -423,6 +426,7 @@ Warning 1287 Bitwise operations on BINARY will change behaviour in a future vers
423426
Warning 1287 Bitwise operations on BINARY will change behaviour in a future version, check the 'Bit functions' section in the manual.
424427
Warning 1287 Bitwise operations on BINARY will change behaviour in a future version, check the 'Bit functions' section in the manual.
425428
Warning 1287 Bitwise operations on BINARY will change behaviour in a future version, check the 'Bit functions' section in the manual.
429+
RESET QUERY CACHE;
426430
EXECUTE s1;
427431
b & c b & 0x31393838 b & NULL b & 0b1011 0x31393838 & b NULL & b 0b1011 & b b | c b | 0x31393838 b | NULL b | 0b1011 0x31393838 | b NULL | b 0b1011 | b b ^ c b ^ 0x31393838 b ^ NULL b ^ 0b1011 0x31393838 ^ b NULL ^ b 0b1011 ^ b BIT_COUNT(b) ~b b << 1 b >> 1
428432
941 56 NULL 9 56 NULL 9 2047 825835453 NULL 1983 825835453 NULL 1983 1106 825835397 NULL 1974 825835397 NULL 1974 9 18446744073709549634 3962 990
@@ -473,6 +477,7 @@ Warnings:
473477
Warning 1287 Bitwise operations on BINARY will change behaviour in a future version, check the 'Bit functions' section in the manual.
474478
Warning 1287 Bitwise operations on BINARY will change behaviour in a future version, check the 'Bit functions' section in the manual.
475479
Warning 1287 Bitwise operations on BINARY will change behaviour in a future version, check the 'Bit functions' section in the manual.
480+
RESET QUERY CACHE;
476481
EXECUTE s2;
477482
BIT_AND(b) BIT_OR(b) BIT_XOR(b)
478483
1981 1981 1981
@@ -496,6 +501,7 @@ Warnings:
496501
Warning 1287 Bitwise operations on BINARY will change behaviour in a future version, check the 'Bit functions' section in the manual.
497502
Warning 1287 Bitwise operations on BINARY will change behaviour in a future version, check the 'Bit functions' section in the manual.
498503
Warning 1287 Bitwise operations on BINARY will change behaviour in a future version, check the 'Bit functions' section in the manual.
504+
RESET QUERY CACHE;
499505
EXECUTE s2;
500506
BIT_AND(b) BIT_OR(b) BIT_XOR(b)
501507
1920 2047 127
@@ -576,6 +582,7 @@ Warning 1287 Bitwise operations on BINARY will change behaviour in a future vers
576582
Warning 1287 Bitwise operations on BINARY will change behaviour in a future version, check the 'Bit functions' section in the manual.
577583
Warning 1287 Bitwise operations on BINARY will change behaviour in a future version, check the 'Bit functions' section in the manual.
578584
Warning 1287 Bitwise operations on BINARY will change behaviour in a future version, check the 'Bit functions' section in the manual.
585+
RESET QUERY CACHE;
579586
SELECT * from v1;
580587
b & c b & 0x31393838 b & NULL b & 0b1011 0x31393838 & b NULL & b 0b1011 & b b | c b | 0x31393838 b | NULL b | 0b1011 0x31393838 | b NULL | b 0b1011 | b b ^ c b ^ 0x31393838 b ^ NULL b ^ 0b1011 0x31393838 ^ b NULL ^ b 0b1011 ^ b BIT_COUNT(b) ~b b << 1 b >> 1
581588
941 56 NULL 9 56 NULL 9 2047 825835453 NULL 1983 825835453 NULL 1983 1106 825835397 NULL 1974 825835397 NULL 1974 9 18446744073709549634 3962 990
@@ -627,6 +634,7 @@ Warnings:
627634
Warning 1287 Bitwise operations on BINARY will change behaviour in a future version, check the 'Bit functions' section in the manual.
628635
Warning 1287 Bitwise operations on BINARY will change behaviour in a future version, check the 'Bit functions' section in the manual.
629636
Warning 1287 Bitwise operations on BINARY will change behaviour in a future version, check the 'Bit functions' section in the manual.
637+
RESET QUERY CACHE;
630638
SELECT * from v2;
631639
BIT_AND(b) BIT_OR(b) BIT_XOR(b)
632640
1981 1981 1981
@@ -651,6 +659,7 @@ Warnings:
651659
Warning 1287 Bitwise operations on BINARY will change behaviour in a future version, check the 'Bit functions' section in the manual.
652660
Warning 1287 Bitwise operations on BINARY will change behaviour in a future version, check the 'Bit functions' section in the manual.
653661
Warning 1287 Bitwise operations on BINARY will change behaviour in a future version, check the 'Bit functions' section in the manual.
662+
RESET QUERY CACHE;
654663
SELECT * from v3;
655664
BIT_AND(b) BIT_OR(b) BIT_XOR(b)
656665
1920 2047 127

mysql-test/t/func_bitwise_ops.test

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -443,12 +443,6 @@ SELECT _set ^ x'cafebabe' FROM at;
443443
SELECT HEX(_bin & _bin), HEX(_bin & _vbn), HEX(_vbn & _bin), HEX(_vbn & _vbn) FROM at;
444444
SELECT HEX(_bin | _bin), HEX(_bin | _vbn), HEX(_vbn | _bin), HEX(_vbn | _vbn) FROM at;
445445
SELECT HEX(_bin ^ _bin), HEX(_bin ^ _vbn), HEX(_vbn ^ _bin), HEX(_vbn ^ _vbn) FROM at;
446-
447-
--error ER_TRUNCATED_WRONG_VALUE
448-
INSERT INTO at(_bin) (SELECT _bin ^ x'cafebabe' FROM at);
449-
--echo #Turn strict mode OFF
450-
--source include/turn_off_strict_mode.inc
451-
INSERT INTO at(_bin) (SELECT _bin ^ x'cafebabe' FROM at);
452446
DROP TABLE at;
453447

454448
--echo #

mysql-test/t/varbinary.test

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -187,20 +187,23 @@ BIT_COUNT(b), ~b, b << 1, b >> 1
187187
FROM t1;
188188

189189
CALL test_bin_op();
190+
RESET QUERY CACHE;
190191
CALL test_bin_op();
191192
DROP PROCEDURE test_bin_op;
192193

193194
CREATE PROCEDURE test_bin_op()
194195
SELECT BIT_AND(b), BIT_OR(b), BIT_XOR(b) FROM t1 GROUP BY a;
195196

196197
CALL test_bin_op();
198+
RESET QUERY CACHE;
197199
CALL test_bin_op();
198200
DROP PROCEDURE test_bin_op;
199201

200202
CREATE PROCEDURE test_bin_op()
201203
SELECT BIT_AND(b), BIT_OR(b), BIT_XOR(b) FROM t1;
202204

203205
CALL test_bin_op();
206+
RESET QUERY CACHE;
204207
CALL test_bin_op();
205208
DROP PROCEDURE test_bin_op;
206209

@@ -220,14 +223,17 @@ BIT_COUNT(b), ~b, b << 1, b >> 1
220223
FROM t1;";
221224

222225
EXECUTE s1;
226+
RESET QUERY CACHE;
223227
EXECUTE s1;
224228

225229
PREPARE s2 from "SELECT BIT_AND(b), BIT_OR(b), BIT_XOR(b) FROM t1 GROUP BY a";
226230
EXECUTE s2;
231+
RESET QUERY CACHE;
227232
EXECUTE s2;
228233

229234
PREPARE s2 from "SELECT BIT_AND(b), BIT_OR(b), BIT_XOR(b) FROM t1";
230235
EXECUTE s2;
236+
RESET QUERY CACHE;
231237
EXECUTE s2;
232238

233239
--echo #
@@ -245,16 +251,19 @@ b ^ c, b ^ 0x31393838, b ^ NULL, b ^ 0b1011,
245251
BIT_COUNT(b), ~b, b << 1, b >> 1
246252
FROM t1;
247253
SELECT * from v1;
254+
RESET QUERY CACHE;
248255
SELECT * from v1;
249256

250257
CREATE VIEW v2 AS
251258
SELECT BIT_AND(b), BIT_OR(b), BIT_XOR(b) FROM t1 GROUP BY a;
252259
SELECT * from v2;
260+
RESET QUERY CACHE;
253261
SELECT * from v2;
254262

255263
CREATE VIEW v3 AS
256264
SELECT BIT_AND(b), BIT_OR(b), BIT_XOR(b) FROM t1;
257265
SELECT * from v3;
266+
RESET QUERY CACHE;
258267
SELECT * from v3;
259268

260269
DROP VIEW v1,v2,v3;

0 commit comments

Comments
 (0)