[MDEV-16034] TokuDB: set global tokudb_block_size is ignored Created: 2018-04-26  Updated: 2018-05-31  Resolved: 2018-05-31

Status: Closed
Project: MariaDB Server
Component/s: Storage Engine - TokuDB
Affects Version/s: 10.1.32
Fix Version/s: N/A

Type: Bug Priority: Minor
Reporter: Rick Pizzi Assignee: Unassigned
Resolution: Not a Bug Votes: 0
Labels: None


 Description   

I have noticed that changing the tokudb_block_size variable with set global has no effect on subsequently created tables. A server restart is required. In Percona Server, this works as intended and the newly created tables have the new block size.

How to reproduce:

MariaDB [(none)]> show global variables like 'tokudb_block_size';
+-------------------+---------+
| Variable_name     | Value   |
+-------------------+---------+
| tokudb_block_size | 4194304 |
+-------------------+---------+
1 row in set (0.00 sec)
 
MariaDB [mydb]> create table testtable (id int not null primary key) engine=TokuDB;
Query OK, 0 rows affected (0.07 sec)
 
MariaDB [mydb]> 
[3]+  Stopped                 mysql -A

[root@rdba-c]# tokuftdump /var/lib/mysql/_mydb_testtable_main_89a9_2_1d.tokudb | grep nodesize
 nodesize=4194304
 basementnodesize=65536
[root@rdba-c]# fg
mysql -A
set global tokudb_block_size=132768;
Query OK, 0 rows affected (0.00 sec)
 
MariaDB [mydb]> show global variables like 'tokudb_block_size';
+-------------------+--------+
| Variable_name     | Value  |
+-------------------+--------+
| tokudb_block_size | 132768 |
+-------------------+--------+
1 row in set (0.00 sec)
 
MariaDB [mydb]> create table testtable2 (id int not null primary key) engine=TokuDB;
Query OK, 0 rows affected (0.06 sec)
 
MariaDB [mydb]> 
[3]+  Stopped                 mysql -A

[root@rdba-c]# tokuftdump /var/lib/mysql/_mydb_testtable2_main_89ab_2_1d.tokudb | grep nodesize
 nodesize=4194304
 basementnodesize=65536
[root@rdba-c]# 



 Comments   
Comment by Elena Stepanova [ 2018-05-31 ]

The variable has a SESSION scope (in addition to GLOBAL), which means changing the global value doesn't affect the current session and its products. Try set tokudb_block_size=132768; instead.

Generated at Thu Feb 08 08:25:52 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.