MySQL 8.0.40
Source Code Documentation
sql_handler.h File Reference
#include "my_base.h"
#include "my_sqlcommand.h"
#include "sql/sql_cmd.h"

Go to the source code of this file.

Classes

class  Sql_cmd_handler_open
 Sql_cmd_handler_open represents HANDLER OPEN statement. More...
 
class  Sql_cmd_handler_read
 Sql_cmd_handler_read represents HANDLER READ statement. More...
 
class  Sql_cmd_handler_close
 Sql_cmd_handler_close represents HANDLER CLOSE statement. More...
 

Enumerations

enum class  enum_ha_read_modes {
  RFIRST , RNEXT , RPREV , RLAST ,
  RKEY , RNEXT_SAME
}
 

Functions

void mysql_ha_flush (THD *thd)
 Flush (close and mark for re-open) all tables that should be should be reopen. More...
 
void mysql_ha_flush_tables (THD *thd, Table_ref *all_tables)
 Close cursors of matching tables from the HANDLER's hash table. More...
 
void mysql_ha_flush_table (THD *thd, const char *db_name, const char *table_name)
 Close cursors on the table from the HANDLER's hash. More...
 
void mysql_ha_rm_tables (THD *thd, Table_ref *tables)
 Remove matching tables from the HANDLER's hash table. More...
 
void mysql_ha_rm_temporary_tables (THD *thd)
 Remove temporary tables from the HANDLER's hash table. More...
 
void mysql_ha_cleanup (THD *thd)
 Close all HANDLER's tables. More...
 
void mysql_ha_set_explicit_lock_duration (THD *thd)
 Set explicit duration for metadata locks corresponding to open HANDLERs to protect them from being released at the end of transaction. More...
 

Enumeration Type Documentation

◆ enum_ha_read_modes

enum class enum_ha_read_modes
strong
Enumerator
RFIRST 
RNEXT 
RPREV 
RLAST 
RKEY 
RNEXT_SAME 

Function Documentation

◆ mysql_ha_cleanup()

void mysql_ha_cleanup ( THD thd)

Close all HANDLER's tables.

Parameters
thdThread identifier.
Note
Broadcasts refresh if it closed a table with old version.

◆ mysql_ha_flush()

void mysql_ha_flush ( THD thd)

Flush (close and mark for re-open) all tables that should be should be reopen.

Parameters
thdThread identifier.
Note
Broadcasts refresh if it closed a table with old version.

◆ mysql_ha_flush_table()

void mysql_ha_flush_table ( THD thd,
const char *  db_name,
const char *  table_name 
)

Close cursors on the table from the HANDLER's hash.

Parameters
thdThread context.
db_nameDatabase name for the table.
table_nameTable name.

◆ mysql_ha_flush_tables()

void mysql_ha_flush_tables ( THD thd,
Table_ref all_tables 
)

Close cursors of matching tables from the HANDLER's hash table.

Parameters
thdThread identifier.
all_tablesThe list of tables to flush.

◆ mysql_ha_rm_tables()

void mysql_ha_rm_tables ( THD thd,
Table_ref tables 
)

Remove matching tables from the HANDLER's hash table.

Parameters
thdThread identifier.
tablesThe list of tables to remove.
Note
Broadcasts refresh if it closed a table with old version.

◆ mysql_ha_rm_temporary_tables()

void mysql_ha_rm_temporary_tables ( THD thd)

Remove temporary tables from the HANDLER's hash table.

The reason for having a separate function, rather than calling mysql_ha_rm_tables() is that it is not always feasible (e.g. in close_temporary_tables) to obtain a Table_ref containing the temporary tables.

See also
close_temporary_tables
Parameters
thdThread identifier.

◆ mysql_ha_set_explicit_lock_duration()

void mysql_ha_set_explicit_lock_duration ( THD thd)

Set explicit duration for metadata locks corresponding to open HANDLERs to protect them from being released at the end of transaction.

Parameters
thdThread identifier.