diff --git a/SqlServer.2005.MS/Tests/DataProvider/SqlServerFunctionsTests/Tests.DataProvider.SqlServerFunctionsTests.GetTableRowCountInfoTest(SqlServer.2005.MS).sql b/SqlServer.2005.MS/Tests/DataProvider/SqlServerFunctionsTests/Tests.DataProvider.SqlServerFunctionsTests.GetTableRowCountInfoTest(SqlServer.2005.MS).sql new file mode 100644 index 000000000000..be7c4b3b7241 --- /dev/null +++ b/SqlServer.2005.MS/Tests/DataProvider/SqlServerFunctionsTests/Tests.DataProvider.SqlServerFunctionsTests.GetTableRowCountInfoTest(SqlServer.2005.MS).sql @@ -0,0 +1,76 @@ +BeforeExecute +-- SqlServer.2005.MS SqlServer.2005 + +SELECT + [p].[object_id], + OBJECT_SCHEMA_NAME([p].[object_id]), + OBJECT_NAME([p].[object_id]), + SUM(Coalesce([p].[rows], 0)) +FROM + [sys].[partitions] [p] + INNER JOIN [sys].[objects] [a_Object] ON [p].[object_id] = [a_Object].[object_id] +WHERE + [p].[index_id] IN (0, 1) AND [a_Object].[type] = N'U' +GROUP BY + [p].[object_id] +ORDER BY + [p].[object_id] + +BeforeExecute +BeginTransaction +BeforeExecute +-- SqlServer.2005.MS SqlServer.2005 +DECLARE @ParentID Int -- Int32 +SET @ParentID = -345 +DECLARE @Value1 Int -- Int32 +SET @Value1 = NULL + +INSERT INTO [Parent] +( + [ParentID], + [Value1] +) +VALUES +( + @ParentID, + @Value1 +) + +BeforeExecute +-- SqlServer.2005.MS SqlServer.2005 + +SELECT + [p].[object_id], + OBJECT_SCHEMA_NAME([p].[object_id]), + OBJECT_NAME([p].[object_id]), + SUM(Coalesce([p].[rows], 0)) +FROM + [sys].[partitions] [p] + INNER JOIN [sys].[objects] [a_Object] ON [p].[object_id] = [a_Object].[object_id] +WHERE + [p].[index_id] IN (0, 1) AND [a_Object].[type] = N'U' +GROUP BY + [p].[object_id] +ORDER BY + [p].[object_id] + +BeforeExecute +RollbackTransaction +BeforeExecute +-- SqlServer.2005.MS SqlServer.2005 + +SELECT + [p].[object_id], + OBJECT_SCHEMA_NAME([p].[object_id]), + OBJECT_NAME([p].[object_id]), + SUM(Coalesce([p].[rows], 0)) +FROM + [sys].[partitions] [p] + INNER JOIN [sys].[objects] [a_Object] ON [p].[object_id] = [a_Object].[object_id] +WHERE + [p].[index_id] IN (0, 1) AND [a_Object].[type] = N'U' +GROUP BY + [p].[object_id] +ORDER BY + [p].[object_id] + diff --git a/SqlServer.2005/Tests/DataProvider/SqlServerFunctionsTests/Tests.DataProvider.SqlServerFunctionsTests.GetTableRowCountInfoTest(SqlServer.2005).sql b/SqlServer.2005/Tests/DataProvider/SqlServerFunctionsTests/Tests.DataProvider.SqlServerFunctionsTests.GetTableRowCountInfoTest(SqlServer.2005).sql new file mode 100644 index 000000000000..ea7399cf9d66 --- /dev/null +++ b/SqlServer.2005/Tests/DataProvider/SqlServerFunctionsTests/Tests.DataProvider.SqlServerFunctionsTests.GetTableRowCountInfoTest(SqlServer.2005).sql @@ -0,0 +1,76 @@ +BeforeExecute +-- SqlServer.2005 + +SELECT + [p].[object_id], + OBJECT_SCHEMA_NAME([p].[object_id]), + OBJECT_NAME([p].[object_id]), + SUM(Coalesce([p].[rows], 0)) +FROM + [sys].[partitions] [p] + INNER JOIN [sys].[objects] [a_Object] ON [p].[object_id] = [a_Object].[object_id] +WHERE + [p].[index_id] IN (0, 1) AND [a_Object].[type] = N'U' +GROUP BY + [p].[object_id] +ORDER BY + [p].[object_id] + +BeforeExecute +BeginTransaction +BeforeExecute +-- SqlServer.2005 +DECLARE @ParentID Int -- Int32 +SET @ParentID = -345 +DECLARE @Value1 Int -- Int32 +SET @Value1 = NULL + +INSERT INTO [Parent] +( + [ParentID], + [Value1] +) +VALUES +( + @ParentID, + @Value1 +) + +BeforeExecute +-- SqlServer.2005 + +SELECT + [p].[object_id], + OBJECT_SCHEMA_NAME([p].[object_id]), + OBJECT_NAME([p].[object_id]), + SUM(Coalesce([p].[rows], 0)) +FROM + [sys].[partitions] [p] + INNER JOIN [sys].[objects] [a_Object] ON [p].[object_id] = [a_Object].[object_id] +WHERE + [p].[index_id] IN (0, 1) AND [a_Object].[type] = N'U' +GROUP BY + [p].[object_id] +ORDER BY + [p].[object_id] + +BeforeExecute +RollbackTransaction +BeforeExecute +-- SqlServer.2005 + +SELECT + [p].[object_id], + OBJECT_SCHEMA_NAME([p].[object_id]), + OBJECT_NAME([p].[object_id]), + SUM(Coalesce([p].[rows], 0)) +FROM + [sys].[partitions] [p] + INNER JOIN [sys].[objects] [a_Object] ON [p].[object_id] = [a_Object].[object_id] +WHERE + [p].[index_id] IN (0, 1) AND [a_Object].[type] = N'U' +GROUP BY + [p].[object_id] +ORDER BY + [p].[object_id] + diff --git a/SqlServer.2008.MS/Tests/DataProvider/SqlServerFunctionsTests/Tests.DataProvider.SqlServerFunctionsTests.GetTableRowCountInfoTest(SqlServer.2008.MS).sql b/SqlServer.2008.MS/Tests/DataProvider/SqlServerFunctionsTests/Tests.DataProvider.SqlServerFunctionsTests.GetTableRowCountInfoTest(SqlServer.2008.MS).sql new file mode 100644 index 000000000000..8c7bb79f4a5a --- /dev/null +++ b/SqlServer.2008.MS/Tests/DataProvider/SqlServerFunctionsTests/Tests.DataProvider.SqlServerFunctionsTests.GetTableRowCountInfoTest(SqlServer.2008.MS).sql @@ -0,0 +1,76 @@ +BeforeExecute +-- SqlServer.2008.MS SqlServer.2008 + +SELECT + [p].[object_id], + OBJECT_SCHEMA_NAME([p].[object_id]), + OBJECT_NAME([p].[object_id]), + SUM(Coalesce([p].[rows], 0)) +FROM + [sys].[partitions] [p] + INNER JOIN [sys].[objects] [a_Object] ON [p].[object_id] = [a_Object].[object_id] +WHERE + [p].[index_id] IN (0, 1) AND [a_Object].[type] = N'U' +GROUP BY + [p].[object_id] +ORDER BY + [p].[object_id] + +BeforeExecute +BeginTransaction +BeforeExecute +-- SqlServer.2008.MS SqlServer.2008 +DECLARE @ParentID Int -- Int32 +SET @ParentID = -345 +DECLARE @Value1 Int -- Int32 +SET @Value1 = NULL + +INSERT INTO [Parent] +( + [ParentID], + [Value1] +) +VALUES +( + @ParentID, + @Value1 +) + +BeforeExecute +-- SqlServer.2008.MS SqlServer.2008 + +SELECT + [p].[object_id], + OBJECT_SCHEMA_NAME([p].[object_id]), + OBJECT_NAME([p].[object_id]), + SUM(Coalesce([p].[rows], 0)) +FROM + [sys].[partitions] [p] + INNER JOIN [sys].[objects] [a_Object] ON [p].[object_id] = [a_Object].[object_id] +WHERE + [p].[index_id] IN (0, 1) AND [a_Object].[type] = N'U' +GROUP BY + [p].[object_id] +ORDER BY + [p].[object_id] + +BeforeExecute +RollbackTransaction +BeforeExecute +-- SqlServer.2008.MS SqlServer.2008 + +SELECT + [p].[object_id], + OBJECT_SCHEMA_NAME([p].[object_id]), + OBJECT_NAME([p].[object_id]), + SUM(Coalesce([p].[rows], 0)) +FROM + [sys].[partitions] [p] + INNER JOIN [sys].[objects] [a_Object] ON [p].[object_id] = [a_Object].[object_id] +WHERE + [p].[index_id] IN (0, 1) AND [a_Object].[type] = N'U' +GROUP BY + [p].[object_id] +ORDER BY + [p].[object_id] + diff --git a/SqlServer.2008/Tests/DataProvider/SqlServerFunctionsTests/Tests.DataProvider.SqlServerFunctionsTests.GetTableRowCountInfoTest(SqlServer.2008).sql b/SqlServer.2008/Tests/DataProvider/SqlServerFunctionsTests/Tests.DataProvider.SqlServerFunctionsTests.GetTableRowCountInfoTest(SqlServer.2008).sql new file mode 100644 index 000000000000..188ccbd0f06d --- /dev/null +++ b/SqlServer.2008/Tests/DataProvider/SqlServerFunctionsTests/Tests.DataProvider.SqlServerFunctionsTests.GetTableRowCountInfoTest(SqlServer.2008).sql @@ -0,0 +1,76 @@ +BeforeExecute +-- SqlServer.2008 + +SELECT + [p].[object_id], + OBJECT_SCHEMA_NAME([p].[object_id]), + OBJECT_NAME([p].[object_id]), + SUM(Coalesce([p].[rows], 0)) +FROM + [sys].[partitions] [p] + INNER JOIN [sys].[objects] [a_Object] ON [p].[object_id] = [a_Object].[object_id] +WHERE + [p].[index_id] IN (0, 1) AND [a_Object].[type] = N'U' +GROUP BY + [p].[object_id] +ORDER BY + [p].[object_id] + +BeforeExecute +BeginTransaction +BeforeExecute +-- SqlServer.2008 +DECLARE @ParentID Int -- Int32 +SET @ParentID = -345 +DECLARE @Value1 Int -- Int32 +SET @Value1 = NULL + +INSERT INTO [Parent] +( + [ParentID], + [Value1] +) +VALUES +( + @ParentID, + @Value1 +) + +BeforeExecute +-- SqlServer.2008 + +SELECT + [p].[object_id], + OBJECT_SCHEMA_NAME([p].[object_id]), + OBJECT_NAME([p].[object_id]), + SUM(Coalesce([p].[rows], 0)) +FROM + [sys].[partitions] [p] + INNER JOIN [sys].[objects] [a_Object] ON [p].[object_id] = [a_Object].[object_id] +WHERE + [p].[index_id] IN (0, 1) AND [a_Object].[type] = N'U' +GROUP BY + [p].[object_id] +ORDER BY + [p].[object_id] + +BeforeExecute +RollbackTransaction +BeforeExecute +-- SqlServer.2008 + +SELECT + [p].[object_id], + OBJECT_SCHEMA_NAME([p].[object_id]), + OBJECT_NAME([p].[object_id]), + SUM(Coalesce([p].[rows], 0)) +FROM + [sys].[partitions] [p] + INNER JOIN [sys].[objects] [a_Object] ON [p].[object_id] = [a_Object].[object_id] +WHERE + [p].[index_id] IN (0, 1) AND [a_Object].[type] = N'U' +GROUP BY + [p].[object_id] +ORDER BY + [p].[object_id] + diff --git a/SqlServer.2012.MS/Tests/DataProvider/SqlServerFunctionsTests/Tests.DataProvider.SqlServerFunctionsTests.GetTableRowCountInfoTest(SqlServer.2012.MS).sql b/SqlServer.2012.MS/Tests/DataProvider/SqlServerFunctionsTests/Tests.DataProvider.SqlServerFunctionsTests.GetTableRowCountInfoTest(SqlServer.2012.MS).sql new file mode 100644 index 000000000000..ca2afd6d81b6 --- /dev/null +++ b/SqlServer.2012.MS/Tests/DataProvider/SqlServerFunctionsTests/Tests.DataProvider.SqlServerFunctionsTests.GetTableRowCountInfoTest(SqlServer.2012.MS).sql @@ -0,0 +1,76 @@ +BeforeExecute +-- SqlServer.2012.MS SqlServer.2012 + +SELECT + [p].[object_id], + OBJECT_SCHEMA_NAME([p].[object_id]), + OBJECT_NAME([p].[object_id]), + SUM(Coalesce([p].[rows], 0)) +FROM + [sys].[partitions] [p] + INNER JOIN [sys].[objects] [a_Object] ON [p].[object_id] = [a_Object].[object_id] +WHERE + [p].[index_id] IN (0, 1) AND [a_Object].[type] = N'U' +GROUP BY + [p].[object_id] +ORDER BY + [p].[object_id] + +BeforeExecute +BeginTransaction +BeforeExecute +-- SqlServer.2012.MS SqlServer.2012 +DECLARE @ParentID Int -- Int32 +SET @ParentID = -345 +DECLARE @Value1 Int -- Int32 +SET @Value1 = NULL + +INSERT INTO [Parent] +( + [ParentID], + [Value1] +) +VALUES +( + @ParentID, + @Value1 +) + +BeforeExecute +-- SqlServer.2012.MS SqlServer.2012 + +SELECT + [p].[object_id], + OBJECT_SCHEMA_NAME([p].[object_id]), + OBJECT_NAME([p].[object_id]), + SUM(Coalesce([p].[rows], 0)) +FROM + [sys].[partitions] [p] + INNER JOIN [sys].[objects] [a_Object] ON [p].[object_id] = [a_Object].[object_id] +WHERE + [p].[index_id] IN (0, 1) AND [a_Object].[type] = N'U' +GROUP BY + [p].[object_id] +ORDER BY + [p].[object_id] + +BeforeExecute +RollbackTransaction +BeforeExecute +-- SqlServer.2012.MS SqlServer.2012 + +SELECT + [p].[object_id], + OBJECT_SCHEMA_NAME([p].[object_id]), + OBJECT_NAME([p].[object_id]), + SUM(Coalesce([p].[rows], 0)) +FROM + [sys].[partitions] [p] + INNER JOIN [sys].[objects] [a_Object] ON [p].[object_id] = [a_Object].[object_id] +WHERE + [p].[index_id] IN (0, 1) AND [a_Object].[type] = N'U' +GROUP BY + [p].[object_id] +ORDER BY + [p].[object_id] + diff --git a/SqlServer.2012/Tests/DataProvider/SqlServerFunctionsTests/Tests.DataProvider.SqlServerFunctionsTests.GetTableRowCountInfoTest(SqlServer.2012).sql b/SqlServer.2012/Tests/DataProvider/SqlServerFunctionsTests/Tests.DataProvider.SqlServerFunctionsTests.GetTableRowCountInfoTest(SqlServer.2012).sql new file mode 100644 index 000000000000..ef8ebdcfbb48 --- /dev/null +++ b/SqlServer.2012/Tests/DataProvider/SqlServerFunctionsTests/Tests.DataProvider.SqlServerFunctionsTests.GetTableRowCountInfoTest(SqlServer.2012).sql @@ -0,0 +1,76 @@ +BeforeExecute +-- SqlServer.2012 + +SELECT + [p].[object_id], + OBJECT_SCHEMA_NAME([p].[object_id]), + OBJECT_NAME([p].[object_id]), + SUM(Coalesce([p].[rows], 0)) +FROM + [sys].[partitions] [p] + INNER JOIN [sys].[objects] [a_Object] ON [p].[object_id] = [a_Object].[object_id] +WHERE + [p].[index_id] IN (0, 1) AND [a_Object].[type] = N'U' +GROUP BY + [p].[object_id] +ORDER BY + [p].[object_id] + +BeforeExecute +BeginTransaction +BeforeExecute +-- SqlServer.2012 +DECLARE @ParentID Int -- Int32 +SET @ParentID = -345 +DECLARE @Value1 Int -- Int32 +SET @Value1 = NULL + +INSERT INTO [Parent] +( + [ParentID], + [Value1] +) +VALUES +( + @ParentID, + @Value1 +) + +BeforeExecute +-- SqlServer.2012 + +SELECT + [p].[object_id], + OBJECT_SCHEMA_NAME([p].[object_id]), + OBJECT_NAME([p].[object_id]), + SUM(Coalesce([p].[rows], 0)) +FROM + [sys].[partitions] [p] + INNER JOIN [sys].[objects] [a_Object] ON [p].[object_id] = [a_Object].[object_id] +WHERE + [p].[index_id] IN (0, 1) AND [a_Object].[type] = N'U' +GROUP BY + [p].[object_id] +ORDER BY + [p].[object_id] + +BeforeExecute +RollbackTransaction +BeforeExecute +-- SqlServer.2012 + +SELECT + [p].[object_id], + OBJECT_SCHEMA_NAME([p].[object_id]), + OBJECT_NAME([p].[object_id]), + SUM(Coalesce([p].[rows], 0)) +FROM + [sys].[partitions] [p] + INNER JOIN [sys].[objects] [a_Object] ON [p].[object_id] = [a_Object].[object_id] +WHERE + [p].[index_id] IN (0, 1) AND [a_Object].[type] = N'U' +GROUP BY + [p].[object_id] +ORDER BY + [p].[object_id] + diff --git a/SqlServer.2014.MS/Tests/DataProvider/SqlServerFunctionsTests/Tests.DataProvider.SqlServerFunctionsTests.GetTableRowCountInfoTest(SqlServer.2014.MS).sql b/SqlServer.2014.MS/Tests/DataProvider/SqlServerFunctionsTests/Tests.DataProvider.SqlServerFunctionsTests.GetTableRowCountInfoTest(SqlServer.2014.MS).sql new file mode 100644 index 000000000000..580dd7c44aab --- /dev/null +++ b/SqlServer.2014.MS/Tests/DataProvider/SqlServerFunctionsTests/Tests.DataProvider.SqlServerFunctionsTests.GetTableRowCountInfoTest(SqlServer.2014.MS).sql @@ -0,0 +1,76 @@ +BeforeExecute +-- SqlServer.2014.MS SqlServer.2014 + +SELECT + [p].[object_id], + OBJECT_SCHEMA_NAME([p].[object_id]), + OBJECT_NAME([p].[object_id]), + SUM(Coalesce([p].[rows], 0)) +FROM + [sys].[partitions] [p] + INNER JOIN [sys].[objects] [a_Object] ON [p].[object_id] = [a_Object].[object_id] +WHERE + [p].[index_id] IN (0, 1) AND [a_Object].[type] = N'U' +GROUP BY + [p].[object_id] +ORDER BY + [p].[object_id] + +BeforeExecute +BeginTransaction +BeforeExecute +-- SqlServer.2014.MS SqlServer.2014 +DECLARE @ParentID Int -- Int32 +SET @ParentID = -345 +DECLARE @Value1 Int -- Int32 +SET @Value1 = NULL + +INSERT INTO [Parent] +( + [ParentID], + [Value1] +) +VALUES +( + @ParentID, + @Value1 +) + +BeforeExecute +-- SqlServer.2014.MS SqlServer.2014 + +SELECT + [p].[object_id], + OBJECT_SCHEMA_NAME([p].[object_id]), + OBJECT_NAME([p].[object_id]), + SUM(Coalesce([p].[rows], 0)) +FROM + [sys].[partitions] [p] + INNER JOIN [sys].[objects] [a_Object] ON [p].[object_id] = [a_Object].[object_id] +WHERE + [p].[index_id] IN (0, 1) AND [a_Object].[type] = N'U' +GROUP BY + [p].[object_id] +ORDER BY + [p].[object_id] + +BeforeExecute +RollbackTransaction +BeforeExecute +-- SqlServer.2014.MS SqlServer.2014 + +SELECT + [p].[object_id], + OBJECT_SCHEMA_NAME([p].[object_id]), + OBJECT_NAME([p].[object_id]), + SUM(Coalesce([p].[rows], 0)) +FROM + [sys].[partitions] [p] + INNER JOIN [sys].[objects] [a_Object] ON [p].[object_id] = [a_Object].[object_id] +WHERE + [p].[index_id] IN (0, 1) AND [a_Object].[type] = N'U' +GROUP BY + [p].[object_id] +ORDER BY + [p].[object_id] + diff --git a/SqlServer.2014/Tests/DataProvider/SqlServerFunctionsTests/Tests.DataProvider.SqlServerFunctionsTests.GetTableRowCountInfoTest(SqlServer.2014).sql b/SqlServer.2014/Tests/DataProvider/SqlServerFunctionsTests/Tests.DataProvider.SqlServerFunctionsTests.GetTableRowCountInfoTest(SqlServer.2014).sql new file mode 100644 index 000000000000..b8a120502a6f --- /dev/null +++ b/SqlServer.2014/Tests/DataProvider/SqlServerFunctionsTests/Tests.DataProvider.SqlServerFunctionsTests.GetTableRowCountInfoTest(SqlServer.2014).sql @@ -0,0 +1,76 @@ +BeforeExecute +-- SqlServer.2014 + +SELECT + [p].[object_id], + OBJECT_SCHEMA_NAME([p].[object_id]), + OBJECT_NAME([p].[object_id]), + SUM(Coalesce([p].[rows], 0)) +FROM + [sys].[partitions] [p] + INNER JOIN [sys].[objects] [a_Object] ON [p].[object_id] = [a_Object].[object_id] +WHERE + [p].[index_id] IN (0, 1) AND [a_Object].[type] = N'U' +GROUP BY + [p].[object_id] +ORDER BY + [p].[object_id] + +BeforeExecute +BeginTransaction +BeforeExecute +-- SqlServer.2014 +DECLARE @ParentID Int -- Int32 +SET @ParentID = -345 +DECLARE @Value1 Int -- Int32 +SET @Value1 = NULL + +INSERT INTO [Parent] +( + [ParentID], + [Value1] +) +VALUES +( + @ParentID, + @Value1 +) + +BeforeExecute +-- SqlServer.2014 + +SELECT + [p].[object_id], + OBJECT_SCHEMA_NAME([p].[object_id]), + OBJECT_NAME([p].[object_id]), + SUM(Coalesce([p].[rows], 0)) +FROM + [sys].[partitions] [p] + INNER JOIN [sys].[objects] [a_Object] ON [p].[object_id] = [a_Object].[object_id] +WHERE + [p].[index_id] IN (0, 1) AND [a_Object].[type] = N'U' +GROUP BY + [p].[object_id] +ORDER BY + [p].[object_id] + +BeforeExecute +RollbackTransaction +BeforeExecute +-- SqlServer.2014 + +SELECT + [p].[object_id], + OBJECT_SCHEMA_NAME([p].[object_id]), + OBJECT_NAME([p].[object_id]), + SUM(Coalesce([p].[rows], 0)) +FROM + [sys].[partitions] [p] + INNER JOIN [sys].[objects] [a_Object] ON [p].[object_id] = [a_Object].[object_id] +WHERE + [p].[index_id] IN (0, 1) AND [a_Object].[type] = N'U' +GROUP BY + [p].[object_id] +ORDER BY + [p].[object_id] + diff --git a/SqlServer.2016.MS/Tests/DataProvider/SqlServerFunctionsTests/Tests.DataProvider.SqlServerFunctionsTests.GetTableRowCountInfoTest(SqlServer.2016.MS).sql b/SqlServer.2016.MS/Tests/DataProvider/SqlServerFunctionsTests/Tests.DataProvider.SqlServerFunctionsTests.GetTableRowCountInfoTest(SqlServer.2016.MS).sql new file mode 100644 index 000000000000..924ec0f4547c --- /dev/null +++ b/SqlServer.2016.MS/Tests/DataProvider/SqlServerFunctionsTests/Tests.DataProvider.SqlServerFunctionsTests.GetTableRowCountInfoTest(SqlServer.2016.MS).sql @@ -0,0 +1,76 @@ +BeforeExecute +-- SqlServer.2016.MS SqlServer.2016 + +SELECT + [p].[object_id], + OBJECT_SCHEMA_NAME([p].[object_id]), + OBJECT_NAME([p].[object_id]), + SUM(Coalesce([p].[rows], 0)) +FROM + [sys].[partitions] [p] + INNER JOIN [sys].[objects] [a_Object] ON [p].[object_id] = [a_Object].[object_id] +WHERE + [p].[index_id] IN (0, 1) AND [a_Object].[type] = N'U' +GROUP BY + [p].[object_id] +ORDER BY + [p].[object_id] + +BeforeExecute +BeginTransaction +BeforeExecute +-- SqlServer.2016.MS SqlServer.2016 +DECLARE @ParentID Int -- Int32 +SET @ParentID = -345 +DECLARE @Value1 Int -- Int32 +SET @Value1 = NULL + +INSERT INTO [Parent] +( + [ParentID], + [Value1] +) +VALUES +( + @ParentID, + @Value1 +) + +BeforeExecute +-- SqlServer.2016.MS SqlServer.2016 + +SELECT + [p].[object_id], + OBJECT_SCHEMA_NAME([p].[object_id]), + OBJECT_NAME([p].[object_id]), + SUM(Coalesce([p].[rows], 0)) +FROM + [sys].[partitions] [p] + INNER JOIN [sys].[objects] [a_Object] ON [p].[object_id] = [a_Object].[object_id] +WHERE + [p].[index_id] IN (0, 1) AND [a_Object].[type] = N'U' +GROUP BY + [p].[object_id] +ORDER BY + [p].[object_id] + +BeforeExecute +RollbackTransaction +BeforeExecute +-- SqlServer.2016.MS SqlServer.2016 + +SELECT + [p].[object_id], + OBJECT_SCHEMA_NAME([p].[object_id]), + OBJECT_NAME([p].[object_id]), + SUM(Coalesce([p].[rows], 0)) +FROM + [sys].[partitions] [p] + INNER JOIN [sys].[objects] [a_Object] ON [p].[object_id] = [a_Object].[object_id] +WHERE + [p].[index_id] IN (0, 1) AND [a_Object].[type] = N'U' +GROUP BY + [p].[object_id] +ORDER BY + [p].[object_id] + diff --git a/SqlServer.2016/Tests/DataProvider/SqlServerFunctionsTests/Tests.DataProvider.SqlServerFunctionsTests.GetTableRowCountInfoTest(SqlServer.2016).sql b/SqlServer.2016/Tests/DataProvider/SqlServerFunctionsTests/Tests.DataProvider.SqlServerFunctionsTests.GetTableRowCountInfoTest(SqlServer.2016).sql new file mode 100644 index 000000000000..44fc62c595f4 --- /dev/null +++ b/SqlServer.2016/Tests/DataProvider/SqlServerFunctionsTests/Tests.DataProvider.SqlServerFunctionsTests.GetTableRowCountInfoTest(SqlServer.2016).sql @@ -0,0 +1,76 @@ +BeforeExecute +-- SqlServer.2016 + +SELECT + [p].[object_id], + OBJECT_SCHEMA_NAME([p].[object_id]), + OBJECT_NAME([p].[object_id]), + SUM(Coalesce([p].[rows], 0)) +FROM + [sys].[partitions] [p] + INNER JOIN [sys].[objects] [a_Object] ON [p].[object_id] = [a_Object].[object_id] +WHERE + [p].[index_id] IN (0, 1) AND [a_Object].[type] = N'U' +GROUP BY + [p].[object_id] +ORDER BY + [p].[object_id] + +BeforeExecute +BeginTransaction +BeforeExecute +-- SqlServer.2016 +DECLARE @ParentID Int -- Int32 +SET @ParentID = -345 +DECLARE @Value1 Int -- Int32 +SET @Value1 = NULL + +INSERT INTO [Parent] +( + [ParentID], + [Value1] +) +VALUES +( + @ParentID, + @Value1 +) + +BeforeExecute +-- SqlServer.2016 + +SELECT + [p].[object_id], + OBJECT_SCHEMA_NAME([p].[object_id]), + OBJECT_NAME([p].[object_id]), + SUM(Coalesce([p].[rows], 0)) +FROM + [sys].[partitions] [p] + INNER JOIN [sys].[objects] [a_Object] ON [p].[object_id] = [a_Object].[object_id] +WHERE + [p].[index_id] IN (0, 1) AND [a_Object].[type] = N'U' +GROUP BY + [p].[object_id] +ORDER BY + [p].[object_id] + +BeforeExecute +RollbackTransaction +BeforeExecute +-- SqlServer.2016 + +SELECT + [p].[object_id], + OBJECT_SCHEMA_NAME([p].[object_id]), + OBJECT_NAME([p].[object_id]), + SUM(Coalesce([p].[rows], 0)) +FROM + [sys].[partitions] [p] + INNER JOIN [sys].[objects] [a_Object] ON [p].[object_id] = [a_Object].[object_id] +WHERE + [p].[index_id] IN (0, 1) AND [a_Object].[type] = N'U' +GROUP BY + [p].[object_id] +ORDER BY + [p].[object_id] + diff --git a/SqlServer.2017.MS/Tests/DataProvider/SqlServerFunctionsTests/Tests.DataProvider.SqlServerFunctionsTests.FileIDExTest(SqlServer.2017.MS).sql b/SqlServer.2017.MS/Tests/DataProvider/SqlServerFunctionsTests/Tests.DataProvider.SqlServerFunctionsTests.FileIDExTest(SqlServer.2017.MS).sql index 8ba67e81dcc6..ece620263bba 100644 --- a/SqlServer.2017.MS/Tests/DataProvider/SqlServerFunctionsTests/Tests.DataProvider.SqlServerFunctionsTests.FileIDExTest(SqlServer.2017.MS).sql +++ b/SqlServer.2017.MS/Tests/DataProvider/SqlServerFunctionsTests/Tests.DataProvider.SqlServerFunctionsTests.FileIDExTest(SqlServer.2017.MS).sql @@ -19,6 +19,7 @@ SELECT TOP (1) [t1].[is_sparse], [t1].[is_percent_growth], [t1].[is_name_reserved], + [t1].[is_persistent_log_buffer], [t1].[create_lsn], [t1].[drop_lsn], [t1].[read_only_lsn], diff --git a/SqlServer.2017.MS/Tests/DataProvider/SqlServerFunctionsTests/Tests.DataProvider.SqlServerFunctionsTests.FileIDTest(SqlServer.2017.MS).sql b/SqlServer.2017.MS/Tests/DataProvider/SqlServerFunctionsTests/Tests.DataProvider.SqlServerFunctionsTests.FileIDTest(SqlServer.2017.MS).sql index af47a8cb8aa5..1ca6933fea30 100644 --- a/SqlServer.2017.MS/Tests/DataProvider/SqlServerFunctionsTests/Tests.DataProvider.SqlServerFunctionsTests.FileIDTest(SqlServer.2017.MS).sql +++ b/SqlServer.2017.MS/Tests/DataProvider/SqlServerFunctionsTests/Tests.DataProvider.SqlServerFunctionsTests.FileIDTest(SqlServer.2017.MS).sql @@ -19,6 +19,7 @@ SELECT TOP (1) [t1].[is_sparse], [t1].[is_percent_growth], [t1].[is_name_reserved], + [t1].[is_persistent_log_buffer], [t1].[create_lsn], [t1].[drop_lsn], [t1].[read_only_lsn], diff --git a/SqlServer.2017.MS/Tests/DataProvider/SqlServerFunctionsTests/Tests.DataProvider.SqlServerFunctionsTests.FileNameTest(SqlServer.2017.MS).sql b/SqlServer.2017.MS/Tests/DataProvider/SqlServerFunctionsTests/Tests.DataProvider.SqlServerFunctionsTests.FileNameTest(SqlServer.2017.MS).sql index 09fa41338304..176981b71208 100644 --- a/SqlServer.2017.MS/Tests/DataProvider/SqlServerFunctionsTests/Tests.DataProvider.SqlServerFunctionsTests.FileNameTest(SqlServer.2017.MS).sql +++ b/SqlServer.2017.MS/Tests/DataProvider/SqlServerFunctionsTests/Tests.DataProvider.SqlServerFunctionsTests.FileNameTest(SqlServer.2017.MS).sql @@ -19,6 +19,7 @@ SELECT TOP (1) [t1].[is_sparse], [t1].[is_percent_growth], [t1].[is_name_reserved], + [t1].[is_persistent_log_buffer], [t1].[create_lsn], [t1].[drop_lsn], [t1].[read_only_lsn], diff --git a/SqlServer.2017.MS/Tests/DataProvider/SqlServerFunctionsTests/Tests.DataProvider.SqlServerFunctionsTests.FilePropertyTest(SqlServer.2017.MS).sql b/SqlServer.2017.MS/Tests/DataProvider/SqlServerFunctionsTests/Tests.DataProvider.SqlServerFunctionsTests.FilePropertyTest(SqlServer.2017.MS).sql index b7f26d86d115..bc2a4ecfa295 100644 --- a/SqlServer.2017.MS/Tests/DataProvider/SqlServerFunctionsTests/Tests.DataProvider.SqlServerFunctionsTests.FilePropertyTest(SqlServer.2017.MS).sql +++ b/SqlServer.2017.MS/Tests/DataProvider/SqlServerFunctionsTests/Tests.DataProvider.SqlServerFunctionsTests.FilePropertyTest(SqlServer.2017.MS).sql @@ -19,6 +19,7 @@ SELECT TOP (1) [t1].[is_sparse], [t1].[is_percent_growth], [t1].[is_name_reserved], + [t1].[is_persistent_log_buffer], [t1].[create_lsn], [t1].[drop_lsn], [t1].[read_only_lsn], diff --git a/SqlServer.2017.MS/Tests/DataProvider/SqlServerFunctionsTests/Tests.DataProvider.SqlServerFunctionsTests.GetTableRowCountInfoTest(SqlServer.2017.MS).sql b/SqlServer.2017.MS/Tests/DataProvider/SqlServerFunctionsTests/Tests.DataProvider.SqlServerFunctionsTests.GetTableRowCountInfoTest(SqlServer.2017.MS).sql new file mode 100644 index 000000000000..cdc1788758f9 --- /dev/null +++ b/SqlServer.2017.MS/Tests/DataProvider/SqlServerFunctionsTests/Tests.DataProvider.SqlServerFunctionsTests.GetTableRowCountInfoTest(SqlServer.2017.MS).sql @@ -0,0 +1,76 @@ +BeforeExecute +-- SqlServer.2017.MS SqlServer.2017 + +SELECT + [p].[object_id], + OBJECT_SCHEMA_NAME([p].[object_id]), + OBJECT_NAME([p].[object_id]), + SUM(Coalesce([p].[rows], 0)) +FROM + [sys].[partitions] [p] + INNER JOIN [sys].[objects] [a_Object] ON [p].[object_id] = [a_Object].[object_id] +WHERE + [p].[index_id] IN (0, 1) AND [a_Object].[type] = N'U' +GROUP BY + [p].[object_id] +ORDER BY + [p].[object_id] + +BeforeExecute +BeginTransaction +BeforeExecute +-- SqlServer.2017.MS SqlServer.2017 +DECLARE @ParentID Int -- Int32 +SET @ParentID = -345 +DECLARE @Value1 Int -- Int32 +SET @Value1 = NULL + +INSERT INTO [Parent] +( + [ParentID], + [Value1] +) +VALUES +( + @ParentID, + @Value1 +) + +BeforeExecute +-- SqlServer.2017.MS SqlServer.2017 + +SELECT + [p].[object_id], + OBJECT_SCHEMA_NAME([p].[object_id]), + OBJECT_NAME([p].[object_id]), + SUM(Coalesce([p].[rows], 0)) +FROM + [sys].[partitions] [p] + INNER JOIN [sys].[objects] [a_Object] ON [p].[object_id] = [a_Object].[object_id] +WHERE + [p].[index_id] IN (0, 1) AND [a_Object].[type] = N'U' +GROUP BY + [p].[object_id] +ORDER BY + [p].[object_id] + +BeforeExecute +RollbackTransaction +BeforeExecute +-- SqlServer.2017.MS SqlServer.2017 + +SELECT + [p].[object_id], + OBJECT_SCHEMA_NAME([p].[object_id]), + OBJECT_NAME([p].[object_id]), + SUM(Coalesce([p].[rows], 0)) +FROM + [sys].[partitions] [p] + INNER JOIN [sys].[objects] [a_Object] ON [p].[object_id] = [a_Object].[object_id] +WHERE + [p].[index_id] IN (0, 1) AND [a_Object].[type] = N'U' +GROUP BY + [p].[object_id] +ORDER BY + [p].[object_id] + diff --git a/SqlServer.2017/Tests/DataProvider/SqlServerFunctionsTests/Tests.DataProvider.SqlServerFunctionsTests.FileIDExTest(SqlServer.2017).sql b/SqlServer.2017/Tests/DataProvider/SqlServerFunctionsTests/Tests.DataProvider.SqlServerFunctionsTests.FileIDExTest(SqlServer.2017).sql index 4e5a024a189c..d6241d8db532 100644 --- a/SqlServer.2017/Tests/DataProvider/SqlServerFunctionsTests/Tests.DataProvider.SqlServerFunctionsTests.FileIDExTest(SqlServer.2017).sql +++ b/SqlServer.2017/Tests/DataProvider/SqlServerFunctionsTests/Tests.DataProvider.SqlServerFunctionsTests.FileIDExTest(SqlServer.2017).sql @@ -19,6 +19,7 @@ SELECT TOP (1) [t1].[is_sparse], [t1].[is_percent_growth], [t1].[is_name_reserved], + [t1].[is_persistent_log_buffer], [t1].[create_lsn], [t1].[drop_lsn], [t1].[read_only_lsn], diff --git a/SqlServer.2017/Tests/DataProvider/SqlServerFunctionsTests/Tests.DataProvider.SqlServerFunctionsTests.FileIDTest(SqlServer.2017).sql b/SqlServer.2017/Tests/DataProvider/SqlServerFunctionsTests/Tests.DataProvider.SqlServerFunctionsTests.FileIDTest(SqlServer.2017).sql index 24069447aee7..3567dcac11e4 100644 --- a/SqlServer.2017/Tests/DataProvider/SqlServerFunctionsTests/Tests.DataProvider.SqlServerFunctionsTests.FileIDTest(SqlServer.2017).sql +++ b/SqlServer.2017/Tests/DataProvider/SqlServerFunctionsTests/Tests.DataProvider.SqlServerFunctionsTests.FileIDTest(SqlServer.2017).sql @@ -19,6 +19,7 @@ SELECT TOP (1) [t1].[is_sparse], [t1].[is_percent_growth], [t1].[is_name_reserved], + [t1].[is_persistent_log_buffer], [t1].[create_lsn], [t1].[drop_lsn], [t1].[read_only_lsn], diff --git a/SqlServer.2017/Tests/DataProvider/SqlServerFunctionsTests/Tests.DataProvider.SqlServerFunctionsTests.FileNameTest(SqlServer.2017).sql b/SqlServer.2017/Tests/DataProvider/SqlServerFunctionsTests/Tests.DataProvider.SqlServerFunctionsTests.FileNameTest(SqlServer.2017).sql index d0783db176e0..c6c041c538d5 100644 --- a/SqlServer.2017/Tests/DataProvider/SqlServerFunctionsTests/Tests.DataProvider.SqlServerFunctionsTests.FileNameTest(SqlServer.2017).sql +++ b/SqlServer.2017/Tests/DataProvider/SqlServerFunctionsTests/Tests.DataProvider.SqlServerFunctionsTests.FileNameTest(SqlServer.2017).sql @@ -19,6 +19,7 @@ SELECT TOP (1) [t1].[is_sparse], [t1].[is_percent_growth], [t1].[is_name_reserved], + [t1].[is_persistent_log_buffer], [t1].[create_lsn], [t1].[drop_lsn], [t1].[read_only_lsn], diff --git a/SqlServer.2017/Tests/DataProvider/SqlServerFunctionsTests/Tests.DataProvider.SqlServerFunctionsTests.FilePropertyTest(SqlServer.2017).sql b/SqlServer.2017/Tests/DataProvider/SqlServerFunctionsTests/Tests.DataProvider.SqlServerFunctionsTests.FilePropertyTest(SqlServer.2017).sql index 43e96c4c9888..d5dd340b4ab0 100644 --- a/SqlServer.2017/Tests/DataProvider/SqlServerFunctionsTests/Tests.DataProvider.SqlServerFunctionsTests.FilePropertyTest(SqlServer.2017).sql +++ b/SqlServer.2017/Tests/DataProvider/SqlServerFunctionsTests/Tests.DataProvider.SqlServerFunctionsTests.FilePropertyTest(SqlServer.2017).sql @@ -19,6 +19,7 @@ SELECT TOP (1) [t1].[is_sparse], [t1].[is_percent_growth], [t1].[is_name_reserved], + [t1].[is_persistent_log_buffer], [t1].[create_lsn], [t1].[drop_lsn], [t1].[read_only_lsn], diff --git a/SqlServer.2017/Tests/DataProvider/SqlServerFunctionsTests/Tests.DataProvider.SqlServerFunctionsTests.GetTableRowCountInfoTest(SqlServer.2017).sql b/SqlServer.2017/Tests/DataProvider/SqlServerFunctionsTests/Tests.DataProvider.SqlServerFunctionsTests.GetTableRowCountInfoTest(SqlServer.2017).sql new file mode 100644 index 000000000000..6c2dbb53bcda --- /dev/null +++ b/SqlServer.2017/Tests/DataProvider/SqlServerFunctionsTests/Tests.DataProvider.SqlServerFunctionsTests.GetTableRowCountInfoTest(SqlServer.2017).sql @@ -0,0 +1,76 @@ +BeforeExecute +-- SqlServer.2017 + +SELECT + [p].[object_id], + OBJECT_SCHEMA_NAME([p].[object_id]), + OBJECT_NAME([p].[object_id]), + SUM(Coalesce([p].[rows], 0)) +FROM + [sys].[partitions] [p] + INNER JOIN [sys].[objects] [a_Object] ON [p].[object_id] = [a_Object].[object_id] +WHERE + [p].[index_id] IN (0, 1) AND [a_Object].[type] = N'U' +GROUP BY + [p].[object_id] +ORDER BY + [p].[object_id] + +BeforeExecute +BeginTransaction +BeforeExecute +-- SqlServer.2017 +DECLARE @ParentID Int -- Int32 +SET @ParentID = -345 +DECLARE @Value1 Int -- Int32 +SET @Value1 = NULL + +INSERT INTO [Parent] +( + [ParentID], + [Value1] +) +VALUES +( + @ParentID, + @Value1 +) + +BeforeExecute +-- SqlServer.2017 + +SELECT + [p].[object_id], + OBJECT_SCHEMA_NAME([p].[object_id]), + OBJECT_NAME([p].[object_id]), + SUM(Coalesce([p].[rows], 0)) +FROM + [sys].[partitions] [p] + INNER JOIN [sys].[objects] [a_Object] ON [p].[object_id] = [a_Object].[object_id] +WHERE + [p].[index_id] IN (0, 1) AND [a_Object].[type] = N'U' +GROUP BY + [p].[object_id] +ORDER BY + [p].[object_id] + +BeforeExecute +RollbackTransaction +BeforeExecute +-- SqlServer.2017 + +SELECT + [p].[object_id], + OBJECT_SCHEMA_NAME([p].[object_id]), + OBJECT_NAME([p].[object_id]), + SUM(Coalesce([p].[rows], 0)) +FROM + [sys].[partitions] [p] + INNER JOIN [sys].[objects] [a_Object] ON [p].[object_id] = [a_Object].[object_id] +WHERE + [p].[index_id] IN (0, 1) AND [a_Object].[type] = N'U' +GROUP BY + [p].[object_id] +ORDER BY + [p].[object_id] + diff --git a/SqlServer.2019.MS/Tests/DataProvider/SqlServerFunctionsTests/Tests.DataProvider.SqlServerFunctionsTests.GetTableRowCountInfoTest(SqlServer.2019.MS).sql b/SqlServer.2019.MS/Tests/DataProvider/SqlServerFunctionsTests/Tests.DataProvider.SqlServerFunctionsTests.GetTableRowCountInfoTest(SqlServer.2019.MS).sql new file mode 100644 index 000000000000..3c51b8484d01 --- /dev/null +++ b/SqlServer.2019.MS/Tests/DataProvider/SqlServerFunctionsTests/Tests.DataProvider.SqlServerFunctionsTests.GetTableRowCountInfoTest(SqlServer.2019.MS).sql @@ -0,0 +1,76 @@ +BeforeExecute +-- SqlServer.2019.MS SqlServer.2019 + +SELECT + [p].[object_id], + OBJECT_SCHEMA_NAME([p].[object_id]), + OBJECT_NAME([p].[object_id]), + SUM(Coalesce([p].[rows], 0)) +FROM + [sys].[partitions] [p] + INNER JOIN [sys].[objects] [a_Object] ON [p].[object_id] = [a_Object].[object_id] +WHERE + [p].[index_id] IN (0, 1) AND [a_Object].[type] = N'U' +GROUP BY + [p].[object_id] +ORDER BY + [p].[object_id] + +BeforeExecute +BeginTransaction +BeforeExecute +-- SqlServer.2019.MS SqlServer.2019 +DECLARE @ParentID Int -- Int32 +SET @ParentID = -345 +DECLARE @Value1 Int -- Int32 +SET @Value1 = NULL + +INSERT INTO [Parent] +( + [ParentID], + [Value1] +) +VALUES +( + @ParentID, + @Value1 +) + +BeforeExecute +-- SqlServer.2019.MS SqlServer.2019 + +SELECT + [p].[object_id], + OBJECT_SCHEMA_NAME([p].[object_id]), + OBJECT_NAME([p].[object_id]), + SUM(Coalesce([p].[rows], 0)) +FROM + [sys].[partitions] [p] + INNER JOIN [sys].[objects] [a_Object] ON [p].[object_id] = [a_Object].[object_id] +WHERE + [p].[index_id] IN (0, 1) AND [a_Object].[type] = N'U' +GROUP BY + [p].[object_id] +ORDER BY + [p].[object_id] + +BeforeExecute +RollbackTransaction +BeforeExecute +-- SqlServer.2019.MS SqlServer.2019 + +SELECT + [p].[object_id], + OBJECT_SCHEMA_NAME([p].[object_id]), + OBJECT_NAME([p].[object_id]), + SUM(Coalesce([p].[rows], 0)) +FROM + [sys].[partitions] [p] + INNER JOIN [sys].[objects] [a_Object] ON [p].[object_id] = [a_Object].[object_id] +WHERE + [p].[index_id] IN (0, 1) AND [a_Object].[type] = N'U' +GROUP BY + [p].[object_id] +ORDER BY + [p].[object_id] + diff --git a/SqlServer.2019/Tests/DataProvider/SqlServerFunctionsTests/Tests.DataProvider.SqlServerFunctionsTests.GetTableRowCountInfoTest(SqlServer.2019).sql b/SqlServer.2019/Tests/DataProvider/SqlServerFunctionsTests/Tests.DataProvider.SqlServerFunctionsTests.GetTableRowCountInfoTest(SqlServer.2019).sql new file mode 100644 index 000000000000..ea3ca41be3bb --- /dev/null +++ b/SqlServer.2019/Tests/DataProvider/SqlServerFunctionsTests/Tests.DataProvider.SqlServerFunctionsTests.GetTableRowCountInfoTest(SqlServer.2019).sql @@ -0,0 +1,76 @@ +BeforeExecute +-- SqlServer.2019 + +SELECT + [p].[object_id], + OBJECT_SCHEMA_NAME([p].[object_id]), + OBJECT_NAME([p].[object_id]), + SUM(Coalesce([p].[rows], 0)) +FROM + [sys].[partitions] [p] + INNER JOIN [sys].[objects] [a_Object] ON [p].[object_id] = [a_Object].[object_id] +WHERE + [p].[index_id] IN (0, 1) AND [a_Object].[type] = N'U' +GROUP BY + [p].[object_id] +ORDER BY + [p].[object_id] + +BeforeExecute +BeginTransaction +BeforeExecute +-- SqlServer.2019 +DECLARE @ParentID Int -- Int32 +SET @ParentID = -345 +DECLARE @Value1 Int -- Int32 +SET @Value1 = NULL + +INSERT INTO [Parent] +( + [ParentID], + [Value1] +) +VALUES +( + @ParentID, + @Value1 +) + +BeforeExecute +-- SqlServer.2019 + +SELECT + [p].[object_id], + OBJECT_SCHEMA_NAME([p].[object_id]), + OBJECT_NAME([p].[object_id]), + SUM(Coalesce([p].[rows], 0)) +FROM + [sys].[partitions] [p] + INNER JOIN [sys].[objects] [a_Object] ON [p].[object_id] = [a_Object].[object_id] +WHERE + [p].[index_id] IN (0, 1) AND [a_Object].[type] = N'U' +GROUP BY + [p].[object_id] +ORDER BY + [p].[object_id] + +BeforeExecute +RollbackTransaction +BeforeExecute +-- SqlServer.2019 + +SELECT + [p].[object_id], + OBJECT_SCHEMA_NAME([p].[object_id]), + OBJECT_NAME([p].[object_id]), + SUM(Coalesce([p].[rows], 0)) +FROM + [sys].[partitions] [p] + INNER JOIN [sys].[objects] [a_Object] ON [p].[object_id] = [a_Object].[object_id] +WHERE + [p].[index_id] IN (0, 1) AND [a_Object].[type] = N'U' +GROUP BY + [p].[object_id] +ORDER BY + [p].[object_id] + diff --git a/SqlServer.2022.MS/Tests/DataProvider/SqlServerFunctionsTests/Tests.DataProvider.SqlServerFunctionsTests.GetTableRowCountInfoTest(SqlServer.2022.MS).sql b/SqlServer.2022.MS/Tests/DataProvider/SqlServerFunctionsTests/Tests.DataProvider.SqlServerFunctionsTests.GetTableRowCountInfoTest(SqlServer.2022.MS).sql new file mode 100644 index 000000000000..cb3575f6c991 --- /dev/null +++ b/SqlServer.2022.MS/Tests/DataProvider/SqlServerFunctionsTests/Tests.DataProvider.SqlServerFunctionsTests.GetTableRowCountInfoTest(SqlServer.2022.MS).sql @@ -0,0 +1,76 @@ +BeforeExecute +-- SqlServer.2022.MS SqlServer.2022 + +SELECT + [p].[object_id], + OBJECT_SCHEMA_NAME([p].[object_id]), + OBJECT_NAME([p].[object_id]), + SUM(Coalesce([p].[rows], 0)) +FROM + [sys].[partitions] [p] + INNER JOIN [sys].[objects] [a_Object] ON [p].[object_id] = [a_Object].[object_id] +WHERE + [p].[index_id] IN (0, 1) AND [a_Object].[type] = N'U' +GROUP BY + [p].[object_id] +ORDER BY + [p].[object_id] + +BeforeExecute +BeginTransaction +BeforeExecute +-- SqlServer.2022.MS SqlServer.2022 +DECLARE @ParentID Int -- Int32 +SET @ParentID = -345 +DECLARE @Value1 Int -- Int32 +SET @Value1 = NULL + +INSERT INTO [Parent] +( + [ParentID], + [Value1] +) +VALUES +( + @ParentID, + @Value1 +) + +BeforeExecute +-- SqlServer.2022.MS SqlServer.2022 + +SELECT + [p].[object_id], + OBJECT_SCHEMA_NAME([p].[object_id]), + OBJECT_NAME([p].[object_id]), + SUM(Coalesce([p].[rows], 0)) +FROM + [sys].[partitions] [p] + INNER JOIN [sys].[objects] [a_Object] ON [p].[object_id] = [a_Object].[object_id] +WHERE + [p].[index_id] IN (0, 1) AND [a_Object].[type] = N'U' +GROUP BY + [p].[object_id] +ORDER BY + [p].[object_id] + +BeforeExecute +RollbackTransaction +BeforeExecute +-- SqlServer.2022.MS SqlServer.2022 + +SELECT + [p].[object_id], + OBJECT_SCHEMA_NAME([p].[object_id]), + OBJECT_NAME([p].[object_id]), + SUM(Coalesce([p].[rows], 0)) +FROM + [sys].[partitions] [p] + INNER JOIN [sys].[objects] [a_Object] ON [p].[object_id] = [a_Object].[object_id] +WHERE + [p].[index_id] IN (0, 1) AND [a_Object].[type] = N'U' +GROUP BY + [p].[object_id] +ORDER BY + [p].[object_id] + diff --git a/SqlServer.2022/Tests/DataProvider/SqlServerFunctionsTests/Tests.DataProvider.SqlServerFunctionsTests.GetTableRowCountInfoTest(SqlServer.2022).sql b/SqlServer.2022/Tests/DataProvider/SqlServerFunctionsTests/Tests.DataProvider.SqlServerFunctionsTests.GetTableRowCountInfoTest(SqlServer.2022).sql new file mode 100644 index 000000000000..7be9175aa473 --- /dev/null +++ b/SqlServer.2022/Tests/DataProvider/SqlServerFunctionsTests/Tests.DataProvider.SqlServerFunctionsTests.GetTableRowCountInfoTest(SqlServer.2022).sql @@ -0,0 +1,76 @@ +BeforeExecute +-- SqlServer.2022 + +SELECT + [p].[object_id], + OBJECT_SCHEMA_NAME([p].[object_id]), + OBJECT_NAME([p].[object_id]), + SUM(Coalesce([p].[rows], 0)) +FROM + [sys].[partitions] [p] + INNER JOIN [sys].[objects] [a_Object] ON [p].[object_id] = [a_Object].[object_id] +WHERE + [p].[index_id] IN (0, 1) AND [a_Object].[type] = N'U' +GROUP BY + [p].[object_id] +ORDER BY + [p].[object_id] + +BeforeExecute +BeginTransaction +BeforeExecute +-- SqlServer.2022 +DECLARE @ParentID Int -- Int32 +SET @ParentID = -345 +DECLARE @Value1 Int -- Int32 +SET @Value1 = NULL + +INSERT INTO [Parent] +( + [ParentID], + [Value1] +) +VALUES +( + @ParentID, + @Value1 +) + +BeforeExecute +-- SqlServer.2022 + +SELECT + [p].[object_id], + OBJECT_SCHEMA_NAME([p].[object_id]), + OBJECT_NAME([p].[object_id]), + SUM(Coalesce([p].[rows], 0)) +FROM + [sys].[partitions] [p] + INNER JOIN [sys].[objects] [a_Object] ON [p].[object_id] = [a_Object].[object_id] +WHERE + [p].[index_id] IN (0, 1) AND [a_Object].[type] = N'U' +GROUP BY + [p].[object_id] +ORDER BY + [p].[object_id] + +BeforeExecute +RollbackTransaction +BeforeExecute +-- SqlServer.2022 + +SELECT + [p].[object_id], + OBJECT_SCHEMA_NAME([p].[object_id]), + OBJECT_NAME([p].[object_id]), + SUM(Coalesce([p].[rows], 0)) +FROM + [sys].[partitions] [p] + INNER JOIN [sys].[objects] [a_Object] ON [p].[object_id] = [a_Object].[object_id] +WHERE + [p].[index_id] IN (0, 1) AND [a_Object].[type] = N'U' +GROUP BY + [p].[object_id] +ORDER BY + [p].[object_id] + diff --git a/SqlServer.Contained.MS/Tests/DataProvider/SqlServerFunctionsTests/Tests.DataProvider.SqlServerFunctionsTests.GetTableRowCountInfoTest(SqlServer.Contained.MS).sql b/SqlServer.Contained.MS/Tests/DataProvider/SqlServerFunctionsTests/Tests.DataProvider.SqlServerFunctionsTests.GetTableRowCountInfoTest(SqlServer.Contained.MS).sql new file mode 100644 index 000000000000..60b1340a9ee2 --- /dev/null +++ b/SqlServer.Contained.MS/Tests/DataProvider/SqlServerFunctionsTests/Tests.DataProvider.SqlServerFunctionsTests.GetTableRowCountInfoTest(SqlServer.Contained.MS).sql @@ -0,0 +1,76 @@ +BeforeExecute +-- SqlServer.Contained.MS SqlServer.2019 + +SELECT + [p].[object_id], + OBJECT_SCHEMA_NAME([p].[object_id]), + OBJECT_NAME([p].[object_id]), + SUM(Coalesce([p].[rows], 0)) +FROM + [sys].[partitions] [p] + INNER JOIN [sys].[objects] [a_Object] ON [p].[object_id] = [a_Object].[object_id] +WHERE + [p].[index_id] IN (0, 1) AND [a_Object].[type] = N'U' +GROUP BY + [p].[object_id] +ORDER BY + [p].[object_id] + +BeforeExecute +BeginTransaction +BeforeExecute +-- SqlServer.Contained.MS SqlServer.2019 +DECLARE @ParentID Int -- Int32 +SET @ParentID = -345 +DECLARE @Value1 Int -- Int32 +SET @Value1 = NULL + +INSERT INTO [Parent] +( + [ParentID], + [Value1] +) +VALUES +( + @ParentID, + @Value1 +) + +BeforeExecute +-- SqlServer.Contained.MS SqlServer.2019 + +SELECT + [p].[object_id], + OBJECT_SCHEMA_NAME([p].[object_id]), + OBJECT_NAME([p].[object_id]), + SUM(Coalesce([p].[rows], 0)) +FROM + [sys].[partitions] [p] + INNER JOIN [sys].[objects] [a_Object] ON [p].[object_id] = [a_Object].[object_id] +WHERE + [p].[index_id] IN (0, 1) AND [a_Object].[type] = N'U' +GROUP BY + [p].[object_id] +ORDER BY + [p].[object_id] + +BeforeExecute +RollbackTransaction +BeforeExecute +-- SqlServer.Contained.MS SqlServer.2019 + +SELECT + [p].[object_id], + OBJECT_SCHEMA_NAME([p].[object_id]), + OBJECT_NAME([p].[object_id]), + SUM(Coalesce([p].[rows], 0)) +FROM + [sys].[partitions] [p] + INNER JOIN [sys].[objects] [a_Object] ON [p].[object_id] = [a_Object].[object_id] +WHERE + [p].[index_id] IN (0, 1) AND [a_Object].[type] = N'U' +GROUP BY + [p].[object_id] +ORDER BY + [p].[object_id] + diff --git a/SqlServer.Contained/Tests/DataProvider/SqlServerFunctionsTests/Tests.DataProvider.SqlServerFunctionsTests.GetTableRowCountInfoTest(SqlServer.Contained).sql b/SqlServer.Contained/Tests/DataProvider/SqlServerFunctionsTests/Tests.DataProvider.SqlServerFunctionsTests.GetTableRowCountInfoTest(SqlServer.Contained).sql new file mode 100644 index 000000000000..23166b0bfbdc --- /dev/null +++ b/SqlServer.Contained/Tests/DataProvider/SqlServerFunctionsTests/Tests.DataProvider.SqlServerFunctionsTests.GetTableRowCountInfoTest(SqlServer.Contained).sql @@ -0,0 +1,76 @@ +BeforeExecute +-- SqlServer.Contained SqlServer.2019 + +SELECT + [p].[object_id], + OBJECT_SCHEMA_NAME([p].[object_id]), + OBJECT_NAME([p].[object_id]), + SUM(Coalesce([p].[rows], 0)) +FROM + [sys].[partitions] [p] + INNER JOIN [sys].[objects] [a_Object] ON [p].[object_id] = [a_Object].[object_id] +WHERE + [p].[index_id] IN (0, 1) AND [a_Object].[type] = N'U' +GROUP BY + [p].[object_id] +ORDER BY + [p].[object_id] + +BeforeExecute +BeginTransaction +BeforeExecute +-- SqlServer.Contained SqlServer.2019 +DECLARE @ParentID Int -- Int32 +SET @ParentID = -345 +DECLARE @Value1 Int -- Int32 +SET @Value1 = NULL + +INSERT INTO [Parent] +( + [ParentID], + [Value1] +) +VALUES +( + @ParentID, + @Value1 +) + +BeforeExecute +-- SqlServer.Contained SqlServer.2019 + +SELECT + [p].[object_id], + OBJECT_SCHEMA_NAME([p].[object_id]), + OBJECT_NAME([p].[object_id]), + SUM(Coalesce([p].[rows], 0)) +FROM + [sys].[partitions] [p] + INNER JOIN [sys].[objects] [a_Object] ON [p].[object_id] = [a_Object].[object_id] +WHERE + [p].[index_id] IN (0, 1) AND [a_Object].[type] = N'U' +GROUP BY + [p].[object_id] +ORDER BY + [p].[object_id] + +BeforeExecute +RollbackTransaction +BeforeExecute +-- SqlServer.Contained SqlServer.2019 + +SELECT + [p].[object_id], + OBJECT_SCHEMA_NAME([p].[object_id]), + OBJECT_NAME([p].[object_id]), + SUM(Coalesce([p].[rows], 0)) +FROM + [sys].[partitions] [p] + INNER JOIN [sys].[objects] [a_Object] ON [p].[object_id] = [a_Object].[object_id] +WHERE + [p].[index_id] IN (0, 1) AND [a_Object].[type] = N'U' +GROUP BY + [p].[object_id] +ORDER BY + [p].[object_id] + diff --git a/SqlServer.SA.MS/Tests/DataProvider/SqlServerFunctionsTests/Tests.DataProvider.SqlServerFunctionsTests.GetTableRowCountInfoTest(SqlServer.SA.MS).sql b/SqlServer.SA.MS/Tests/DataProvider/SqlServerFunctionsTests/Tests.DataProvider.SqlServerFunctionsTests.GetTableRowCountInfoTest(SqlServer.SA.MS).sql new file mode 100644 index 000000000000..4d3b3b08988c --- /dev/null +++ b/SqlServer.SA.MS/Tests/DataProvider/SqlServerFunctionsTests/Tests.DataProvider.SqlServerFunctionsTests.GetTableRowCountInfoTest(SqlServer.SA.MS).sql @@ -0,0 +1,76 @@ +BeforeExecute +-- SqlServer.SA.MS SqlServer.2019 + +SELECT + [p].[object_id], + OBJECT_SCHEMA_NAME([p].[object_id]), + OBJECT_NAME([p].[object_id]), + SUM(Coalesce([p].[rows], 0)) +FROM + [sys].[partitions] [p] + INNER JOIN [sys].[objects] [a_Object] ON [p].[object_id] = [a_Object].[object_id] +WHERE + [p].[index_id] IN (0, 1) AND [a_Object].[type] = N'U' +GROUP BY + [p].[object_id] +ORDER BY + [p].[object_id] + +BeforeExecute +BeginTransaction +BeforeExecute +-- SqlServer.SA.MS SqlServer.2019 +DECLARE @ParentID Int -- Int32 +SET @ParentID = -345 +DECLARE @Value1 Int -- Int32 +SET @Value1 = NULL + +INSERT INTO [Parent] +( + [ParentID], + [Value1] +) +VALUES +( + @ParentID, + @Value1 +) + +BeforeExecute +-- SqlServer.SA.MS SqlServer.2019 + +SELECT + [p].[object_id], + OBJECT_SCHEMA_NAME([p].[object_id]), + OBJECT_NAME([p].[object_id]), + SUM(Coalesce([p].[rows], 0)) +FROM + [sys].[partitions] [p] + INNER JOIN [sys].[objects] [a_Object] ON [p].[object_id] = [a_Object].[object_id] +WHERE + [p].[index_id] IN (0, 1) AND [a_Object].[type] = N'U' +GROUP BY + [p].[object_id] +ORDER BY + [p].[object_id] + +BeforeExecute +RollbackTransaction +BeforeExecute +-- SqlServer.SA.MS SqlServer.2019 + +SELECT + [p].[object_id], + OBJECT_SCHEMA_NAME([p].[object_id]), + OBJECT_NAME([p].[object_id]), + SUM(Coalesce([p].[rows], 0)) +FROM + [sys].[partitions] [p] + INNER JOIN [sys].[objects] [a_Object] ON [p].[object_id] = [a_Object].[object_id] +WHERE + [p].[index_id] IN (0, 1) AND [a_Object].[type] = N'U' +GROUP BY + [p].[object_id] +ORDER BY + [p].[object_id] + diff --git a/SqlServer.SA/Tests/DataProvider/SqlServerFunctionsTests/Tests.DataProvider.SqlServerFunctionsTests.GetTableRowCountInfoTest(SqlServer.SA).sql b/SqlServer.SA/Tests/DataProvider/SqlServerFunctionsTests/Tests.DataProvider.SqlServerFunctionsTests.GetTableRowCountInfoTest(SqlServer.SA).sql new file mode 100644 index 000000000000..66f3a3d5a839 --- /dev/null +++ b/SqlServer.SA/Tests/DataProvider/SqlServerFunctionsTests/Tests.DataProvider.SqlServerFunctionsTests.GetTableRowCountInfoTest(SqlServer.SA).sql @@ -0,0 +1,76 @@ +BeforeExecute +-- SqlServer.SA SqlServer.2019 + +SELECT + [p].[object_id], + OBJECT_SCHEMA_NAME([p].[object_id]), + OBJECT_NAME([p].[object_id]), + SUM(Coalesce([p].[rows], 0)) +FROM + [sys].[partitions] [p] + INNER JOIN [sys].[objects] [a_Object] ON [p].[object_id] = [a_Object].[object_id] +WHERE + [p].[index_id] IN (0, 1) AND [a_Object].[type] = N'U' +GROUP BY + [p].[object_id] +ORDER BY + [p].[object_id] + +BeforeExecute +BeginTransaction +BeforeExecute +-- SqlServer.SA SqlServer.2019 +DECLARE @ParentID Int -- Int32 +SET @ParentID = -345 +DECLARE @Value1 Int -- Int32 +SET @Value1 = NULL + +INSERT INTO [Parent] +( + [ParentID], + [Value1] +) +VALUES +( + @ParentID, + @Value1 +) + +BeforeExecute +-- SqlServer.SA SqlServer.2019 + +SELECT + [p].[object_id], + OBJECT_SCHEMA_NAME([p].[object_id]), + OBJECT_NAME([p].[object_id]), + SUM(Coalesce([p].[rows], 0)) +FROM + [sys].[partitions] [p] + INNER JOIN [sys].[objects] [a_Object] ON [p].[object_id] = [a_Object].[object_id] +WHERE + [p].[index_id] IN (0, 1) AND [a_Object].[type] = N'U' +GROUP BY + [p].[object_id] +ORDER BY + [p].[object_id] + +BeforeExecute +RollbackTransaction +BeforeExecute +-- SqlServer.SA SqlServer.2019 + +SELECT + [p].[object_id], + OBJECT_SCHEMA_NAME([p].[object_id]), + OBJECT_NAME([p].[object_id]), + SUM(Coalesce([p].[rows], 0)) +FROM + [sys].[partitions] [p] + INNER JOIN [sys].[objects] [a_Object] ON [p].[object_id] = [a_Object].[object_id] +WHERE + [p].[index_id] IN (0, 1) AND [a_Object].[type] = N'U' +GROUP BY + [p].[object_id] +ORDER BY + [p].[object_id] +