Skip to content

Commit 09dac82

Browse files
committed
WL#6372 : Post-Iris changes to Server defaults
Details: - Implemented default changes for: - table_open_cache - table_definition_cache - open_files_limit - thread_cache_size - host_cache_size - query_cache_size - query_cache_type
1 parent 3e1f88a commit 09dac82

File tree

88 files changed

+3869
-131
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

88 files changed

+3869
-131
lines changed

mysql-test/include/Load_data.inc

+14
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
--echo ===============
2+
--echo Load the data
3+
--echo ===============
4+
5+
SET @col_1 = repeat('a', 10);
6+
7+
while ($i) {
8+
9+
eval INSERT INTO $table
10+
VALUES (@col_1);
11+
dec $i;
12+
}
13+
commit;
14+

mysql-test/include/create_table.inc

+8
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
--echo ===============
2+
--echo create table & Index
3+
--echo ===============
4+
5+
eval CREATE TABLE $table (col_1 text(10))
6+
ENGINE=INNODB ;
7+
8+
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
perl;
2+
my $dir = $ENV{'MYSQLD_DATADIR'};
3+
my $size;
4+
opendir(DIR, $dir) or die $!;
5+
while (my $file = readdir(DIR))
6+
{
7+
8+
next unless ($file =~ m/\ib_logfile.$/);
9+
$size = -s "$dir/$file";
10+
print "The size of the ib_logfile(0/1): $size \n";
11+
}
12+
close(DIR);
13+
exit(0)
14+
EOF

mysql-test/include/mtr_warnings.sql

+3
Original file line numberDiff line numberDiff line change
@@ -239,6 +239,9 @@ INSERT INTO global_suppressions VALUES
239239
of events, this warning is emitted.
240240
*/
241241
("Slave SQL: Coordinator thread of multi-threaded slave is being stopped in the middle of assigning a group of events.*"),
242+
243+
("Changed limits: max_open_files: * max_connections: * table_cache: *"),
244+
("Could not increase number of max_open_files to more than *"),
242245

243246
("THE_LAST_SUPPRESSION")||
244247

mysql-test/include/mysqld--help.inc

+1-1
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ perl;
1818
# their paths may vary:
1919
@skipvars=qw/basedir open-files-limit general-log-file log plugin-dir
2020
log-slow-queries pid-file slow-query-log-file
21-
datadir slave-load-tmpdir tmpdir socket/;
21+
datadir slave-load-tmpdir tmpdir socket table-definition-cache table-open-cache/;
2222

2323
# Plugins which may or may not be there:
2424
@plugins=qw/innodb ndb ndbinfo archive blackhole federated partition ndbcluster debug temp-pool ssl des-key-file
+26
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
--echo Check the size of the vardir
2+
--echo The output size is in unit blocks
3+
perl;
4+
#!/usr/bin/perl
5+
use warnings;
6+
use strict;
7+
use File::Find;
8+
my $dir = $ENV{'MYSQLTEST_VARDIR'};
9+
my $size = 0;
10+
find( sub { $size += -f $_ ? -s _ : 0 }, $dir );
11+
12+
if ( $size < 1717987000 )
13+
{ print "TRUE", "\n";}
14+
else
15+
{ print "FALSE $size", "\n";}
16+
17+
18+
## Expected size for the VAR dir being changed for the PB2 runs
19+
20+
##if ( $size =~ /^496[\d]{5}$/ )
21+
## {
22+
## { print "TRUE", "\n";}
23+
## }
24+
##else
25+
## { print "FALSE $size", "\n";}
26+
EOF
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,73 @@
1+
'#________________________VAR_09_INNODB_LOG_FILE_SIZE__________________#'
2+
echo '##'
3+
--echo '#---------------------WL6372_VAR_9_01----------------------#'
4+
####################################################################
5+
# Checking default value #
6+
####################################################################
7+
SELECT COUNT(@@GLOBAL.innodb_log_file_size)
8+
1 Expected
9+
SELECT @@GLOBAL.innodb_log_file_size;
10+
@@GLOBAL.innodb_log_file_size
11+
5242880
12+
5242880 Expected
13+
'#---------------------WL6372_VAR_9_02----------------------#'
14+
SET @@local.innodb_log_file_size=1;
15+
ERROR HY000: Variable 'innodb_log_file_size' is a read only variable
16+
Expected error 'Read only variable'
17+
SET @@session.innodb_log_file_size=1;
18+
ERROR HY000: Variable 'innodb_log_file_size' is a read only variable
19+
Expected error 'Read only variable'
20+
SET @@GLOBAL.innodb_log_file_size=1;
21+
ERROR HY000: Variable 'innodb_log_file_size' is a read only variable
22+
Expected error 'Read only variable'
23+
SET @@GLOBAL.innodb_log_file_size=DEFAULT;
24+
ERROR HY000: Variable 'innodb_log_file_size' is a read only variable
25+
Expected error 'Read only variable'
26+
SELECT COUNT(@@GLOBAL.innodb_log_file_size);
27+
COUNT(@@GLOBAL.innodb_log_file_size)
28+
1
29+
1 Expected
30+
'#---------------------WL6372_VAR_9_03----------------------#'
31+
SELECT @@GLOBAL.innodb_log_file_size = VARIABLE_VALUE
32+
FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES
33+
WHERE VARIABLE_NAME='innodb_log_file_size';
34+
@@GLOBAL.innodb_log_file_size = VARIABLE_VALUE
35+
1
36+
1 Expected
37+
SELECT COUNT(@@GLOBAL.innodb_log_file_size);
38+
COUNT(@@GLOBAL.innodb_log_file_size)
39+
1
40+
1 Expected
41+
SELECT COUNT(VARIABLE_VALUE)
42+
FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES
43+
WHERE VARIABLE_NAME='innodb_log_file_size';
44+
COUNT(VARIABLE_VALUE)
45+
1
46+
1 Expected
47+
'#---------------------WL6372_VAR_9_04----------------------#'
48+
SELECT @@innodb_log_file_size = @@GLOBAL.innodb_log_file_size;
49+
@@innodb_log_file_size = @@GLOBAL.innodb_log_file_size
50+
1
51+
1 Expected
52+
SELECT COUNT(@@local.innodb_log_file_size);
53+
ERROR HY000: Variable 'innodb_log_file_size' is a GLOBAL variable
54+
Expected error 'Variable is a GLOBAL variable'
55+
SELECT COUNT(@@SESSION.innodb_log_file_size);
56+
ERROR HY000: Variable 'innodb_log_file_size' is a GLOBAL variable
57+
Expected error 'Variable is a GLOBAL variable'
58+
SELECT COUNT(@@GLOBAL.innodb_log_file_size);
59+
COUNT(@@GLOBAL.innodb_log_file_size)
60+
1
61+
1 Expected
62+
SELECT innodb_log_file_size = @@SESSION.innodb_log_file_size;
63+
ERROR 42S22: Unknown column 'innodb_log_file_size' in 'field list'
64+
Expected error 'Unknown column innodb_log_file_size in field list'
65+
'#---------------------WL6372_VAR_9_05----------------------#'
66+
Check the size of the vardir
67+
The output size is in unit blocks
68+
TRUE
69+
TRUE Expected
70+
'#---------------------WL6372_VAR_9_06----------------------#'
71+
The size of the ib_logfile(0/1): 5242880
72+
The size of the ib_logfile(0/1): 5242880
73+
5242880 expected

