diff --git a/conn_go18_test.go b/conn_go18_test.go index 4b24f81..b10f27e 100644 --- a/conn_go18_test.go +++ b/conn_go18_test.go @@ -45,7 +45,7 @@ func (s *connSuite) TestColumnTypes() { s.Require().NoError(err) expected := []string{ "Int64", "UInt64", "Float64", "String", "String", "Array(Int16)", "Array(UInt8)", "Date", "DateTime", - `Enum8(\'one\' = 1, \'two\' = 2, \'three\' = 3)`, + "Enum8('one' = 1, 'two' = 2, 'three' = 3)", } s.Require().Equal(len(expected), len(types)) for i, e := range expected { diff --git a/rows.go b/rows.go index b4ec7f5..2bfc430 100644 --- a/rows.go +++ b/rows.go @@ -23,6 +23,12 @@ func newTextRows(c *conn, body io.ReadCloser, location *time.Location, useDBLoca if err != nil { return nil, err } + for i := range types { + types[i], err = readUnquoted(strings.NewReader(types[i]), 0) + if err != nil { + return nil, err + } + } parsers := make([]DataParser, len(types), len(types)) for i, typ := range types {