Wrong column type in sys.sql_modules
Description
Currently, definition column in the view sys.sql_modules stores upto 4000 characters. SSMS scripting uses sys.sql_modules view to show the definition of the procedure, and the procedure definition is truncated to 4000 characters if the actual procedure definition is more than 4K.
To avoid this incorrect definition, We can directly use sys.nvarchar and there is no need to specify the tymod of 4000 in case of sys.nvarchar for the definition column i.e., sys.nvarchar(4000).
Fixed the definition column for the views which should use nvarchar(max): sql_modules, system_sql_modules, all_sql_modules.
Issues Resolved
Task: BABEL-4870 Signed-off-by: Shalini Lohia [email protected]
Test Scenarios Covered
-
Use case based - Added test in DDL test framework. Also, testing using SSMS.
-
Boundary conditions -
-
Arbitrary inputs -
-
Negative test cases -
-
Minor version upgrade tests -
-
Major version upgrade tests -
-
Performance tests -
-
Tooling impact -
-
Client tests -
Pull Request Test Coverage Report for Build 9202292116
Warning: This coverage report may be inaccurate.
This pull request's base commit is no longer the HEAD commit of its target branch. This means it includes changes from outside the original pull request, including, potentially, unrelated coverage changes.
- For more information on this, see Tracking coverage changes with pull request builds.
- To avoid this issue with future PRs, see these Recommended CI Configurations.
- For a quick fix, rebase this PR at GitHub. Your next report should be accurate.
Details
- 0 of 0 changed or added relevant lines in 0 files are covered.
- 263 unchanged lines in 3 files lost coverage.
- Overall coverage increased (+0.005%) to 73.179%
| Files with Coverage Reduction | New Missed Lines | % |
|---|---|---|
| contrib/babelfishpg_tsql/src/hooks.c | 7 | 83.51% |
| contrib/babelfishpg_tsql/src/catalog.c | 110 | 86.63% |
| contrib/babelfishpg_tsql/src/pl_handler.c | 146 | 91.48% |
| <!-- | Total: | 263 |
| Totals | |
|---|---|
| Change from base Build 9172587441: | 0.005% |
| Covered Lines: | 41706 |
| Relevant Lines: | 56992 |
💛 - Coveralls
Have we tested object explorer with these changes?
Yes, I have tested with SSMS