Bug #39986 ALTER TABLE on a I_S table leads to a assertion on the embedded server
Submitted: 11 Oct 2008 19:49
Reporter: Davi Arnaut (OCA) Email Updates:
Status: Verified Impact on me:
Category:MySQL Server: Embedded Library ( libmysqld ) Severity:S2 (Serious)
Version:5.1+ OS:Any
Assigned to: CPU Architecture:Any

[11 Oct 2008 19:49] Davi Arnaut
Trying to alter or to create a index on a I_S table leads to a assertion (crash) when run on a embedded server. Under non-embedded, the insertion is denied very early because of permission checks. Since on a embedded server there is no permission checks, the alter table is able to proceed and later hits the assertion.

The assertion is:

mysqltest_embedded: sql_base.cc:1858: void close_temporary_table(THD*, TABLE*, bool, bool): Assertion `table == thd->temporary_tables' failed.

How to repeat:
ALTER TABLE information_schema.engines ADD a INT;
CREATE INDEX idx ON information_schema.character_sets(character_set_name);