Fix issue with byte representation in MSSQL (#1957)
There is a missing cast to string in BuildUpdates which leads to a failure to call str2ucs and ucs2str for converts on MSSQL. Ref: https://github.com/go-gitea/gitea/issues/16252 Signed-off-by: Andrew Thornton <art27@cantab.net> Reviewed-on: https://gitea.com/xorm/xorm/pulls/1957 Co-authored-by: Andrew Thornton <art27@cantab.net> Co-committed-by: Andrew Thornton <art27@cantab.net>
This commit is contained in:
parent
ad4830f531
commit
d973423802
|
@ -129,6 +129,9 @@ func (statement *Statement) BuildUpdates(tableValue reflect.Value,
|
|||
}
|
||||
if data != nil {
|
||||
val = data
|
||||
if !col.SQLType.IsBlob() {
|
||||
val = string(data)
|
||||
}
|
||||
}
|
||||
goto APPEND
|
||||
}
|
||||
|
@ -141,6 +144,9 @@ func (statement *Statement) BuildUpdates(tableValue reflect.Value,
|
|||
}
|
||||
if data != nil {
|
||||
val = data
|
||||
if !col.SQLType.IsBlob() {
|
||||
val = string(data)
|
||||
}
|
||||
}
|
||||
goto APPEND
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue