Azure / Azure/azure-functions-sql-extension
SqlAsyncCollector.GetExtraProperties doesn't obey case-insensitive collation
- Dominant language
- C#
- Stars
- 130
- Forks
- 71
- Avg merge
- 4d 8h
- Merged PRs (30d)
- 4
Description
- Azure Functions SQL Extension or Extension Bundle Version:
3.1.169-preview, but looking at code in github appears to be an issue with latest
- Is this a deployed or local function:
deployed to azure function app
- What type of Database are you using? (Run `SELECT @@VERSION as Version, SERVERPROPERTY('EngineEdition') as EngineEdition` on your database)
Microsoft SQL Azure (RTM) - 12.0.2000.8 Oct 2 2024 11:51:41 Copyright (C) 2022 Microsoft Corporation 5
- List any custom settings for your function app. This could be a custom time-out defined specifically for your database server or optional configuration that can be customized for the app defined [here](https://learn.microsoft.com/azure/azure-functions/functions-bindings-azure-sql-trigger?tabs=isolated-process%2Cportal&pivots=programming-language-csharp#optional-configuration).
Steps to Reproduce:
1. create table with columns in uppercase
2. access table with class properties in lowercase
Our app was previously .net6, using a very old SQL extension (0.1.483-preview). When we upgraded the app to .net8, we also upgraded the sql extension to 3.1.169-preview. Since then, we run into the error generated from [GetExtraProperties](https://github.com/Azure/azure-functions-sql-extension/blob/8f9cba99a79b51f5e8359f3570c0c5c94956af38/src/SqlAsyncCollector.cs#L219)
Default collation is SQL_Latin1_General_CP1_CI_AS, which is case insensitive, so mismatch case on column names should not be an issue.
Contributor guide
Research direction
Start by reading GetExtraProperties in src/SqlAsyncCollector.cs around line 219 and compare its name-matching behavior with the reported SQL_Latin1_General_CP1_CI_AS reproduction. Validate with a table using uppercase columns and class properties in lowercase; done means the collector accepts this case-insensitive match.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- azure, csharp, sql
- Domain
- backend, databases
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100