mirror of
https://github.com/MariaDB/server.git
synced 2025-07-30 16:24:05 +03:00
Bug#49907: ALTER TABLE ... TRUNCATE PARTITION does not wait for
locks on the table Fixing the partitioning specifics after TRUNCATE TABLE in bug-42643 was fixed. Reorganize of code to decrease the size of the giant switch in mysql_execute_command, and to prepare for future parser reengineering. Moved code into Sql_statement objects. Updated patch according to davi's review comments.
This commit is contained in:
@ -20,4 +20,30 @@ struct TABLE_LIST;
|
||||
|
||||
bool mysql_truncate_table(THD *thd, TABLE_LIST *table_ref);
|
||||
|
||||
/**
|
||||
Truncate_statement represents the TRUNCATE statement.
|
||||
*/
|
||||
class Truncate_statement : public Sql_statement
|
||||
{
|
||||
public:
|
||||
/**
|
||||
Constructor, used to represent a ALTER TABLE statement.
|
||||
@param lex the LEX structure for this statement.
|
||||
*/
|
||||
Truncate_statement(LEX *lex)
|
||||
: Sql_statement(lex)
|
||||
{}
|
||||
|
||||
~Truncate_statement()
|
||||
{}
|
||||
|
||||
/**
|
||||
Execute a TRUNCATE statement at runtime.
|
||||
@param thd the current thread.
|
||||
@return false on success.
|
||||
*/
|
||||
bool execute(THD *thd);
|
||||
};
|
||||
|
||||
|
||||
#endif
|
||||
|
Reference in New Issue
Block a user