~ubuntu-branches/ubuntu/precise/mysql-5.1/precise

« back to all changes in this revision

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

  • Committer: Bazaar Package Importer
  • Author(s): Norbert Tretkowski
  • Date: 2010-03-17 14:56:02 UTC
  • Revision ID: james.westby@ubuntu.com-20100317145602-x7e30l1b2sb5s6w6
Tags: upstream-5.1.45
ImportĀ upstreamĀ versionĀ 5.1.45

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
# We currently only have shm support on windows, so in order
 
2
# to optimize things we skip this test on all other platforms
 
3
--source include/windows.inc
 
4
 
 
5
# Only run this test if shared memory is avaliable
 
6
let $shm= query_get_value("SHOW VARIABLES LIKE 'shared_memory'", Value, 1);
 
7
if (`SELECT '$shm' != 'ON'`){
 
8
  skip No shm support;
 
9
}
 
10
 
 
11
# Source select test case
 
12
-- source include/common-tests.inc
 
13
 
 
14
#
 
15
# Bug #24924: shared-memory-base-name that is too long causes buffer overflow
 
16
#
 
17
--exec $MYSQLADMIN --no-defaults --user=root --host=127.0.0.1 --port=$MASTER_MYPORT --shared-memory-base-name=HeyMrBaseNameXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX ping
 
18
 
 
19
#
 
20
# Bug #33899: Deadlock in mysql_real_query with shared memory connections
 
21
#
 
22
 
 
23
let $name= query_get_value("SHOW GLOBAL VARIABLES LIKE 'shared_memory_base_name'", Value, 1);
 
24
let $stmt= `SELECT REPEAT('a', 2048)`;
 
25
 
 
26
SET @max_allowed_packet= @@global.max_allowed_packet;
 
27
SET @net_buffer_length= @@global.net_buffer_length;
 
28
 
 
29
SET GLOBAL max_allowed_packet= 1024;
 
30
SET GLOBAL net_buffer_length= 1024;
 
31
 
 
32
--error 1
 
33
--exec echo SELECT '$stmt'| $MYSQL --protocol=memory --shared-memory-base-name=$name 2>&1
 
34
 
 
35
SET GLOBAL max_allowed_packet= @max_allowed_packet;
 
36
SET GLOBAL net_buffer_length= @net_buffer_length;
 
37
 
 
38
--echo End of 5.0 tests.