Skip to content
This repository has been archived by the owner on Nov 24, 2023. It is now read-only.

reference table not exists when add foreign key statement is the first statement that table in syncer #1056

Closed
GMHDBJD opened this issue Sep 17, 2020 · 0 comments · Fixed by #1093
Assignees
Labels
help wanted This issue wanted some help from contributor severity/major type/bug This issue is a bug report

Comments

@GMHDBJD
Copy link
Collaborator

GMHDBJD commented Sep 17, 2020

Bug Report

Please answer these questions before submitting your issue. Thanks!

  1. What did you do? If possible, provide a recipe for reproducing the error.
start task
alter table tb1 add constraint foreign key (a) references tb2(a);
  1. What did you expect to see?
    worker runs well
  2. What did you see instead?
{
                                "ErrCode": 44006,
                                "ErrClass": "schema-tracker",
                                "ErrScope": "internal",
                                "ErrLevel": "high",
                                "Message": "startLocation: [position: (mysql-bin.000001, 987), gtid-set: 90ef7875-f829-11ea-a36c-0242ac110002:1-4], endLocation: [position: (mysql-bin.000001, 1154), gtid-set: 90ef7875-f829-11ea-a36c-0242ac110002:1-5]: cannot track DDL: ALTER TABLE `handle_error`.`tb1` ADD CONSTRAINT FOREIGN KEY (`a`) REFERENCES `handle_error`.`ta`(`a`)",
                                "RawCause": "[schema:1146]Table 'handle_error.ta' doesn't exist",
                                "Workaround": ""
}
  1. Versions of the cluster

    • DM version (run dmctl -V or dm-worker -V or dm-master -V):

      master
      
@GMHDBJD GMHDBJD added type/bug This issue is a bug report help wanted This issue wanted some help from contributor labels Sep 17, 2020
@lance6716 lance6716 self-assigned this Sep 24, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
help wanted This issue wanted some help from contributor severity/major type/bug This issue is a bug report
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants