rusuly / MySqlCdc

MySQL/MariaDB binlog replication client for .NET
Other
118 stars 41 forks source link

[Question] TableMapEvent.TableMetaData.ColumnNames returns null #20

Closed weirdyang closed 3 years ago

weirdyang commented 3 years ago

Any hint on what could be the issue?

image

image

I'm using MySQL 8.0.23

þbin `   y   }     8.0.23                                             ` 
         a       

** 4 
(Î~
¨ `#      œ   €         ]Ùy9 `"   O   ë                                             ê
‡"bÂüh—8 ¶N9 `   K   6                     E    std! ! ÿ ÿ test BEGINÿ¾b9 `   K     € 3INSERT INTO test (id, name)
   VALUES
   ( 1, 3 )×ãd9 `   :   »    X      test test È   üÿ I`« 9 `   *   å    X       ÿ    3—õW9 `          -       nõ_;~ `"   O   S                                           ¾´örbÂüx—8 e+§o~ `   K   ž                     E    std! ! ÿ ÿ test BEGINÍÓ±£~ `   T   ò  € <INSERT INTO test (id, name)
   VALUES
   ( 1, "asdasdas" )‡20Ë~ `   :   ,    X      test test È   üÿ !œüc~ `   1   ]    X       ÿ    asdasdasjÕŸ;~ `      |    s       rË×=­ `"   O   Ë                                           ‡5¼ubÂüx—8 Õsh5­ `   K                        E    std! ! ÿ ÿ test BEGIN0GKð­ `   T   j  € <INSERT INTO test (id, name)
   VALUES
   ( 1, "asdasdas" )BÛtô­ `   :   ¤    X      test test È   üÿ Cî©­­ `   1   Õ    X       ÿ    asdasdas“@Öî­ `      ô    v       rOi½ `"   O   C                                           ¹|´vbÂüw—8 bV!)½ `   K   Ž                     E    std! ! ÿ ÿ test BEGIN¶¾f½ `   U   ã  € =INSERT INTO test (id, name)
   VALUES
   ( 3333, "asdasd" )öø½ `   :       X      test test È   üÿ jÙm¢½ `   /   L    X       ÿ 
  asdasdÈßØt½ `      k    w       Š6Ì( `"   O   º                                           wbÂüw—8 ËÔw¸Â `   K                        E    std! ! ÿ ÿ test BEGIN>ÝM¶Â `   U   Z  € =INSERT INTO test (id, name)
   VALUES
   ( 3333, "asdasd" )¸«Z `   :   ”    X      test test È   üÿ \Œ< `   /   à    X       ÿ 
  asdasdüL¢Â `      â    y       y+œÃ `"   O   1                                           þWwbÂüw—8 ¶c”µÃ `   K   |                     E    std! ! ÿ ÿ test BEGINAWËà`   U   Ñ  € =INSERT INTO test (id, name)
   VALUES
   ( 3333, "asdasd" )üjŒäà`   :        X      test test È   üÿ û‚E*à`   /   :       X       ÿ 
  asdasdèlÔà`      Y     z       Ыäà

Contents of my binlog.. could it be an encoding issue?

weirdyang commented 3 years ago

fixed it by including binlog_row_metadata = full in my.cnf.

but now I'm getting Table metadata type 12 is not supported

rusuly commented 3 years ago

Hi, I believe you need to configure binlog_row_metadata = full

weirdyang commented 3 years ago

Hi, I believe you need to configure binlog_row_metadata = full

thanks I did that, wrongly assumed v8 didn't need it.

are you able to help me with this exception? Table metadata type 12 is not supported

rusuly commented 3 years ago

Hi, just looking at the release notes for different MySQL 8 versions. The library handles 11 metadata types and it looks like a new metadata type with id=12 was added in some MySQL 8.0.x version but I don't see it in the docs

You can download the source code and comment the line that throws the exception while I investigate the issue and parse the new metadata type

rusuly commented 3 years ago

Ok, I found that the COLUMN_VISIBILITY was added

rusuly commented 3 years ago

Just fixed it and published a new version to the nuget

weirdyang commented 3 years ago

that was really fast! thanks. I had cloned the repo and commented it out earlier. Much appreciated!