diff --git a/executor/show.go b/executor/show.go index 0c10de649234e..773e7e6d8e85b 100644 --- a/executor/show.go +++ b/executor/show.go @@ -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. diff --git a/executor/show_test.go b/executor/show_test.go index 2f61d67a6a371..6d548ece3854a 100644 --- a/executor/show_test.go +++ b/executor/show_test.go @@ -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