mysql-test/r/innodb_mysql_sync.result

+1-1
Original file line numberDiff line numberDiff line change
@@ -297,7 +297,7 @@ ERROR HY000: Lock wait timeout exceeded; try restarting transaction
297297
SET DEBUG_SYNC= 'now SIGNAL continue2';
298298
SET DEBUG_SYNC= 'now WAIT_FOR binlog';
299299
# Now both reads and writes should be blocked.
300-
SELECT * FROM t1;
300+
SELECT * FROM t1 limit 1;
301301
ERROR HY000: Lock wait timeout exceeded; try restarting transaction
302302
INSERT INTO t1 VALUES (5,5);
303303
ERROR HY000: Lock wait timeout exceeded; try restarting transaction

mysql-test/r/lowercase_table_qcache.result

+1-1
Original file line numberDiff line numberDiff line change
@@ -21,4 +21,4 @@ select * from MySQL.db;
2121
show status like "Qcache_queries_in_cache";
2222
Variable_name Value
2323
Qcache_queries_in_cache 0
24-
set GLOBAL query_cache_size=0;
24+
set GLOBAL query_cache_size=DEFAULT;

mysql-test/r/merge.result

+3
Original file line numberDiff line numberDiff line change
@@ -2414,6 +2414,8 @@ End of 5.1 tests
24142414
#
24152415
drop table if exists t_parent;
24162416
set @save_table_definition_cache=@@global.table_definition_cache;
2417+
set @save_table_open_cache=@@global.table_open_cache;
2418+
set @@global.table_open_cache=400;
24172419
#
24182420
# Set @@global.table_definition_cache to minimum
24192421
#
@@ -2442,6 +2444,7 @@ deallocate prepare stmt;
24422444
#
24432445
drop table t_parent;
24442446
set @@global.table_definition_cache=@save_table_definition_cache;
2447+
set @@global.table_open_cache=@save_table_open_cache;
24452448
DROP DATABASE IF EXISTS mysql_test1;
24462449
CREATE DATABASE mysql_test1;
24472450
CREATE TABLE t1 ... DATA DIRECTORY=... INDEX DIRECTORY=...

mysql-test/r/mysqld--help-notwin.result

