summaryrefslogtreecommitdiff
path: root/sql/sql_truncate.h
diff options
context:
space:
mode:
Diffstat (limited to 'sql/sql_truncate.h')
-rw-r--r--sql/sql_truncate.h17
1 files changed, 10 insertions, 7 deletions
diff --git a/sql/sql_truncate.h b/sql/sql_truncate.h
index 0280ecc4932..b8525fd6abb 100644
--- a/sql/sql_truncate.h
+++ b/sql/sql_truncate.h
@@ -19,9 +19,9 @@ class THD;
struct TABLE_LIST;
/**
- Truncate_statement represents the TRUNCATE statement.
+ Sql_cmd_truncate_table represents the TRUNCATE statement.
*/
-class Truncate_statement : public Sql_statement
+class Sql_cmd_truncate_table : public Sql_cmd
{
private:
/* Set if a lock must be downgraded after truncate is done. */
@@ -29,14 +29,12 @@ private:
public:
/**
- Constructor, used to represent a ALTER TABLE statement.
- @param lex the LEX structure for this statement.
+ Constructor, used to represent a TRUNCATE statement.
*/
- Truncate_statement(LEX *lex)
- : Sql_statement(lex)
+ Sql_cmd_truncate_table()
{}
- virtual ~Truncate_statement()
+ virtual ~Sql_cmd_truncate_table()
{}
/**
@@ -46,6 +44,11 @@ public:
*/
bool execute(THD *thd);
+ virtual enum_sql_command sql_command_code() const
+ {
+ return SQLCOM_TRUNCATE;
+ }
+
protected:
enum truncate_result{
TRUNCATE_OK=0,