diff --git a/AUTHORS b/AUTHORS index 4021b96c..bab66a3b 100644 --- a/AUTHORS +++ b/AUTHORS @@ -33,6 +33,7 @@ Daniel Montoya Daniel Nichter Daniƫl van Eeden Dave Protasowski +Dirkjan Bussink DisposaBoy Egor Smolyakov Erwan Martin diff --git a/const.go b/const.go index 22526e03..0cee9b2e 100644 --- a/const.go +++ b/const.go @@ -125,7 +125,10 @@ const ( fieldTypeBit ) const ( - fieldTypeJSON fieldType = iota + 0xf5 + fieldTypeVector fieldType = iota + 0xf2 + fieldTypeInvalid + fieldTypeBool + fieldTypeJSON fieldTypeNewDecimal fieldTypeEnum fieldTypeSet diff --git a/fields.go b/fields.go index 28608424..be5cd809 100644 --- a/fields.go +++ b/fields.go @@ -112,6 +112,8 @@ func (mf *mysqlField) typeDatabaseName() string { return "VARCHAR" case fieldTypeYear: return "YEAR" + case fieldTypeVector: + return "VECTOR" default: return "" } @@ -198,7 +200,7 @@ func (mf *mysqlField) scanType() reflect.Type { return scanTypeNullFloat case fieldTypeBit, fieldTypeTinyBLOB, fieldTypeMediumBLOB, fieldTypeLongBLOB, - fieldTypeBLOB, fieldTypeVarString, fieldTypeString, fieldTypeGeometry: + fieldTypeBLOB, fieldTypeVarString, fieldTypeString, fieldTypeGeometry, fieldTypeVector: if mf.charSet == binaryCollationID { return scanTypeBytes } diff --git a/packets.go b/packets.go index df850fd4..ccdd532b 100644 --- a/packets.go +++ b/packets.go @@ -1329,7 +1329,8 @@ func (rows *binaryRows) readRow(dest []driver.Value) error { case fieldTypeDecimal, fieldTypeNewDecimal, fieldTypeVarChar, fieldTypeBit, fieldTypeEnum, fieldTypeSet, fieldTypeTinyBLOB, fieldTypeMediumBLOB, fieldTypeLongBLOB, fieldTypeBLOB, - fieldTypeVarString, fieldTypeString, fieldTypeGeometry, fieldTypeJSON: + fieldTypeVarString, fieldTypeString, fieldTypeGeometry, fieldTypeJSON, + fieldTypeVector: var isNull bool var n int dest[i], isNull, n, err = readLengthEncodedString(data[pos:])