Bug #86257 Error log: Got error 155 when reading table
Submitted: 10 May 2017 5:53 Modified: 10 May 2017 9:58
Reporter: Roel Van de Paar Email Updates:
Status: Verified Impact on me:
None 
Category:MySQL Server: InnoDB storage engine Severity:S1 (Critical)
Version:5.7.17, 5.7.18 OS:Any
Assigned to: CPU Architecture:Any

[10 May 2017 5:53] Roel Van de Paar
Description:
mysql> SELECT hex(c1),hex(c2) FROM t1 ORDER BY c1 DESC;
ERROR 1814 (HY000): Tablespace has been discarded for table 't1'

Looks fine. However, the error log shows;

2017-05-10T05:28:08.551990Z 3 [ERROR] Got error 155 when reading table './test/t1'

How to repeat:
DROP DATABASE test;CREATE DATABASE test;USE test;
CREATE TABLE t1(c1 YEAR KEY,c2 INT,c3 BINARY);
ALTER TABLE t1 DISCARD TABLESPACE;
SELECT hex(c1),hex(c2) FROM t1 ORDER BY c1 DESC;
[10 May 2017 9:58] MySQL Verification Team
Hello Roel,

Thank you for the report and test case.

Thanks,
Umesh
[21 Jul 2023 16:53] linkang zhang
Code to fix this bug In MySQL 5.7

(*) I confirm the code being submitted is offered under the terms of the OCA, and that I am authorized to contribute it.

Contribution: source_code.diff (application/octet-stream, text), 1.43 KiB.

[21 Jul 2023 16:54] linkang zhang
The testcase for this bugfix.

(*) I confirm the code being submitted is offered under the terms of the OCA, and that I am authorized to contribute it.

Contribution: test.diff (application/octet-stream, text), 2.06 KiB.

[21 Jul 2023 16:54] linkang zhang
The result file for this bugfix.

(*) I confirm the code being submitted is offered under the terms of the OCA, and that I am authorized to contribute it.

Contribution: result.diff (application/octet-stream, text), 1.04 KiB.

[21 Jul 2023 16:54] linkang zhang
All the affected testcases is fixed.

(*) I confirm the code being submitted is offered under the terms of the OCA, and that I am authorized to contribute it.

Contribution: fix_all_the_affected_testcases.diff (application/octet-stream, text), 2.76 KiB.