New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
BlitzIndex Column Details Showing Half Sizes for varchar Columns #1068
Comments
Good catch! I had to do some digging to understand what you were reporting. Here's a repro script:
It's confusing, but the number in parenthesis means different things in different result sets and columns:
The results:
|
BrentOzar
added a commit
that referenced
this issue
Aug 27, 2017
nchar and varchar fields were reporting the wrong data type lengths. Closes #1068.
Yay! Thank you! :) |
BlitzErik
added a commit
that referenced
this issue
Aug 31, 2017
#1068 sp_BlitzIndex - fixing field length bug
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Do you want to request a feature or report a bug?
Bug
What is the current behavior?
When running BlitzIndex with the @tablename parameter, the column information is incorrectly showing datatype sizes of half of what they should be for varchar. Example: Varchar(8) is showing as varchar(4). The thing that made me first notice is that some columns were showing as varchar(0). Nchar datatypes lengths are also not being divided in half like nvarchars are.
What is the expected behavior?
Show the correct data lengths.
Details:
I believe it's just a simple datatype mix up between two lines of code. On lines 1945 and 1946 of BlitzIndex:
Nchar should be down with the other unicode datatype nvarchar on line 1946 (with the lengths being divided by 2), and varchar should be up on line 1945 with the non unicode datatypes (with the lengths not being divided by 2) :)
The text was updated successfully, but these errors were encountered: