Hi,
I have a table
CREATE TABLE recommendations (
_item_id bigint(20) unsigned NOT NULL,
_recommended_item_id bigint(20) unsigned NOT NULL,
_score float NOT NULL,
_algorithm_id tinyint(3) unsigned NOT NULL,
/*!90618 SHARD / KEY _recommended_item_id (_recommended_item_id),
KEY _item_id (_item_id,_algorithm_id,_recommended_item_id,_score) /!90619 USING CLUSTERED COLUMNSTORE / /!90621 WITH(COLUMNSTORE_SEGMENT_ROWS=10000) /,
KEY _recommended_item_id_2 (_recommended_item_id) USING HASH
) /!90623 AUTOSTATS_CARDINALITY_MODE=INCREMENTAL, AUTOSTATS_HISTOGRAM_MODE=CREATE, AUTOSTATS_SAMPLING=ON / /!90623 SQL_MODE=‘STRICT_ALL_TABLES’ */
memsql> SHOW INDEX FROM recommendations;
+-----------------+------------+------------------------+--------------+----------------------+-----------+-------------+----------+--------+------+-----------------------+---------+---------------+
| Table | Non_unique | Key_name | Seq_in_index | Column_name | Collation | Cardinality | Sub_part | Packed | Null | Index_type | Comment | Index_comment |
+-----------------+------------+------------------------+--------------+----------------------+-----------+-------------+----------+--------+------+-----------------------+---------+---------------+
| recommendations | 1 | _recommended_item_id | 1 | _recommended_item_id | NULL | NULL | NULL | NULL | | BTREE | | |
| recommendations | 0 | _item_id | 1 | _item_id | NULL | NULL | NULL | NULL | | CLUSTERED_COLUMNSTORE | | |
| recommendations | 0 | _item_id | 2 | _algorithm_id | NULL | NULL | NULL | NULL | | CLUSTERED_COLUMNSTORE | | |
| recommendations | 0 | _item_id | 3 | _recommended_item_id | NULL | NULL | NULL | NULL | | CLUSTERED_COLUMNSTORE | | |
| recommendations | 0 | _item_id | 4 | _score | NULL | NULL | NULL | NULL | | CLUSTERED_COLUMNSTORE | | |
| recommendations | 1 | _recommended_item_id_2 | 1 | _recommended_item_id | NULL | NULL | NULL | NULL | | COLUMNSTORE HASH | | |
+-----------------+------------+------------------------+--------------+----------------------+-----------+-------------+----------+--------+------+-----------------------+---------+---------------+
6 rows in set (0,00 sec)
memsql> ALTER TABLE recommendations DROP KEY _recommended_item_id_2;
ERROR 1091 (42000): Leaf Error (memsql-c04s01:3307): Can't DROP '_recommended_item_id_2'; check that column/key exists
In the memsql.log I see this:
ERROR: Thread 99726: ShardingAlterTableV6: Executing 'USING? ALTER TWO_PHASE 15376380536120774201:351 TABLE recommendations DROP KEY _recommended_item_id_2' on a leaf failed. The main query was 'ALTER TABLE recommendations DROP KEY _recommended_item_id_2'.
Can please someone explain this? Is it a bug?