Skip to content

Commit

Permalink
Merge branch 'upstream-master' into add-support-for-truncate
Browse files Browse the repository at this point in the history
  • Loading branch information
rafael committed Oct 25, 2017
2 parents fbd4a56 + f6ed5b8 commit 682f852
Show file tree
Hide file tree
Showing 48 changed files with 972 additions and 267 deletions.
5 changes: 5 additions & 0 deletions data/test/tabletserver/ddl_cases.txt
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,11 @@
"Action": "alter", "TableName": "b.c", "NewName": "b.c"
}

"drop index a on b lock=none"
{
"Action": "alter", "TableName": "b", "NewName": "b"
}

"rename table a to b"
{
"Action": "rename", "TableName": "a", "NewTable": "b"
Expand Down
376 changes: 376 additions & 0 deletions data/test/vtexplain/comments-output.json
Original file line number Diff line number Diff line change
Expand Up @@ -85,5 +85,381 @@
]
}
}
},
{
"SQL": "select /* ; */ 1 from user",
"Plans": [
{
"Original": "select /* ; */ :vtg1 from user",
"Instructions": {
"Opcode": "SelectScatter",
"Keyspace": {
"Name": "ks_sharded",
"Sharded": true
},
"Query": "select /* ; */ :vtg1 from user",
"FieldQuery": "select :vtg1 from user where 1 != 1"
}
}
],
"TabletActions": {
"ks_sharded/-40": {
"TabletQueries": [
{
"Time": 1,
"SQL": "select /* ; */ :vtg1 from user",
"BindVars": {
"#maxLimit": "10001",
"vtg1": "1"
}
}
],
"MysqlQueries": [
{
"Time": 1,
"SQL": "select /* ; */ 1 from user limit 10001"
}
]
},
"ks_sharded/40-80": {
"TabletQueries": [
{
"Time": 1,
"SQL": "select /* ; */ :vtg1 from user",
"BindVars": {
"#maxLimit": "10001",
"vtg1": "1"
}
}
],
"MysqlQueries": [
{
"Time": 1,
"SQL": "select /* ; */ 1 from user limit 10001"
}
]
},
"ks_sharded/80-c0": {
"TabletQueries": [
{
"Time": 1,
"SQL": "select /* ; */ :vtg1 from user",
"BindVars": {
"#maxLimit": "10001",
"vtg1": "1"
}
}
],
"MysqlQueries": [
{
"Time": 1,
"SQL": "select /* ; */ 1 from user limit 10001"
}
]
},
"ks_sharded/c0-": {
"TabletQueries": [
{
"Time": 1,
"SQL": "select /* ; */ :vtg1 from user",
"BindVars": {
"#maxLimit": "10001",
"vtg1": "1"
}
}
],
"MysqlQueries": [
{
"Time": 1,
"SQL": "select /* ; */ 1 from user limit 10001"
}
]
}
}
},
{
"SQL": "select 1 from user where x=';'",
"Plans": [
{
"Original": "select :vtg1 from user where x = :vtg2",
"Instructions": {
"Opcode": "SelectScatter",
"Keyspace": {
"Name": "ks_sharded",
"Sharded": true
},
"Query": "select :vtg1 from user where x = :vtg2",
"FieldQuery": "select :vtg1 from user where 1 != 1"
}
}
],
"TabletActions": {
"ks_sharded/-40": {
"TabletQueries": [
{
"Time": 1,
"SQL": "select :vtg1 from user where x = :vtg2",
"BindVars": {
"#maxLimit": "10001",
"vtg1": "1",
"vtg2": "';'"
}
}
],
"MysqlQueries": [
{
"Time": 1,
"SQL": "select 1 from user where x = ';' limit 10001"
}
]
},
"ks_sharded/40-80": {
"TabletQueries": [
{
"Time": 1,
"SQL": "select :vtg1 from user where x = :vtg2",
"BindVars": {
"#maxLimit": "10001",
"vtg1": "1",
"vtg2": "';'"
}
}
],
"MysqlQueries": [
{
"Time": 1,
"SQL": "select 1 from user where x = ';' limit 10001"
}
]
},
"ks_sharded/80-c0": {
"TabletQueries": [
{
"Time": 1,
"SQL": "select :vtg1 from user where x = :vtg2",
"BindVars": {
"#maxLimit": "10001",
"vtg1": "1",
"vtg2": "';'"
}
}
],
"MysqlQueries": [
{
"Time": 1,
"SQL": "select 1 from user where x = ';' limit 10001"
}
]
},
"ks_sharded/c0-": {
"TabletQueries": [
{
"Time": 1,
"SQL": "select :vtg1 from user where x = :vtg2",
"BindVars": {
"#maxLimit": "10001",
"vtg1": "1",
"vtg2": "';'"
}
}
],
"MysqlQueries": [
{
"Time": 1,
"SQL": "select 1 from user where x = ';' limit 10001"
}
]
}
}
},
{
"SQL": "select 1 from user where x='/* hello */'",
"Plans": [
{
"Original": "select :vtg1 from user where x = :vtg2",
"Instructions": {
"Opcode": "SelectScatter",
"Keyspace": {
"Name": "ks_sharded",
"Sharded": true
},
"Query": "select :vtg1 from user where x = :vtg2",
"FieldQuery": "select :vtg1 from user where 1 != 1"
}
}
],
"TabletActions": {
"ks_sharded/-40": {
"TabletQueries": [
{
"Time": 1,
"SQL": "select :vtg1 from user where x = :vtg2",
"BindVars": {
"#maxLimit": "10001",
"vtg1": "1",
"vtg2": "'/* hello */'"
}
}
],
"MysqlQueries": [
{
"Time": 1,
"SQL": "select 1 from user where x = '/* hello */' limit 10001"
}
]
},
"ks_sharded/40-80": {
"TabletQueries": [
{
"Time": 1,
"SQL": "select :vtg1 from user where x = :vtg2",
"BindVars": {
"#maxLimit": "10001",
"vtg1": "1",
"vtg2": "'/* hello */'"
}
}
],
"MysqlQueries": [
{
"Time": 1,
"SQL": "select 1 from user where x = '/* hello */' limit 10001"
}
]
},
"ks_sharded/80-c0": {
"TabletQueries": [
{
"Time": 1,
"SQL": "select :vtg1 from user where x = :vtg2",
"BindVars": {
"#maxLimit": "10001",
"vtg1": "1",
"vtg2": "'/* hello */'"
}
}
],
"MysqlQueries": [
{
"Time": 1,
"SQL": "select 1 from user where x = '/* hello */' limit 10001"
}
]
},
"ks_sharded/c0-": {
"TabletQueries": [
{
"Time": 1,
"SQL": "select :vtg1 from user where x = :vtg2",
"BindVars": {
"#maxLimit": "10001",
"vtg1": "1",
"vtg2": "'/* hello */'"
}
}
],
"MysqlQueries": [
{
"Time": 1,
"SQL": "select 1 from user where x = '/* hello */' limit 10001"
}
]
}
}
},
{
"SQL": "select 1 from user where x='/* ; */'",
"Plans": [
{
"Original": "select :vtg1 from user where x = :vtg2",
"Instructions": {
"Opcode": "SelectScatter",
"Keyspace": {
"Name": "ks_sharded",
"Sharded": true
},
"Query": "select :vtg1 from user where x = :vtg2",
"FieldQuery": "select :vtg1 from user where 1 != 1"
}
}
],
"TabletActions": {
"ks_sharded/-40": {
"TabletQueries": [
{
"Time": 1,
"SQL": "select :vtg1 from user where x = :vtg2",
"BindVars": {
"#maxLimit": "10001",
"vtg1": "1",
"vtg2": "'/* ; */'"
}
}
],
"MysqlQueries": [
{
"Time": 1,
"SQL": "select 1 from user where x = '/* ; */' limit 10001"
}
]
},
"ks_sharded/40-80": {
"TabletQueries": [
{
"Time": 1,
"SQL": "select :vtg1 from user where x = :vtg2",
"BindVars": {
"#maxLimit": "10001",
"vtg1": "1",
"vtg2": "'/* ; */'"
}
}
],
"MysqlQueries": [
{
"Time": 1,
"SQL": "select 1 from user where x = '/* ; */' limit 10001"
}
]
},
"ks_sharded/80-c0": {
"TabletQueries": [
{
"Time": 1,
"SQL": "select :vtg1 from user where x = :vtg2",
"BindVars": {
"#maxLimit": "10001",
"vtg1": "1",
"vtg2": "'/* ; */'"
}
}
],
"MysqlQueries": [
{
"Time": 1,
"SQL": "select 1 from user where x = '/* ; */' limit 10001"
}
]
},
"ks_sharded/c0-": {
"TabletQueries": [
{
"Time": 1,
"SQL": "select :vtg1 from user where x = :vtg2",
"BindVars": {
"#maxLimit": "10001",
"vtg1": "1",
"vtg2": "'/* ; */'"
}
}
],
"MysqlQueries": [
{
"Time": 1,
"SQL": "select 1 from user where x = '/* ; */' limit 10001"
}
]
}
}
}
]
Loading

0 comments on commit 682f852

Please sign in to comment.