SQLSTATE[23000]: [Microsoft][SQL Server Native Client 10.0][SQL Server]Cannot insert duplicate key row in object 'dbo.simpletest431540file_managed' with unique index 'uri_unique'.
The same tests do no fail on MySQL. My bets are on collation differences. To be investigated before release.
| Comment | File | Size | Author |
|---|---|---|---|
| #1 | 1050800-computed-varbinary-max.patch | 1.74 KB | damien tournoud |
Comments
Comment #1
damien tournoud commentedThis is actually a regression introduced by our removal of filtered indexes.
It seems that this computed column:
Results in the [uri] column being *first* truncated to 16 characters, and then hashed. In other words, it's equivalent to:
I don't know the implicit cast rules of SQL Server, but it really feels like a bug to me that the final type is carried into hashbytes() arguments, as this is a very destructive function. (@Ashay, if you want to look into this :p)
Anyway, casting explicitly to
varbinary(max)prevents this behavior. Patch attached for review.Comment #2
damien tournoud commentedCommitted to HEAD.
Comment #4
henneman commentedSubscribe