File: wl6443_deprecation.test

package info (click to toggle)
percona-xtrabackup 2.2.3-2.1
  • links: PTS
  • area: main
  • in suites: jessie, jessie-kfreebsd
  • size: 293,260 kB
  • ctags: 146,881
  • sloc: cpp: 1,051,960; ansic: 570,217; java: 54,595; perl: 53,495; pascal: 44,194; sh: 27,826; yacc: 15,314; python: 12,142; xml: 7,848; sql: 4,125; makefile: 1,459; awk: 785; lex: 758
file content (112 lines) | stat: -rw-r--r-- 3,709 bytes parent folder | download
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
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
106
107
108
109
110
111
112
--source include/not_embedded.inc
--source include/have_validate_password_plugin.inc

# Warning is generated when default file (NULL) is used
CALL mtr.add_suppression("Dictionary file not specified");

--echo #
--echo # Tests for deprecation warnings introduced by wl#6443
--echo #

--echo # System variables

select @@global.max_tmp_tables;
select @@local.max_tmp_tables;
set @default_max_tmp_tables= @@global.max_tmp_tables;
select @@global.date_format;
select @@global.time_format;
select @@global.datetime_format;
set @@global.max_tmp_tables= 64;
set @@global.max_tmp_tables= @@global.max_tmp_tables;
set @@global.max_tmp_tables= @default_max_tmp_tables;
select @@global.profiling;
select @@local.profiling;
select @@global.profiling_history_size;
select @@local.profiling_history_size;
select @@global.have_profiling;
set @@local.profiling= @@global.profiling;
set @@local.profiling_history_size= @@global.profiling_history_size;
set @wl6443_have_profiling= @@global.have_profiling;

--echo # SHOW PROFILE and SHOW PROFILES

SHOW PROFILE;
SHOW PROFILE ALL;
SHOW PROFILE IPC;
SHOW PROFILES;

--echo # --plugin-xyz

--replace_regex /\.dll/.so/
eval INSTALL PLUGIN validate_password SONAME '$VALIDATE_PASSWORD';

--echo # restarting the server

# Write file to make mysql-test-run.pl wait for the server to stop
--exec echo "wait" > $MYSQLTEST_VARDIR/tmp/mysqld.1.expect

# Request shutdown
-- send_shutdown

# Call script that will poll the server waiting for it to disapear
-- source include/wait_until_disconnected.inc

--echo # Restart server.

--exec echo "restart:--plugin-validate-password-length=8" > $MYSQLTEST_VARDIR/tmp/mysqld.1.expect

# Turn on reconnect
--enable_reconnect

# Call script that will poll the server waiting for it to be back online again
--source include/wait_until_connected_again.inc

# Turn off reconnect again
--disable_reconnect

UNINSTALL PLUGIN validate_password;

--echo # Search for deprecation warnings in error log.
--echo # YMMDD HH:MM:SS [Warning] The syntax 'plugin-validate-password-length' is deprecated and will be removed in a future release. Please use validate-password-length instead.
--let $log_file= $MYSQLTEST_VARDIR/log/mysqld.1.err
--let LOGF= $log_file

perl;
  use strict;
  my $logf= $ENV{'LOGF'} or die "LOGF not set";
  open(FILE, "$logf") or die("Unable to open $logf: $!\n");
  my $count_warnings= grep(/\[Warning\] The syntax 'plugin-validate-password-length' is deprecated and will be removed in a future release\. Please use validate-password-length instead\./gi,<FILE>);
  my $count_warnings= $count_warnings;
  print "Deprecation warning count : $count_warnings\n";
  close(FILE);
EOF

-- source include/mysql_upgrade_preparation.inc

--echo # Host table deprecation
select count(*) from information_schema.tables where table_name like 'host' and table_schema like 'mysql' and table_type like 'BASE TABLE';

create table mysql.host(c1 int) engine MyISAM;
insert into mysql.host values(1);

--exec $MYSQL_UPGRADE --skip-verbose 2>&1
# It should have created a file in the MySQL Servers datadir
let $MYSQLD_DATADIR= `select @@datadir`;
file_exists $MYSQLD_DATADIR/mysql_upgrade_info;

drop table mysql.host;
create view mysql.host as select HOST from mysql.db;
create user 'wl6443_u1'@'10.10.10.1' identified by 'sql';
select count(*) from mysql.host;

--exec $MYSQL_UPGRADE --skip-verbose --force 2>&1
# It should have created a file in the MySQL Servers datadir
file_exists $MYSQLD_DATADIR/mysql_upgrade_info;

# Clean Up
drop view mysql.host;
drop user 'wl6443_u1'@'10.10.10.1';

--exec $MYSQL_UPGRADE --skip-verbose --force 2>&1
# It should have created a file in the MySQL Servers datadir
file_exists $MYSQLD_DATADIR/mysql_upgrade_info;