Тема
:
Бага в Query update(true)
Показать сообщение отдельно
14.09.2011, 12:57
#
5
gl00mie
Участник
3,684
/
5803
(
201
)
Регистрация: 28.11.2005
Адрес: Москва
Записей в блоге:
3
Цитата:
Сообщение от
Alexius
MS SQL 2008 R2
Для получения задвоения необходимо в индексе InventTable / GroupItemIdx поле ItemId заменить на ItemName, после этого у меня на некоторых группах происходят двойные обновления.
Вообще это напоминает старую багу в SQL Server, см.
kb843267 - Dynamic cursor retrieves the same row two times when you update the non-clustered index key to the same value
Цитата:
A dynamic cursor retrieves the same row two times when all the following conditions are true:
The dynamic cursor has an order-by clause that matches a non-clustered index.
One or more key columns is updated to the same value that the column currently has. The key columns in the non-clustered index are used to specify order.
One or more key columns can be assigned a null value
Впрочем, дело еще может быть в кэшировании. Воспроизведется ли ошибка, если то же самое сделать через while select forupdate? А если перед этим у табличного буфера вызвать disableCache(true)?
За это сообщение автора поблагодарили:
Alexius
(
3
).
gl00mie
Посмотреть профиль
Отправить личное сообщение для gl00mie
Найти ещё сообщения от gl00mie
Читать блог