[MDEV-14031] Password policy causes replication failure Created: 2017-10-09 Updated: 2017-12-20 Resolved: 2017-12-20 |
|
| Status: | Closed |
| Project: | MariaDB Server |
| Component/s: | Authentication and Privilege System, Replication |
| Affects Version/s: | 10.1, 10.2.9, 10.2 |
| Fix Version/s: | 10.1.30, 10.2.12, 10.3.3 |
| Type: | Bug | Priority: | Major |
| Reporter: | Michael Xu | Assignee: | Alexander Barkov |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | None | ||
| Environment: |
CentOS 7 x86_64 |
||
| Issue Links: |
|
||||||||
| Sprint: | 10.2.11, 10.1.30 | ||||||||
| Description |
|
simple_password_check settings on both master and slave
On master side, create an user with invalid password The user was not created on master server, but for some reason binlog has written to disk. On slave side, replication slave stops Meanwhile, I can see the new user has been created on slave server, the behaviour is strange. |
| Comments |
| Comment by Elena Stepanova [ 2017-10-09 ] | |||||||||||||||||||||||||||||||||||||||||||
|
Due to various considerations, some statements are written into the binary log even when they fail. In this case, CREATE USER is written into the binary log on master. The binlog event gets the error code 1819 (ER_NOT_VALID_PASSWORD). The expectation is that the slave will hit the same error while trying to execute the statement. However, you apparently don't have the simple_password_check plugin on the slave, so the password does not violate any restrictions, the statement works all right ("no error" on the slave), which causes the replication failure. Reasons for writing erroneous statements into the binary log are different, depending on the statement. I don't know reasoning for single CREATE USER, it looks like the change was made in the scope of | |||||||||||||||||||||||||||||||||||||||||||
| Comment by Sergei Golubchik [ 2017-10-09 ] | |||||||||||||||||||||||||||||||||||||||||||
|
As far as I remember, password validation is always skipped on the slave. In particular, because normally passwords are not written to binlog, the statement is rewritten to use IDENTIFIED BY PASSWORD and the password hash. | |||||||||||||||||||||||||||||||||||||||||||
| Comment by Alexander Barkov [ 2017-12-18 ] | |||||||||||||||||||||||||||||||||||||||||||
|
The failed CREATE USER statement gets written into the binary log.
The output is:
Notice, the CREATE USER statement. | |||||||||||||||||||||||||||||||||||||||||||
| Comment by Sergei Golubchik [ 2017-12-18 ] | |||||||||||||||||||||||||||||||||||||||||||
|
ok to push, but please create a bug report for the second issue we've discussed. |