Skip to content

Commit 526cf61

Browse files
grooverdandr-m
authored andcommitted
MDEV-39829/MDEV-33532 s3.debug test failure
MDEV-39516 corrected the interface with curl particularly around passing options. After this the s3.debug actually enabled curl debugging like is was meant to. With this enabled, there are addition s3_test_ pattens in the result file, from the error log where curl correctly provide debug message. ps-protocol test also failed under MDEV-33532 where a differnet number of entries was recored. Correct variations by using the $database/$table rather than just the s3_test_ pattern. As the purpose of this test is to check if s3_debug is dynamic, the second part of the test searches for a previously, under s3_debug=1, table t2 interaction, where the results should be NOT_FOUND. Remove count from the result file to allow for different curl versions and the possibiliy of being run under ps-protocol.
1 parent 2c40efe commit 526cf61

2 files changed

Lines changed: 21 additions & 10 deletions

File tree

mysql-test/suite/s3/debug.result

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,12 @@ drop table if exists t1;
22
#
33
# MDEV-32884 Make s3_debug dynamic
44
#
5+
set @save_s3_debug=@@global.s3_debug;
56
create or replace table t1 (a int, b int, c varchar(1000), key (a), key(c)) engine=aria;
67
insert into t1 select seq, seq+10, repeat(char(65+ mod(seq, 20)),mod(seq,1000)) from seq_1_to_100;
8+
create table t2 as select * from t1;
79
alter table t1 engine=s3;
10+
alter table t2 engine=s3;
811
show create table t1;
912
Table Create Table
1013
t1 CREATE TABLE `t1` (
@@ -17,16 +20,17 @@ t1 CREATE TABLE `t1` (
1720
select count(*) from t1;
1821
count(*)
1922
100
20-
flush table t1;
21-
NOT FOUND /s3_test_/ in mysqld.1.err
23+
flush table t1, t2;
24+
NOT FOUND matches in mysqld.1.err
2225
set @@global.s3_debug=1;
2326
select count(*) from t1;
2427
count(*)
2528
100
2629
set @@global.s3_debug=0;
27-
FOUND 8 /s3_test_/ in mysqld.1.err
28-
select count(*) from t1;
30+
FOUND NUMBER matches in mysqld.1.err
31+
select count(*) from t2;
2932
count(*)
3033
100
31-
drop table t1;
32-
FOUND 8 /s3_test_/ in mysqld.1.err
34+
drop table t1, t2;
35+
NOT FOUND matches in mysqld.1.err
36+
set @@global.s3_debug=@save_s3_debug;

mysql-test/suite/s3/debug.test

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,22 +13,29 @@ drop table if exists t1;
1313
--echo # MDEV-32884 Make s3_debug dynamic
1414
--echo #
1515

16+
set @save_s3_debug=@@global.s3_debug;
1617
create or replace table t1 (a int, b int, c varchar(1000), key (a), key(c)) engine=aria;
1718
insert into t1 select seq, seq+10, repeat(char(65+ mod(seq, 20)),mod(seq,1000)) from seq_1_to_100;
19+
create table t2 as select * from t1;
1820
alter table t1 engine=s3;
21+
alter table t2 engine=s3;
1922
show create table t1;
2023
select count(*) from t1;
21-
flush table t1;
24+
flush table t1, t2;
2225

2326
--let SEARCH_FILE=$MYSQLTEST_VARDIR/log/mysqld.1.err
24-
--let SEARCH_PATTERN=s3_test_
27+
--let SEARCH_PATTERN=$database/t1
28+
--let SEARCH_OUTPUT=count
2529
--source include/search_pattern_in_file.inc
2630
set @@global.s3_debug=1;
2731
select count(*) from t1;
2832
set @@global.s3_debug=0;
33+
--replace_regex / [0-9]+/ NUMBER/
2934
--source include/search_pattern_in_file.inc
30-
select count(*) from t1;
31-
drop table t1;
35+
select count(*) from t2;
36+
drop table t1, t2;
37+
--let SEARCH_PATTERN=$database/t2
3238
--source include/search_pattern_in_file.inc
3339

40+
set @@global.s3_debug=@save_s3_debug;
3441
--source drop_database.inc

0 commit comments

Comments
 (0)