[MDEV-4004] Empty variable names allowed and break replication Created: 2013-01-06 Updated: 2013-05-08 Resolved: 2013-05-08 |
|
| Status: | Closed |
| Project: | MariaDB Server |
| Component/s: | None |
| Affects Version/s: | 5.5.29 |
| Fix Version/s: | 5.5.31 |
| Type: | Bug | Priority: | Major |
| Reporter: | Federico Razzoli | Assignee: | Sergei Golubchik |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | upstream | ||
| Issue Links: |
|
||||||||
| Description |
|
The original description can be found further in this field The problem is reproducible with MySQL 5.1-5.6 and filed as http://bugs.mysql.com/bug.php?id=68135. A variable can be created with an empty name. Apparently, it's confusing (see the original request below) and potentially error-prone; but it also causes problems with binary logging and replication:
Consequently, replication fails with ER_SLAVE_RELAY_LOG_READ_FAILURE. Currently it's only reproducible on maria/5.5, but not on maria/5.1, 5.2, 5.3 or 10.0-base. However, I suppose it's just a matter of time, since it came to maria/5.5 with the last mysql-5.1.67 merge, and it exists in all current trees of MySQL. Test case:
================================== Original descriptionI'm not sure if this is a bug or a feature request. Empty names seem to be allowed for variables. No warnings.
The same happens with local vars in stored routines:
|
| Comments |
| Comment by Elena Stepanova [ 2013-01-22 ] |
|
Hi Federico, I suppose as a feature request it wouldn't stand much of a chance, not because it's unreasonable, but because it would almost inevitably cause compatibility issues – replication from an old slave to a new master, stored procedures which use an empty name, etc., and of course for MariaDb also compatibility with the upstream. However, it turns out there is a bug with empty names, most likely a regression, which causes replication problems. I've updated the description and refiled it to MySQL bug base, and mentioned your request there, too. I doubt, however, that the bug will make Oracle forbid empty names, on the same reason of breaking compatibility with older versions; and if they don't, we can't either. Thanks for the report, it revealed a serious issue. |
| Comment by Federico Razzoli [ 2013-01-22 ] |
|
Hi Elena |
| Comment by Elena Stepanova [ 2013-01-31 ] |
|
A comment from the corresponding MySQL bug report: " A zero-length name for a user variable was incorrectly considered to be a sign of data corruption and thus was not written to the binary log. So I suppose they haven't made an empty name illegal. |
| Comment by Sergei Golubchik [ 2013-05-08 ] |
|
fixed by the mysql-5.5.31 merge |