File tree Expand file tree Collapse file tree 3 files changed +8
-3
lines changed Expand file tree Collapse file tree 3 files changed +8
-3
lines changed Original file line number Diff line number Diff line change @@ -24,7 +24,7 @@ public function makeQueryDTO()
2424 $ schema = $ this ->binaryDataReader ->read ($ schema_length );
2525 $ this ->binaryDataReader ->advance (1 );
2626 $ query = $ this ->binaryDataReader ->read (
27- $ this ->eventInfo ->getSize () - 36 - $ status_vars_length - $ schema_length - 1
27+ $ this ->eventInfo ->getSize () - 13 - $ status_vars_length - $ schema_length - 1
2828 );
2929
3030 return new QueryDTO (
@@ -34,4 +34,4 @@ public function makeQueryDTO()
3434 $ query
3535 );
3636 }
37- }
37+ }
Original file line number Diff line number Diff line change @@ -351,6 +351,10 @@ private function getColumnData($colsBitmap)
351351 {
352352 $ values [$ name ] = $ this ->getDatetime2 ($ column );
353353 }
354+ elseif ($ column ['type ' ] == ConstFieldType::TIMESTAMP )
355+ {
356+ $ values [$ name ] = date ('c ' , $ this ->binaryDataReader ->readUInt32 ());
357+ }
354358 elseif ($ column ['type ' ] === ConstFieldType::TIME2 )
355359 {
356360 $ values [$ name ] = $ this ->getTime2 ($ column );
Original file line number Diff line number Diff line change @@ -75,6 +75,7 @@ public function __construct(Config $config)
7575 'host ' => $ config ->getIp (),
7676 'port ' => $ config ->getPort (),
7777 'driver ' => 'pdo_mysql ' ,
78+ 'charset ' => $ config ->getCharset () ? $ config ->getCharset () : 'utf8 '
7879 ]);
7980 $ this ->binLogAuth = new BinLogAuth ();
8081 $ this ->MySQLRepository = new MySQLRepository ($ this ->connection );
@@ -110,4 +111,4 @@ public function binLogEvent()
110111 {
111112 $ this ->event ->consume ();
112113 }
113- }
114+ }
You can’t perform that action at this time.
0 commit comments