Repository navigation
Conversation
|
@ajcvickers Build failing due to "##[error]The job running on agent NetCorePublic-Pool 239 ran longer than the maximum time of 60 minutes. For more information, see https://go.microsoft.com/fwlink/?linkid=2077134", rerun? |
|
@bdebaere We discussed this and don't think that this is the correct behavior. When converting to a byte, we expect exactly one byte, for a short, exactly 2 bytes, for an int, exactly 4 bytes, and so on. If anything is needed in this space it is throwing a better exception message when the byte array is the wrong size.t |
|
@ajcvickers It's not about the byte array being the wrong size. It's about the byte array being empty. See #12518 for an example of when this happens. |
|
@smitpatel Is it fixed in 3.1? I'm running that version and getting the bug. Same with other array properties like string[]. If you need a repro, let me know. |
|
I ran the repro code in the issue and it worked for me. Share your repro code if it is still failing. |
|
@ajcvickers @smitpatel Unless there's something obvious I'm missing here which would render this all wrong, in which case I apologize in advance, these are the paths I currently see:
Do let me know which one of the above paths you wish to take, or if you wish to take a different path, so that I can adjust my pull request. |
|
But your column is declared as "NOT NULL" !? Have you tried: Have you tried: CREATE TABLE [Entity] (
[Id] UNIQUEIDENTIFIER NOT NULL,
[RowVersion] TIMESTAMP NULL
)
|
|
@ErikEJ Yes, I have tried that. Same result: 0x. |
|
OK, rowversion is never null, and always gets a value assigned by the database engine: A nonnullable rowversion column is semantically equivalent to a binary(8) column. A nullable rowversion column is semantically equivalent to a varbinary(8) column. |
|
@ErikEJ If you change the type to BINARY(8) NOT NULL, you will notice that the behavior is as expected: NULL is returned, and ISDBNull is true. It's only rowversion/timestamp that has this issue. |
|
@bdebaere - Please file a new issue if you are seeing something wrong with rowversion. Or use #12518 if you want to discuss about bug where empty array is being read by query pipeline incorrectly. I am closing out this PR as this is not the change we want to make and it is unnecessarily running builds. |
|
@smitpatel Then what is the change you want to see? All you have to do is tell me, and I can start working on it. |
|
Don't read default value when reading values from DataReader, rather let it fail when assigning values so assigning null value to non-null will throw exception. Alongside update BufferedDataReader to accommodate that null value could come in even though the reader column was expecting a non-null value since DbDataReader does not care about nullability of values either. |

Introduces a check on Array.Length equalling zero to avoid an IndexOutOfRangeException when called on a null navigation property.