Bug #97331 client displays incorrect error message when executing alter table failed
Submitted: 22 Oct 2019 13:29 Modified: 23 Oct 2019 12:37
Reporter: songlei wang Email Updates:
Status: Not a Bug Impact on me:
None 
Category:MySQL Server: Errors Severity:S3 (Non-critical)
Version:5.7.27 OS:Any
Assigned to: CPU Architecture:Any

[22 Oct 2019 13:29] songlei wang
Description:
client displays incorrect error message when executing alter table to an encryption table failed. It will show a temporary name instead of the real table name in error message.

How to repeat:
install plugin in config file:
early-plugin-load=keyring_file.so

create schema and table:
CREATE DATABASE test;
use test
CREATE TABLE t3(a INT, b VARCHAR(20)) ENCRYPTION='Y';

alter table engine to myisam:
ALTER TABLE t3 ENGINE='MYISAM';

result:
ERROR 1031 (HY000): Table storage engine for '#sql-1be27_2' doesn't have this option

Suggested fix:
fix the error message.
[23 Oct 2019 12:37] MySQL Verification Team
Hi Mr. wang,

Thank you for your bug report.

I have tested your test case and I have got the same error as you on 5.7. Hence, yes, it is a bug, but the one of the very low severity and priority.

On 8.0 I get this error:

ERROR 1178 (42000) at line 1: The storage engine for the table doesn't support ENCRYPTION

As you can see there is completely new error message for 8.0. Since this problem can be fix only with a new error message, it can not be fixed in 5.7, since GA versions can not introduce new error messages.

Not a bug.