dyrnq / docker-canal

docker-canal
https://github.com/alibaba/canal
0 stars 0 forks source link

test case binlog_rows_query_log_events = 1 #35

Open dyrnq opened 1 month ago

dyrnq commented 1 month ago

binlog_rows_query_log_events = 0

INFO  c.a.o.canal.client.adapter.logger.LoggerAdapterExample - DML: {"data":[{"Create_routine_priv":"2","Alter_priv":"2","User":"root","References_priv":"2","Index_priv":"2","account_locked":"1","Process_priv":"2","Repl_slave_priv":"2","Trigger_priv":"2","ssl_cipher":"","password_lifetime":null,"File_priv":"2","Drop_priv":"2","Select_priv":"2","Create_priv":"2","authentication_string":"","Create_tablespace_priv":"2","Execute_priv":"2","Show_view_priv":"2","x509_issuer":"","Insert_priv":"2","Create_tmp_table_priv":"2","Create_view_priv":"2","Alter_routine_priv":"2","Repl_client_priv":"2","Lock_tables_priv":"2","ssl_type":"1","password_last_changed":"2024-10-25 08:53:36","max_questions":"0","max_connections":"0","Shutdown_priv":"2","password_expired":"1","Event_priv":"2","Delete_priv":"2","x509_subject":"","Host":"localhost","Grant_priv":"2","max_updates":"0","max_user_connections":"0","Super_priv":"2","plugin":"mysql_native_password","Reload_priv":"2","Update_priv":"2","Create_user_priv":"2","Show_db_priv":"2"},{"Create_routine_priv":"1","Alter_priv":"1","User":"mysql.session","References_priv":"1","Index_priv":"1","account_locked":"2","Process_priv":"1","Repl_slave_priv":"1","Trigger_priv":"1","ssl_cipher":"","password_lifetime":null,"File_priv":"1","Drop_priv":"1","Select_priv":"1","Create_priv":"1","authentication_string":"*THISISNOTAVALIDPASSWORDTHATCANBEUSEDHERE","Create_tablespace_priv":"1","Execute_priv":"1","Show_view_priv":"1","x509_issuer":"","Insert_priv":"1","Create_tmp_table_priv":"1","Create_view_priv":"1","Alter_routine_priv":"1","Repl_client_priv":"1","Lock_tables_priv":"1","ssl_type":"1","password_last_changed":"2024-10-25 08:53:36","max_questions":"0","max_connections":"0","Shutdown_priv":"1","password_expired":"1","Event_priv":"1","Delete_priv":"1","x509_subject":"","Host":"localhost","Grant_priv":"1","max_updates":"0","max_user_connections":"0","Super_priv":"2","plugin":"mysql_native_password","Reload_priv":"1","Update_priv":"1","Create_user_priv":"1","Show_db_priv":"1"}],"database":"mysql","destination":"example","es":1729817621000,"groupId":"g1","isDdl":false,"old":null,"pkNames":["Host","User"],"sql":"","table":"user","ts":1729817672574,"type":"DELETE"}
INFO  c.a.o.canal.client.adapter.logger.LoggerAdapterExample - DML: {"data":null,"database":"mytest2","destination":"mytest2","es":1729817625000,"groupId":"mytest2","isDdl":true,"old":null,"pkNames":null,"sql":"DROP TABLE IF EXISTS `stuff` /* generated by server */","table":"stuff","ts":1729817672574,"type":"ERASE"}
INFO  c.a.o.canal.client.adapter.logger.LoggerAdapterExample - DML: {"data":null,"database":"","destination":"example","es":1729817625000,"groupId":"g1","isDdl":true,"old":null,"pkNames":null,"sql":"CREATE DATABASE /*!32312 IF NOT EXISTS*/ `mytest2` /*!40100 DEFAULT CHARACTER SET utf8 COLLATE utf8_bin */","table":"","ts":1729817672575,"type":"QUERY"}
INFO  c.a.o.canal.client.adapter.logger.LoggerAdapterExample - DML: {"data":null,"database":"mytest2","destination":"mytest2","es":1729817625000,"groupId":"mytest2","isDdl":true,"old":null,"pkNames":null,"sql":"CREATE TABLE `stuff` (\n    id INT PRIMARY KEY,\n    name VARCHAR(50)\n)","table":"stuff","ts":1729817672575,"type":"CREATE"}
INFO  c.a.o.canal.client.adapter.logger.LoggerAdapterExample - DML: {"data":[{"name":"Alice","id":"1"},{"name":"Bob","id":"2"},{"name":"Charlie","id":"3"},{"name":"David","id":"4"},{"name":"Eva","id":"5"},{"name":"Frank","id":"6"},{"name":"Grace","id":"7"},{"name":"Hannah","id":"8"},{"name":"Ivy","id":"9"},{"name":"Jack","id":"10"}],"database":"mytest2","destination":"mytest2","es":1729817625000,"groupId":"mytest2","isDdl":false,"old":null,"pkNames":["id"],"sql":"","table":"stuff","ts":1729817672575,"type":"INSERT"}
INFO  c.a.o.canal.client.adapter.logger.LoggerAdapterExample - DML: {"data":[{"name":"Kathy","id":"11"},{"name":"Leo","id":"12"},{"name":"Mia","id":"13"},{"name":"Nina","id":"14"},{"name":"Oscar","id":"15"},{"name":"Paul","id":"16"},{"name":"Quincy","id":"17"},{"name":"Rachel","id":"18"},{"name":"Sam","id":"19"},{"name":"Tina","id":"20"},{"name":"Uma","id":"21"},{"name":"Victor","id":"22"},{"name":"Wendy","id":"23"},{"name":"Xander","id":"24"},{"name":"Yara","id":"25"},{"name":"Zane","id":"26"},{"name":"Amy","id":"27"},{"name":"Brian","id":"28"},{"name":"Cathy","id":"29"},{"name":"Derek","id":"30"}],"database":"mytest2","destination":"mytest2","es":1729817625000,"groupId":"mytest2","isDdl":false,"old":null,"pkNames":["id"],"sql":"","table":"stuff","ts":1729817672575,"type":"INSERT"}

