{"id":1396,"date":"2018-01-24T23:32:56","date_gmt":"2018-01-24T15:32:56","guid":{"rendered":"http:\/\/www.royalwzy.com\/?p=1396"},"modified":"2018-01-25T15:24:00","modified_gmt":"2018-01-25T07:24:00","slug":"mysqldump-error-3024-query-execution-was-interrupted","status":"publish","type":"post","link":"http:\/\/www.royalwzy.com\/?p=1396","title":{"rendered":"mysqldump Error 3024: Query execution was interrupted"},"content":{"rendered":"<p><strong>mysqldump\u65f6\u53ef\u80fd\u51fa\u73b0\u7684\u4e00\u4e2aerror\uff0c\u5b8c\u6574\u62a5<\/strong><strong>\u9519\u5982\u4e0b\uff1a<\/strong><br \/>\nmysqldump: Error: Query execution was interrupted, maximum statement execution time exceeded when trying to dump tablespaces<br \/>\nmysqldump: Error 3024: Query execution was interrupted, maximum statement execution time exceeded when dumping table `$tb_name` at row: 25002<\/p>\n<p><strong>\u5728SELECT\u65f6\u4e5f\u6709\u53ef\u80fd\u62a5\u8be5\u9519\uff1a<\/strong><br \/>\nERROR 3024 (HY000): Query execution was interrupted, maximum statement execution time exceeded<\/p>\n<p><strong>\u8be5\u95ee\u9898\u4ec5\u53d1\u751f\u57285.7.8+\u7684\u7248\u672c<\/strong><\/p>\n<p><strong>\u539f\u56e0\u662fmax_execution_time\u8bbe\u7f6e\u8fc7\u5c0f\u5bfc\u81f4\u3002<\/strong><\/p>\n<p>\u5c06max_execution_time\u8bbe\u7f6e\u6210\u5f88\u5c0f\u7684\u503c\uff0c\u6267\u884cmysqldump\uff08\u672c\u8d28\u4e5f\u662f\u6267\u884cSELECT\uff09\u6216\u8005SELECT\u8bed\u53e5\u5373\u53ef\u590d\u73b0\uff1a<\/p>\n<ol class=\"dp-css none_number\" start=\"1\">\n<li>[17:23:01]\u00a0root@localhost\u00a0[(none)]&gt;\u00a0SET\u00a0GLOBAL max_execution_time=10;<\/li>\n<li>Query OK, 0 rows affected (0.00 sec)<\/li>\n<li><\/li>\n<li>[17:23:11]\u00a0root@localhost\u00a0[(none)]&gt;\u00a0SELECT\u00a0*\u00a0FROM\u00a0test.t1 LIMIT 100000;<\/li>\n<li>ERROR 3024\u00a0(HY000):\u00a0Query execution was interrupted,\u00a0maximum statement execution\u00a0time\u00a0exceeded<\/li>\n<li><\/li>\n<li>mysqldump -uxxx -pxxx -S xxx.socket -A\u00a0&gt;\u00a0\/tmp\/a.sql<\/li>\n<li>mysqldump: Error 3024: Query execution was interrupted,\u00a0maximum statement execution\u00a0time\u00a0exceeded\u00a0when\u00a0dumping\u00a0table\u00a0`$tb_name`\u00a0at row: 0<\/li>\n<\/ol>\n<p>&nbsp;<\/p>\n<p><strong>\u53ef\u4ee5\u8003\u8651\u4ee5\u4e0b\u89e3\u51b3\u65b9\u6848\uff1a<\/strong><\/p>\n<p><strong>\u2460 \u901a\u8fc7hints\uff0c\u8bbe\u7f6e\u4e00\u4e2a\u8f83\u5927\u7684N\u503c\u3002<\/strong><br \/>\nSELECT \/*+ MAX_EXECUTION_TIME(N) *\/ * FROM t1 LIMIT 100000;<\/p>\n<p><strong>\u2461 \u4fee\u6539max_execution_time\u503c\uff0c\u5c06\u8be5\u503c\u8bbe\u7f6e\u4e3a\u8f83\u5927\u4e00\u4e2a\u503c\uff0c\u6216\u8bbe\u7f6e\u4e3a0\uff08\u4e0d\u9650\u5236\uff09\u3002<\/strong><\/p>\n<p>&nbsp;<\/p>\n<p><strong>\u76f8\u5173\u53c2\u6570\uff1a<\/strong><\/p>\n<p><strong>max_execution_time<\/strong><br \/>\n\u8be5\u53c2\u65705.7.8\u88ab\u6dfb\u52a0\uff0c\u5355\u4f4d\u4e3ams\uff0c\u52a8\u6001\u53c2\u6570\uff0c\u9ed8\u8ba4\u4e3a0\u3002<br \/>\n\u8bbe\u7f6e\u4e3a0\u65f6\u610f\u5473\u7740SELECT\u8d85\u65f6\u4e0d\u88ab\u8bbe\u7f6e\uff08\u4e0d\u9650\u5236\u8d85\u65f6\u65f6\u95f4\uff09\u3002<br \/>\n\u4e0d\u4f5c\u7528\u4e8e\u5b58\u50a8\u8fc7\u7a0b\u4e2d\u7684SELECT\u8bed\u53e5\uff0c\u5e76\u4e14\u53ea\u4f5c\u7528\u4e8e\u53ea\u8bfb\u7684SELECT\uff0c\u6bd4\u5982INSERT &#8230; SELECT &#8230; \u662f\u4e0d\u88ab\u4f5c\u7528\u7684\u3002<\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>mysqldump\u65f6\u53ef\u80fd\u51fa\u73b0\u7684\u4e00\u4e2aerror\uff0c\u5b8c\u6574\u62a5\u9519\u5982\u4e0b\uff1a mysqldump: Error: Query  [&hellip;]<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[6],"tags":[],"class_list":["post-1396","post","type-post","status-publish","format-standard","hentry","category-oracle"],"_links":{"self":[{"href":"http:\/\/www.royalwzy.com\/index.php?rest_route=\/wp\/v2\/posts\/1396","targetHints":{"allow":["GET"]}}],"collection":[{"href":"http:\/\/www.royalwzy.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/www.royalwzy.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/www.royalwzy.com\/index.php?rest_route=\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"http:\/\/www.royalwzy.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=1396"}],"version-history":[{"count":2,"href":"http:\/\/www.royalwzy.com\/index.php?rest_route=\/wp\/v2\/posts\/1396\/revisions"}],"predecessor-version":[{"id":1398,"href":"http:\/\/www.royalwzy.com\/index.php?rest_route=\/wp\/v2\/posts\/1396\/revisions\/1398"}],"wp:attachment":[{"href":"http:\/\/www.royalwzy.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=1396"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/www.royalwzy.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=1396"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/www.royalwzy.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=1396"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}