Skip to content

sync-diff-inspector fix.sql can not execute when data has blob column type. #710

@erwadba

Description

@erwadba

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.
source:
use test
drop table bb;
create table bb(id int primary key,b blob);
insert into `a`.`bb`(`id`,`b`) VALUES (1,x'3e3934f03ed9bcebeb18c73d6ae1346a047e59749751fe425d4bc66c812953b403245aeb12ef7c1237bdf3695b12d3a14c7f5c272f5008aac3956c82e66f4a49ce06653388e8c2a3eb73c7d841ffb40a6cb94e769a577423969b5f53cda87c2e131298401bb37bfd433c4c830b9cdbce1704b97d7e128b411c58e4af5adc8136d39b5414fdd7ceaa0754883c76953978e9e0377f2ba07f894924641a28e0b2f7a9291888862a5575be40a6bf30ecc33dfae635943d2b3140d80fde18a8960416e56ec8ec7e3bece892a151d3b1e77056a14606685c77c87b9faaedf7ec1b8eaa05e7af388b591ad99bd3cfc41ad7cc02324da3d0e9419da04313de8e1df5eda4084e5c3c9b826cfa25fdc3c38974b99688c7a6b1bf6180a092de30a985344d8f23b2d20eec6d8b36ca0766ae31a1a410d9da654158d2954283822a581f6e6fffb81215fa00dc021a7c2ca7fb78a58ebb5a11ecd0e10e741cef6f17592de0bff572a20511755189150ebf2e8182bba0cb83794c73988627b85ac1c9a2cce2ba2891fd5681a662b9bd2bf47b633e5cd45e0a39217c98c4a1f9aa11b86799c927eb0eba40883f20fa606ebb8d4fdfcbf4');

target:
use test
drop table bb;
create table bb(id int primary key,b blob);
  1. What did you expect to see?
    no error

  2. What did you see instead?

# mysql -uroot --default-character-set=utf8mb4  -hxx.xx.xx.xx a -P4000  -pxx --binary-mode=true <output1/fix-on-tidb/a\:tab\:0\:0-0\:0.sql 
mysql: [Warning] Using a password on the command line interface can be insecure.
ERROR at line 3: Unknown command '\''.
# 
  1. What version of TiDB are you using (tidb-server -V or run select tidb_version(); on TiDB)?
mysql> select tidb_version()\G
*************************** 1. row ***************************
tidb_version(): Release Version: v6.5.0
Edition: Community
Git Commit Hash: 706c3fa3c526cdba5b3e9f066b1a568fb96c56e3
Git Branch: heads/refs/tags/v6.5.0
UTC Build Time: 2022-12-27 03:50:44
GoVersion: go1.19.3
Race Enabled: false
TiKV Min Version: 6.2.0-alpha
Check Table Before Drop: false
Store: tikv
1 row in set (0.00 sec)

mysql> 
  1. which tool are you using?
    sync-diff-inspector
  2. what versionof tool are you using (pump -V or tidb-lightning -V or syncer -V)?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions