Tuesday, October 4, 2016

MySQL 8.0 and TokuDB

A stripped down version of TokuDB is running on MySQL 8.0.


mysql> select @@version\G;
*************************** 1. row ***************************
@@version: 8.0.0-dmr-debug
1 row in set (0.00 sec)

mysql> show create table test.t\G;
*************************** 1. row ***************************
       Table: t
Create Table: CREATE TABLE `t` (
  `id` int(11) NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=TokuDB DEFAULT CHARSET=latin1
1 row in set (0.00 sec)

mysql> show engines\G;
*************************** 6. row ***************************
      Engine: TokuDB
     Support: YES
     Comment: Percona TokuDB Storage Engine with Fractal Tree(tm) Technology
Transactions: YES
          XA: YES
  Savepoints: YES

mysql> create table test.t (id int primary key) engine=tokudb;
Query OK, 0 rows affected (0.08 sec)

mysql> show create table test.t\G;
*************************** 1. row ***************************
       Table: t
Create Table: CREATE TABLE `t` (
  `id` int(11) NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=TokuDB DEFAULT CHARSET=latin1
1 row in set (0.00 sec)

Look at where the data files are:


$ ls -1 data/
auto.cnf        
ib_logfile1                
mysqld_safe.pid         
sebastian.pid  
test                
__tokudb_lock_dont_delete_me_data        
__tokudb_lock_dont_delete_me_temp
ib_buffer_pool  
ibtmp1                     
performance_sche_3.SDI  
sys            
test_5.SDI          
__tokudb_lock_dont_delete_me_environment  
tokudb.rollback
ibdata1         
log000000000001.tokulog29  
performance_schema      
sys_4.SDI      
tokudb.directory    
__tokudb_lock_dont_delete_me_logs
ib_logfile0     
mysql                      
sebastian.err           
tc.log         
tokudb.environment  
__tokudb_lock_dont_delete_me_recovery

$ ls -1 data/test
t_323.SDI  
t_main_10_2_1d.tokudb  
t_status_10_1_1d.tokudb

4 comments:

  1. The FT code now supports TokuDB data files in the database directories. Thanks to Vlad Lesin.

    ReplyDelete
  2. Changes:
    TokuDB: https://github.com/prohaska7/percona-server/tree/my800
    FT: https://github.com/prohaska7/tokuft/tree/my800

    ReplyDelete
  3. I hacked the tokudb from percona server 5.7 to run on mysql 8.0. Did not make any patches to mysql 8.0 code other than enabling the tokudb mysql tests. This means that the following features are missing:

    - no tokudb compression algorithms added to mysql's row format. should use the table compression option instead.
    - no tokudb clustering keys.
    - no tokudb table discovery.
    - no DB_TYPE_TOKUDB patch. this was needed in prior mysql's to solve some DDL related problems.
    - no index and range prelocking.
    - no optimizer patches for clustering keys.
    - no hacks to tokudb WRT group commit.
    - no support for native partitioning.
    - no read free replication.
    - no write optimized upserts.
    - probably other stuff
    - did not try to do anything with the backup plugin

    Some of these features (for example, the lack of clustering keys) cause a lot of tokudb test failures.

    Here is the status of the tokudb mysql tests:

    engines.funcs.out:Completed: All 0 tests were successful.
    engines.iuds.out:Completed: All 0 tests were successful.
    tokudb.add_index.out:Completed: Failed 1/29 tests, 96.55% were successful.
    tokudb.alter_table.out:Completed: Failed 16/66 tests, 75.76% were successful.
    tokudb.bugs.out:Completed: Failed 34/108 tests, 68.52% were successful.
    tokudb.out:Completed: Failed 62/240 tests, 74.17% were successful.
    tokudb.parts.out:Completed: Failed 45/45 tests, 0.00% were successful.
    tokudb.rpl.out:Completed: Failed 25/54 tests, 53.70% were successful.
    tokudb.sys_vars.out:Completed: All 7 tests were successful.

    My changes can be seen in these repo's:
    https://github.com/prohaska7/mysql-server/tree/8.0-tokudb
    https://github.com/prohaska7/percona-server/tree/my800
    https://github.com/prohaska7/tokuft/tree/my800

    ReplyDelete