{"id":246,"date":"2020-06-12T13:33:04","date_gmt":"2020-06-12T05:33:04","guid":{"rendered":"http:\/\/www.gbase8.cn\/?p=246"},"modified":"2021-04-13T11:44:10","modified_gmt":"2021-04-13T03:44:10","slug":"gbase-8a%e9%9b%86%e7%be%a4%e6%9a%82%e5%81%9c%e5%ae%9a%e6%97%b6%e4%bb%bb%e5%8a%a1event-disable","status":"publish","type":"post","link":"https:\/\/www.gbase8.cn\/en\/246","title":{"rendered":"\u5357\u5927\u901a\u7528GBase 8a\u96c6\u7fa4\u6682\u505c\u5b9a\u65f6\u4efb\u52a1event disable"},"content":{"rendered":"<p>gbase&gt; use gclusterdb;<br>Query OK, 0 rows affected (Elapsed: 00:00:00.03)<\/p>\n\n\n\n<p>gbase&gt; alter event import_audit_log disable;<br>Query OK, 0 rows affected (Elapsed: 00:00:00.01)<\/p>\n\n\n\n<p>gbase&gt; select * from gbase.event\\G<br>* 1. row *<br>db: gbase<br>name: drop_temp_table<br>body: DROP TEMPTABLE<br>definer: root@localhost<br>execute_at: NULL<br>interval_value: 1<br>interval_field: DAY<br>created: 2019-10-27 01:03:07<br>modified: 2019-10-27 01:03:07<br>last_executed: NULL<br>starts: 2019-10-27 01:03:07<br>ends: NULL<br>status: ENABLED<br>on_completion: DROP<br>sql_mode: ANSI_QUOTES,IGNORE_SPACE<br>comment:<br>execute_mode: 1<br>time_zone: +08:00<br>character_set_client: utf8<br>collation_connection: utf8_general_ci<br>db_collation: utf8_general_ci<br>body_utf8: DROP TEMPTABLE<br>* 2. row *<br>db: gclusterdb<br>name: import_audit_log<br>body: begin declare errno int; declare msg text; declare exit handler for sqlexception begin get diagnostics condition 1 errno = gbase_errno, msg = message_text; create table if not exists import_audit_log_errors(err_time datetime, hostname varchar(64), err_no int, msg_txt varchar(1024)) CHARSET=utf8mb4; insert into import_audit_log_errors values (now(), @@hostname, errno, substr(msg, 0, 1024)); end; create table if not exists audit_log_express (hostname varchar(64), thread_id int, taskid bigint, start_time datetime, uid bigint, user varchar(16), host_ip varchar(32), query_time time, rows bigint, table_list varchar(4096), sql_text varchar(8191), sql_type varchar(16), sql_command varchar(32), operators varchar(256), status varchar(16), conn_type varchar(16)) CHARSET=utf8mb4; set self sql_mode = ''; create self table gbase.audit_log_bak2 like gbase.audit_log; set self sql_mode = default; rename self table gbase.audit_log to gbase.audit_log_bak1, gbase.audit_log_bak2 to gbase.audit_log; set _gbase_query_path = on; insert into audit_log_express select @@hostname as hostname, thread_id, taskid, start_time, uid, user, host_ip, query_time, rows, substr(table_list, 0, 4096), substr(sql_text, 0, 8191), sql_type, sql_command, operators, status, conn_type from gbase.audit_log_bak1; drop self table gbase.audit_log_bak1; end<br>definer: root@%<br>execute_at: NULL<br>interval_value: 60<br>interval_field: MINUTE<br>created: 2017-12-01 00:00:00<br>modified: 2020-03-03 15:55:11<br>last_executed: NULL<br>starts: 2017-12-01 00:00:00<br>ends: NULL<br>status: DISABLED<br>on_completion: DROP<br>sql_mode: PIPES_AS_CONCAT,ANSI_QUOTES,IGNORE_SPACE,ONLY_FULL_GROUP_BY,NO_AUTO_VALUE_ON_ZERO,STRICT_ALL_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION,PAD_CHAR_TO_FULL_LENGTH<br>comment:<br>execute_mode: 0<br>time_zone: +08:00<br>character_set_client: utf8<br>collation_connection: utf8_general_ci<br>db_collation: utf8_general_ci<br>body_utf8: begin declare errno int; declare msg text; declare exit handler for sqlexception begin get diagnostics condition 1 errno = gbase_errno, msg = message_text; create table if not exists import_audit_log_errors(err_time datetime, hostname varchar(64), err_no int, msg_txt varchar(1024)) CHARSET=utf8mb4; insert into import_audit_log_errors values (now(), @@hostname, errno, substr(msg, 0, 1024)); end; create table if not exists audit_log_express (hostname varchar(64), thread_id int, taskid bigint, start_time datetime, uid bigint, user varchar(16), host_ip varchar(32), query_time time, rows bigint, table_list varchar(4096), sql_text varchar(8191), sql_type varchar(16), sql_command varchar(32), operators varchar(256), status varchar(16), conn_type varchar(16)) CHARSET=utf8mb4; set self sql_mode = ''; create self table gbase.audit_log_bak2 like gbase.audit_log; set self sql_mode = default; rename self table gbase.audit_log to gbase.audit_log_bak1, gbase.audit_log_bak2 to gbase.audit_log; set _gbase_query_path = on; insert into audit_log_express select @@hostname as hostname, thread_id, taskid, start_time, uid, user, host_ip, query_time, rows, substr(table_list, 0, 4096), substr(sql_text, 0, 8191), sql_type, sql_command, operators, status, conn_type from gbase.audit_log_bak1; drop self table gbase.audit_log_bak1; end<br>2 rows in set (Elapsed: 00:00:00.00)<\/p>","protected":false},"excerpt":{"rendered":"<p>\u5357\u5927\u901a\u7528GBase 8a\u96c6\u7fa4\u6682\u505c\u5b9a\u65f6\u4efb\u52a1event disable<\/p>","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[3,4],"tags":[],"class_list":["post-246","post","type-post","status-publish","format-standard","hentry","category-gbase8a"],"_links":{"self":[{"href":"https:\/\/www.gbase8.cn\/en\/wp-json\/wp\/v2\/posts\/246","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.gbase8.cn\/en\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.gbase8.cn\/en\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.gbase8.cn\/en\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.gbase8.cn\/en\/wp-json\/wp\/v2\/comments?post=246"}],"version-history":[{"count":2,"href":"https:\/\/www.gbase8.cn\/en\/wp-json\/wp\/v2\/posts\/246\/revisions"}],"predecessor-version":[{"id":5318,"href":"https:\/\/www.gbase8.cn\/en\/wp-json\/wp\/v2\/posts\/246\/revisions\/5318"}],"wp:attachment":[{"href":"https:\/\/www.gbase8.cn\/en\/wp-json\/wp\/v2\/media?parent=246"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.gbase8.cn\/en\/wp-json\/wp\/v2\/categories?post=246"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.gbase8.cn\/en\/wp-json\/wp\/v2\/tags?post=246"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}