binlog_rows_query_log_events = 1

INFO  c.a.o.canal.client.adapter.logger.LoggerAdapterExample - DML: {"data":null,"database":"","destination":"example","es":1729817093000,"groupId":"g1","isDdl":false,"old":null,"pkNames":null,"sql":"DELETE FROM mysql.user WHERE user not in ('mysql.sys','mariadb.sys')","table":"user","ts":1729817142608,"type":"QUERY"}
INFO  c.a.o.canal.client.adapter.logger.LoggerAdapterExample - DML: {"data":null,"database":"mytest2","destination":"mytest2","es":1729817097000,"groupId":"mytest2","isDdl":true,"old":null,"pkNames":null,"sql":"DROP TABLE IF EXISTS `stuff` /* generated by server */","table":"stuff","ts":1729817142611,"type":"ERASE"}
INFO  c.a.o.canal.client.adapter.logger.LoggerAdapterExample - DML: {"data":null,"database":"mytest2","destination":"mytest2","es":1729817097000,"groupId":"mytest2","isDdl":true,"old":null,"pkNames":null,"sql":"CREATE TABLE `stuff` (\n    id INT PRIMARY KEY,\n    name VARCHAR(50)\n)","table":"stuff","ts":1729817142611,"type":"CREATE"}
INFO  c.a.o.canal.client.adapter.logger.LoggerAdapterExample - DML: {"data":[{"name":"Alice","id":"1"},{"name":"Bob","id":"2"},{"name":"Charlie","id":"3"},{"name":"David","id":"4"},{"name":"Eva","id":"5"},{"name":"Frank","id":"6"},{"name":"Grace","id":"7"},{"name":"Hannah","id":"8"},{"name":"Ivy","id":"9"},{"name":"Jack","id":"10"}],"database":"mytest2","destination":"mytest2","es":1729817097000,"groupId":"mytest2","isDdl":false,"old":null,"pkNames":["id"],"sql":"","table":"stuff","ts":1729817142611,"type":"INSERT"}
INFO  c.a.o.canal.client.adapter.logger.LoggerAdapterExample - DML: {"data":[{"name":"Kathy","id":"11"},{"name":"Leo","id":"12"},{"name":"Mia","id":"13"},{"name":"Nina","id":"14"},{"name":"Oscar","id":"15"},{"name":"Paul","id":"16"},{"name":"Quincy","id":"17"},{"name":"Rachel","id":"18"},{"name":"Sam","id":"19"},{"name":"Tina","id":"20"},{"name":"Uma","id":"21"},{"name":"Victor","id":"22"},{"name":"Wendy","id":"23"},{"name":"Xander","id":"24"},{"name":"Yara","id":"25"},{"name":"Zane","id":"26"},{"name":"Amy","id":"27"},{"name":"Brian","id":"28"},{"name":"Cathy","id":"29"},{"name":"Derek","id":"30"}],"database":"mytest2","destination":"mytest2","es":1729817097000,"groupId":"mytest2","isDdl":false,"old":null,"pkNames":["id"],"sql":"","table":"stuff","ts":1729817142611,"type":"INSERT"}
INFO  c.a.o.canal.client.adapter.logger.LoggerAdapterExample - DML: {"data":[{"Create_routine_priv":"2","Alter_priv":"2","User":"root","References_priv":"2","Index_priv":"2","account_locked":"1","Process_priv":"2","Repl_slave_priv":"2","Trigger_priv":"2","ssl_cipher":"","password_lifetime":null,"File_priv":"2","Drop_priv":"2","Select_priv":"2","Create_priv":"2","authentication_string":"","Create_tablespace_priv":"2","Execute_priv":"2","Show_view_priv":"2","x509_issuer":"","Insert_priv":"2","Create_tmp_table_priv":"2","Create_view_priv":"2","Alter_routine_priv":"2","Repl_client_priv":"2","Lock_tables_priv":"2","ssl_type":"1","password_last_changed":"2024-10-25 08:44:48","max_questions":"0","max_connections":"0","Shutdown_priv":"2","password_expired":"1","Event_priv":"2","Delete_priv":"2","x509_subject":"","Host":"localhost","Grant_priv":"2","max_updates":"0","max_user_connections":"0","Super_priv":"2","plugin":"mysql_native_password","Reload_priv":"2","Update_priv":"2","Create_user_priv":"2","Show_db_priv":"2"},{"Create_routine_priv":"1","Alter_priv":"1","User":"mysql.session","References_priv":"1","Index_priv":"1","account_locked":"2","Process_priv":"1","Repl_slave_priv":"1","Trigger_priv":"1","ssl_cipher":"","password_lifetime":null,"File_priv":"1","Drop_priv":"1","Select_priv":"1","Create_priv":"1","authentication_string":"*THISISNOTAVALIDPASSWORDTHATCANBEUSEDHERE","Create_tablespace_priv":"1","Execute_priv":"1","Show_view_priv":"1","x509_issuer":"","Insert_priv":"1","Create_tmp_table_priv":"1","Create_view_priv":"1","Alter_routine_priv":"1","Repl_client_priv":"1","Lock_tables_priv":"1","ssl_type":"1","password_last_changed":"2024-10-25 08:44:49","max_questions":"0","max_connections":"0","Shutdown_priv":"1","password_expired":"1","Event_priv":"1","Delete_priv":"1","x509_subject":"","Host":"localhost","Grant_priv":"1","max_updates":"0","max_user_connections":"0","Super_priv":"2","plugin":"mysql_native_password","Reload_priv":"1","Update_priv":"1","Create_user_priv":"1","Show_db_priv":"1"}],"database":"mysql","destination":"example","es":1729817093000,"groupId":"g1","isDdl":false,"old":null,"pkNames":["Host","User"],"sql":"","table":"user","ts":1729817142609,"type":"DELETE"}
INFO  c.a.o.canal.client.adapter.logger.LoggerAdapterExample - DML: {"data":null,"database":"","destination":"example","es":1729817097000,"groupId":"g1","isDdl":true,"old":null,"pkNames":null,"sql":"CREATE DATABASE /*!32312 IF NOT EXISTS*/ `mytest2` /*!40100 DEFAULT CHARACTER SET utf8 COLLATE utf8_bin */","table":"","ts":1729817142609,"type":"QUERY"}
INFO  c.a.o.canal.client.adapter.logger.LoggerAdapterExample - DML: {"data":null,"database":"","destination":"example","es":1729817097000,"groupId":"g1","isDdl":false,"old":null,"pkNames":null,"sql":"INSERT INTO stuff (id, name) VALUES\n(1, 'Alice'),\n(2, 'Bob'),\n(3, 'Charlie'),\n(4, 'David'),\n(5, 'Eva'),\n(6, 'Frank'),\n(7, 'Grace'),\n(8, 'Hannah'),\n(9, 'Ivy'),\n(10, 'Jack')","table":"stuff","ts":1729817142609,"type":"QUERY"}
INFO  c.a.o.canal.client.adapter.logger.LoggerAdapterExample - DML: {"data":null,"database":"","destination":"example","es":1729817097000,"groupId":"g1","isDdl":false,"old":null,"pkNames":null,"sql":"INSERT INTO stuff (id, name) VALUES\n(11, 'Kathy'),\n(12, 'Leo'),\n(13, 'Mia'),\n(14, 'Nina'),\n(15, 'Oscar'),\n(16, 'Paul'),\n(17, 'Quincy'),\n(18, 'Rachel'),\n(19, 'Sam'),\n(20, 'Tina'),\n(21, 'Uma'),\n(22, 'Victor'),\n(23, 'Wendy'),\n(24, 'Xander'),\n(25, 'Yara'),\n(26, 'Zane'),\n(27, 'Amy'),\n(28, 'Brian'),\n(29, 'Cathy'),\n(30, 'Derek')","table":"stuff","ts":1729817142609,"type":"QUERY"}
dyrnq commented 1 month ago

binlog_rows_query_log_events 是 MySQL 中的一个系统变量,用于控制在使用行格式(ROW format)进行二进制日志记录时,是否记录执行的 SQL 语句。

主要功能

使用场景