Skip to content

Commit 90548bc

Browse files
Sergey GlukhovSergey Glukhov
Sergey Glukhov
authored and
Sergey Glukhov
committed
Bug#39541 CHECK TABLE on information_schema myisam tables produces error
issue 'The storage engine for the table doesn't support check' note for I_S tables
1 parent d60da1c commit 90548bc

File tree

3 files changed

+19
-0
lines changed

3 files changed

+19
-0
lines changed

mysql-test/r/mysqlcheck.result

+6
Original file line numberDiff line numberDiff line change
@@ -57,4 +57,10 @@ drop view v_bug25347;
5757
drop table t_bug25347;
5858
drop database d_bug25347;
5959
use test;
60+
create view v1 as select * from information_schema.routines;
61+
check table v1, information_schema.routines;
62+
Table Op Msg_type Msg_text
63+
test.v1 check status OK
64+
information_schema.routines check note The storage engine for the table doesn't support check
65+
drop view v1;
6066
End of 5.0 tests

mysql-test/t/mysqlcheck.test

+7
Original file line numberDiff line numberDiff line change
@@ -58,4 +58,11 @@ drop table t_bug25347;
5858
drop database d_bug25347;
5959
use test;
6060

61+
#
62+
# Bug#39541 CHECK TABLE on information_schema myisam tables produces error
63+
#
64+
create view v1 as select * from information_schema.routines;
65+
check table v1, information_schema.routines;
66+
drop view v1;
67+
6168
--echo End of 5.0 tests

sql/sql_table.cc

+6
Original file line numberDiff line numberDiff line change
@@ -2322,6 +2322,12 @@ static bool mysql_admin_table(THD* thd, TABLE_LIST* tables,
23222322
goto send_result;
23232323
}
23242324

2325+
if (table->schema_table)
2326+
{
2327+
result_code= HA_ADMIN_NOT_IMPLEMENTED;
2328+
goto send_result;
2329+
}
2330+
23252331
if ((table->table->db_stat & HA_READ_ONLY) && open_for_modify)
23262332
{
23272333
char buff[FN_REFLEN + MYSQL_ERRMSG_SIZE];

0 commit comments

Comments
 (0)