[MDEV-11815] SP variables of temporal data types do not replicate correctly Created: 2017-01-16 Updated: 2017-09-15 Resolved: 2017-02-01 |
|
| Status: | Closed |
| Project: | MariaDB Server |
| Component/s: | Replication, Stored routines |
| Affects Version/s: | 5.5, 10.0, 10.1, 10.2, 10.3 |
| Fix Version/s: | 10.3.0 |
| Type: | Bug | Priority: | Major |
| Reporter: | Alexander Barkov | Assignee: | Alexander Barkov |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | datatype | ||
| Issue Links: |
|
||||||||||||||||||||
| Description |
|
SP variables in statement binlog are replicated by replacing them to a special function NAME_CONST(). The implementation of sp_get_item_value() is not correct. It replaces values of temporal variables to string literals, so they are interpreted differently on the master and on the slave. This mtr test demonstrates the problem:
This tests returns the following results:
Notice, the INSERT statement inserted 1 on the master and 0 on the slave. If I look inside mysql-test/var/mysqld.1/data/master-bin.000001, I can see that the INSERT query rewritten as follows:
This is wrong. It should be rewritten using the temporal literal syntax instead of the string literal syntax:
|
| Comments |
| Comment by Alexander Barkov [ 2017-02-01 ] |
|
Pushed into bb-10.2-ext, in a joint patch for |