diff --git a/test/dotnet/ExpectedOutput/insertBulkErrors.out b/test/dotnet/ExpectedOutput/insertBulkErrors.out index 34fcef8f76..fb375dc432 100644 --- a/test/dotnet/ExpectedOutput/insertBulkErrors.out +++ b/test/dotnet/ExpectedOutput/insertBulkErrors.out @@ -1,5 +1,5 @@ -#Q#Create table sourceTable(a int, b int not null) -#Q#Create table destinationTable(a int, b int not null) +#Q#Create table sourceTable(a int, b int PRIMARY KEY) +#Q#Create table destinationTable(a int, b int PRIMARY KEY) #Q#Insert into sourceTable values (1, 1); #Q#Insert into sourceTable values (NULL, 2); #Q#select @@trancount; @@ -18,8 +18,8 @@ #!#2 #Q#drop table sourceTable #Q#drop table destinationTable -#Q#Create table sourceTable(a int, b int not null) -#Q#Create table destinationTable(a int, b int not null) +#Q#Create table sourceTable(a int, b int PRIMARY KEY) +#Q#Create table destinationTable(a int, b int PRIMARY KEY) #Q#Insert into sourceTable values (1, 1); #Q#Insert into sourceTable values (NULL, 2); #Q#select @@trancount; @@ -35,8 +35,8 @@ #Q#Select * from destinationTable #Q#drop table sourceTable #Q#drop table destinationTable -#Q#Create table sourceTable(a int, b int not null) -#Q#Create table destinationTable(a int, b int not null) +#Q#Create table sourceTable(a int, b int PRIMARY KEY) +#Q#Create table destinationTable(a int, b int PRIMARY KEY) #Q#create index idx on destinationTable(a); #Q#Insert into sourceTable values (1, 1); #Q#Insert into sourceTable values (NULL, 2); @@ -81,8 +81,8 @@ on on #Q#drop table sourceTable #Q#drop table destinationTable -#Q#Create table sourceTable(a int, b int not null) -#Q#Create table destinationTable(a int, b int not null) +#Q#Create table sourceTable(a int, b int PRIMARY KEY) +#Q#Create table destinationTable(a int, b int PRIMARY KEY) #Q#create index idx on destinationTable(a); #Q#Insert into sourceTable values (1, 1); #Q#Insert into sourceTable values (NULL, 2); @@ -250,25 +250,6 @@ on #Q#drop table sourceTable1 #Q#drop table destinationTable #Q#create table sourceTable(c1 int, c2 CHAR(1024)) -#Q#INSERT INTO sourceTable SELECT generate_series(1, 1000, 1), 'Foo' -#Q#INSERT INTO sourceTable VALUES (NULL, NULL) -#Q#create table destinationTable(c1 int NOT NULL, c2 CHAR(1024)) -#Q#create table sourceTable1(c1 int, c2 CHAR(1024)) -#Q#INSERT INTO sourceTable1 VALUES(NULL, NULL) -#Q#INSERT INTO sourceTable1 SELECT generate_series(1, 999, 1), 'Foo' -#Q#Select count(*) from sourceTable -#D#int -1001 -#Q#select count(*) from sourceTable1 -#D#int -1000 -#Q#Select count(*) from destinationTable -#D#int -0 -#Q#drop table sourceTable -#Q#drop table sourceTable1 -#Q#drop table destinationTable -#Q#create table sourceTable(c1 int, c2 CHAR(1024)) #Q#INSERT INTO sourceTable SELECT generate_series(1, 1001, 1), 'Foo' #Q#create table destinationTable(c1 int, c2 CHAR(1024), check(c1 < 1000)) #Q#create table sourceTable1(c1 int, c2 CHAR(1024)) diff --git a/test/dotnet/input/InsertBulk/insertBulkErrors.txt b/test/dotnet/input/InsertBulk/insertBulkErrors.txt index 35780887fb..4ed635f3bc 100644 --- a/test/dotnet/input/InsertBulk/insertBulkErrors.txt +++ b/test/dotnet/input/InsertBulk/insertBulkErrors.txt @@ -19,8 +19,8 @@ ####### Testing explicit transaction ####### # commit and then check for inserts -Create table sourceTable(a int, b int not null) -Create table destinationTable(a int, b int not null) +Create table sourceTable(a int, b int PRIMARY KEY) +Create table destinationTable(a int, b int PRIMARY KEY) Insert into sourceTable values (1, 1); Insert into sourceTable values (NULL, 2); txn#!#begin @@ -36,8 +36,8 @@ drop table sourceTable drop table destinationTable # rollback and then check for inserts -Create table sourceTable(a int, b int not null) -Create table destinationTable(a int, b int not null) +Create table sourceTable(a int, b int PRIMARY KEY) +Create table destinationTable(a int, b int PRIMARY KEY) Insert into sourceTable values (1, 1); Insert into sourceTable values (NULL, 2); txn#!#begin @@ -54,8 +54,8 @@ drop table sourceTable drop table destinationTable # Index without transaction -Create table sourceTable(a int, b int not null) -Create table destinationTable(a int, b int not null) +Create table sourceTable(a int, b int PRIMARY KEY) +Create table destinationTable(a int, b int PRIMARY KEY) create index idx on destinationTable(a); Insert into sourceTable values (1, 1); Insert into sourceTable values (NULL, 2); @@ -81,8 +81,8 @@ drop table sourceTable drop table destinationTable ####### Index with transaction ####### -Create table sourceTable(a int, b int not null) -Create table destinationTable(a int, b int not null) +Create table sourceTable(a int, b int PRIMARY KEY) +Create table destinationTable(a int, b int PRIMARY KEY) create index idx on destinationTable(a); Insert into sourceTable values (1, 1); Insert into sourceTable values (NULL, 2); @@ -208,31 +208,6 @@ drop table sourceTable drop table sourceTable1 drop table destinationTable -####### Not Null ####### -# last row is error (last packet will be flushed) -create table sourceTable(c1 int, c2 CHAR(1024)) -INSERT INTO sourceTable SELECT generate_series(1, 1000, 1), 'Foo' -INSERT INTO sourceTable VALUES (NULL, NULL) -create table destinationTable(c1 int NOT NULL, c2 CHAR(1024)) - -insertbulk#!#sourceTable#!#destinationTable - -# 1st row is error (remaining packets to be discarded) -create table sourceTable1(c1 int, c2 CHAR(1024)) -INSERT INTO sourceTable1 VALUES(NULL, NULL) -INSERT INTO sourceTable1 SELECT generate_series(1, 999, 1), 'Foo' - -insertbulk#!#sourceTable1#!#destinationTable - -Select count(*) from sourceTable -select count(*) from sourceTable1 - -Select count(*) from destinationTable - -drop table sourceTable -drop table sourceTable1 -drop table destinationTable - ####### Check ####### ##### THESE TESTS ALSO TEST REUSING THE SAME CONNECTION ##### ON WHICH WE ERROR OUT AND NEED TO RESET TDS STATE