1
0
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:
Michael Widenius
2013-06-15 18:32:08 +03:00
parent 3143ad589a
commit 5f1f2fc0e4
162 changed files with 11704 additions and 6298 deletions

View File

@ -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 *);