pingcap/tidb-tools

sync_diff: failed to initialize the diff process with downstream MySQL and hidden column.

3AceShowHand opened this issue · 4 comments

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.
set character_set_connection=utf8;

CREATE TABLE `t` (
  `pk` bigint(20) NOT NULL AUTO_INCREMENT,
  `j` json DEFAULT NULL,
  `i` int(11) DEFAULT NULL,
  `c` char(64) DEFAULT NULL,
  PRIMARY KEY (`pk`) /*T![clustered_index] CLUSTERED */
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin AUTO_INCREMENT=30001;

alter table t add index j((cast(j->'$.number[*]' as signed array))); 
  1. What did you expect to see?

sync diff runs normally

  1. What did you see instead?
[FATAL] [main.go:120] ["failed to initialize diff process"] [error="get table test.t's information error line 7 column 56 near \"'$.number[*]') as signed array)))\n) ENGINE=InnoDB AUTO_INCREMENT=30001 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin\"

sync_diff.log

  1. What version of TiDB are you using (tidb-server -V or run select tidb_version(); on TiDB)?

  2. which tool are you using?
    sync-diff

  3. what versionof tool are you using (pump -V or tidb-lightning -V or syncer -V)?

@3AceShowHand this isn't a hidden column, but a generated column, right?

I have created #802 for hidden columns

Looks like you reported this for v7.0.0-1-g640ac78, but I can't reproduce this anymore on v8.1.0-1-g17af326

I can reproduce this on v7.0.0, so this was fixed somewhere after that release.