Skip to content

Commit

Permalink
added failing insert with negative value
Browse files Browse the repository at this point in the history
Signed-off-by: Harshit Gangal <[email protected]>
  • Loading branch information
harshit-gangal committed Oct 11, 2023
1 parent 8d7b507 commit 5348254
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 0 deletions.
8 changes: 8 additions & 0 deletions go/test/endtoend/vtgate/misc_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,14 @@ import (
"github.com/stretchr/testify/require"
)

func TestInsertNeg(t *testing.T) {
conn, closer := start(t)
defer closer()

utils.Exec(t, conn, "insert ignore into t10(id, sharding_key, col1, col2, col3) values(10, 20, 'a', 1, 2), (20, -20, 'b', 3, 4), (30, -40, 'c', 6, 7), (40, 60, 'd', 4, 10)")
utils.Exec(t, conn, "insert ignore into t10(id, sharding_key, col1, col2, col3) values(1, 2, 'a', 1, 2), (2, -2, 'b', -3, 4), (3, -4, 'c', 6, -7), (4, 6, 'd', 4, -10)")
}

func TestSelectNull(t *testing.T) {
conn, closer := start(t)
defer closer()
Expand Down
3 changes: 3 additions & 0 deletions go/test/endtoend/vtgate/schema.sql
Original file line number Diff line number Diff line change
Expand Up @@ -143,6 +143,9 @@ create table t10
(
id bigint,
sharding_key bigint,
col1 varchar(50),
col2 int,
col3 int,
primary key (id)
) Engine = InnoDB;

Expand Down

0 comments on commit 5348254

Please sign in to comment.