mirror of
https://github.com/MariaDB/server.git
synced 2026-01-06 05:22:24 +03:00
added replication of VIEW DDL commands (BUG#4838)
sql/sql_acl.cc: filling privileges for slave thread fixed sql/sql_parse.cc: added writing to binary log view DDL commands
This commit is contained in:
@@ -4059,7 +4059,12 @@ unsent_create_error:
|
||||
}
|
||||
case SQLCOM_CREATE_VIEW:
|
||||
{
|
||||
res= mysql_create_view(thd, thd->lex->create_view_mode);
|
||||
if (!(res= mysql_create_view(thd, thd->lex->create_view_mode)) &&
|
||||
mysql_bin_log.is_open())
|
||||
{
|
||||
Query_log_event qinfo(thd, thd->query, thd->query_length, 0, FALSE);
|
||||
mysql_bin_log.write(&qinfo);
|
||||
}
|
||||
break;
|
||||
}
|
||||
case SQLCOM_DROP_VIEW:
|
||||
@@ -4067,7 +4072,12 @@ unsent_create_error:
|
||||
if (check_table_access(thd, DROP_ACL, all_tables, 0) ||
|
||||
end_active_trans(thd))
|
||||
goto error;
|
||||
res= mysql_drop_view(thd, first_table, thd->lex->drop_mode);
|
||||
if (!(res= mysql_drop_view(thd, first_table, thd->lex->drop_mode)) &&
|
||||
mysql_bin_log.is_open())
|
||||
{
|
||||
Query_log_event qinfo(thd, thd->query, thd->query_length, 0, FALSE);
|
||||
mysql_bin_log.write(&qinfo);
|
||||
}
|
||||
break;
|
||||
}
|
||||
case SQLCOM_CREATE_TRIGGER:
|
||||
|
||||
Reference in New Issue
Block a user