vitess.io/vitess@v0.16.2/go/vt/vttablet/tabletserver/planbuilder/testdata/stream_cases.txt (about) 1 # select 2 "select * from a" 3 { 4 "PlanID": "SelectStream", 5 "TableName": "a", 6 "Permissions":[{"TableName":"a","Role":0}], 7 "FullQuery": "select * from a" 8 } 9 10 # select join 11 "select * from a join b" 12 { 13 "PlanID": "SelectStream", 14 "TableName": "", 15 "Permissions":[{"TableName":"a","Role":0},{"TableName":"b","Role":0}], 16 "FullQuery": "select * from a join b" 17 } 18 19 # select for update 20 "select * from a for update" 21 { 22 "PlanID": "SelectStream", 23 "TableName": "a", 24 "Permissions":[{"TableName":"a","Role":0}], 25 "FullQuery": "select * from a for update" 26 } 27 28 # union 29 "select * from a union select * from b" 30 { 31 "PlanID": "SelectStream", 32 "TableName": "", 33 "Permissions":[{"TableName":"a","Role":0},{"TableName":"b","Role":0}], 34 "FullQuery": "select * from a union select * from b" 35 } 36 37 # show 38 "show tables" 39 { 40 "PlanID": "SelectStream", 41 "TableName": "", 42 "FullQuery": "show tables" 43 } 44 45 # show table status 46 "show table status" 47 { 48 "PlanID": "SelectStream", 49 "TableName": "", 50 "FullQuery": "show table status" 51 } 52 53 # other 54 "desc foo" 55 { 56 "PlanID": "SelectStream", 57 "TableName": "", 58 "FullQuery": "explain foo" 59 } 60 61 # dml 62 "update a set b = 1" 63 "UPDATE not allowed for streaming" 64 65 # syntax error 66 "syntax error" 67 "syntax error at position 7 near 'syntax'" 68 69 # named locks are unsafe with server-side connection pooling, plan is generated with NeedReservedConn set to true 70 "select get_lock('foo', 10) from dual" 71 { 72 "PlanID": "SelectStream", 73 "TableName": "dual", 74 "Permissions": [ 75 { 76 "TableName": "dual", 77 "Role": 0 78 } 79 ], 80 "FullQuery": "select get_lock('foo', 10) from dual", 81 "NeedsReservedConn": true 82 } 83 84 # set statement unsafe with pooling 85 "set @udv = 10" 86 "SET not allowed for streaming"