[MDEV-15867] Slave SQL: Error 'Table 't' is specified twice (ER_UPDATE_TABLE_USED) upon CREATE TABLE .. SELECT Created: 2018-04-13 Updated: 2018-07-18 Resolved: 2018-07-18 |
|
| Status: | Closed |
| Project: | MariaDB Server |
| Component/s: | Data Definition - Temporary, Replication |
| Affects Version/s: | 10.2, 10.3 |
| Fix Version/s: | 10.2.17 |
| Type: | Bug | Priority: | Major |
| Reporter: | Elena Stepanova | Assignee: | Sachin Setiya (Inactive) |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | None | ||
| Attachments: |
|
||||||||||||||||
| Issue Links: |
|
||||||||||||||||
| Description |
|
Reproducible on 10.2, 10.3. Not reproducible on 10.1. |
| Comments |
| Comment by Sachin Setiya (Inactive) [ 2018-05-16 ] | |||||||||||||||
|
With row format this test passes which is strange. | |||||||||||||||
| Comment by Sachin Setiya (Inactive) [ 2018-05-16 ] | |||||||||||||||
|
Ohh got it , in the case of row format the slave does not receive temp table | |||||||||||||||
| Comment by Sachin Setiya (Inactive) [ 2018-05-16 ] | |||||||||||||||
|
commit b2ae32aafdd2
| |||||||||||||||
| Comment by Sachin Setiya (Inactive) [ 2018-05-16 ] | |||||||||||||||
|
Initial Analysis:- 1st->It only fails when format is mixed/stmt because in row format tmp table is not transfered to slave. 2nd-> The above patch is the introduces different behavior between 10.1 and 10.2 Now there are two ways
2. We can change condition in mysql_execute_command , If we find that the duplicate table itself is temp table then do not through error.
in master create_info.or_replace is false() {for this test case, which makes me thinking that master is also buggy}In Slave however it is turned true by this line
| |||||||||||||||
| Comment by Sachin Setiya (Inactive) [ 2018-05-16 ] | |||||||||||||||
|
Initial Patch
| |||||||||||||||
| Comment by Sachin Setiya (Inactive) [ 2018-05-16 ] | |||||||||||||||
|
http://lists.askmonty.org/pipermail/commits/2018-May/012551.html | |||||||||||||||
| Comment by Andrei Elkin [ 2018-07-17 ] | |||||||||||||||
|
Reviewed to approve provided couple of small improvement is done. |