Skip to content

Commit

Permalink
Merge 10.1 into 10.2
Browse files Browse the repository at this point in the history
  • Loading branch information
dr-m committed Apr 28, 2020
2 parents 5a1d931 + 713e427 commit 547cb28
Show file tree
Hide file tree
Showing 16 changed files with 1,786 additions and 233 deletions.
73 changes: 73 additions & 0 deletions mysql-test/suite/innodb/r/innodb_sys_var_valgrind.result
@@ -0,0 +1,73 @@
#
# Bug #29717909 MEMORY LIFETIME OF VARIABLES BETWEEN CHECK AND UPDATE INCORRECTLY MANAGED
#
select @@innodb_ft_server_stopword_table;
@@innodb_ft_server_stopword_table
NULL
create table user_stopword_1(value varchar(30)) engine = innodb;
create table user_stopword_2(value varchar(30)) engine = innodb;
set @blah = 'test/user_stopword_1';
SET GLOBAL innodb_ft_server_stopword_table= @blah;
select @@innodb_ft_server_stopword_table;
@@innodb_ft_server_stopword_table
test/user_stopword_1
set @blah = 'test/user_stopword_2';
SET GLOBAL innodb_ft_server_stopword_table= @blah;
select @@innodb_ft_server_stopword_table;
@@innodb_ft_server_stopword_table
test/user_stopword_2
SET GLOBAL innodb_ft_server_stopword_table= NULL;
select @@innodb_ft_server_stopword_table;
@@innodb_ft_server_stopword_table
NULL
SET GLOBAL innodb_ft_server_stopword_table= default;
select @@innodb_ft_server_stopword_table;
@@innodb_ft_server_stopword_table
NULL
drop table user_stopword_1, user_stopword_2;
select @@innodb_buffer_pool_filename;
@@innodb_buffer_pool_filename
ib_buffer_pool
set @blah='hello';
set global innodb_buffer_pool_filename = @blah;
select @@innodb_buffer_pool_filename;
@@innodb_buffer_pool_filename
hello
set global innodb_buffer_pool_filename="bye";
select @@innodb_buffer_pool_filename;
@@innodb_buffer_pool_filename
bye
set global innodb_buffer_pool_filename=NULL;
ERROR 42000: Variable 'innodb_buffer_pool_filename' can't be set to the value of 'NULL'
select @@innodb_buffer_pool_filename;
@@innodb_buffer_pool_filename
bye
set global innodb_buffer_pool_filename=default;
select @@innodb_buffer_pool_filename;
@@innodb_buffer_pool_filename
ib_buffer_pool
CREATE TABLE t1 ( id INT UNSIGNED AUTO_INCREMENT NOT NULL PRIMARY KEY,
opening_line TEXT(500), author VARCHAR(200), title VARCHAR(200), FULLTEXT idx
(opening_line)) ENGINE=InnoDB;
CREATE TABLE t2 ( id INT UNSIGNED AUTO_INCREMENT NOT NULL PRIMARY KEY,
opening_line TEXT(500), author VARCHAR(200), title VARCHAR(200), FULLTEXT idx
(opening_line)) ENGINE=InnoDB;
select @@innodb_ft_aux_table;
@@innodb_ft_aux_table
NULL
set @blah = 'test/t1';
SET GLOBAL innodb_ft_aux_table = @blah;
select @@innodb_ft_aux_table;
@@innodb_ft_aux_table
test/t1
set @blah = 'test/t2';
SET GLOBAL innodb_ft_aux_table = @blah;
SET GLOBAL innodb_ft_aux_table = NULL;
select @@innodb_ft_aux_table;
@@innodb_ft_aux_table
NULL
SET GLOBAL innodb_ft_aux_table =default;
select @@innodb_ft_aux_table;
@@innodb_ft_aux_table
NULL
drop table t1,t2;
70 changes: 70 additions & 0 deletions mysql-test/suite/innodb/t/innodb_sys_var_valgrind.test
@@ -0,0 +1,70 @@
--source include/have_innodb.inc

--echo #
--echo # Bug #29717909 MEMORY LIFETIME OF VARIABLES BETWEEN CHECK AND UPDATE INCORRECTLY MANAGED
--echo #

#Test innodb_ft_server_stopword_table (global variable)
select @@innodb_ft_server_stopword_table;
create table user_stopword_1(value varchar(30)) engine = innodb;
create table user_stopword_2(value varchar(30)) engine = innodb;

set @blah = 'test/user_stopword_1';
SET GLOBAL innodb_ft_server_stopword_table= @blah;
select @@innodb_ft_server_stopword_table;

set @blah = 'test/user_stopword_2';
SET GLOBAL innodb_ft_server_stopword_table= @blah;
select @@innodb_ft_server_stopword_table;

SET GLOBAL innodb_ft_server_stopword_table= NULL;
select @@innodb_ft_server_stopword_table;

SET GLOBAL innodb_ft_server_stopword_table= default;
select @@innodb_ft_server_stopword_table;

drop table user_stopword_1, user_stopword_2;

#Test innodb_buffer_pool_filename (global variable)

select @@innodb_buffer_pool_filename;

set @blah='hello';
set global innodb_buffer_pool_filename = @blah;
select @@innodb_buffer_pool_filename;

set global innodb_buffer_pool_filename="bye";
select @@innodb_buffer_pool_filename;

--error ER_WRONG_VALUE_FOR_VAR
set global innodb_buffer_pool_filename=NULL;
select @@innodb_buffer_pool_filename;

set global innodb_buffer_pool_filename=default;
select @@innodb_buffer_pool_filename;

#Test innodb_ft_aux_table (global variable)
CREATE TABLE t1 ( id INT UNSIGNED AUTO_INCREMENT NOT NULL PRIMARY KEY,
opening_line TEXT(500), author VARCHAR(200), title VARCHAR(200), FULLTEXT idx
(opening_line)) ENGINE=InnoDB;

CREATE TABLE t2 ( id INT UNSIGNED AUTO_INCREMENT NOT NULL PRIMARY KEY,
opening_line TEXT(500), author VARCHAR(200), title VARCHAR(200), FULLTEXT idx
(opening_line)) ENGINE=InnoDB;

select @@innodb_ft_aux_table;

set @blah = 'test/t1';
SET GLOBAL innodb_ft_aux_table = @blah;
select @@innodb_ft_aux_table;

set @blah = 'test/t2';
SET GLOBAL innodb_ft_aux_table = @blah;

SET GLOBAL innodb_ft_aux_table = NULL;
select @@innodb_ft_aux_table;

SET GLOBAL innodb_ft_aux_table =default;
select @@innodb_ft_aux_table;

drop table t1,t2;

0 comments on commit 547cb28

Please sign in to comment.