How to reproduce
Please see/continue discussion of the lock error in DB-929. This issue will remain specifically for the assertion fix which is a side/after effect of the lock problem but still a real issue in itself.
@george : FYI, Able to reproduce it with PS-5.7 optimized build
Able to reproduce the issue with default table_open_cache (2K)
PS : # mysqld options required for replay: --log-output=none --sql_mode=ONLY_FULL_GROUP_BY --plugin-load=tokudb=ha_tokudb.so
@RameshSivaraman Nice find. For --sql_mode=ONLY_FULL_GROUP_BY, likely --sql_mode= (i.e. no value), is likely enough. This is due to new default change in 5.7.