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

Method execute

sql/sql_admin.cc:1656–1682  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1654
1655
1656bool Sql_cmd_analyze_table::execute(THD *thd)
1657{
1658 LEX *m_lex= thd->lex;
1659 TABLE_LIST *first_table= m_lex->first_select_lex()->table_list.first;
1660 bool res= TRUE;
1661 thr_lock_type lock_type = TL_READ_NO_INSERT;
1662 DBUG_ENTER("Sql_cmd_analyze_table::execute");
1663
1664 if (check_table_access(thd, SELECT_ACL | INSERT_ACL, first_table,
1665 FALSE, UINT_MAX, FALSE))
1666 goto error;
1667 if (thd->has_read_only_protection())
1668 goto error;
1669
1670 WSREP_TO_ISOLATION_BEGIN_WRTCHK(NULL, NULL, first_table);
1671 res= mysql_admin_table(thd, first_table, &m_lex->check_opt,
1672 &msg_analyze, lock_type, 1, 0, 0, 0,
1673 &handler::ha_analyze, 0, true);
1674 m_lex->first_select_lex()->table_list.first= first_table;
1675 m_lex->query_tables= first_table;
1676
1677#ifdef WITH_WSREP
1678 wsrep_error_label:
1679#endif /* WITH_WSREP */
1680error:
1681 DBUG_RETURN(res);
1682}
1683
1684
1685bool Sql_cmd_check_table::execute(THD *thd)

Callers

nothing calls this directly

Calls 7

mysql_admin_tableFunction · 0.85
my_errorFunction · 0.85
mysql_recreate_tableFunction · 0.85
first_select_lexMethod · 0.80
check_table_accessFunction · 0.70
check_some_accessFunction · 0.70

Tested by

no test coverage detected