Bug #93683 Got error 155 when reading table './test/t1'
Submitted: 19 Dec 2018 11:17 Modified: 29 Jul 2019 9:25
Reporter: Roel Van de Paar Email Updates:
Status: Duplicate Impact on me:
None 
Category:MySQL Server: InnoDB storage engine Severity:S1 (Critical)
Version:8.0.13 OS:Any
Assigned to: CPU Architecture:Any

[19 Dec 2018 11:17] Roel Van de Paar
Description:
This may or may not be a bug, but I wanted to log it in any case, for analysis

8.0.13>ALTER TABLE t1 DISCARD TABLESPACE;
Query OK, 0 rows affected (0.07 sec)

8.0.13>SELECT COUNT(*)FROM t1;
ERROR 1814 (HY000): Tablespace has been discarded for table 't1'

This ERROR seems justified. However this is in the error log;

2018-12-19T11:07:33.878962Z 9 [ERROR] [MY-010211] [Server] Got error 155 when reading table './test/t1'

An unclear error. Why would the error log not report the same as the client, if anything?

How to repeat:
CREATE DATABASE test;
USE test;
CREATE TABLE t1(a INT KEY,b CHAR (1),c CHAR(1));
ALTER TABLE t1 DISCARD TABLESPACE;
SELECT COUNT(*)FROM t1;
[19 Dec 2018 11:48] MySQL Verification Team
Thank you for the bug report.

Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 8
Server version: 8.0.15 Source distribution BUILD: 2018-DEC-11

Copyright (c) 2000, 2019, Oracle and/or its affiliates. All rights reserved.

Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective
owners.

Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.

mysql 8.0 > DROP DATABASE test;
Query OK, 0 rows affected (0.02 sec)

mysql 8.0 > CREATE DATABASE test;
Query OK, 1 row affected (0.02 sec)

mysql 8.0 > USE test;
Database changed
mysql 8.0 > CREATE TABLE t1(a INT KEY,b CHAR (1),c CHAR(1));
Query OK, 0 rows affected (0.05 sec)

mysql 8.0 > ALTER TABLE t1 DISCARD TABLESPACE;
Query OK, 0 rows affected (0.02 sec)

mysql 8.0 > SELECT COUNT(*)FROM t1;
ERROR 1814 (HY000): Tablespace has been discarded for table 't1'
mysql 8.0 >

C:\dbs>c:\dbs\8.0\bin\mysqld --defaults-file=c:\dbs\my80.ini --standalone --console
2018-12-19T11:46:07.597490Z 0 [System] [MY-010116] [Server] c:\dbs\8.0\bin\mysqld (mysqld 8.0.15) starting as process 4804
2018-12-19T11:46:10.291427Z 0 [Warning] [MY-010068] [Server] CA certificate ca.pem is self signed.
2018-12-19T11:46:10.347271Z 0 [System] [MY-010931] [Server] c:\dbs\8.0\bin\mysqld: ready for connections. Version: '8.0.15'  socket: ''  port: 3580  Source distribution BUILD: 2018-DEC-11.
2018-12-19T11:46:10.411343Z 0 [System] [MY-011323] [Server] X Plugin ready for connections. Bind-address: '::' port: 33060
2018-12-19T11:47:05.924409Z 8 [ERROR] [MY-010211] [Server] Got error 155 when reading table '.\test\t1'
[19 Dec 2018 14:10] MySQL Verification Team
Adding for search engine:

#define HA_ERR_NO_SUCH_TABLE 155 /* The table does not exist in engine */
[5 Jul 2019 11:31] Jens Even Blomsoy
Posted by developer:
 
Duplicate of https://bugs.mysql.com/bug.php?id=75911