+4-6
Original file line numberDiff line numberDiff line change
@@ -1027,7 +1027,7 @@ general-log FALSE
10271027
group-concat-max-len 1024
10281028
gtid-mode OFF
10291029
help TRUE
1030-
host-cache-size 128
1030+
host-cache-size 279
10311031
ignore-builtin-innodb FALSE
10321032
init-connect
10331033
init-file (No default value)
@@ -1172,8 +1172,8 @@ profiling-history-size 15
11721172
query-alloc-block-size 8192
11731173
query-cache-limit 1048576
11741174
query-cache-min-res-unit 4096
1175-
query-cache-size 0
1176-
query-cache-type ON
1175+
query-cache-size 1048576
1176+
query-cache-type OFF
11771177
query-cache-wlock-invalidate FALSE
11781178
query-prealloc-size 8192
11791179
range-alloc-block-size 4096
@@ -1230,11 +1230,9 @@ sync-master-info 10000
12301230
sync-relay-log 10000
12311231
sync-relay-log-info 10000
12321232
sysdate-is-now FALSE
1233-
table-definition-cache 400
1234-
table-open-cache 400
12351233
table-open-cache-instances 1
12361234
tc-heuristic-recover COMMIT
1237-
thread-cache-size 0
1235+
thread-cache-size 9
12381236
thread-handling one-thread-per-connection
12391237
thread-stack 262144
12401238
time-format %H:%i:%s

mysql-test/r/mysqld--help-win.result

+4-6
Original file line numberDiff line numberDiff line change
@@ -1035,7 +1035,7 @@ general-log FALSE
10351035
group-concat-max-len 1024
10361036
gtid-mode OFF
10371037
help TRUE
1038-
host-cache-size 128
1038+
host-cache-size 279
10391039
ignore-builtin-innodb FALSE
10401040
init-connect
10411041
init-file (No default value)
@@ -1180,8 +1180,8 @@ profiling-history-size 15
11801180
query-alloc-block-size 8192
11811181
query-cache-limit 1048576
11821182
query-cache-min-res-unit 4096
1183-
query-cache-size 0
1184-
query-cache-type ON
1183+
query-cache-size 1048576
1184+
query-cache-type OFF
11851185
query-cache-wlock-invalidate FALSE
11861186
query-prealloc-size 8192
11871187
range-alloc-block-size 4096
@@ -1241,11 +1241,9 @@ sync-master-info 10000
12411241
sync-relay-log 10000
12421242
sync-relay-log-info 10000
12431243
sysdate-is-now FALSE
1244-
table-definition-cache 400
1245-
table-open-cache 400
12461244
table-open-cache-instances 1
12471245
tc-heuristic-recover COMMIT
1248-
thread-cache-size 0
1246+
thread-cache-size 9
12491247
thread-handling one-thread-per-connection
12501248
thread-stack 262144
12511249
time-format %H:%i:%s

mysql-test/r/query_cache.result

+1-1
Original file line numberDiff line numberDiff line change
@@ -1637,7 +1637,7 @@ Variable_name Value
16371637
Qcache_queries_in_cache 1
16381638
drop database db2;
16391639
drop database db3;
1640-
set GLOBAL query_cache_type=default;
1640+
set GLOBAL query_cache_type=1;
16411641
set GLOBAL query_cache_limit=default;
16421642
set GLOBAL query_cache_min_res_unit=default;
16431643
set GLOBAL query_cache_size=default;

mysql-test/r/query_cache_debug.result

-1
Original file line numberDiff line numberDiff line change
@@ -221,4 +221,3 @@ SET DEBUG_SYNC= 'RESET';
221221
RESET QUERY CACHE;
222222
DROP TABLE t1;
223223
SET GLOBAL query_cache_size= DEFAULT;
224-
SET GLOBAL query_cache_type= DEFAULT;

mysql-test/r/query_cache_disabled.result

+1-1
Original file line numberDiff line numberDiff line change
@@ -11,4 +11,4 @@ SET GLOBAL query_cache_size=1024*1024;
1111
SHOW GLOBAL VARIABLES LIKE 'query_cache_size';
1212
Variable_name Value
1313
query_cache_size 1048576
14-
SET GLOBAL query_cache_size=0;
14+
SET GLOBAL query_cache_size=DEFAULT;

mysql-test/r/query_cache_merge.result

+1-1
Original file line numberDiff line numberDiff line change
@@ -1690,6 +1690,6 @@ DROP TABLE t4;
16901690
DROP TABLE t3;
16911691
DROP TABLE t2;
16921692
DROP TABLE t1;
1693-
SET @@global.query_cache_size = 0;
1693+
SET @@global.query_cache_size = DEFAULT;
16941694
SET @@global.table_definition_cache = @save_table_definition_cache;
16951695
End of 5.1 tests

mysql-test/r/query_cache_notembedded.result

-1
Original file line numberDiff line numberDiff line change
@@ -380,7 +380,6 @@ Qcache_queries_in_cache 1
380380
USE test;
381381
DROP DATABASE bug30269;
382382
DROP USER 'bug30269'@'localhost';
383-
set GLOBAL query_cache_type=default;
384383
set GLOBAL query_cache_limit=default;
385384
set GLOBAL query_cache_min_res_unit=default;
386385
set GLOBAL query_cache_size=default;

0 commit comments

Comments
 (0)