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

[11 Oct 2008 19:32] Davi Arnaut
Description:
Inserting on a I_S with the INSERT ... SELECT statement 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 insert proceeds, opens the table and later, in check_insert_fields, denies the insert since the table is not insertable. Interesting enough, a simple insert on a I_S table does not cause the assertion to fail.

The assertion is:

mysqltest_embedded: handler.cc:4490: int handler::ha_reset(): Assertion `(uchar*) table->def_read_set.bitmap + table->s->column_bitmap_size == (uchar*) table->def_write_set.bitmap' failed.

How to repeat:
INSERT INTO information_schema.engines (egnine) SELECT 'engine';