Commit a2bd45b
committed
MDEV-38506: (Patch) Failed GRANT on a procedure breaks replication
A failed GRANT on a procedure will be replicated when sql_mode does not
have NO_AUTO_CREATE_USER. This is because the function
mysql_routine_grant() does not check if an error occured while
performing the GRANT on a procedure before binlogging, it simply always
binlogs.
This patch fixes this problem by checking if an error happened
previously before binlogging, and if so, then skip binlogging.
Note there is still a broader issue in this area leading to replication
divergence. Reported in MDEV-29848, a partially-completed GRANT
statment (where some earlier GRANTS succeed and a later fails) will not
binlog. Note this affects all grant types, whereas the issue addressed
in this patch is limited to GRANT EXECUTE ON PROCEDURE. This patch
makes GRANT EXECUTE ON PROCEDURE binlogging behavior consistent with
the other grant types. A separate follow-up patch will address the
broader MDEV-29848 issue.
Reviewed-by: TODO
Signed-off-by: Brandon Nesterenko <[email protected]>1 parent b35af31 commit a2bd45b
2 files changed
+33
-6
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
38 | 38 | | |
39 | 39 | | |
40 | 40 | | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
41 | 69 | | |
| 70 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
7428 | 7428 | | |
7429 | 7429 | | |
7430 | 7430 | | |
7431 | | - | |
| 7431 | + | |
7432 | 7432 | | |
7433 | 7433 | | |
7434 | 7434 | | |
| |||
7519 | 7519 | | |
7520 | 7520 | | |
7521 | 7521 | | |
7522 | | - | |
7523 | | - | |
7524 | | - | |
7525 | | - | |
7526 | | - | |
| 7522 | + | |
| 7523 | + | |
| 7524 | + | |
7527 | 7525 | | |
7528 | 7526 | | |
7529 | 7527 | | |
| |||
0 commit comments