File: ssl-big.test

package info (click to toggle)
mysql-dfsg-5.0 5.0.51a-24%2Blenny5
  • links: PTS, VCS
  • area: main
  • in suites: lenny
  • size: 106,168 kB
  • ctags: 94,516
  • sloc: cpp: 447,179; ansic: 411,410; perl: 38,307; sh: 37,449; tcl: 30,484; pascal: 14,851; yacc: 8,559; makefile: 5,078; java: 4,610; xml: 3,953; sql: 2,920; awk: 1,338; asm: 1,061; sed: 772
file content (56 lines) | stat: -rw-r--r-- 1,272 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
# Turn on ssl between the client and server
# and run a number of tests

-- source include/have_ssl.inc
-- source include/big_test.inc

--disable_warnings
DROP TABLE IF EXISTS t1, t2;
--enable_warnings

#
# Bug #29579 Clients using SSL can hang the server
#

connect (ssl_con,localhost,root,,,,,SSL);

create table t1 (a int);

disconnect ssl_con;

  
--disable_query_log
--disable_result_log

let $count= 2000;
while ($count)
{
  connect (ssl_con,localhost,root,,,,,SSL);
  
  eval insert into t1 values ($count);
  dec $count;
  
  # This select causes the net buffer to fill as the server sends the results 
  # but the client doesn't reap the results. The results are larger each time
  # through the loop, so that eventually the buffer is completely full
  # at the exact moment the server attempts to the close the connection with
  # the lock held.
  send select * from t1;
  
  # now send the quit the command so the server will initiate the shutdown.
  send_quit ssl_con; 
  
  # if the server is hung, this will hang too:
  connect (ssl_con2,localhost,root,,,,,SSL);
  
  # no hang if we get here, close and retry
  disconnect ssl_con2;
  disconnect ssl_con;
}  
--enable_query_log
--enable_result_log

connect (ssl_con,localhost,root,,,,,SSL);

drop table t1;