1
0
mirror of https://github.com/MariaDB/server.git synced 2025-07-29 05:21:33 +03:00

BUG#13343 CREATE|etc TRIGGER|VIEW|USER don't commit the transaction (inconsistency)

Updated more DDL statements to cause implicit commit.


mysql-test/r/rpl_ddl.result:
  updated results to test for implicit commit for:
  CREATE OR REPLACE VIEW
  ALTER VIEW
  DROP VIEW
  CREATE TRIGGER
  DROP TRIGGER
  CREATE USER
  RENAME USER
  DROP USER
mysql-test/t/rpl_ddl.test:
  updated results to test for implicit commit for:
  CREATE OR REPLACE VIEW
  ALTER VIEW
  DROP VIEW
  CREATE TRIGGER
  DROP TRIGGER
  CREATE USER
  RENAME USER
  DROP USER
sql/sql_parse.cc:
  added implicit commit for:
  CREATE OR REPLACE VIEW
  ALTER VIEW
  DROP VIEW
  CREATE TRIGGER
  DROP TRIGGER
  CREATE USER
  RENAME USER
  DROP USER
This commit is contained in:
unknown
2005-10-13 05:12:17 -04:00
parent 849eafa751
commit 799b1e6c5a
3 changed files with 556 additions and 0 deletions

View File

@ -3684,6 +3684,8 @@ end_with_restore_list:
if (check_access(thd, INSERT_ACL, "mysql", 0, 1, 1, 0) &&
check_global_access(thd,CREATE_USER_ACL))
break;
if (end_active_trans(thd))
goto error;
if (!(res= mysql_create_user(thd, lex->users_list)))
{
if (mysql_bin_log.is_open())
@ -3700,6 +3702,8 @@ end_with_restore_list:
if (check_access(thd, DELETE_ACL, "mysql", 0, 1, 1, 0) &&
check_global_access(thd,CREATE_USER_ACL))
break;
if (end_active_trans(thd))
goto error;
if (!(res= mysql_drop_user(thd, lex->users_list)))
{
if (mysql_bin_log.is_open())
@ -3716,6 +3720,8 @@ end_with_restore_list:
if (check_access(thd, UPDATE_ACL, "mysql", 0, 1, 1, 0) &&
check_global_access(thd,CREATE_USER_ACL))
break;
if (end_active_trans(thd))
goto error;
if (!(res= mysql_rename_user(thd, lex->users_list)))
{
if (mysql_bin_log.is_open())
@ -4510,6 +4516,9 @@ end_with_restore_list:
}
case SQLCOM_CREATE_VIEW:
{
if (end_active_trans(thd))
goto error;
if (!(res= mysql_create_view(thd, thd->lex->create_view_mode)) &&
mysql_bin_log.is_open())
{
@ -4557,6 +4566,9 @@ end_with_restore_list:
}
case SQLCOM_CREATE_TRIGGER:
{
if (end_active_trans(thd))
goto error;
res= mysql_create_or_drop_trigger(thd, all_tables, 1);
/* We don't care about trigger body after this point */
@ -4566,6 +4578,9 @@ end_with_restore_list:
}
case SQLCOM_DROP_TRIGGER:
{
if (end_active_trans(thd))
goto error;
res= mysql_create_or_drop_trigger(thd, all_tables, 0);
break;
}