{"id":35,"date":"2021-04-27T14:33:45","date_gmt":"2021-04-27T06:33:45","guid":{"rendered":"http:\/\/www.yunloveting.com\/?p=35"},"modified":"2021-04-27T14:33:45","modified_gmt":"2021-04-27T06:33:45","slug":"mysql-%e6%97%a5%e6%9c%9f%e4%b8%8d%e5%85%81%e8%ae%b8%e4%b8%ba0%e8%a7%a3%e5%86%b3%e6%96%b9%e6%b3%95","status":"publish","type":"post","link":"http:\/\/www.yunloveting.com\/?p=35","title":{"rendered":"MySQL \u65e5\u671f\u4e0d\u5141\u8bb8\u4e3a0\u89e3\u51b3\u65b9\u6cd5"},"content":{"rendered":"\n<p>\u9047\u5230\u4e2a\u95ee\u9898\u8bf4\u9700\u8981\u91cd\u5efa\u4e00\u4e2a\u5b57\u6bb5\u3002\u7136\u540e\u5c1d\u8bd5\u5220\u9664:<\/p>\n\n\n\n<p>MariaDB [cmxt_log]&gt; desc tl_user_sent_stat;<br>+&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-+&#8212;&#8212;&#8212;&#8212;-+&#8212;&#8212;+&#8212;&#8211;+&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;+&#8212;&#8212;-+<br>| Field | Type | Null | Key | Default | Extra |<br>+&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-+&#8212;&#8212;&#8212;&#8212;-+&#8212;&#8212;+&#8212;&#8211;+&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;+&#8212;&#8212;-+<br>| provider_id | varchar(60) | YES | MUL | NULL | |<br>| org_id | varchar(60) | YES | | NULL | |<br>| user_id | varchar(60) | YES | | NULL | |<br>| log_time | datetime | NO | | 0000-00-00 00:00:00 | |<br>| deliver_result | int(11) | YES | | NULL | |<br>| sent_count1 | int(11) | YES | | NULL | |<br>| sent_count2 | int(11) | YES | | NULL | |<br>| sent_count3 | int(11) | YES | | NULL | |<br>| sent_count4 | int(11) | YES | | NULL | |<br>| sent_count5 | int(11) | YES | | NULL | |<br>| sent_count6 | int(11) | YES | | NULL | |<br>| sent_count7 | int(11) | YES | | NULL | |<br>| sent_count8 | int(11) | YES | | NULL | |<br>| sent_count9 | int(11) | YES | | NULL | |<br>| msg_sent_size_sum | bigint(20) | YES | | NULL | |<br>| msg_sent_count | int(11) | YES | | NULL | |<br>| max_msg_size | int(11) | YES | | NULL | |<br>| spam_influence_count | int(11) | YES | | NULL | |<br>| spam_count | int(11) | YES | | NULL | |<br>+&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-+&#8212;&#8212;&#8212;&#8212;-+&#8212;&#8212;+&#8212;&#8211;+&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;+&#8212;&#8212;-+<br>19 rows in set (0.024 sec)<\/p>\n\n\n\n<p>\u62a5\u9519\uff1a<br>MariaDB [cmxt_log]&gt; alter table tl_user_sent_stat drop column spam_count ;<br>ERROR 1067 (42000): Invalid default value for &#8216;log_time&#8217;<\/p>\n\n\n\n<p>\u53ef\u4ee5\u770b\u5230NO_ZERO_IN_DATE,NO_ZERO_DATE\uff0c\u9650\u5236\u4e86\u4e0d\u5141\u8bb8\u4f7f\u75280000-00 \u8fd9\u79cd\u683c\u5f0f\u3002<br>MariaDB [cmxt_log]&gt; show variables like &#8220;%mode%&#8221;;<br>+&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8211;+&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;+<br>| Variable_name | Value |<br>+&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8211;+&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;+<br>| gtid_strict_mode | OFF |<br>| innodb_autoinc_lock_mode | 1 |<br>| innodb_strict_mode | ON |<br>| old_mode | |<br>| pseudo_slave_mode | OFF |<br>| slave_ddl_exec_mode | IDEMPOTENT |<br>| slave_exec_mode | STRICT |<br>| slave_parallel_mode | optimistic |<br>| sql_mode | STRICT_TRANS_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION |<br>| wsrep_gtid_mode | OFF |<br>+&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8211;+&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;+<br>10 rows in set (0.089 sec)<\/p>\n\n\n\n<p>\u4f7f\u7528\u547d\u4ee4\u628aNO_ZERO_IN_DATE,NO_ZERO_DATE,\u53bb\u6389\u3002<br>MariaDB [cmxt_log]&gt; set session<br>-&gt; sql_mode=&#8217;ONLY_FULL_GROUP_BY,STRICT_TRANS_TABLES,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION&#8217;;<br>Query OK, 0 rows affected (0.009 sec)<\/p>\n\n\n\n<p>MariaDB [cmxt_log]&gt; show variables like &#8220;%mode%&#8221;;<br>+&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8211;+&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8211;+<br>| Variable_name | Value |<br>+&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8211;+&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8211;+<br>| gtid_strict_mode | OFF |<br>| innodb_autoinc_lock_mode | 1 |<br>| innodb_strict_mode | ON |<br>| old_mode | |<br>| pseudo_slave_mode | OFF |<br>| slave_ddl_exec_mode | IDEMPOTENT |<br>| slave_exec_mode | STRICT |<br>| slave_parallel_mode | optimistic |<br>| sql_mode | ONLY_FULL_GROUP_BY,STRICT_TRANS_TABLES,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION |<br>| wsrep_gtid_mode | OFF |<br>+&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8211;+&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8211;+<br>10 rows in set (0.001 sec)<\/p>\n\n\n\n<p>\u5728\u6267\u884c\u5220\u9664\uff0c\u6210\u529f\u4e86\u3002<br>MariaDB [cmxt_log]&gt; alter table tl_user_sent_stat drop column spam_count ;<br>Query OK, 92555 rows affected (0.535 sec)<br>Records: 92555 Duplicates: 0 Warnings: 0<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u9047\u5230\u4e2a\u95ee\u9898\u8bf4\u9700\u8981\u91cd\u5efa\u4e00\u4e2a\u5b57\u6bb5\u3002\u7136\u540e\u5c1d\u8bd5\u5220\u9664: MariaDB [cmxt_log]&gt; desc tl_u [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[9],"tags":[],"_links":{"self":[{"href":"http:\/\/www.yunloveting.com\/index.php?rest_route=\/wp\/v2\/posts\/35"}],"collection":[{"href":"http:\/\/www.yunloveting.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/www.yunloveting.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/www.yunloveting.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/www.yunloveting.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=35"}],"version-history":[{"count":1,"href":"http:\/\/www.yunloveting.com\/index.php?rest_route=\/wp\/v2\/posts\/35\/revisions"}],"predecessor-version":[{"id":36,"href":"http:\/\/www.yunloveting.com\/index.php?rest_route=\/wp\/v2\/posts\/35\/revisions\/36"}],"wp:attachment":[{"href":"http:\/\/www.yunloveting.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=35"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/www.yunloveting.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=35"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/www.yunloveting.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=35"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}