Debian Codegraph @

mysql-test/suite/innodb/r/tmpdir.result

raw
1 #
2 # Bug #19183565 CREATE DYNAMIC INNODB_TMPDIR VARIABLE TO CONTROL
3 # WHERE INNODB WRITES TEMP FILES
4 #
5 # If innodb_tmpdir is NULL or "", temporary file will be created in
6 # server configuration variable location(--tmpdir)
7 create table t1(a int primary key)engine=innodb;
8 show session variables like 'innodb_tmpdir';
9 Variable_name Value
10 innodb_tmpdir
11 alter table t1 add column b int not null;
12 set global innodb_tmpdir=NULL;
13 connect con1,localhost,root;
14 show session variables like 'innodb_tmpdir';
15 Variable_name Value
16 innodb_tmpdir
17 alter table t1 add key(b);
18 connection default;
19 disconnect con1;
20 drop table t1;
21 # innodb_tmpdir with invalid path.
22 create table t1(a int primary key)engine=innodb;
23 set global innodb_tmpdir='wrong_value';
24 ERROR 42000: Variable 'innodb_tmpdir' can't be set to the value of 'wrong_value'
25 show warnings;
26 Level Code Message
27 Warning 1210 InnoDB: Path doesn't exist.
28 Error 1231 Variable 'innodb_tmpdir' can't be set to the value of 'wrong_value'
29 drop table t1;
30 # innodb_tmpdir with mysql data directory path.
31 create table t1(a text, b text, fulltext(a,b))engine=innodb;
32 insert into t1 values('test1', 'test2');
33 insert into t1 values('text1', 'text2');
34 set global innodb_tmpdir = @@global.datadir;
35 ERROR 42000: Variable 'innodb_tmpdir' can't be set to the value of 'MYSQL_DATADIR'
36 show warnings;
37 Level Code Message
38 Warning 1210 InnoDB: Path Location should not be same as mysql data directory location.
39 Error 1231 DATADIR/data/'
40 drop table t1;
41 # innodb_tmpdir with valid location.
42 create table t1(a text, b text, fulltext(a,b))engine=innodb;
43 insert into t1 values('test1', 'test2');
44 insert into t1 values('text1', 'text2');
45 set @tmpdir = @@global.tmpdir;
46 set global innodb_tmpdir = @tmpdir;
47 show session variables like 'innodb_tmpdir';
48 Variable_name Value
49 innodb_tmpdir
50 connect con3,localhost,root;
51 alter table t1 add fulltext(b);
52 disconnect con3;
53 connection default;
54 set global innodb_tmpdir=NULL;
55 drop table t1;