|
My Project
|
#include <sql_truncate.h>
Public Member Functions | |
| Sql_cmd_truncate_table () | |
| bool | execute (THD *thd) |
| virtual enum_sql_command | sql_command_code () const |
| Return the command code for this statement. | |
Protected Types | |
| enum | truncate_result { TRUNCATE_OK = 0, TRUNCATE_FAILED_BUT_BINLOG, TRUNCATE_FAILED_SKIP_BINLOG } |
Protected Member Functions | |
| bool | lock_table (THD *, TABLE_LIST *, bool *) |
| enum truncate_result | handler_truncate (THD *, TABLE_LIST *, bool) |
| bool | truncate_table (THD *, TABLE_LIST *) |
Sql_cmd_truncate_table represents the TRUNCATE statement.
| Sql_cmd_truncate_table::Sql_cmd_truncate_table | ( | ) | [inline] |
Constructor, used to represent a TRUNCATE statement.
| bool Sql_cmd_truncate_table::execute | ( | THD * | thd | ) | [virtual] |
Execute a TRUNCATE statement at runtime.
| thd | the current thread. |
Execute a TRUNCATE statement at runtime.
| thd | The current thread. |
Implements Sql_cmd.
| enum Sql_cmd_truncate_table::truncate_result Sql_cmd_truncate_table::handler_truncate | ( | THD * | thd, |
| TABLE_LIST * | table_ref, | ||
| bool | is_tmp_table | ||
| ) | [protected] |
Truncate table via the handler method.
| bool Sql_cmd_truncate_table::lock_table | ( | THD * | thd, |
| TABLE_LIST * | table_ref, | ||
| bool * | hton_can_recreate | ||
| ) | [protected] |
Handle locking a base table for truncate.
| bool Sql_cmd_truncate_table::truncate_table | ( | THD * | thd, |
| TABLE_LIST * | table_ref | ||
| ) | [protected] |
Optimized delete of all rows by doing a full regenerate of the table. Depending on the storage engine, it can be accomplished through a drop and recreate or via the handler truncate method.
1.7.6.1