Problem/Motivation

The change of the uid field from integer to serial in user_update_9301() causes the anonymous uid 0 record to be removed from the users table on MS SQL Server, taking down the site.

Steps to reproduce

Apply user_update_9301 to a Drupal instance utilizing MS SQL Server.

Proposed resolution

Determine why the use of NO_AUTO_VALUE_ON_ZERO mode is failing in this case. Develop a solution.

Remaining tasks

TBD

User interface changes

None

API changes

None

Data model changes

None

Release notes snippet

TBD

Comments

danguyf created an issue. See original summary.

danguyf’s picture

Priority: Normal » Major
Issue summary: View changes
cilefen’s picture

This sounds like something that was already fixed.

cilefen’s picture

It looks also like this existing report.

xjm’s picture

Category: Bug report » Support request

MS SQL is also not officially supported by core, so this issue should be filed in a contrib queue for the appropriate project. It would only end up back in core if it turned out that core blocked contrib from fixing the bug. (Which is possible given the recent core change, but not necessarily the case. If it does turn out to be impossible to fix, then it'd be a critical bug.) Thanks!

alexpott’s picture

Status: Active » Closed (duplicate)

@danguyf we've landed #3265802: user_update_9301() causes data loss and a broken site on SQL Server today to prevent the update from breaking SQL server sites.

The current plan is to fix the sqlsrv module in #3263493: Upgrading to Drupal 9.3.x changes users table and locks users out of the site. There also a fix script for live sites in this comment: #3263493-4: Upgrading to Drupal 9.3.x changes users table and locks users out of the site.

Given the above I'm going to close this issue as a duplicate of those 2 issues. Thank @danguyf for your report of the issue.