зеркало из https://github.com/github/vitess-gh.git
Merge branch 'master' of github.com:youtube/vitess
This commit is contained in:
Коммит
32be6645cf
|
@ -21,3 +21,6 @@ select VALUES(B, C) from b#select values(b, c) from b
|
|||
select * from b use index (A)#select * from b use index (a)
|
||||
insert into A(A, B) values (1, 2)#insert into A(a, b) values (1, 2)
|
||||
CREATE TABLE A#create table A
|
||||
create view A#create table a
|
||||
alter view A#alter table a
|
||||
drop view A#drop table a
|
||||
|
|
|
@ -6,4 +6,7 @@ drop index a on b#{"Action": "ALTER", "TableName": "b", "NewName": "b"}
|
|||
rename table a to b#{"Action": "RENAME", "TableName": "a", "NewTable": "b"}
|
||||
alter table a rename b#{"Action": "RENAME", "TableName": "a", "NewTable": "b"}
|
||||
alter table a rename to b#{"Action": "RENAME", "TableName": "a", "NewTable": "b"}
|
||||
create view a asdasd#{"Action": "CREATE", "NewName": "a"}
|
||||
alter view c alter foo#{"Action": "ALTER", "TableName": "c", "NewTable": "c"}
|
||||
drop view b#{"Action": "DROP", "TableName": "b"}
|
||||
syntax error#{"Action": "NONE"}
|
||||
|
|
|
@ -155,6 +155,9 @@ create table if not exists a#create table a
|
|||
create index a on b#alter table b
|
||||
create unique index a on b#alter table b
|
||||
create unique index a using foo on b#alter table b
|
||||
create view a#create table a
|
||||
alter view a#alter table a
|
||||
drop view a#drop table a
|
||||
drop table a
|
||||
drop table if exists a#drop table a
|
||||
drop index b on a#alter table a
|
||||
|
|
Разница между файлами не показана из-за своего большого размера
Загрузить разницу
|
@ -122,7 +122,7 @@ const (
|
|||
|
||||
// DDL Tokens
|
||||
%token <node> CREATE ALTER DROP RENAME
|
||||
%token <node> TABLE INDEX TO IGNORE IF UNIQUE USING
|
||||
%token <node> TABLE INDEX VIEW TO IGNORE IF UNIQUE USING
|
||||
|
||||
%start any_command
|
||||
|
||||
|
@ -238,6 +238,10 @@ create_statement:
|
|||
$$ = NewSimpleParseNode(ALTER, "alter")
|
||||
$$.Push($7)
|
||||
}
|
||||
| CREATE VIEW sql_id force_eof
|
||||
{
|
||||
$$.Push($3)
|
||||
}
|
||||
|
||||
alter_statement:
|
||||
ALTER ignore_opt TABLE ID non_rename_operation force_eof
|
||||
|
@ -250,6 +254,10 @@ alter_statement:
|
|||
$$ = NewSimpleParseNode(RENAME, "rename")
|
||||
$$.PushTwo($4, $7)
|
||||
}
|
||||
| ALTER VIEW sql_id force_eof
|
||||
{
|
||||
$$.Push($3)
|
||||
}
|
||||
|
||||
rename_statement:
|
||||
RENAME TABLE ID TO ID
|
||||
|
@ -268,6 +276,10 @@ drop_statement:
|
|||
$$ = NewSimpleParseNode(ALTER, "alter")
|
||||
$$.Push($5)
|
||||
}
|
||||
| DROP VIEW sql_id force_eof
|
||||
{
|
||||
$$.Push($3)
|
||||
}
|
||||
|
||||
comment_opt:
|
||||
{
|
||||
|
|
|
@ -95,6 +95,7 @@ var keywords = map[string]int{
|
|||
"drop": DROP,
|
||||
"table": TABLE,
|
||||
"index": INDEX,
|
||||
"view": VIEW,
|
||||
"to": TO,
|
||||
"ignore": IGNORE,
|
||||
"if": IF,
|
||||
|
|
Загрузка…
Ссылка в новой задаче