IndexOutOfRangeException when invoking a stored procedure
還沒有人認領這個 Issue。
評估
研究方向
The payload names no source files, so begin by searching the MsSql provider for where stored procedure parameters are filtered by direction (ReturnValue) and mapped to supplied values. Reproduce with a procedure that has an output result set and no matching input value, then confirm the IndexOutOfRangeException. Done means the call succeeds, the result set is returned, and the existing stored procedure tests still pass.
由索引模型根據 Issue 內容生成。
描述
Describe the bug
When using InvokeAsync on a stored procedure while using SqlProvider.MsSql the list of input parameters include all of the input parameters defined by the stored procedure given a direction of Input as well as the result set given a direction of Output. The list of values provided match the number of input parameters marked with a direction of Input. When the input parameters are processed in order to map them to values and create command parameters, the input parameters are filtered to remove those with a direction of ReturnValue, then attempt to map over the values. In my specific situation where I have a stored procedure with five parameters and one result set, I have six input parameters and five values. After filtering out direction of ReturnValue there are still six input parameters, and after processing the first five input parameters commands are created mapped to the five values provided, but then the sixth input parameter which has a direction of Output results in an IndexOutOfRangeException when it attempts to map to the nonexistent sixth value.
To Reproduce
Steps to reproduce the behavior:
- Call
InvokeAsyncon a stored procedure usingSqlProvider.MsSql - Get
IndexOutOfRangeExceptionbefore the procedure is called
Expected behavior
The stored procedure is called with the given values and the result set is retrieved.
Environment (please complete the following information):
- Database: MsSql
- Nuget Package and version: SQLProvider.MsSql 1.5.7
- OS: Windows
- .NET 10
Additional context
This error was introduced in my project when I upgraded from SqlProvider 1.3.19 to SqlProvider.MsSql 1.5.7. I don't know exactly what it was doing internally previously, but I would assume either the result set was not being created as an input parameter, or it was being created as an input parameter with a direction of ReturnValue which was being filtered out when creating command parameters. My naïve solution to this would be to also filter out Output direction, or perhaps only keep Input direction, though I don't know what that would do in other situations.
- 主要語言
- F#
- 星號
- 627
- 分支
- 148
- 平均合併
- 2 小時 2 分鐘
- 30 天內合併 PR
- 1
環境準備
在瀏覽器裡用你自己的 GitHub 帳號啟動這個專案的開發容器。
- 沒有 Dockerfile 或 Docker Compose 檔案
- 有 Pull Request 範本
- 沒有貢獻指南
從這裡開始
- 先讀完整個 Issue,再讀專案的貢獻指南。
- 在 Issue 下留言說明你要接手 —— 這能避免兩個人做同樣的事。
- Fork 儲存庫,在一個分支上完成修改。
- 送出 Pull Request,並在描述裡引用這個 Issue 編號。
fsprojects/SQLProvider 的其他 Issue
-
enhancement
難度 3/5 1-2 天 新手友好度 55/100
fsprojects/SQLProvider#872 · 2 則留言 ·
-
Repo Assist?未關閉enhancement
難度 5/5 一週以上 新手友好度 10/100
fsprojects/SQLProvider#870 · 1 則留言 ·
-
postgresql
難度 4/5 3-5 天 新手友好度 58/100
fsprojects/SQLProvider#869 · 2 則留言 ·
-
documentation
難度 2/5 1-3 小時 新手友好度 42/100
fsprojects/SQLProvider#868 · 2 則留言 ·
-
sql server
難度 4/5 3-5 天 新手友好度 45/100
fsprojects/SQLProvider#851 · 1 則留言 ·
查看 fsprojects/SQLProvider 的全部 Issue
相似的 Issue
-
bug jdbc-v2
難度 2/5 1-3 小時 新手友好度 70/100
ClickHouse/clickhouse-java#3214 ·
維護者通常 1 天內回覆
-
難度 2/5 1-3 小時 新手友好度 74/100
維護者通常 1 天內回覆
-
database high-priority security
難度 2/5 1-3 小時 新手友好度 72/100
bridgelet-org/bridgelet-sdk#879 · 1 則留言 ·
維護者通常 1 天內回覆
-
backend gamification P0
難度 2/5 1-3 小時 新手友好度 66/100
semanadeinformatica/website#461 ·
-
backend bug
難度 2/5 1-3 小時 新手友好度 72/100
OlaGreat/NovaSupport#1340 ·
維護者通常 1 天內回覆