Skip to content

Commit 60e8ff8

Browse files
authored
fix(mysql): Disallow time.Time in mysql :copyfrom queries, not all queries (#2768)
1 parent 5c439e7 commit 60e8ff8

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

internal/codegen/golang/gen.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -305,6 +305,9 @@ func usesBatch(queries []Query) bool {
305305

306306
func checkNoTimesForMySQLCopyFrom(queries []Query) error {
307307
for _, q := range queries {
308+
if q.Cmd != metadata.CmdCopyFrom {
309+
continue
310+
}
308311
for _, f := range q.Arg.CopyFromMySQLFields() {
309312
if f.Type == "time.Time" {
310313
return fmt.Errorf("values with a timezone are not yet supported")

0 commit comments

Comments
 (0)