mirror of
https://github.com/MariaDB/server.git
synced 2025-07-27 18:02:13 +03:00
Fix for bug #6859 (after Sanja's review)
Added check which throws ER_WRONG_OBJECT error in case the .frm doesn't contain a valid table type (e.g. view or trigger)
This commit is contained in:
@ -2629,6 +2629,15 @@ bool mysql_create_like_table(THD* thd, TABLE_LIST* table,
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
create like should be not allowed for Views, Triggers, ...
|
||||
*/
|
||||
if (mysql_frm_type(src_path) != FRMTYPE_TABLE)
|
||||
{
|
||||
my_error(ER_WRONG_OBJECT, MYF(0), src_db, src_table, "a table");
|
||||
goto err;
|
||||
}
|
||||
|
||||
/*
|
||||
Validate the destination table
|
||||
|
||||
|
Reference in New Issue
Block a user