mirror of
https://github.com/MariaDB/server.git
synced 2025-07-27 18:02:13 +03:00
Applied all changes from Igor and Sanja
This commit is contained in:
@ -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:
|
||||
/** Handle locking a base table for truncate. */
|
||||
bool lock_table(THD *, TABLE_LIST *, bool *);
|
||||
|
Reference in New Issue
Block a user