| 1629 | */ |
| 1630 | |
| 1631 | bool mysql_preload_keys(THD* thd, TABLE_LIST* tables) |
| 1632 | { |
| 1633 | DBUG_ENTER("mysql_preload_keys"); |
| 1634 | |
| 1635 | if (check_some_access(thd, TABLE_ACLS, tables)) |
| 1636 | { |
| 1637 | my_error(ER_TABLEACCESS_DENIED_ERROR, MYF(0), "LOAD INDEX INTO CACHE", |
| 1638 | thd->security_ctx->priv_user, |
| 1639 | thd->security_ctx->host_or_ip, |
| 1640 | tables->db.str, tables->table_name.str); |
| 1641 | DBUG_RETURN(TRUE); |
| 1642 | } |
| 1643 | |
| 1644 | /* |
| 1645 | We cannot allow concurrent inserts. The storage engine reads |
| 1646 | directly from the index file, bypassing the cache. It could read |
| 1647 | outdated information if parallel inserts into cache blocks happen. |
| 1648 | */ |
| 1649 | DBUG_RETURN(mysql_admin_table(thd, tables, 0, |
| 1650 | &msg_preload_keys, TL_READ_NO_INSERT, |
| 1651 | 0, 0, 0, 0, |
| 1652 | &handler::preload_keys, 0, false)); |
| 1653 | } |
| 1654 | |
| 1655 | |
| 1656 | bool Sql_cmd_analyze_table::execute(THD *thd) |
no test coverage detected