File: deprecation_56.test

package info (click to toggle)
mysql-8.0 8.0.43-3
  • links: PTS, VCS
  • area: main
  • in suites: sid
  • size: 1,273,924 kB
  • sloc: cpp: 4,684,605; ansic: 412,450; pascal: 108,398; java: 83,641; perl: 30,221; cs: 27,067; sql: 26,594; sh: 24,181; python: 21,816; yacc: 17,169; php: 11,522; xml: 7,388; javascript: 7,076; makefile: 2,194; lex: 1,075; awk: 670; asm: 520; objc: 183; ruby: 97; lisp: 86
file content (123 lines) | stat: -rw-r--r-- 3,854 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
113
114
115
116
117
118
119
120
121
122
123
# The test needs myisam as innodb does not support system tables
--source include/big_test.inc
--source include/not_valgrind.inc
--source include/force_myisam_default.inc
--source include/have_myisam.inc
--source include/have_profiling.inc
--source include/have_validate_password_plugin.inc
--source include/mysql_upgrade_preparation.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.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);
  # Truncate the log file so that repititions of the test don't pick up deprecation warnings from previous runs
  open(FILE,">$logf") or die("Unable to open $logf for truncation $!\n");
  close(FILE);
EOF

--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);

--let $restart_parameters = restart: --upgrade=FORCE
--let $wait_counter= 10000
--source include/restart_mysqld.inc

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;

--let $restart_parameters = restart: --upgrade=FORCE
--let $wait_counter= 10000
--source include/restart_mysqld.inc

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

--let $restart_parameters = restart: --upgrade=FORCE
--let $wait_counter= 10000
--source include/restart_mysqld.inc

--echo # End of 5.6 tests


--echo #
--echo # WL#6802: Deprecate the INFORMATION_SCHEMA.PROFILING table
--echo #

SELECT * FROM INFORMATION_SCHEMA.profiling;

--source include/mysql_upgrade_cleanup.inc


--echo # End of 5.7 tests