summaryrefslogtreecommitdiff
path: root/mysql-test/suite/innodb/t/innodb-use-sys-malloc.test
blob: 07ccf26171311046aeaea1c30fd200da451c8e48 (plain)
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
--source include/have_innodb.inc
# XtraDB has lots of "still reachable" memory leak warnings at shutdown when
# --innodb-use-sys-malloc
--source include/not_valgrind.inc

#display current value of innodb_use_sys_malloc
SELECT @@GLOBAL.innodb_use_sys_malloc;
--echo 1 Expected

#try changing it. Should fail.
--error ER_INCORRECT_GLOBAL_LOCAL_VAR
SET @@GLOBAL.innodb_use_sys_malloc=0;
--echo Expected error 'Read only variable'

SELECT @@GLOBAL.innodb_use_sys_malloc;
--echo 1 Expected


#do some stuff to see if it works.
--disable_warnings
drop table if exists t1;
--enable_warnings

create table t1(a int not null) engine=innodb DEFAULT CHARSET=latin1;
insert into t1 values (1),(2),(3),(4),(5),(6),(7);
select * from t1;
drop table t1;
--source include/have_innodb.inc

#display current value of innodb_use_sys_malloc
SELECT @@GLOBAL.innodb_use_sys_malloc;
--echo 1 Expected

#try changing it. Should fail.
--error ER_INCORRECT_GLOBAL_LOCAL_VAR
SET @@GLOBAL.innodb_use_sys_malloc=0;
--echo Expected error 'Read only variable'

SELECT @@GLOBAL.innodb_use_sys_malloc;
--echo 1 Expected


#do some stuff to see if it works.
--disable_warnings
drop table if exists t1;
--enable_warnings

create table t1(a int not null) engine=innodb DEFAULT CHARSET=latin1;
insert into t1 values (1),(2),(3),(4),(5),(6),(7);
select * from t1;
drop table t1;