Skip to content

Commit

Permalink
parser: fixed alter table compression option (pingcap#3293)
Browse files Browse the repository at this point in the history
  • Loading branch information
holys authored and shenli committed May 20, 2017
1 parent cd5bc0a commit 2c07a47
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion parser/parser.y
Original file line number Diff line number Diff line change
Expand Up @@ -5386,7 +5386,7 @@ TableOption:
{
$$ = &ast.TableOption{Tp: ast.TableOptionPassword, StrValue: $3}
}
| "COMPRESSION" EqOpt Identifier
| "COMPRESSION" EqOpt stringLit
{
$$ = &ast.TableOption{Tp: ast.TableOptionCompression, StrValue: $3}
}
Expand Down
4 changes: 2 additions & 2 deletions parser/parser_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -1092,8 +1092,8 @@ func (s *testParserSuite) TestDDL(c *C) {
{"create table t (c int) avg_row_length 3", true},
{"create table t (c int) checksum = 0", true},
{"create table t (c int) checksum 1", true},
{"create table t (c int) compression = none", true},
{"create table t (c int) compression lz4", true},
{"create table t (c int) compression = 'NONE'", true},
{"create table t (c int) compression 'lz4'", true},
{"create table t (c int) connection = 'abc'", true},
{"create table t (c int) connection 'abc'", true},
{"create table t (c int) key_block_size = 1024", true},
Expand Down

0 comments on commit 2c07a47

Please sign in to comment.