Skip to content

Commit 34a4283

Browse files
angelamayxiefulghum
authored andcommitted
added tests
1 parent c7747dd commit 34a4283

File tree

2 files changed

+14
-1
lines changed

2 files changed

+14
-1
lines changed

enginetest/queries/queries.go

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11760,6 +11760,19 @@ var VersionedViewTests = []QueryTest{
1176011760
sql.NewRow("myview5"),
1176111761
},
1176211762
},
11763+
{
11764+
Query: "insert into mytable values(4, 'fourth row'),(5, 'fifth row') returning i, s",
11765+
Expected: []sql.Row{
11766+
sql.NewRow(4, "fourth row"),
11767+
sql.NewRow(5, "fifth row"),
11768+
},
11769+
},
11770+
{
11771+
Query: "insert into mytable set i =4, s='fourth row' returning i, s",
11772+
Expected: []sql.Row{
11773+
sql.NewRow(4, "fourth row"),
11774+
},
11775+
},
1176311776
}
1176411777

1176511778
var ShowTableStatusQueries = []QueryTest{

sql/plan/insert.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ type InsertInto struct {
7272
LiteralValueSource bool
7373

7474
// Returning is a list of expressions to return after the insert operation. This feature is not supported
75-
// in MySQL's syntax, but is exposed through PostgreSQL's syntax.
75+
// in MySQL's syntax, but is exposed through PostgreSQL's and MariaDB's syntax.
7676
Returning []sql.Expression
7777

7878
// FirstGenerateAutoIncRowIdx is the index of the first row inserted that increments last_insert_id.

0 commit comments

Comments
 (0)