File: tmpdir.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 (61 lines) | stat: -rw-r--r-- 1,891 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
48
49
50
51
52
53
54
55
56
57
58
59
60
61
--source include/have_innodb.inc
--source include/count_sessions.inc

--echo #
--echo # Bug #19183565 CREATE DYNAMIC INNODB_TMPDIR VARIABLE TO CONTROL
--echo #		WHERE INNODB WRITES TEMP FILES
--echo #

--echo # If innodb_tmpdir is NULL or "", temporary file will be created in
--echo # server configuration variable location(--tmpdir)

create table t1(a int primary key)engine=innodb;
show session variables like 'innodb_tmpdir';
alter table t1 add column b int not null;
set global innodb_tmpdir=NULL;
connect (con1,localhost,root);
show session variables like 'innodb_tmpdir';
alter table t1 add key(b);
connection default;
disconnect con1;
drop table t1;

--echo # innodb_tmpdir with invalid path.

create table t1(a int primary key)engine=innodb;
--error ER_WRONG_VALUE_FOR_VAR
set global innodb_tmpdir='wrong_value';
show warnings;
drop table t1;


--echo # innodb_tmpdir with mysql data directory path.

let $MYSQLD_DATADIR= `select @@datadir`;
create table t1(a text, b text, fulltext(a,b))engine=innodb;
insert into t1 values('test1', 'test2');
insert into t1 values('text1', 'text2');
--replace_result $MYSQLD_DATADIR MYSQL_DATADIR
--error ER_WRONG_VALUE_FOR_VAR
set global innodb_tmpdir = @@global.datadir;
--replace_regex /.*mysqld.1/DATADIR/
show warnings;
drop table t1;

--echo # innodb_tmpdir with valid location.
let $MYSQL_TMP_DIR= `select @@tmpdir`;
create table t1(a text, b text, fulltext(a,b))engine=innodb;
insert into t1 values('test1', 'test2');
insert into t1 values('text1', 'text2');
set @tmpdir = @@global.tmpdir;
set global innodb_tmpdir = @tmpdir;
show session variables like 'innodb_tmpdir';
connect (con3,localhost,root);
# Following alter using innodb_tmpdir as a path to create temporary files
alter table t1 add fulltext(b);
disconnect con3;
connection default;
set global innodb_tmpdir=NULL;
drop table t1;

--source include/wait_until_count_sessions.inc