MCPcopy Create free account
hub / github.com/MariaDB/server / mysql_preload_keys

Function mysql_preload_keys

sql/sql_admin.cc:1631–1653  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1629*/
1630
1631bool 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
1656bool Sql_cmd_analyze_table::execute(THD *thd)

Callers 1

sql_parse.ccFile · 0.85

Calls 3

my_errorFunction · 0.85
mysql_admin_tableFunction · 0.85
check_some_accessFunction · 0.70

Tested by

no test coverage detected