File: shm.test

package info (click to toggle)
mariadb-10.0 10.0.32-0%2Bdeb8u1
  • links: PTS, VCS
  • area: main
  • in suites: jessie
  • size: 476,064 kB
  • sloc: cpp: 1,400,131; ansic: 832,140; perl: 54,391; sh: 41,304; pascal: 32,365; yacc: 14,921; xml: 5,257; sql: 4,667; cs: 4,647; makefile: 4,555; ruby: 4,465; python: 2,292; lex: 1,427; java: 941; asm: 295; awk: 54; php: 22; sed: 16
file content (47 lines) | stat: -rw-r--r-- 1,481 bytes parent folder | download | duplicates (6)
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
# We currently only have shm support on windows, so in order
# to optimize things we skip this test on all other platforms
--source include/windows.inc

# thread pool causes different results
-- source include/not_threadpool.inc

# Only run this test if shared memory is avaliable
let $shm= query_get_value("SHOW VARIABLES LIKE 'shared_memory'", Value, 1);
if ($shm != ON){
  skip No shm support;
}
let $shm_name= query_get_value("SHOW GLOBAL VARIABLES LIKE 'shared_memory_base_name'", Value, 1);

# Connect using SHM for testing
connect(shm_con,localhost,root,,,,$shm_name,SHM);

# Source select test case
-- source include/common-tests.inc

connection default;
disconnect shm_con;

#
# Bug #24924: shared-memory-base-name that is too long causes buffer overflow
#
--exec $MYSQLADMIN --user=root --host=127.0.0.1 --port=$MASTER_MYPORT --shared-memory-base-name=HeyMrBaseNameXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX ping

#
# Bug #33899: Deadlock in mysql_real_query with shared memory connections
#

let $stmt= `SELECT REPEAT('a', 2048)`;

SET @max_allowed_packet= @@global.max_allowed_packet;
SET @net_buffer_length= @@global.net_buffer_length;

SET GLOBAL max_allowed_packet= 1024;
SET GLOBAL net_buffer_length= 1024;

--error 1
--exec echo SELECT '$stmt'| $MYSQL --protocol=memory --shared-memory-base-name=$shm_name 2>&1

SET GLOBAL max_allowed_packet= @max_allowed_packet;
SET GLOBAL net_buffer_length= @net_buffer_length;

--echo End of 5.0 tests.