1
0
mirror of https://github.com/MariaDB/server.git synced 2025-08-01 03:47:19 +03:00

Merge dl145s.mysql.com:/data/bk/team_tree_merge/MERGE/mysql-5.0-opt

into  dl145s.mysql.com:/data/bk/team_tree_merge/MERGE/mysql-5.1-opt
This commit is contained in:
gkodinov@dl145s.mysql.com
2006-09-29 11:30:35 +02:00
6 changed files with 47 additions and 24 deletions

View File

@ -1461,8 +1461,11 @@ void update_non_unique_table_error(TABLE_LIST *update,
*/
if (update->view)
{
/* Issue the ER_NON_INSERTABLE_TABLE error for an INSERT */
if (update->view == duplicate->view)
my_error(ER_NON_UPDATABLE_TABLE, MYF(0), update->alias, operation);
my_error(!strncmp(operation, "INSERT", 6) ?
ER_NON_INSERTABLE_TABLE : ER_NON_UPDATABLE_TABLE, MYF(0),
update->alias, operation);
else
my_error(ER_VIEW_PREVENT_UPDATE, MYF(0),
(duplicate->view ? duplicate->alias : update->alias),