{"id":27123,"date":"2020-02-04T00:30:42","date_gmt":"2020-02-03T16:30:42","guid":{"rendered":"http:\/\/4563.org\/?p=27123"},"modified":"2020-02-04T00:30:42","modified_gmt":"2020-02-03T16:30:42","slug":"%e3%80%90%e4%b8%8d%e6%87%82%e5%b0%b1%e8%a6%81%e9%97%ae%e3%80%91mysql-%e6%9b%bf%e6%8d%a2%e9%9a%8f%e6%9c%ba%e6%95%b0","status":"publish","type":"post","link":"http:\/\/4563.org\/?p=27123","title":{"rendered":"\u3010\u4e0d\u61c2\u5c31\u8981\u95ee\u3011MySQL \u66ff\u6362\u968f\u673a\u6570"},"content":{"rendered":"\n<p>  \t\t\t\t\t<strong>imsun<\/strong>  \t\t\t\t\u5927\u4f6c\u6709\u8bdd\u8bf4 : 2019-12-28 18:00:31\t<\/p>\n<h3>\u3010\u4e0d\u61c2\u5c31\u8981\u95ee\u3011MySQL \u66ff\u6362\u968f\u673a\u6570<\/h3>\n<p>  \t\tUPDATE DedeCMS SET text=REPLACE(text,&#8217;\u6587\u5b57&#8217;,ROUND((rand() * 500)))<\/p>\n<p>  \u7ed3\u679c\u53d1\u73b0\u4e86\u4e00\u4e2a\u95ee\u9898<br \/>  \u5c31\u662f\u6240\u6709\u7684 \u6587\u5b57 \u90fd\u88ab\u66ff\u6362\u6210\u540c\u4e00\u4e2a\u968f\u673a\u503c\uff0c<\/p>\n<p>  \u6211\u60f3\u8981\u8fbe\u5230\u7684\u662f\uff0c\u6587\u5b57\u88ab\u66ff\u6362\u4e3a1\uff0c \u88ab\u66ff\u6362\u4e3a2\uff0c\u88ab\u66ff\u6362\u4e3a3&#8230;.\u8fd9\u6837\u6bcf\u4e2a\u90fd\u968f\u673a\u3002<\/p>\n<p>  \u8bf7\u6c42\u5927\u4f6c\u6307\u660e\u65b9\u5411\u3002\t\t\t\t<\/p>\n<p>  \t\t\t\t\t<strong>imsun<\/strong>  \t\t\t\t\u5927\u4f6c\u6709\u8bdd\u8bf4 : 2019-12-28 18:06:56\t<\/p>\n<h3><\/h3>\n<p>  \t\t\u6c42\u52a9\u6c42\u52a9\u4eba\u5de5\u9876\t\t\t\t<\/p>\n<p>  \t\t\t\t\t<strong>woniu<\/strong>  \t\t\t\t\u5927\u4f6c\u6709\u8bdd\u8bf4 : 2019-12-28 18:09:27\t<\/p>\n<h3><\/h3>\n<p>  \t\t\u5475\u5475 \u4e00\u4e2a\u8bed\u53e5\u5f53\u7136\u662f\u7edf\u4e00\u66ff\u6362<\/p>\n<p>  \u81ea\u5df1\u5199\u5b58\u50a8\u8fc7\u7a0b\u5427\uff0c\u5faa\u73af\u91cc\u9762\u4e00\u6761\u6761\u66f4\u65b0\u5373\u53ef\t\t\t\t<\/p>\n<p>  \t\t\t\t\t<strong>hnxzc<\/strong>  \t\t\t\t\u5927\u4f6c\u6709\u8bdd\u8bf4 : 2019-12-28 18:37:30\t<\/p>\n<h3><\/h3>\n<p>  \t\t\u4f60\u8fd9rand\u53ea\u6709\u4e00\u6b21\u554a\t\t\t\t<\/p>\n<p>  \t\t\t\t\t<strong>imsun<\/strong>  \t\t\t\t\u5927\u4f6c\u6709\u8bdd\u8bf4 : 2019-12-28 20:03:27\t<\/p>\n<h3><\/h3>\n<p>  \t\twoniu \u5927\u4f6c\u6709\u8bdd\u8bf4 : 2019-12-28 18:09<br \/>  \u5475\u5475 \u4e00\u4e2a\u8bed\u53e5\u5f53\u7136\u662f\u7edf\u4e00\u66ff\u6362<\/p>\n<p>  \u81ea\u5df1\u5199\u5b58\u50a8\u8fc7\u7a0b\u5427\uff0c\u5faa\u73af\u91cc\u9762\u4e00\u6761\u6761\u66f4\u65b0\u5373\u53ef &#8230;<\/p>\n<p> \u6c42\u52a9\u8be5\u600e\u4e48\u5199&#8230;\t\t\t\t<\/p>\n<p>  \t\t\t\t\t<strong>woniu<\/strong>  \t\t\t\t\u5927\u4f6c\u6709\u8bdd\u8bf4 : 2019-12-28 20:14:57\t<\/p>\n<h3><\/h3>\n<p>  \t\timsun \u5927\u4f6c\u6709\u8bdd\u8bf4 : 2019-12-28 20:03<br \/>  \u6c42\u52a9\u8be5\u600e\u4e48\u5199&#8230;<\/p>\n<p> \u5199\u4e2a\u6e38\u6807<\/p>\n<p>  \u7136\u540e\u5728\u6e38\u6807\u91cc\u9762\u6267\u884c\u4f60\u7684\u66f4\u65b0\u8bed\u53e5\u5c31\u53ef\u4ee5\u4e86<\/p>\n<p>  \u81ea\u5df1\u53bb\u770b https:\/\/**blogs.com\/horror\/p\/9520906.html<\/p>\n<p>  \u6216\u8005\u628a\u4f60\u7684\u8868\u7ed3\u6784\u53d1\u4e0a\u6765\t\t\t\t<\/p>\n<p>  \t\t\t\t\t<strong>imsun<\/strong>  \t\t\t\t\u5927\u4f6c\u6709\u8bdd\u8bf4 : 2019-12-28 20:24:26\t<\/p>\n<h3><\/h3>\n<p>  \t\twoniu \u5927\u4f6c\u6709\u8bdd\u8bf4 : 2019-12-28 20:14<br \/>  \u5199\u4e2a\u6e38\u6807<\/p>\n<p>  \u7136\u540e\u5728\u6e38\u6807\u91cc\u9762\u6267\u884c\u4f60\u7684\u66f4\u65b0\u8bed\u53e5\u5c31\u53ef\u4ee5\u4e86<\/p>\n<p> ELIMITER \/\/<br \/>  DROP PROCEDURE IF EXISTS test;<br \/>  CREATE PROCEDURE test()<br \/>  BEGIN<br \/>  DECLARE i INT;<br \/>  SET i = 0;<br \/>  REPEAT<br \/>  &nbsp; &nbsp; UPDATE DedeCMS SET text=REPLACE(text,&#8217;\u6587\u5b57&#8217;,ROUND((rand() * 500)))<br \/>  &nbsp; &nbsp; SET i = i + 1;<br \/>  UNTIL i &gt; 51900 END REPEAT;<br \/>  SELECT * FROM test;<br \/>  END<br \/>  \/\/<br \/>  CALL test();<br \/>  DELIMITER ;<\/p>\n<p>  \u6267\u884c\u4e0d\u8d77\u6765\u3002<\/p>\n<p>  \u6211\u7684\u8868\u7ed3\u6784\u662f<br \/>  \u8868\u540d\uff1aak_texts<br \/>  \u7ed3\u6784\uff1aid&nbsp; &nbsp;itemid&nbsp; &nbsp; subtitle&nbsp; &nbsp; text&nbsp; &nbsp; page&nbsp; &nbsp;outid<br \/>  \u4e3b\u8981\u6362\u300a text\u300b\u76f8\u5173\u5339\u914d\u7684\u6587\u5b57\t\t\t\t<\/p>\n<p>  \t\t\t\t\t<strong>woniu<\/strong>  \t\t\t\t\u5927\u4f6c\u6709\u8bdd\u8bf4 : 2019-12-28 20:42:58\t<\/p>\n<h3><\/h3>\n<p>  \t\t \u672c\u5e16\u6700\u540e\u7531 woniu \u4e8e 2019-12-28 20:47 \u7f16\u8f91 <\/p>\n<p> imsun \u5927\u4f6c\u6709\u8bdd\u8bf4 : 2019-12-28 20:24<br \/>  \u6267\u884c\u4e0d\u8d77\u6765\u3002<\/p>\n<p>  \u6211\u7684\u8868\u7ed3\u6784\u662f<\/p>\n<p>  \u8001\u94c1 \u4f60\u8fd9\u6837\u5199\u80af\u5b9a\u4e0d\u884c \u6211\u4e0d\u662f\u8bf4\u4e86\u5fc5\u987b\u4e00\u884c\u4e00\u884c\u7684\u66f4\u65b0<\/p>\n<p>  \u4f60\u8868\u91cc\u7684id\u662f\u4e3b\u952e\u5417\uff0c\u4e0d\u662f\u7684\u8bdd\u81ea\u5df1\u6539\u6539<\/p>\n<p>  &nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;create procedure p3()<br \/>  &nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;begin <br \/>  &nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;declare ssid int; &#8212; \u5fc5\u987b\u662f\u4e3b\u952e<br \/>  &nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;DECLARE done INT DEFAULT FALSE;<\/p>\n<p>  &nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;DECLARE my_cursor CURSOR FOR select id from ak_texts;<br \/>  &nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;DECLARE CONTINUE HANDLER FOR NOT FOUND SET done = TRUE;<br \/>  &nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;<br \/>  &nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;open my_cursor;<br \/>  &nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp; xxoo: LOOP<br \/>  &nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;fetch my_cursor into ssid;<br \/>  &nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;if done then <br \/>  &nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;leave xxoo;<br \/>  &nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;END IF;<br \/>  &nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;UPDATE ak_texts SET text=REPLACE(text,&#8217;\u6587\u5b57&#8217;,ROUND((rand() * 500)))where id = ssid;<br \/>  &nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp; COMMIT;<br \/>  &nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp; end loop xxoo;<br \/>  &nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;close my_cursor;<br \/>  &nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;end<\/p>\n<p>  \t\t\t\t\t<strong>imsun<\/strong>  \t\t\t\t\u5927\u4f6c\u6709\u8bdd\u8bf4 : 2019-12-28 20:56:49\t<\/p>\n<h3><\/h3>\n<p>  \t\twoniu \u5927\u4f6c\u6709\u8bdd\u8bf4 : 2019-12-28 20:42<br \/>  \u8001\u94c1 \u4f60\u8fd9\u6837\u5199\u80af\u5b9a\u4e0d\u884c \u6211\u4e0d\u662f\u8bf4\u4e86\u5fc5\u987b\u4e00\u884c\u4e00\u884c\u7684\u66f4\u65b0<\/p>\n<p>  \u4f60\u8868\u91cc\u7684id\u662f\u4e3b\u952e\u5417\uff0c\u4e0d\u662f\u7684\u8bdd\u81ea\u5df1\u6539\u6539<\/p>\n<p>  id \u662f\u4e3b\u952e\uff0c\u8fd0\u884c\u9519\u8bef\u4e86\u3002<\/p>\n<p>  SQL \u67e5\u8be2\uff1a<\/p>\n<p>  &nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;create procedure p3()<br \/>  &nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;begin<br \/>  &nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;declare ssid int;<br \/>  MySQL \u8fd4\u56de\uff1a \u6587\u6863<\/p>\n<p>  #1064 &#8211; You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near &#8221; at line 3\t\t\t\t<\/p>\n<p>  \t\t\t\t\t<strong>woniu<\/strong>  \t\t\t\t\u5927\u4f6c\u6709\u8bdd\u8bf4 : 2019-12-28 20:58:24\t<\/p>\n<h3><\/h3>\n<p>  \t\t \u672c\u5e16\u6700\u540e\u7531 woniu \u4e8e 2019-12-28 20:59 \u7f16\u8f91 <\/p>\n<p> imsun \u5927\u4f6c\u6709\u8bdd\u8bf4 : 2019-12-28 20:56<br \/>  id \u662f\u4e3b\u952e\uff0c\u8fd0\u884c\u9519\u8bef\u4e86\u3002<\/p>\n<p>  SQL \u67e5\u8be2\uff1a<\/p>\n<p>  \u81ea\u5df1\u767e\u5ea6\u4e00\u4e0b\u5427 \u53ea\u80fd\u7ed9\u4f60\u63d0\u4f9b\u601d\u8def<\/p>\n<p>  \u6211\u4e5f\u6ca1\u5199\u8fc7mysql\u7684\uff0c\u5199\u8fc7oralce\u7684\uff0c\u53ea\u662f\u9053\u7406\u662f\u76f8\u540c\u7684\t\t\t  <\/p>\n","protected":false},"excerpt":{"rendered":"<p>imsun \u5927\u4f6c\u6709\u8bdd\u8bf4 : 201&hellip;<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[],"tags":[],"_links":{"self":[{"href":"http:\/\/4563.org\/index.php?rest_route=\/wp\/v2\/posts\/27123"}],"collection":[{"href":"http:\/\/4563.org\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/4563.org\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/4563.org\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/4563.org\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=27123"}],"version-history":[{"count":0,"href":"http:\/\/4563.org\/index.php?rest_route=\/wp\/v2\/posts\/27123\/revisions"}],"wp:attachment":[{"href":"http:\/\/4563.org\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=27123"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/4563.org\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=27123"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/4563.org\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=27123"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}