~ubuntu-branches/ubuntu/trusty/mysql-5.6/trusty

« back to all changes in this revision

Viewing changes to mysql-test/t/ssl.test

  • Committer: Package Import Robot
  • Author(s): James Page
  • Date: 2014-02-12 11:54:27 UTC
  • Revision ID: package-import@ubuntu.com-20140212115427-oq6tfsqxl1wuwehi
Tags: upstream-5.6.15
ImportĀ upstreamĀ versionĀ 5.6.15

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
#Want to skip this test from daily Valgrind execution
 
2
--source include/no_valgrind_without_big.inc
 
3
# Turn on ssl between the client and server
 
4
# and run a number of tests
 
5
 
 
6
-- source include/have_ssl_communication.inc
 
7
 
 
8
# Save the initial number of concurrent sessions
 
9
--source include/count_sessions.inc
 
10
 
 
11
connect (ssl_con,localhost,root,,,,,SSL);
 
12
 
 
13
# Check ssl turned on
 
14
SHOW STATUS LIKE 'Ssl_cipher';
 
15
 
 
16
# Check ssl expiration
 
17
SHOW STATUS LIKE 'Ssl_server_not_before';
 
18
SHOW STATUS LIKE 'Ssl_server_not_after';
 
19
 
 
20
# Source select test case
 
21
-- source include/common-tests.inc
 
22
 
 
23
# Check ssl turned on
 
24
SHOW STATUS LIKE 'Ssl_cipher';
 
25
 
 
26
connection default;
 
27
disconnect ssl_con;
 
28
 
 
29
--echo #
 
30
--echo # Bug#54790: Use of non-blocking mode for sockets limits performance
 
31
--echo #
 
32
 
 
33
--echo # Open ssl_con and set a timeout.
 
34
connect (ssl_con,localhost,root,,,,,SSL);
 
35
 
 
36
LET $ID= `SELECT connection_id()`;
 
37
SET @@SESSION.wait_timeout = 2;
 
38
 
 
39
--echo # Wait for ssl_con to be disconnected.
 
40
connection default;
 
41
let $wait_condition=
 
42
  SELECT COUNT(*) = 0 FROM INFORMATION_SCHEMA.PROCESSLIST
 
43
  WHERE ID = $ID;
 
44
--source include/wait_condition.inc
 
45
 
 
46
--echo # Check that ssl_con has been disconnected.
 
47
connection ssl_con;
 
48
--echo # CR_SERVER_LOST, CR_SERVER_GONE_ERROR
 
49
--error 2006,2013
 
50
SELECT 1;
 
51
 
 
52
connection default;
 
53
disconnect ssl_con;
 
54
 
 
55
# Wait till all disconnects are completed
 
56
--source include/wait_until_count_sessions.inc
 
57
 
 
58
##  This test file is for testing encrypted communication only, not other
 
59
##  encryption routines that the SSL library happens to provide!