File: transaction_prealloc_size_bug27322.test

package info (click to toggle)
mariadb 1%3A11.8.3-1
  • links: PTS, VCS
  • area: main
  • in suites: sid
  • size: 772,520 kB
  • sloc: ansic: 2,414,714; cpp: 1,791,394; asm: 381,336; perl: 62,905; sh: 49,647; pascal: 40,897; java: 39,363; python: 20,791; yacc: 20,432; sql: 17,907; xml: 12,344; ruby: 8,544; cs: 6,542; makefile: 6,145; ada: 1,879; lex: 1,193; javascript: 996; objc: 80; tcl: 73; awk: 46; php: 22
file content (66 lines) | stat: -rw-r--r-- 2,299 bytes parent folder | download | duplicates (7)
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
#
# test variables big
#

--source include/big_test.inc
# The test would allocate and initialize 5GB of memory
# if compiled with debug. It can take a lot of time
# of for paging/swapping.
--source include/not_debug.inc

#
# Bug#27322 failure to allocate transaction_prealloc_size causes crash
#
#
# Manual (6.0):
# Platform Bit Size  Range                      Default
# 32                 1024-4294967295 (4 Gi - 1) 4096
# 64                 1024-18446744073709547520  4096
#
# Observation(mleich):
# 1. - Linux 64 Bit, MySQL 64 Bit, 4 GiB RAM, 8 GiB swap
#    - SET SESSION transaction_prealloc_size=1099511627776;
#      SHOW PROCESSLIST;
#      Id   User ... Info
#      <Id> root ... SHOW PROCESSLIST
#      SELECT @@session.transaction_prealloc_size;
#      @@session.transaction_prealloc_size
#      1099511627776
#      very short runtime in 5.0
#      excessive resource consumption + long runtime in 5.1 and 6.0
# 2. - Win in VM, slightly older version of this test, MySQL 5.0
#    - testcase timeout after 900s
#      analyze-timeout-mysqld.1.err :
#      Id User ... Time Info
#      83 root ... 542  set session transaction_prealloc_size=1024*1024*1024*2
#      84 root ... 1    SHOW PROCESSLIST
#
# There is a significant probablitity that this tests fails with testcase
# timeout if the testing box is not powerful enough.
#
SET @def_var= @@session.transaction_prealloc_size;

--disable_warnings
SET SESSION transaction_prealloc_size=1024*1024*1024*1;
# Embedded server is shows "cleaning up" as STATE, while non-embedded shows "init"
--replace_column 1 <Id> 3 <Host> 6 <Time> 7 <State>
--replace_result Execute Query
SHOW PROCESSLIST;
SET SESSION transaction_prealloc_size=1024*1024*1024*2;
--replace_column 1 <Id> 3 <Host> 6 <Time> 7 <State>
--replace_result Execute Query
SHOW PROCESSLIST;
SET SESSION transaction_prealloc_size=1024*1024*1024*3;
--replace_column 1 <Id> 3 <Host> 6 <Time> 7 <State>
--replace_result Execute Query
SHOW PROCESSLIST;
SET SESSION transaction_prealloc_size=1024*1024*1024*4;
--replace_column 1 <Id> 3 <Host> 6 <Time> 7 <State>
--replace_result Execute Query
SHOW PROCESSLIST;
SET SESSION transaction_prealloc_size=1024*1024*1024*5;
--replace_column 1 <Id> 3 <Host> 6 <Time> 7 <State>
--replace_result Execute Query
SHOW PROCESSLIST;
--enable_warnings