mirror of
https://github.com/MariaDB/server.git
synced 2025-07-27 18:02:13 +03:00
MDEV-11836 vcol.vcol_keys_myisam fails in buildbot and outside
move TABLE::key_read into handler. Because in index merge and DS-MRR there can be many handlers per table, and some of them use key read while others don't. "keyread" is really per handler, not per TABLE property.
This commit is contained in:
@ -2633,8 +2633,7 @@ int collect_statistics_for_index(THD *thd, TABLE *table, uint index)
|
||||
DBUG_RETURN(rc);
|
||||
}
|
||||
|
||||
table->key_read= 1;
|
||||
table->file->extra(HA_EXTRA_KEYREAD);
|
||||
table->file->ha_start_keyread();
|
||||
|
||||
table->file->ha_index_init(index, TRUE);
|
||||
rc= table->file->ha_index_first(table->record[0]);
|
||||
@ -2649,7 +2648,7 @@ int collect_statistics_for_index(THD *thd, TABLE *table, uint index)
|
||||
index_prefix_calc.add();
|
||||
rc= table->file->ha_index_next(table->record[0]);
|
||||
}
|
||||
table->key_read= 0;
|
||||
table->file->ha_end_keyread();
|
||||
table->file->ha_index_end();
|
||||
|
||||
rc= (rc == HA_ERR_END_OF_FILE && !thd->killed) ? 0 : 1;
|
||||
|
Reference in New Issue
Block a user