{"id":5566,"date":"2024-08-01T22:47:05","date_gmt":"2024-08-01T14:47:05","guid":{"rendered":"https:\/\/xinchewhd.com.cn\/?p=5566"},"modified":"2024-08-01T22:47:05","modified_gmt":"2024-08-01T14:47:05","slug":"%e7%ba%bf%e4%b8%8ainsert-on-duplicate-%e6%ad%bb%e9%94%81%e9%97%ae%e9%a2%98%e6%8e%92%e6%9f%a5","status":"publish","type":"post","link":"https:\/\/xinchewhd.com.cn\/index.php\/mysql\/%e7%ba%bf%e4%b8%8ainsert-on-duplicate-%e6%ad%bb%e9%94%81%e9%97%ae%e9%a2%98%e6%8e%92%e6%9f%a5\/","title":{"rendered":"\u7ebf\u4e0aINSERT ON DUPLICATE \u6b7b\u9501\u95ee\u9898\u6392\u67e5"},"content":{"rendered":"<div class='wxsyncmain'>\n<p style=\"margin-right: 16px;margin-bottom: 0px;margin-left: 16px;outline: 0px;letter-spacing: 0.544px;text-wrap: wrap;color: rgb(43, 43, 43);font-size: 16px;text-align: left;text-size-adjust: inherit;font-family: -apple-system-font, system-ui, &quot;Helvetica Neue&quot;, &quot;PingFang SC&quot;, &quot;Hiragino Sans GB&quot;, &quot;Microsoft YaHei UI&quot;, &quot;Microsoft YaHei&quot;, Arial, sans-serif;background-color: rgb(255, 255, 255);visibility: visible;\" data-mpa-powered-by=\"yiban.io\"><span style=\"outline: 0px;color: rgb(136, 136, 136);font-size: 12px;letter-spacing: 0.544px;caret-color: rgb(136, 136, 136);visibility: visible;\">\u6765\u6e90\uff1ajuejin.cn\/post\/7038156758614802440<\/span><\/p>\n<p style=\"margin-right: 16px;margin-bottom: 0px;margin-left: 16px;outline: 0px;letter-spacing: 0.544px;text-wrap: wrap;color: rgb(43, 43, 43);font-size: 16px;text-align: left;text-size-adjust: inherit;font-family: -apple-system-font, system-ui, &quot;Helvetica Neue&quot;, &quot;PingFang SC&quot;, &quot;Hiragino Sans GB&quot;, &quot;Microsoft YaHei UI&quot;, &quot;Microsoft YaHei&quot;, Arial, sans-serif;background-color: rgb(255, 255, 255);visibility: visible;\"><span style=\"outline: 0px;color: rgb(136, 136, 136);font-size: 12px;letter-spacing: 0.544px;caret-color: rgb(136, 136, 136);visibility: visible;\">\u63a8\u8350\uff1ahttps<\/span><span style=\"outline: 0px;color: rgb(136, 136, 136);font-size: 12px;letter-spacing: 0.544px;caret-color: rgb(136, 136, 136);visibility: visible;\">:\/\/t.zsxq.com\/SyOqf<\/span><\/p>\n<section data-tool=\"mdnice\u7f16\u8f91\u5668\" data-website=\"https:\/\/www.mdnice.com\" style=\"margin-bottom: 0px;padding-left: 10px;padding-right: 10px;background-attachment: scroll;background-clip: border-box;background-image: linear-gradient(90deg, rgba(50, 0, 0, 0.03) 0%, rgba(255, 255, 255, 0) 11.49%), linear-gradient(360deg, rgba(50, 0, 0, 0.04) 0%, rgba(255, 255, 255, 0) 12.16%);background-origin: padding-box;background-position: 0% 0%;background-repeat: repeat, repeat;background-size: 20px 20px, 20px 20px;width: auto;font-family: Optima, PingFangSC-light, serif;font-size: 16px;color: rgb(0, 0, 0);line-height: 1.5em;word-spacing: 0em;letter-spacing: 0em;word-break: break-word;text-align: left;\">\n<h2 data-tool=\"mdnice\u7f16\u8f91\u5668\" style=\" border-color: rgb(0, 0, 0) rgb(0, 0, 0) rgb(64, 184, 250);margin-top: 30px;margin-bottom: 15px;align-items: unset;background-attachment: scroll;background-clip: border-box;background-image: none;background-origin: padding-box;background-position: 0% 0%;background-repeat: no-repeat;background-size: auto;border-style: none none solid;border-width: 1px 1px 4px;border-radius: 0px;box-shadow: none;flex-direction: unset;float: unset;height: auto;justify-content: unset;line-height: 1.5em;overflow: unset; text-shadow: none;transform: none;width: auto;-webkit-box-reflect: unset; \"><span style=\"background-attachment: scroll;background-clip: border-box;background-image: url('https:\/\/wp-moto-1258805347.cos.ap-shanghai.myqcloud.com\/2024\/08\/20240801221815583.png');background-origin: padding-box;background-position: 0% 0%;background-repeat: no-repeat;background-size: 20px 20px;width: 20px;height: 20px;align-items: unset;border-style: none;border-width: 1px;border-color: rgb(0, 0, 0);border-radius: 0px;box-shadow: none;display: flex;font-size: 22px;font-weight: bold;flex-direction: unset;float: unset;justify-content: unset;letter-spacing: 0px;line-height: 1.5em;margin-bottom: -25px;overflow: unset; text-indent: 0em;text-shadow: none;transform: none;-webkit-box-reflect: unset;\"><\/span><span style=\" font-size: 20px;color: rgb(64, 184, 250);line-height: 1.5em;letter-spacing: 0em;align-items: unset;background-attachment: scroll;background-clip: border-box;background-image: none;background-origin: padding-box;background-position: 0% 0%;background-repeat: no-repeat;background-size: auto;border-style: none;border-width: 1px;border-color: rgb(0, 0, 0);border-radius: 0px;box-shadow: none;display: flex;font-weight: bold;flex-direction: unset;float: unset;height: auto;justify-content: unset;margin-left: 25px;overflow: unset; text-indent: 0em;text-shadow: none;transform: none;width: auto;-webkit-box-reflect: unset; \">\u524d\u8a00<\/span><span style=\" background: none 0% 0% \/ auto no-repeat scroll padding-box border-box rgba(64, 184, 250, 0.5);align-items: unset;border-style: none;border-width: 1px;border-color: rgb(0, 0, 0);border-radius: 20px 0px 0px;box-shadow: none;display: flex;font-size: 22px;font-weight: bold;flex-direction: unset;float: right;height: 10px;justify-content: unset;letter-spacing: 0px;line-height: 1.5em;margin-top: -10px;overflow: unset; text-indent: 0em;text-shadow: none;transform: none;width: 200px;-webkit-box-reflect: unset; \"><\/span><\/h2>\n<p data-tool=\"mdnice\u7f16\u8f91\u5668\" style=\"color: rgb(43, 43, 43);font-size: 14px;line-height: 1.8em;letter-spacing: 0.02em;text-indent: 0em;padding-top: 8px;padding-bottom: 8px;\">\u6700\u8fd1\u5728\u5e76\u53d1\u91cf\u7a0d\u5fae\u9ad8\u7684\u60c5\u51b5\uff0c\u7ebf\u4e0a\u51fa\u73b0\u5f88\u591adeadlock\u65e5\u5fd7\uff0c\u65e5\u5fd7\u4e2d\u540c\u65f6\u4e5f\u6253\u5370\u51fa\u8868\u540d\u548cMDL\uff0c\u662f\u4e00\u6761insert\u8bed\u53e5\u3002\u4e8e\u662f\uff0c\u6211\u67e5\u770b\u8868\u7ed3\u6784\u548c\u4ee3\u7801\u4e2d\u771f\u6b63\u7684\u6267\u884c\u8bed\u53e5\u3002\uff08\u8fd9\u91cc\u4e3a\u4e86\u907f\u514d\u4f7f\u7528\u771f\u5b9e\u8868\uff0c\u6211\u7a0d\u5fae\u6539\u4e86\u4e00\u4e0b\u8868\u540d\u548c\u5b57\u6bb5\u540d\u3002\uff09<\/p>\n<p data-tool=\"mdnice\u7f16\u8f91\u5668\" style=\"color: rgb(43, 43, 43);font-size: 14px;line-height: 1.8em;letter-spacing: 0.02em;text-indent: 0em;padding-top: 8px;padding-bottom: 8px;\"><strong style=\"color: rgb(53, 148, 247);background-attachment: scroll;background-clip: border-box;background-image: none;background-origin: padding-box;background-position: 0% 0%;background-repeat: no-repeat;background-size: auto;width: auto;height: auto;border-style: none;border-width: 3px;border-color: rgba(0, 0, 0, 0.4);border-radius: 0px;\">\u9694\u79bb\u7ea7\u522b\uff1aRR<\/strong><\/p>\n<p data-tool=\"mdnice\u7f16\u8f91\u5668\" style=\"color: rgb(43, 43, 43);font-size: 14px;line-height: 1.8em;letter-spacing: 0.02em;text-indent: 0em;padding-top: 8px;padding-bottom: 8px;\"><strong style=\"color: rgb(53, 148, 247);background-attachment: scroll;background-clip: border-box;background-image: none;background-origin: padding-box;background-position: 0% 0%;background-repeat: no-repeat;background-size: auto;width: auto;height: auto;border-style: none;border-width: 3px;border-color: rgba(0, 0, 0, 0.4);border-radius: 0px;\">\u6570\u636e\u5e93\u7248\u672c\uff1a5.7<\/strong><\/p>\n<p data-tool=\"mdnice\u7f16\u8f91\u5668\" style=\"color: rgb(43, 43, 43);font-size: 14px;line-height: 1.8em;letter-spacing: 0.02em;text-indent: 0em;padding-top: 8px;padding-bottom: 8px;\"><strong style=\"color: rgb(53, 148, 247);background-attachment: scroll;background-clip: border-box;background-image: none;background-origin: padding-box;background-position: 0% 0%;background-repeat: no-repeat;background-size: auto;width: auto;height: auto;border-style: none;border-width: 3px;border-color: rgba(0, 0, 0, 0.4);border-radius: 0px;\">\u8868\u7ed3\u6784<\/strong><\/p>\n<pre data-tool=\"mdnice\u7f16\u8f91\u5668\" style=\"border-radius: 5px;box-shadow: rgba(0, 0, 0, 0.55) 0px 2px 10px;margin-top: 10px;margin-bottom: 10px;\"><span style=\"display: block;background: url(&quot;https:\/\/wp-moto-1258805347.cos.ap-shanghai.myqcloud.com\/2024\/08\/20240801221941871.jpeg&quot;) 10px 10px \/ 40px no-repeat rgb(40, 44, 52);height: 30px;width: 100%;margin-bottom: -7px;border-radius: 5px;\"><\/span><code style=\"overflow-x: auto;padding: 16px;color: #abb2bf;padding-top: 15px;background: #282c34;border-radius: 5px;display: -webkit-box;font-family: &#39;Operator Mono&#39;, Consolas, Monaco, Menlo, monospace;border-top-left-radius: 0px;border-top-right-radius: 0px;border-bottom-right-radius: 0px;border-bottom-left-radius: 0px;font-size: 12px;\"><span style=\"color: #c678dd;line-height: 26px;\">CREATE<\/span><span style=\"color: #c678dd;line-height: 26px;\">TABLE<\/span><span style=\"color: #c678dd;line-height: 26px;\">IF<\/span><span style=\"color: #c678dd;line-height: 26px;\">NOT<\/span><span style=\"color: #c678dd;line-height: 26px;\">EXISTS<\/span><span style=\"color: #98c379;line-height: 26px;\">`t_test`<\/span>(<span style=\"color: #c678dd;line-height: 26px;\">id<\/span><span style=\"color: #e6c07b;line-height: 26px;\">BIGINT<\/span><span style=\"color: #c678dd;line-height: 26px;\">UNSIGNED<\/span><span style=\"color: #c678dd;line-height: 26px;\">NOT<\/span><span style=\"color: #56b6c2;line-height: 26px;\">NULL<\/span>AUTO_INCREMENT,userid<span style=\"color: #e6c07b;line-height: 26px;\">BIGINT<\/span>(<span style=\"color: #d19a66;line-height: 26px;\">11<\/span>)<span style=\"color: #c678dd;line-height: 26px;\">NOT<\/span><span style=\"color: #56b6c2;line-height: 26px;\">NULL<\/span>,seq<span style=\"color: #e6c07b;line-height: 26px;\">BIGINT<\/span>(<span style=\"color: #d19a66;line-height: 26px;\">20<\/span>)<span style=\"color: #c678dd;line-height: 26px;\">UNSIGNED<\/span><span style=\"color: #c678dd;line-height: 26px;\">NOT<\/span><span style=\"color: #56b6c2;line-height: 26px;\">NULL<\/span>,PRIMARY<span style=\"color: #c678dd;line-height: 26px;\">KEY<\/span>(<span style=\"color: #c678dd;line-height: 26px;\">id<\/span>),<span style=\"color: #c678dd;line-height: 26px;\">UNIQUE<\/span><span style=\"color: #c678dd;line-height: 26px;\">KEY<\/span>_uk_userid(userid),<span style=\"color: #c678dd;line-height: 26px;\">KEY<\/span>_k_userid_seq(userid,seq))<span style=\"color: #c678dd;line-height: 26px;\">ENGINE<\/span>=<span style=\"color: #c678dd;line-height: 26px;\">InnoDB<\/span><span style=\"color: #c678dd;line-height: 26px;\">DEFAULT<\/span><span style=\"color: #c678dd;line-height: 26px;\">CHARSET<\/span>=utf8mb4;<\/code><\/pre>\n<p data-tool=\"mdnice\u7f16\u8f91\u5668\" style=\"color: rgb(43, 43, 43);font-size: 14px;line-height: 1.8em;letter-spacing: 0.02em;text-indent: 0em;padding-top: 8px;padding-bottom: 8px;\"><strong style=\"color: rgb(53, 148, 247);background-attachment: scroll;background-clip: border-box;background-image: none;background-origin: padding-box;background-position: 0% 0%;background-repeat: no-repeat;background-size: auto;width: auto;height: auto;border-style: none;border-width: 3px;border-color: rgba(0, 0, 0, 0.4);border-radius: 0px;\">\u8868\u521d\u59cb\u5316\u6570\u636e<\/strong><\/p>\n<figure data-tool=\"mdnice\u7f16\u8f91\u5668\" style=\"margin-top: 10px;margin-bottom: 10px;display: flex;flex-direction: column;justify-content: center;align-items: center;\"><img decoding=\"async\" class=\"rich_pages wxw-img lazyload\" data-imgfileid=\"505889951\" data-ratio=\"0.46607669616519176\"  data-type=\"png\" data-w=\"339\" style=\"display: block;margin-right: auto;margin-left: auto;border-style: none;border-width: 3px;border-color: rgba(0, 0, 0, 0.4);border-radius: 8px;object-fit: fill;box-shadow: rgb(153, 153, 153) 2px 4px 8px 0px;\" data-src=\"https:\/\/wp-moto-1258805347.cos.ap-shanghai.myqcloud.com\/2024\/08\/20240801221859617.png\" src=\"https:\/\/s.nmxc.ltd\/sakurairo_vision\/@2.6\/load_svg\/inload.svg\" onerror=\"imgError(this)\"><noscript><img decoding=\"async\" class=\"rich_pages wxw-img\" data-imgfileid=\"505889951\" data-ratio=\"0.46607669616519176\"  data-type=\"png\" data-w=\"339\" style=\"display: block;margin-right: auto;margin-left: auto;border-style: none;border-width: 3px;border-color: rgba(0, 0, 0, 0.4);border-radius: 8px;object-fit: fill;box-shadow: rgb(153, 153, 153) 2px 4px 8px 0px;\" src=\"https:\/\/wp-moto-1258805347.cos.ap-shanghai.myqcloud.com\/2024\/08\/20240801221859617.png\"><\/noscript><\/figure>\n<section data-tool=\"mdnice\u7f16\u8f91\u5668\" style=\"overflow-x: auto;\">\n<table>\n<thead>\n<tr>\n<th style=\"color: rgb(89, 89, 89);font-size: 14px;line-height: 1.5em;letter-spacing: 0.02em;text-align: left;background: none 0% 0% \/ auto no-repeat scroll padding-box border-box rgb(240, 240, 240);width: auto;height: auto;border-top-width: 1px;border-color: rgba(204, 204, 204, 0.4);border-radius: 0px;min-width: 85px;\">\u65f6\u95f4<\/th>\n<th style=\"color: rgb(89, 89, 89);font-size: 14px;line-height: 1.5em;letter-spacing: 0.02em;text-align: left;background: none 0% 0% \/ auto no-repeat scroll padding-box border-box rgb(240, 240, 240);width: auto;height: auto;border-top-width: 1px;border-color: rgba(204, 204, 204, 0.4);border-radius: 0px;min-width: 85px;\">\u4e8b\u52a11<\/th>\n<th style=\"color: rgb(89, 89, 89);font-size: 14px;line-height: 1.5em;letter-spacing: 0.02em;text-align: left;background: none 0% 0% \/ auto no-repeat scroll padding-box border-box rgb(240, 240, 240);width: auto;height: auto;border-top-width: 1px;border-color: rgba(204, 204, 204, 0.4);border-radius: 0px;min-width: 85px;\">\u4e8b\u52a12<\/th>\n<th style=\"color: rgb(89, 89, 89);font-size: 14px;line-height: 1.5em;letter-spacing: 0.02em;text-align: left;background: none 0% 0% \/ auto no-repeat scroll padding-box border-box rgb(240, 240, 240);width: auto;height: auto;border-top-width: 1px;border-color: rgba(204, 204, 204, 0.4);border-radius: 0px;min-width: 85px;\">\u4e8b\u52a13<\/th>\n<\/tr>\n<\/thead>\n<tbody style=\"font-size: 14px;line-height: 1.5em;letter-spacing: 0.02em;border-width: 0px;border-style: initial;border-color: initial;\">\n<tr style=\"color: rgb(89, 89, 89);background-attachment: scroll;background-clip: border-box;background-color: rgb(255, 255, 255);background-image: none;background-origin: padding-box;background-position-x: 0%;background-position-y: 0%;background-repeat: no-repeat;background-size: auto;width: auto;height: auto;\">\n<td style=\"min-width: 85px;border-color: rgba(204, 204, 204, 0.4);border-radius: 0px;\">T1<\/td>\n<td style=\"min-width: 85px;border-color: rgba(204, 204, 204, 0.4);border-radius: 0px;\">begin;insert into t_test (userid,seq) values (6,1638504289244987791) on duplicate key update seq=seq+1;\u83b7\u53d6\u63d2\u5165\u610f\u5411\u9501\uff0c\u6392\u5b83\u7684\u95f4\u9699\u9501\uff085\uff0c10\uff09\uff1b\u6267\u884c\u63d2\u5165\u6210\u529f\uff1b<\/td>\n<td style=\"min-width: 85px;border-color: rgba(204, 204, 204, 0.4);border-radius: 0px;\"><\/td>\n<td style=\"min-width: 85px;border-color: rgba(204, 204, 204, 0.4);border-radius: 0px;\"><\/td>\n<\/tr>\n<tr style=\"color: rgb(89, 89, 89);background-attachment: scroll;background-clip: border-box;background-color: rgb(248, 248, 248);background-image: none;background-origin: padding-box;background-position-x: 0%;background-position-y: 0%;background-repeat: no-repeat;background-size: auto;width: auto;height: auto;\">\n<td style=\"min-width: 85px;border-color: rgba(204, 204, 204, 0.4);border-radius: 0px;\">T2<\/td>\n<td style=\"min-width: 85px;border-color: rgba(204, 204, 204, 0.4);border-radius: 0px;\"><\/td>\n<td style=\"min-width: 85px;border-color: rgba(204, 204, 204, 0.4);border-radius: 0px;\">begin;insert into t_test (userid,seq) values (7,1638504289244987791) on duplicate key update seq=seq+1;\u51c6\u5907\u63d2\u5165\u610f\u5411\u9501\uff0c\u7b49\u5f85\u4e8b\u52a11\u7684\u95f4\u9699\u9501\uff1b<\/td>\n<td style=\"min-width: 85px;border-color: rgba(204, 204, 204, 0.4);border-radius: 0px;\"><\/td>\n<\/tr>\n<tr style=\"color: rgb(89, 89, 89);background-attachment: scroll;background-clip: border-box;background-color: rgb(255, 255, 255);background-image: none;background-origin: padding-box;background-position-x: 0%;background-position-y: 0%;background-repeat: no-repeat;background-size: auto;width: auto;height: auto;\">\n<td style=\"min-width: 85px;border-color: rgba(204, 204, 204, 0.4);border-radius: 0px;\">T3<\/td>\n<td style=\"min-width: 85px;border-color: rgba(204, 204, 204, 0.4);border-radius: 0px;\"><\/td>\n<td style=\"min-width: 85px;border-color: rgba(204, 204, 204, 0.4);border-radius: 0px;\">\u9501\u7b49\u5f85\u4e2d<\/td>\n<td style=\"min-width: 85px;border-color: rgba(204, 204, 204, 0.4);border-radius: 0px;\">insert into t_test (userid,seq) values (8,1638504289244987791) on duplicate key update seq=seq+1;\u51c6\u5907\u63d2\u5165\u610f\u5411\u9501\uff0c\u7b49\u5f85\u4e8b\u52a11\u7684\u95f4\u9699\u9501\uff1b<\/td>\n<\/tr>\n<tr style=\"color: rgb(89, 89, 89);background-attachment: scroll;background-clip: border-box;background-color: rgb(248, 248, 248);background-image: none;background-origin: padding-box;background-position-x: 0%;background-position-y: 0%;background-repeat: no-repeat;background-size: auto;width: auto;height: auto;\">\n<td style=\"min-width: 85px;border-color: rgba(204, 204, 204, 0.4);border-radius: 0px;\">T4<\/td>\n<td style=\"min-width: 85px;border-color: rgba(204, 204, 204, 0.4);border-radius: 0px;\"><\/td>\n<td style=\"min-width: 85px;border-color: rgba(204, 204, 204, 0.4);border-radius: 0px;\"><\/td>\n<td style=\"min-width: 85px;border-color: rgba(204, 204, 204, 0.4);border-radius: 0px;\">\u9501\u7b49\u5f85\u4e2d<\/td>\n<\/tr>\n<tr style=\"color: rgb(89, 89, 89);background-attachment: scroll;background-clip: border-box;background-color: rgb(255, 255, 255);background-image: none;background-origin: padding-box;background-position-x: 0%;background-position-y: 0%;background-repeat: no-repeat;background-size: auto;width: auto;height: auto;\">\n<td style=\"min-width: 85px;border-color: rgba(204, 204, 204, 0.4);border-radius: 0px;\">T5<\/td>\n<td style=\"min-width: 85px;border-color: rgba(204, 204, 204, 0.4);border-radius: 0px;\">rollback;<\/td>\n<td style=\"min-width: 85px;border-color: rgba(204, 204, 204, 0.4);border-radius: 0px;\"><\/td>\n<td style=\"min-width: 85px;border-color: rgba(204, 204, 204, 0.4);border-radius: 0px;\">\u6b7b\u9501\u51fa\u73b0<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/section>\n<figure data-tool=\"mdnice\u7f16\u8f91\u5668\" style=\"margin-top: 10px;margin-bottom: 10px;display: flex;flex-direction: column;justify-content: center;align-items: center;\"><img decoding=\"async\" class=\"rich_pages wxw-img lazyload\" data-imgfileid=\"505889952\" data-ratio=\"0.8021052631578948\"  data-type=\"png\" data-w=\"950\" style=\"display: block;margin-right: auto;margin-left: auto;border-style: none;border-width: 3px;border-color: rgba(0, 0, 0, 0.4);border-radius: 8px;object-fit: fill;box-shadow: rgb(153, 153, 153) 2px 4px 8px 0px;\" data-src=\"https:\/\/wp-moto-1258805347.cos.ap-shanghai.myqcloud.com\/2024\/08\/20240801221905990.png\" src=\"https:\/\/s.nmxc.ltd\/sakurairo_vision\/@2.6\/load_svg\/inload.svg\" onerror=\"imgError(this)\"><noscript><img decoding=\"async\" class=\"rich_pages wxw-img\" data-imgfileid=\"505889952\" data-ratio=\"0.8021052631578948\"  data-type=\"png\" data-w=\"950\" style=\"display: block;margin-right: auto;margin-left: auto;border-style: none;border-width: 3px;border-color: rgba(0, 0, 0, 0.4);border-radius: 8px;object-fit: fill;box-shadow: rgb(153, 153, 153) 2px 4px 8px 0px;\" src=\"https:\/\/wp-moto-1258805347.cos.ap-shanghai.myqcloud.com\/2024\/08\/20240801221905990.png\"><\/noscript><\/figure>\n<h2 data-tool=\"mdnice\u7f16\u8f91\u5668\" style=\" border-color: rgb(0, 0, 0) rgb(0, 0, 0) rgb(64, 184, 250);margin-top: 30px;margin-bottom: 15px;align-items: unset;background-attachment: scroll;background-clip: border-box;background-image: none;background-origin: padding-box;background-position: 0% 0%;background-repeat: no-repeat;background-size: auto;border-style: none none solid;border-width: 1px 1px 4px;border-radius: 0px;box-shadow: none;flex-direction: unset;float: unset;height: auto;justify-content: unset;line-height: 1.5em;overflow: unset; text-shadow: none;transform: none;width: auto;-webkit-box-reflect: unset; \"><span style=\"background-attachment: scroll;background-clip: border-box;background-image: url('https:\/\/wp-moto-1258805347.cos.ap-shanghai.myqcloud.com\/2024\/08\/20240801221815583.png');background-origin: padding-box;background-position: 0% 0%;background-repeat: no-repeat;background-size: 20px 20px;width: 20px;height: 20px;align-items: unset;border-style: none;border-width: 1px;border-color: rgb(0, 0, 0);border-radius: 0px;box-shadow: none;display: flex;font-size: 22px;font-weight: bold;flex-direction: unset;float: unset;justify-content: unset;letter-spacing: 0px;line-height: 1.5em;margin-bottom: -25px;overflow: unset; text-indent: 0em;text-shadow: none;transform: none;-webkit-box-reflect: unset;\"><\/span><span style=\" font-size: 20px;color: rgb(64, 184, 250);line-height: 1.5em;letter-spacing: 0em;align-items: unset;background-attachment: scroll;background-clip: border-box;background-image: none;background-origin: padding-box;background-position: 0% 0%;background-repeat: no-repeat;background-size: auto;border-style: none;border-width: 1px;border-color: rgb(0, 0, 0);border-radius: 0px;box-shadow: none;display: flex;font-weight: bold;flex-direction: unset;float: unset;height: auto;justify-content: unset;margin-left: 25px;overflow: unset; text-indent: 0em;text-shadow: none;transform: none;width: auto;-webkit-box-reflect: unset; \">\u9884\u9632\u6b7b\u9501<\/span><span style=\" background: none 0% 0% \/ auto no-repeat scroll padding-box border-box rgba(64, 184, 250, 0.5);align-items: unset;border-style: none;border-width: 1px;border-color: rgb(0, 0, 0);border-radius: 20px 0px 0px;box-shadow: none;display: flex;font-size: 22px;font-weight: bold;flex-direction: unset;float: right;height: 10px;justify-content: unset;letter-spacing: 0px;line-height: 1.5em;margin-top: -10px;overflow: unset; text-indent: 0em;text-shadow: none;transform: none;width: 200px;-webkit-box-reflect: unset; \"><\/span><\/h2>\n<ol data-tool=\"mdnice\u7f16\u8f91\u5668\" style=\"margin-top: 8px;margin-bottom: 8px;padding-left: 25px;\" class=\"list-paddingleft-1\">\n<li>\n<section style=\"margin-top: 5px;margin-bottom: 5px;color: rgb(89, 89, 89);font-size: 14px;line-height: 1.8em;letter-spacing: 0.02em;\">\u5c3d\u91cf\u4f7f\u7528<code style=\"background: none 0% 0% \/ auto no-repeat scroll padding-box border-box rgba(27, 31, 35, 0.05);width: auto;margin-left: 2px;margin-right: 2px;padding: 2px 4px;border-style: none;border-width: 3px;border-color: rgb(0, 0, 0) rgba(0, 0, 0, 0.4) rgba(0, 0, 0, 0.4);border-radius: 4px;font-family: &quot;Operator Mono&quot;, Consolas, Monaco, Menlo, monospace;word-break: break-all;\">INSERT<\/code>\u6765\u66ff\u6362<code style=\"background: none 0% 0% \/ auto no-repeat scroll padding-box border-box rgba(27, 31, 35, 0.05);width: auto;margin-left: 2px;margin-right: 2px;padding: 2px 4px;border-style: none;border-width: 3px;border-color: rgb(0, 0, 0) rgba(0, 0, 0, 0.4) rgba(0, 0, 0, 0.4);border-radius: 4px;font-family: &quot;Operator Mono&quot;, Consolas, Monaco, Menlo, monospace;word-break: break-all;\">INSERT...ON DUPLICATE KEY UPDAT<\/code>\u3002<code style=\"background: none 0% 0% \/ auto no-repeat scroll padding-box border-box rgba(27, 31, 35, 0.05);width: auto;margin-left: 2px;margin-right: 2px;padding: 2px 4px;border-style: none;border-width: 3px;border-color: rgb(0, 0, 0) rgba(0, 0, 0, 0.4) rgba(0, 0, 0, 0.4);border-radius: 4px;font-family: &quot;Operator Mono&quot;, Consolas, Monaco, Menlo, monospace;word-break: break-all;\">INSERT<\/code>\u5c06\u5728\u552f\u4e00\u952e\u548c\u4e3b\u952e\u4e2d\u6dfb\u52a0\u8bb0\u5f55 x \u9501\uff0c\u800c\u4e0d\u662f\u83b7\u53d6\u95f4\u9699\u9501\uff0c\u56e0\u6b64\u4e0d\u4f1a\u9020\u6210\u6b7b\u9501\u3002<\/section>\n<\/li>\n<li>\n<section style=\"margin-top: 5px;margin-bottom: 5px;color: rgb(89, 89, 89);font-size: 14px;line-height: 1.8em;letter-spacing: 0.02em;\">\u4f7f\u7528<code style=\"background: none 0% 0% \/ auto no-repeat scroll padding-box border-box rgba(27, 31, 35, 0.05);width: auto;margin-left: 2px;margin-right: 2px;padding: 2px 4px;border-style: none;border-width: 3px;border-color: rgb(0, 0, 0) rgba(0, 0, 0, 0.4) rgba(0, 0, 0, 0.4);border-radius: 4px;font-family: &quot;Operator Mono&quot;, Consolas, Monaco, Menlo, monospace;word-break: break-all;\">INSERT<\/code>\uff0c\u7136\u540e\u4e1a\u52a1\u4e0a\u5224\u65adduplicate-key\u9519\u8bef\uff0c\u8fdb\u884c<code style=\"background: none 0% 0% \/ auto no-repeat scroll padding-box border-box rgba(27, 31, 35, 0.05);width: auto;margin-left: 2px;margin-right: 2px;padding: 2px 4px;border-style: none;border-width: 3px;border-color: rgb(0, 0, 0) rgba(0, 0, 0, 0.4) rgba(0, 0, 0, 0.4);border-radius: 4px;font-family: &quot;Operator Mono&quot;, Consolas, Monaco, Menlo, monospace;word-break: break-all;\">UPDATE<\/code>\u64cd\u4f5c\u3002<\/section>\n<\/li>\n<li>\n<section style=\"margin-top: 5px;margin-bottom: 5px;color: rgb(89, 89, 89);font-size: 14px;line-height: 1.8em;letter-spacing: 0.02em;\">\u5c3d\u91cf\u51cf\u5c11\u4f7f\u7528\u552f\u4e00\u952e\uff0c\u53ef\u4ee5\u7684\u8bdd\u4ece\u4e1a\u52a1\u5c42\u9762\u4fdd\u8bc1\u3002<\/section>\n<\/li>\n<\/ol>\n<p style=\"text-align: center;\"><img decoding=\"async\" class=\"rich_pages wxw-img lazyload\" data-galleryid=\"\" data-imgfileid=\"505879143\" data-ratio=\"0.6629213483146067\" data-s=\"300,640\"  data-type=\"png\" data-w=\"623\" style=\"\" data-src=\"https:\/\/wp-moto-1258805347.cos.ap-shanghai.myqcloud.com\/2024\/08\/20240801221924135.png\" src=\"https:\/\/s.nmxc.ltd\/sakurairo_vision\/@2.6\/load_svg\/inload.svg\" onerror=\"imgError(this)\"><noscript><img decoding=\"async\" class=\"rich_pages wxw-img\" data-galleryid=\"\" data-imgfileid=\"505879143\" data-ratio=\"0.6629213483146067\" data-s=\"300,640\"  data-type=\"png\" data-w=\"623\" style=\"\" src=\"https:\/\/wp-moto-1258805347.cos.ap-shanghai.myqcloud.com\/2024\/08\/20240801221924135.png\"><\/noscript><\/p>\n<h2 data-tool=\"mdnice\u7f16\u8f91\u5668\" style=\" border-color: rgb(0, 0, 0) rgb(0, 0, 0) rgb(64, 184, 250);margin-top: 30px;margin-bottom: 15px;align-items: unset;background-attachment: scroll;background-clip: border-box;background-image: none;background-origin: padding-box;background-position: 0% 0%;background-repeat: no-repeat;background-size: auto;border-style: none none solid;border-width: 1px 1px 4px;border-radius: 0px;box-shadow: none;flex-direction: unset;float: unset;height: auto;justify-content: unset;line-height: 1.5em;overflow: unset; text-shadow: none;transform: none;width: auto;-webkit-box-reflect: unset; \"><span style=\"background-attachment: scroll;background-clip: border-box;background-image: url('https:\/\/wp-moto-1258805347.cos.ap-shanghai.myqcloud.com\/2024\/08\/20240801221815583.png');background-origin: padding-box;background-position: 0% 0%;background-repeat: no-repeat;background-size: 20px 20px;width: 20px;height: 20px;align-items: unset;border-style: none;border-width: 1px;border-color: rgb(0, 0, 0);border-radius: 0px;box-shadow: none;display: flex;font-size: 22px;font-weight: bold;flex-direction: unset;float: unset;justify-content: unset;letter-spacing: 0px;line-height: 1.5em;margin-bottom: -25px;overflow: unset; text-indent: 0em;text-shadow: none;transform: none;-webkit-box-reflect: unset;\"><\/span><span style=\" font-size: 20px;color: rgb(64, 184, 250);line-height: 1.5em;letter-spacing: 0em;align-items: unset;background-attachment: scroll;background-clip: border-box;background-image: none;background-origin: padding-box;background-position: 0% 0%;background-repeat: no-repeat;background-size: auto;border-style: none;border-width: 1px;border-color: rgb(0, 0, 0);border-radius: 0px;box-shadow: none;display: flex;font-weight: bold;flex-direction: unset;float: unset;height: auto;justify-content: unset;margin-left: 25px;overflow: unset; text-indent: 0em;text-shadow: none;transform: none;width: auto;-webkit-box-reflect: unset; \">\u603b\u7ed3<\/span><span style=\" background: none 0% 0% \/ auto no-repeat scroll padding-box border-box rgba(64, 184, 250, 0.5);align-items: unset;border-style: none;border-width: 1px;border-color: rgb(0, 0, 0);border-radius: 20px 0px 0px;box-shadow: none;display: flex;font-size: 22px;font-weight: bold;flex-direction: unset;float: right;height: 10px;justify-content: unset;letter-spacing: 0px;line-height: 1.5em;margin-top: -10px;overflow: unset; text-indent: 0em;text-shadow: none;transform: none;width: 200px;-webkit-box-reflect: unset; \"><\/span><\/h2>\n<p data-tool=\"mdnice\u7f16\u8f91\u5668\" style=\"color: rgb(43, 43, 43);font-size: 14px;line-height: 1.8em;letter-spacing: 0.02em;text-indent: 0em;padding-top: 8px;padding-bottom: 8px;\">MySQL\u9501\u8fd9\u5757\u77e5\u8bc6\u771f\u7684\u5f88\u591a\uff0c\u9700\u8981\u6211\u4eec\u5e73\u65f6\u4e0d\u65ad\u601d\u8003\u548c\u79ef\u7d2f\u3002\u672c\u6b21\u4e3b\u8981\u4ecb\u7ecd\u5f53\u7ebf\u4e0a\u9047\u5230\u6b7b\u9501\u7684\u60c5\u51b5\uff0c\u6211\u4eec\u600e\u6837\u53bb\u5b9a\u4f4d\uff0c\u6392\u67e5\u548c\u5206\u6790\u3002\u901a\u8fc7<code style=\"color: rgb(53, 148, 247);line-height: 1.8em;letter-spacing: 0em;background: none 0% 0% \/ auto no-repeat scroll padding-box border-box rgba(27, 31, 35, 0.05);width: auto;height: auto;margin-left: 2px;margin-right: 2px;padding: 2px 4px;border-style: none;border-width: 3px;border-color: rgb(0, 0, 0) rgba(0, 0, 0, 0.4) rgba(0, 0, 0, 0.4);border-radius: 4px;font-family: &quot;Operator Mono&quot;, Consolas, Monaco, Menlo, monospace;word-break: break-all;\">SHOW ENGINE INNODB STATUSG<\/code>\u67e5\u770b\u6700\u540e\u4e00\u6b21\u6b7b\u9501\u60c5\u51b5\uff0c\u627e\u51fa\u5bfc\u81f4\u6b7b\u9501\u7684SQL\u8bed\u53e5\uff0c\u518d\u5206\u6790\u5177\u4f53\u7684\u6b7b\u9501\u539f\u56e0\uff0c\u6bd4\u5982\u6301\u6709\u4ec0\u4e48\u9501\uff0c\u7b49\u5f85\u4ec0\u4e48\u9501\u3002\u6700\u540e\u9a8c\u8bc1\u4fee\u590d\u6b7b\u9501\u95ee\u9898\u3002<\/p>\n<\/section>\n<p style=\"display: none;\"><mp-style-type data-value=\"3\"><\/mp-style-type><\/p>\n<blockquote>\n<p>\u672c\u7bc7\u6587\u7ae0\u6765\u6e90\u4e8e\u5fae\u4fe1\u516c\u4f17\u53f7:                 \u4e1a\u4f59\u8349              <\/p>\n<\/blockquote>\n<\/div>\n","raw":"","protected":false},"excerpt":{"rendered":"<p>\u6765\u6e90\uff1ajuejin.cn\/post\/7038156758614802440 \u63a8\u8350\uff1ahttps:\/\/t.zsxq.com\/SyOqf &#8230;<\/p>\n","protected":false},"author":1,"featured_media":5536,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"emotion":"","emotion_color":"","title_style":"","license":"","footnotes":""},"categories":[3],"tags":[],"class_list":["post-5566","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-mysql"],"post_thumbnail_image":"https:\/\/wp-moto-1258805347.cos.ap-shanghai.myqcloud.com\/2024\/08\/20240801221821294-150x150.jpeg","content_first_image":"https:\/\/wp-moto-1258805347.cos.ap-shanghai.myqcloud.com\/2024\/08\/20240801221859617.png","post_medium_image_300":"https:\/\/wp-moto-1258805347.cos.ap-shanghai.myqcloud.com\/2024\/08\/20240801221821294-300x128.jpeg","post_thumbnail_image_624":"https:\/\/wp-moto-1258805347.cos.ap-shanghai.myqcloud.com\/2024\/08\/20240801221821294-1024x436.jpeg","post_frist_image":"https:\/\/wp-moto-1258805347.cos.ap-shanghai.myqcloud.com\/2024\/08\/20240801221859617.png","post_medium_image":"https:\/\/wp-moto-1258805347.cos.ap-shanghai.myqcloud.com\/2024\/08\/20240801221821294-300x128.jpeg","post_large_image":"https:\/\/wp-moto-1258805347.cos.ap-shanghai.myqcloud.com\/2024\/08\/20240801221821294-1024x436.jpeg","post_full_image":"https:\/\/wp-moto-1258805347.cos.ap-shanghai.myqcloud.com\/2024\/08\/20240801221821294.jpeg","post_all_images":[{"imagesurl":"https:\/\/wp-moto-1258805347.cos.ap-shanghai.myqcloud.com\/2024\/08\/20240801221859617.png","id":"image0"},{"imagesurl":"https:\/\/wp-moto-1258805347.cos.ap-shanghai.myqcloud.com\/2024\/08\/20240801221859617.png","id":"image1"},{"imagesurl":"https:\/\/wp-moto-1258805347.cos.ap-shanghai.myqcloud.com\/2024\/08\/20240801221905990.png","id":"image2"},{"imagesurl":"https:\/\/wp-moto-1258805347.cos.ap-shanghai.myqcloud.com\/2024\/08\/20240801221905990.png","id":"image3"},{"imagesurl":"https:\/\/wp-moto-1258805347.cos.ap-shanghai.myqcloud.com\/2024\/08\/20240801221924135.png","id":"image4"},{"imagesurl":"https:\/\/wp-moto-1258805347.cos.ap-shanghai.myqcloud.com\/2024\/08\/20240801221924135.png","id":"image5"}],"videoAdId":"","listAd":"0","listAdId":"","listAdEvery":6,"total_comments":0,"category_name":"MySQL","post_date":"2024-08-01","like_count":"0","praiseWord":"\u9f13\u52b1","copyright_state":"","excitationAd":"0","rewardedVideoAdId":"","detailAdId":"","detailAd":"0","enterpriseMinapp":"0","audios":[],"postImageUrl":"https:\/\/wp-moto-1258805347.cos.ap-shanghai.myqcloud.com\/2023\/05\/20230519082947553.jpg","avatarurls":[],"related_posts":null,"pageviews":459,"next_post_id":5436,"next_post_title":"MySQL\u4e2dinsertOrUpdate\u7684\u529f\u80fd\u5982\u4f55\u5b9e\u73b0\u7684","previous_post_id":6016,"previous_post_title":"\u3010\u6536\u85cf\u3011MySQL \u8d85\u5168\u4f18\u5316\u6e05\u5355\uff08\u53ef\u6267\u884c\u7cfb\u5217\uff09","_links":{"self":[{"href":"https:\/\/xinchewhd.com.cn\/index.php\/wp-json\/wp\/v2\/posts\/5566","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/xinchewhd.com.cn\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/xinchewhd.com.cn\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/xinchewhd.com.cn\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/xinchewhd.com.cn\/index.php\/wp-json\/wp\/v2\/comments?post=5566"}],"version-history":[{"count":1,"href":"https:\/\/xinchewhd.com.cn\/index.php\/wp-json\/wp\/v2\/posts\/5566\/revisions"}],"predecessor-version":[{"id":6289,"href":"https:\/\/xinchewhd.com.cn\/index.php\/wp-json\/wp\/v2\/posts\/5566\/revisions\/6289"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/xinchewhd.com.cn\/index.php\/wp-json\/wp\/v2\/media\/5536"}],"wp:attachment":[{"href":"https:\/\/xinchewhd.com.cn\/index.php\/wp-json\/wp\/v2\/media?parent=5566"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/xinchewhd.com.cn\/index.php\/wp-json\/wp\/v2\/categories?post=5566"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/xinchewhd.com.cn\/index.php\/wp-json\/wp\/v2\/tags?post=5566"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}