blob: 836e883ca063b0638f86d22ec11facd86a1d425c [file] [log] [blame]
"use strict";(self.webpackChunkdoris_website=self.webpackChunkdoris_website||[]).push([[40504],{15680:(e,t,n)=>{n.d(t,{xA:()=>u,yg:()=>O});var r=n(296540);function a(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function l(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function s(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?l(Object(n),!0).forEach((function(t){a(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):l(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function o(e,t){if(null==e)return{};var n,r,a=function(e,t){if(null==e)return{};var n,r,a={},l=Object.keys(e);for(r=0;r<l.length;r++)n=l[r],t.indexOf(n)>=0||(a[n]=e[n]);return a}(e,t);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);for(r=0;r<l.length;r++)n=l[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}var i=r.createContext({}),c=function(e){var t=r.useContext(i),n=t;return e&&(n="function"==typeof e?e(t):s(s({},t),e)),n},u=function(e){var t=c(e.components);return r.createElement(i.Provider,{value:t},e.children)},m="mdxType",p={inlineCode:"code",wrapper:function(e){var t=e.children;return r.createElement(r.Fragment,{},t)}},y=r.forwardRef((function(e,t){var n=e.components,a=e.mdxType,l=e.originalType,i=e.parentName,u=o(e,["components","mdxType","originalType","parentName"]),m=c(n),y=a,O=m["".concat(i,".").concat(y)]||m[y]||p[y]||l;return n?r.createElement(O,s(s({ref:t},u),{},{components:n})):r.createElement(O,s({ref:t},u))}));function O(e,t){var n=arguments,a=t&&t.mdxType;if("string"==typeof e||a){var l=n.length,s=new Array(l);s[0]=y;var o={};for(var i in t)hasOwnProperty.call(t,i)&&(o[i]=t[i]);o.originalType=e,o[m]="string"==typeof e?e:a,s[1]=o;for(var c=2;c<l;c++)s[c]=n[c];return r.createElement.apply(null,s)}return r.createElement.apply(null,n)}y.displayName="MDXCreateElement"},789598:(e,t,n)=>{n.r(t),n.d(t,{assets:()=>i,contentTitle:()=>s,default:()=>p,frontMatter:()=>l,metadata:()=>o,toc:()=>c});var r=n(58168),a=(n(296540),n(15680));const l={title:"SHOW-SQL-BLOCK-RULE",language:"en"},s=void 0,o={unversionedId:"sql-manual/sql-statements/Show-Statements/SHOW-SQL-BLOCK-RULE",id:"sql-manual/sql-statements/Show-Statements/SHOW-SQL-BLOCK-RULE",title:"SHOW-SQL-BLOCK-RULE",description:"\x3c!--",source:"@site/docs/sql-manual/sql-statements/Show-Statements/SHOW-SQL-BLOCK-RULE.md",sourceDirName:"sql-manual/sql-statements/Show-Statements",slug:"/sql-manual/sql-statements/Show-Statements/SHOW-SQL-BLOCK-RULE",permalink:"/docs/dev/sql-manual/sql-statements/Show-Statements/SHOW-SQL-BLOCK-RULE",draft:!1,tags:[],version:"current",frontMatter:{title:"SHOW-SQL-BLOCK-RULE",language:"en"},sidebar:"docs",previous:{title:"SHOW-SNAPSHOT",permalink:"/docs/dev/sql-manual/sql-statements/Show-Statements/SHOW-SNAPSHOT"},next:{title:"SHOW-ROUTINE-LOAD",permalink:"/docs/dev/sql-manual/sql-statements/Show-Statements/SHOW-ROUTINE-LOAD"}},i={},c=[{value:"SQL-BLOCK-RULE",id:"sql-block-rule",level:2},{value:"Name",id:"name",level:3},{value:"Description",id:"description",level:3},{value:"Example",id:"example",level:3},{value:"Keywords",id:"keywords",level:3},{value:"Best Practice",id:"best-practice",level:3}],u={toc:c},m="wrapper";function p(e){let{components:t,...n}=e;return(0,a.yg)(m,(0,r.A)({},u,n,{components:t,mdxType:"MDXLayout"}),(0,a.yg)("h2",{id:"sql-block-rule"},"SQL-BLOCK-RULE"),(0,a.yg)("h3",{id:"name"},"Name"),(0,a.yg)("p",null,"SHOW SQL BLOCK RULE"),(0,a.yg)("h3",{id:"description"},"Description"),(0,a.yg)("p",null,"View the configured SQL blocking rules. If you do not specify a rule name, you will view all rules."),(0,a.yg)("p",null,"grammar:"),(0,a.yg)("pre",null,(0,a.yg)("code",{parentName:"pre",className:"language-sql"},"SHOW SQL_BLOCK_RULE [FOR RULE_NAME];\n")),(0,a.yg)("h3",{id:"example"},"Example"),(0,a.yg)("ol",null,(0,a.yg)("li",{parentName:"ol"},(0,a.yg)("p",{parentName:"li"},"View all rules."),(0,a.yg)("pre",{parentName:"li"},(0,a.yg)("code",{parentName:"pre",className:"language-sql"},"mysql> SHOW SQL_BLOCK_RULE;\n+------------+----------------------------+---------+- -------------+------------+-------------+--------+- -------+\n| Name | Sql | SqlHash | PartitionNum | TabletNum | Cardinality | Global | Enable |\n+------------+----------------------------+---------+- -------------+------------+-------------+--------+- -------+\n| test_rule | select * from order_analysis | NULL | 0 | 0 | 0 | true | true |\n| test_rule2 | NULL | NULL | 30 | 0 | 10000000000 | false | true |\n+------------+----------------------------+---------+- -------------+------------+-------------+--------+- -------+\n2 rows in set (0.01 sec)\n"))),(0,a.yg)("li",{parentName:"ol"},(0,a.yg)("p",{parentName:"li"},"Make a rule name query"),(0,a.yg)("pre",{parentName:"li"},(0,a.yg)("code",{parentName:"pre",className:"language-sql"},"mysql> SHOW SQL_BLOCK_RULE FOR test_rule2;\n+------------+------+---------+---------------+---- -------+-------------+--------+--------+\n| Name | Sql | SqlHash | PartitionNum | TabletNum | Cardinality | Global | Enable |\n+------------+------+---------+---------------+---- -------+-------------+--------+--------+\n| test_rule2 | NULL | NULL | 30 | 0 | 10000000000 | false | true |\n+------------+------+---------+---------------+---- -------+-------------+--------+--------+\n1 row in set (0.00 sec)\n\n")))),(0,a.yg)("h3",{id:"keywords"},"Keywords"),(0,a.yg)("pre",null,(0,a.yg)("code",{parentName:"pre"},"SHOW, SQL_BLOCK_RULE\n")),(0,a.yg)("h3",{id:"best-practice"},"Best Practice"))}p.isMDXComponent=!0}}]);