Skip to content

Commit

Permalink
ddl: fix 'show create table' result not correct when the table with a…
Browse files Browse the repository at this point in the history
… compression option (#7793)
  • Loading branch information
ciscoxll authored and coocood committed Sep 27, 2018
1 parent 86416be commit 0d979a2
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion executor/show.go
Original file line number Diff line number Diff line change
Expand Up @@ -598,7 +598,7 @@ func (e *ShowExec) fetchShowCreateTable() error {

// Displayed if the compression typed is set.
if len(tb.Meta().Compression) != 0 {
buf.WriteString(fmt.Sprintf(" COMPRESSION=`%s`", tb.Meta().Compression))
buf.WriteString(fmt.Sprintf(" COMPRESSION='%s'", tb.Meta().Compression))
}

// add partition info here.
Expand Down
2 changes: 1 addition & 1 deletion executor/show_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -397,7 +397,7 @@ func (s *testSuite) TestShow(c *C) {
tk.MustQuery("show create table t1").Check(testutil.RowsWithSep("|",
"t1 CREATE TABLE `t1` (\n"+
" `c1` int(11) DEFAULT NULL\n"+
") ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin COMPRESSION=`zlib`",
") ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin COMPRESSION='zlib'",
))

// Test show create table year type
Expand Down

0 comments on commit 0d979a2

Please sign in to comment.