Assertion `Handlerton: db != NULL ' failed (errno=0) in analyze_key | tokudb/ha_tokudb_admin.cc:582

Description

Testcase

Startup options : --plugin-load-add=tokudb=ha_tokudb.so --sql_mode=ONLY_FULL_GROUP_BY

GDB info

The attached tarball (1457331400_bug_bundle.tar.gz) gives the testcase as an exact match of our system, including some handy utilities

Environment

None

Activity

Show:
George Lorch
March 31, 2016, 7:16 PM
Edited

It seems that with tokudb_auto_analyze > 0, an ALTER TABLE can trigger an auto analysis. if tokudb_analyze_in_background = true, this analysis is dispatched to the bjm and executed in parallel.

The problem is that with an ALTER TABLE DROP KEY, the analysis can try to run on the table/key meta-data (number of and definition of keys) before the table/key meta-data has been updated in the TOKUDB_SHARE by the process of COMMITing the ALTER (close and re-open) and therefore the analyze will be operating on old/bad table/key meta-data.

The fix is to not allow an ALTER to trigger an analyze at all.

5.6 :
https://github.com/georgelorchpercona/percona-server/tree/ps-5.6-DB-945
http://jenkins.percona.com/view/PS%205.6/job/percona-server-5.6-param/1102/
https://github.com/percona/percona-server/pull/431

5.7 :
https://github.com/georgelorchpercona/percona-server/tree/ps-5.7-DB-945
http://jenkins.percona.com/view/5.7/job/mysql-5.7-param/128/
https://github.com/percona/percona-server/pull/432

Assignee

George Lorch

Reporter

Ramesh Sivaraman

External issue ID

None

Freshdesk Tickets

None

Priority

Major
Configure