MySQL 5.6.14 Source Code Document
|
#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 Member Functions | |
bool | lock_table (THD *, TABLE_LIST *, bool *) |
int | handler_truncate (THD *, TABLE_LIST *, bool) |
bool | truncate_table (THD *, TABLE_LIST *) |
Additional Inherited Members | |
Static Public Member Functions inherited from Sql_alloc | |
static void * | operator new (size_t size) throw () |
static void * | operator new[] (size_t size) throw () |
static void * | operator new[] (size_t size, MEM_ROOT *mem_root) throw () |
static void * | operator new (size_t size, MEM_ROOT *mem_root) throw () |
static void | operator delete (void *ptr, size_t size) |
static void | operator delete (void *ptr, MEM_ROOT *mem_root) |
static void | operator delete[] (void *ptr, MEM_ROOT *mem_root) |
static void | operator delete[] (void *ptr, size_t size) |
Sql_cmd_truncate_table represents the TRUNCATE statement.
Definition at line 24 of file sql_truncate.h.
|
inline |
Constructor, used to represent a TRUNCATE statement.
Definition at line 34 of file sql_truncate.h.
|
virtual |
Execute a TRUNCATE statement at runtime.
thd | the current thread. |
Execute a TRUNCATE statement at runtime.
thd | The current thread. |
Implements Sql_cmd.
Definition at line 509 of file sql_truncate.cc.
|
protected |
Truncate table via the handler method.
Definition at line 187 of file sql_truncate.cc.
|
protected |
Handle locking a base table for truncate.
Definition at line 305 of file sql_truncate.cc.
|
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.
Definition at line 393 of file sql_truncate.cc.