1
0
mirror of https://github.com/MariaDB/server.git synced 2025-09-02 09:41:40 +03:00

Merge branch 'merge-innodb-5.6' into 10.0

This commit is contained in:
Sergei Golubchik
2016-02-16 18:32:59 +01:00
22 changed files with 705 additions and 158 deletions

View File

@@ -0,0 +1,51 @@
#
# Bug #19183565 CREATE DYNAMIC INNODB_TMPDIR VARIABLE TO CONTROL
# WHERE INNODB WRITES TEMP FILES
#
# If innodb_tmpdir is NULL or "", temporary file will be created in
# server configuration variable location(--tmpdir)
create table t1(a int primary key)engine=innodb;
show session variables like 'innodb_tmpdir';
Variable_name Value
innodb_tmpdir
alter table t1 add column b int not null;
set global innodb_tmpdir=NULL;
# Connection con1
show session variables like 'innodb_tmpdir';
Variable_name Value
innodb_tmpdir
alter table t1 add key(b);
drop table t1;
# innodb_tmpdir with invalid path.
create table t1(a int primary key)engine=innodb;
set global innodb_tmpdir='wrong_value';
ERROR 42000: Variable 'innodb_tmpdir' can't be set to the value of 'wrong_value'
show warnings;
Level Code Message
Warning 1210 InnoDB: Path doesn't exist.
Error 1231 Variable 'innodb_tmpdir' can't be set to the value of 'wrong_value'
drop table t1;
# innodb_tmpdir with mysql data directory path.
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 global innodb_tmpdir = @@global.datadir;
ERROR 42000: Variable 'innodb_tmpdir' can't be set to the value of 'MYSQL_DATADIR'
show warnings;
Level Code Message
Warning 1210 InnoDB: Path Location should not be same as mysql data directory location.
Error 1231 DATADIR/data/'
drop table t1;
# innodb_tmpdir with valid location.
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';
Variable_name Value
innodb_tmpdir
# Connection con3
alter table t1 add fulltext(b);
set global innodb_tmpdir=NULL;
drop table t1;

View File

@@ -0,0 +1,68 @@
--source include/have_innodb.inc
--source include/count_sessions.inc
if (`select plugin_auth_version <= "5.6.26-MariaDB-76.0" from information_schema.plugins where plugin_name='innodb'`)
{
--skip Not fixed in XtraDB as of 5.6.26-MariaDB-76.0 or earlier
}
--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;
--echo # Connection con1
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';
--echo # Connection con3
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