修改了
重现步骤,旧值为 "
[步骤]
主键冲突
172.23.42.4
hwy-zh-gz-iis-erpweb01
D:\Window-Service\服务_智汇创想(1)_本地服务1号\Log\DBError_2023-02-22.txt
1676995916
__tag__:__client_ip__:124.71.42.247
content:[00:11:21] -------------------------------------------------------------
CODE:N0011212
Error:14_2627_1_-2146232060
SQL: if exists ((select * from tempdb.dbo.sysobjects where id = object_id(N'tempdb..#tmpSubsidyPlanIDs') and type='U'))
drop table if exists #tmpSubsidyPlanIDs;
create table #tmpSubsidyPlanIDs (Id int primary key)
INSERT INTO #tmpSubsidyPlanIDs
SELECT CONVERT(INT, item) AS Id
FROM Charsplitforin(@IDs, ',') SELECT S.ID,S.SubsidyPlanGUID,S.SKU
FROM RB_SellerSKU_SubsidyPlan (nolock) AS S
INNER Join #tmpSubsidyPlanIDs as IDs ON S.ID = IDs.Id
WHERE CustomerID = @CustomerID
PARAMS:@CustomerID = 1 ,@IDs = 1252483,761494,1610021,1700086,1666598,1666820,1667844,1667847,1667847,1667889,1667913,1667952,1667996,1668055,1668087,1668213,1668425,1668442,1698587,1698508,1701987,1702137,1702206,1702260,1702312,1702336,1053834,1053940,1053422,1052996,1702490,1705113,1261458,1702789,1702790,1702995,1703078,1703663,1703753,859361,765962,770881,1365218,1263656,1264189,1264352,1265415,955610,984838,984846,983619,989970,984623,807348,993334,1560262,1560399,1560880,1563710,1704348,1704411,1704439,1704510,1704801,1704679,1704870,1704886,1704943,1705049,1705282,1705334,1705848,1705855,1705867,1706109,1706193,1706623,1706540,1706645,1706701,1706719,1706879,1707007,1707098,1707183,1713357,1713289,1713443,1713571,1713648,1713676,1713683,1713696,1713701,1714749,1714756,985910,985920,1714950,1707298,1707314,1708487,1708523,1709567,1363056,1715828,1363841,1707651,1707678,1707725,1708013,1708029,1708114,1708144,1708296,1708604,1708609,1708639,1708895,1709044,1709232,1709365,1709347,1709361,1010056,1212326,1268047,1370011,769711,1466219,994552,994173,992646,1028224,1208419,1208179,1068012,1207359,1371087,1371459,1373166,1565591,1568852,774707,771273,957212,1015480,1013824,1038213,820506,1570067,1573534,1376831,1377864,1379501,1010888,1010272,958816,1475625,1475758,819650,637016,1029861,634570,634231,1517088,1517083,778464,878171,1205404,1205309,1205050,1204703,1203893 ,
MESSAGE:Violation of PRIMARY KEY constraint 'PK__#tmpSubs__3214EC075B936DF3'. Cannot insert duplicate key in object 'dbo.#tmpSubsidyPlanIDs'. The duplicate key value is (1667847).
The statement has been terminated.
TRACE: 在 System.Data.SqlClient.SqlConnection.OnError(SqlException exception, Boolean breakConnection, Action`1 wrapCloseInAction)
在 System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj, Boolean callerHasConnectionLock, Boolean asyncClose)
在 System.Data.SqlClient.TdsParser.TryRun(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj, Boolean& dataReady)
在 System.Data.SqlClient.SqlDataReader.TryConsumeMetaData()
在 System.Data.SqlClient.SqlDataReader.get_MetaData()
在 System.Data.SqlClient.SqlCommand.FinishExecuteReader(SqlDataReader ds, RunBehavior runBehavior, String resetOptionsString, Boolean isInternal, Boolean forDescribeParameterEncryption, Boolean shouldCacheForAlwaysEncrypted)
在 System.Data.SqlClient.SqlCommand.RunExecuteReaderTds(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, Boolean async, Int32 timeout, Task& task, Boolean asyncWrite, Boolean inRetry, SqlDataReader ds, Boolean describeParameterEncryptionRequest)
在 System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method, TaskCompletionSource`1 completion, Int32 timeout, Task& task, Boolean& usedCache, Boolean asyncWrite, Boolean inRetry)
在 System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method)
在 System.Data.SqlClient.SqlCommand.ExecuteReader(CommandBehavior behavior, String method)
在 System.Data.Common.DbDataAdapter.FillInternal(DataSet dataset, DataTable[] datatables, Int32 startRecord, Int32 maxRecords, String srcTable, IDbCommand command, CommandBehavior behavior)
在 System.Data.Common.DbDataAdapter.Fill(DataSet dataSet, Int32 startRecord, Int32 maxRecords, String srcTable, IDbCommand command, CommandBehavior behavior)
在 System.Data.Common.DbDataAdapter.Fill(DataSet dataSet, String srcTable)
在 RB.DAL.DBOperator.Query(String SQLString, SqlCommand cmd, Int32 Times, SqlParameter[] cmdParms, Boolean IsWriteDB) 在 RB.DAL.DBOperator.toCommonTipException(SqlException ex, String sql, SqlParameter[] cmdParms)
在 RB.DAL.DBOperator.Query(String SQLString, SqlCommand cmd, Int32 Times, SqlParameter[] cmdParms, Boolean IsWriteDB)
在 RB.DALExtendV2.RB_SellerSKU_SubsidyPlanExtendV2.GetSubsidyPlanListByIDs(Int32 customerID, List`1 ids)
在 Biz.Irobotbox.ClearStorehouse.GenerateClearStockSKUV2.UpdateClearStockSkuStatus(Int32 customerID)
在 Biz.Irobotbox.ClearStorehouse.GenerateClearStockSKUV2.<Execute>b__0_0(Int32 customerID)
在 System.Collections.Generic.List`1.ForEach(Action`1 action)
在 ChinaDownLoadImage.Task.ClearStorehouse.Task_GenerateClearStockSKUV2.Execute()
在 RB.Utility.SystemTask.<doTask>b__43_0()
在 System.Threading.Tasks.Task.Execute()
在 System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
在 System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
在 System.Threading.Tasks.Task.ExecuteWithThreadLocal(Task& currentTaskSlot)
在 System.Threading.Tasks.Task.ExecuteEntry(Boolean bPreventDoubleExecution)
在 System.Threading.ThreadPoolWorkQueue.Dispatch()
[结果]
[期望]
",新值为 "
[步骤]
主键冲突
172.23.42.4
hwy-zh-gz-iis-erpweb01
D:\Window-Service\服务_智汇创想(1)_本地服务1号\Log\DBError_2023-02-22.txt
1676995916
__tag__:__client_ip__:124.71.42.247
content:[00:11:21] -------------------------------------------------------------
CODE:N0011212
Error:14_2627_1_-2146232060
SQL: if exists ((select * from tempdb.dbo.sysobjects where id = object_id(N'tempdb..#tmpSubsidyPlanIDs') and type='U'))
drop table if exists #tmpSubsidyPlanIDs;
create table #tmpSubsidyPlanIDs (Id int primary key)
INSERT INTO #tmpSubsidyPlanIDs
SELECT CONVERT(INT, item) AS Id
FROM Charsplitforin(@IDs, ',') SELECT S.ID,S.SubsidyPlanGUID,S.SKU
FROM RB_SellerSKU_SubsidyPlan (nolock) AS S
INNER Join #tmpSubsidyPlanIDs as IDs ON S.ID = IDs.Id
WHERE CustomerID = @CustomerID
PARAMS:@CustomerID = 1 ,@IDs = 1252483,761494,1610021,1700086,1666598,1666820,1667844,1667847,1667847,1667889,1667913,1667952,1667996,1668055,1668087,1668213,1668425,1668442,1698587,1698508,1701987,1702137,1702206,1702260,1702312,1702336,1053834,1053940,1053422,1052996,1702490,1705113,1261458,1702789,1702790,1702995,1703078,1703663,1703753,859361,765962,770881,1365218,1263656,1264189,1264352,1265415,955610,984838,984846,983619,989970,984623,807348,993334,1560262,1560399,1560880,1563710,1704348,1704411,1704439,1704510,1704801,1704679,1704870,1704886,1704943,1705049,1705282,1705334,1705848,1705855,1705867,1706109,1706193,1706623,1706540,1706645,1706701,1706719,1706879,1707007,1707098,1707183,1713357,1713289,1713443,1713571,1713648,1713676,1713683,1713696,1713701,1714749,1714756,985910,985920,1714950,1707298,1707314,1708487,1708523,1709567,1363056,1715828,1363841,1707651,1707678,1707725,1708013,1708029,1708114,1708144,1708296,1708604,1708609,1708639,1708895,1709044,1709232,1709365,1709347,1709361,1010056,1212326,1268047,1370011,769711,1466219,994552,994173,992646,1028224,1208419,1208179,1068012,1207359,1371087,1371459,1373166,1565591,1568852,774707,771273,957212,1015480,1013824,1038213,820506,1570067,1573534,1376831,1377864,1379501,1010888,1010272,958816,1475625,1475758,819650,637016,1029861,634570,634231,1517088,1517083,778464,878171,1205404,1205309,1205050,1204703,1203893 ,
MESSAGE:Violation of PRIMARY KEY constraint 'PK__#tmpSubs__3214EC075B936DF3'. Cannot insert duplicate key in object 'dbo.#tmpSubsidyPlanIDs'. The duplicate key value is (1667847).
The statement has been terminated.
TRACE: 在 System.Data.SqlClient.SqlConnection.OnError(SqlException exception, Boolean breakConnection, Action`1 wrapCloseInAction)
在 System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj, Boolean callerHasConnectionLock, Boolean asyncClose)
在 System.Data.SqlClient.TdsParser.TryRun(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj, Boolean& dataReady)
在 System.Data.SqlClient.SqlDataReader.TryConsumeMetaData()
在 System.Data.SqlClient.SqlDataReader.get_MetaData()
在 System.Data.SqlClient.SqlCommand.FinishExecuteReader(SqlDataReader ds, RunBehavior runBehavior, String resetOptionsString, Boolean isInternal, Boolean forDescribeParameterEncryption, Boolean shouldCacheForAlwaysEncrypted)
在 System.Data.SqlClient.SqlCommand.RunExecuteReaderTds(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, Boolean async, Int32 timeout, Task& task, Boolean asyncWrite, Boolean inRetry, SqlDataReader ds, Boolean describeParameterEncryptionRequest)
在 System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method, TaskCompletionSource`1 completion, Int32 timeout, Task& task, Boolean& usedCache, Boolean asyncWrite, Boolean inRetry)
在 System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method)
在 System.Data.SqlClient.SqlCommand.ExecuteReader(CommandBehavior behavior, String method)
在 System.Data.Common.DbDataAdapter.FillInternal(DataSet dataset, DataTable[] datatables, Int32 startRecord, Int32 maxRecords, String srcTable, IDbCommand command, CommandBehavior behavior)
在 System.Data.Common.DbDataAdapter.Fill(DataSet dataSet, Int32 startRecord, Int32 maxRecords, String srcTable, IDbCommand command, CommandBehavior behavior)
在 System.Data.Common.DbDataAdapter.Fill(DataSet dataSet, String srcTable)
在 RB.DAL.DBOperator.Query(String SQLString, SqlCommand cmd, Int32 Times, SqlParameter[] cmdParms, Boolean IsWriteDB) 在 RB.DAL.DBOperator.toCommonTipException(SqlException ex, String sql, SqlParameter[] cmdParms)
在 RB.DAL.DBOperator.Query(String SQLString, SqlCommand cmd, Int32 Times, SqlParameter[] cmdParms, Boolean IsWriteDB)
在 RB.DALExtendV2.RB_SellerSKU_SubsidyPlanExtendV2.GetSubsidyPlanListByIDs(Int32 customerID, List`1 ids)
在 Biz.Irobotbox.ClearStorehouse.GenerateClearStockSKUV2.UpdateClearStockSkuStatus(Int32 customerID)
在 Biz.Irobotbox.ClearStorehouse.GenerateClearStockSKUV2.<Execute>b__0_0(Int32 customerID)
在 System.Collections.Generic.List`1.ForEach(Action`1 action)
在 ChinaDownLoadImage.Task.ClearStorehouse.Task_GenerateClearStockSKUV2.Execute()
在 RB.Utility.SystemTask.<doTask>b__43_0()
在 System.Threading.Tasks.Task.Execute()
在 System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
在 System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
在 System.Threading.Tasks.Task.ExecuteWithThreadLocal(Task& currentTaskSlot)
在 System.Threading.Tasks.Task.ExecuteEntry(Boolean bPreventDoubleExecution)
在 System.Threading.ThreadPoolWorkQueue.Dispatch()
[结果]
[期望]
"。
修改了
Bug标题 ,区别为:
001- 主键冲突
001+ RB_SellerSKU_SubsidyPlan 主键冲突
001- 主键冲突
001+ RB_SellerSKU_SubsidyPlan 主键冲突