mirror of
https://github.com/MariaDB/server.git
synced 2025-07-29 05:21:33 +03:00
Bug#14653504 CRASH WHEN TRUNCATING PARTITIONS FROM A VIEW!
ANALYSIS -------- When we open the view using open_new_frm() ,it doesnt set the table-list->table variable and any access to table_list->table will cause a crash. FIX --- Added a check during execution of the alter partition to return error if table is view. [http://rb.no.oracle.com/rb/r/2001/ Approved by Mattias J ]
This commit is contained in:
@ -141,7 +141,9 @@ bool Alter_table_truncate_partition_statement::execute(THD *thd)
|
|||||||
TODO: Add support for TRUNCATE PARTITION for NDB and other
|
TODO: Add support for TRUNCATE PARTITION for NDB and other
|
||||||
engines supporting native partitioning.
|
engines supporting native partitioning.
|
||||||
*/
|
*/
|
||||||
if (first_table->table->s->db_type() != partition_hton)
|
|
||||||
|
if (!first_table->table || first_table->view ||
|
||||||
|
first_table->table->s->db_type() != partition_hton)
|
||||||
{
|
{
|
||||||
my_error(ER_PARTITION_MGMT_ON_NONPARTITIONED, MYF(0));
|
my_error(ER_PARTITION_MGMT_ON_NONPARTITIONED, MYF(0));
|
||||||
DBUG_RETURN(TRUE);
|
DBUG_RETURN(TRUE);
|
||||||
|
Reference in New Issue
Block a user