Skip to content

bug: The error message displayed is inaccurate when you drop unique index or drop fulltext index. #1342

@haitaoguan

Description

@haitaoguan

Have you read the Contributing Guidelines on issues?

Please confirm if bug report does NOT exists already ?

  • I confirm there is no existing issue for this

Describe the problem

mysql> show variables like 'sql_mode';
+---------------+-----------------------------------------------------------------------------+
| Variable_name | Value                                                                       |
+---------------+-----------------------------------------------------------------------------+
| sql_mode      | STRICT_TRANS_TABLES,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION,NO_KEY_ERROR |
+---------------+-----------------------------------------------------------------------------+
1 row in set (0.00 sec)

mysql> show create table xxx\G
*************************** 1. row ***************************
       Table: xxx
Create Table: CREATE TABLE `xxx` (
  `id` int(11) DEFAULT NULL,
  `name` varchar(10) DEFAULT NULL,
  UNIQUE KEY `idx_id` (`id`)
) ENGINE=TIANMU DEFAULT CHARSET=utf8mb4
1 row in set (0.00 sec)

mysql> drop index idx_id on xxx;
Query OK, 0 rows affected (0.01 sec)
Records: 0  Duplicates: 0  Warnings: 0

mysql> set global sql_mode='STRICT_TRANS_TABLES,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION';
Query OK, 0 rows affected, 1 warning (0.00 sec)

mysql> exit
Bye

mysql> show variables like 'sql_mode';
+---------------+----------------------------------------------------------------+
| Variable_name | Value                                                          |
+---------------+----------------------------------------------------------------+
| sql_mode      | STRICT_TRANS_TABLES,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION |
+---------------+----------------------------------------------------------------+
1 row in set (0.01 sec)

mysql> show create table xxx\G
*************************** 1. row ***************************
       Table: xxx
Create Table: CREATE TABLE `xxx` (
  `id` int(11) DEFAULT NULL,
  `name` varchar(10) DEFAULT NULL,
  UNIQUE KEY `idx_id` (`id`)
) ENGINE=TIANMU DEFAULT CHARSET=utf8mb4
1 row in set (0.01 sec)

mysql> drop index idx_id on xxx;
ERROR 2233 (HY000): Be disgraceful to storage engine, operating is forbidden!

The error message is display StoneDB don't support drop unique index or drop fulltext index.However StoneDB support drop unique index or drop fulltext index.The error message maybe display
ERROR 3235 (HY000): Tianmu engine does not support unique index.

Expected behavior

###drop unique index
ERROR 3235 (HY000): Tianmu engine does not support unique index.
###drop fulltext index
ERROR 3236 (HY000): Tianmu engine does not support fulltext index.

How To Reproduce

No response

Environment

build information as follow:
Repository address: https://github.com/stoneatom/stonedb.git:stonedb-5.7-dev
Branch name: stonedb-5.7-dev
Last commit ID: f8df638
Last commit time: Date: Mon Feb 27 19:36:39 2023 +0800
Build time: Date: Tue Feb 28 10:02:51 CST 2023

Are you interested in submitting a PR to solve the problem?

  • Yes, I will!

Metadata

Metadata

Assignees

Labels

A-bugSomething isn't working

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions