We're updating the issue view to help you get more done. 

ps 5.6 Can not create a clustering index on a partitioned tokudb table

Description

mysql> CREATE TABLE `t1` ( -> `a` int(10) unsigned NOT NULL AUTO_INCREMENT,
-> `b` varchar(255) DEFAULT NULL,
-> PRIMARY KEY (`a`)
-> ) ENGINE=TokuDB DEFAULT CHARSET=latin1
-> /*!50100 PARTITION BY RANGE (a)
-> (PARTITION p0 VALUES LESS THAN (100) ENGINE = TokuDB,
-> PARTITION p2 VALUES LESS THAN MAXVALUE ENGINE = TokuDB) */;
Query OK, 0 rows affected (0.23 sec)

mysql> alter table t1 add clustering index cl_b (`b`);
ERROR 1478 (HY000): Table storage engine 'partition' does not support the create option 'CLUSTERING'

Bugs is here:
(gdb) bt
#0 mysql_prepare_create_table (thd=0x183e1290, create_info=0x7ffda427d430, alter_info=0x7ffda427d370, tmp_table=true, db_options=0x7ffda427ac70, file=0x7ffd54006358, key_info_buffer=0x7ffda427bbf8, key_\
count=0x7ffda427bbcc, select_field_count=0) at /home/rfp/ps5620/percona-server-5.6/sql/sql_table.cc:3785
#1 0x000000000083b71f in create_table_impl (thd=0x183e1290, db=0x7ffd540052a0 "test", table_name=0x7ffda427c840 "#sql-6ce3_2", path=0x7ffda427d0ac "./test/#sql-6ce3_2", create_info=0x7ffda427d430, alter\
_info=0x7ffda427d370, internal_tmp_table=true, select_field_count=0, no_ha_table=true, is_trans=0x0, key_info=0x7ffda427bbf8, key_count=0x7ffda427bbcc) at /home/rfp/ps5620/percona-server-5.6/sql/sql_tabl\
e.cc:4737
#2 0x00000000008444ea in mysql_alter_table (thd=0x183e1290, new_db=0x7ffd540052a0 "test", new_name=0x0, create_info=0x7ffda427d430, table_list=0x7ffd54004d40, alter_info=0x7ffda427d370, order_num=0, ord\
er=0x0, ignore=false) at /home/rfp/ps5620/percona-server-5.6/sql/sql_table.cc:8426
#3 0x0000000000989799 in Sql_cmd_alter_table::execute (this=0x7ffd54005368, thd=0x183e1290) at /home/rfp/ps5620/percona-server-5.6/sql/sql_alter.cc:317
#4 0x00000000007d18d1 in mysql_execute_command (thd=0x183e1290) at /home/rfp/ps5620/percona-server-5.6/sql/sql_parse.cc:5384
#5 0x00000000007d4b4d in mysql_parse (thd=0x183e1290, rawbuf=0x7ffd54004c30 "alter table t1 add clustering index cl_b (`b`)", length=46, parser_state=0x7ffda427f1d0) at /home/rfp/ps5620/percona-server-5\
.6/sql/sql_parse.cc:6746
#6 0x00000000007c72e8 in dispatch_command (command=COM_QUERY, thd=0x183e1290, packet=0x183e53e1 "alter table t1 add clustering index cl_b (`b`)", packet_length=46) at /home/rfp/ps5620/percona-server-5.6\
/sql/sql_parse.cc:1434

Partition storage engine needs to pass up the clustering flag from the underlying engine.

Environment

percona server 5.6 + tokudb 7.1.8

Status

Assignee

George Lorch

Reporter

Rich Prohaska

Labels

External issue ID

None

External issue ID

None

External issue ID

None

External issue ID

None

External issue ID

None

External issue ID

None

External issue ID

None

External issue ID

None

External issue ID

None

Freshdesk Tickets

None

Affects versions

tokudb-7.1.8
Percona-Server-5.7.10-RC1
Percona-Server-5.6.27-76.0

Priority

Major