When i am updating my Drupal core from 7.39->7.40 I get the error below after i run the update script for pending update "7080 - Convert the 'format' column in {date_format_locale} to case sensitive varchar"

ERROR
PDOException: SQLSTATE[42000]: [Microsoft][ODBC Driver 11 for SQL Server][SQL Server]Cannot resolve the collation conflict between "Latin1_General_CS_AI" and "SQL_Latin1_General_CP1_CI_AS" in the equal to operation.: SELECT df.dfid, df.format, df.type, df.locked, dfl.[language] FROM date_formats df LEFT JOIN date_format_locale dfl ON df.format = dfl.format AND df.type = dfl.type ORDER BY df.type, df.format; Array ( ) in _system_date_formats_build()

My enivironment is
DrupalCore:7.39
Drupal 7 driver for SQL Server and SQL Azure 7.x-2.0
PHP:PHP5.3

For a temp fix if i change the date_format_locale format coailation back to "SQL_Latin1_General_CP1_CI_AS" in the DB to match up with "date_formats" table "format" column the error went away.

CommentFileSizeAuthor
#3 Date_format_locale format.GIF193.44 KBsseetala

Comments

sseetala created an issue. See original summary.

Anonymous’s picture

I have the same issue updating to 7.41. There is a thread here: https://www.drupal.org/node/2376239
that addresses the issue, but it doesnt seem to help me. When i go to the database the date_format_locale table is empty. What exactly did you put in "type", "language", and "format"?

sseetala’s picture

StatusFileSize
new193.44 KB

Hi drclayt0n,
I am new to Drupal and PHP . So I was not comfortable changing any PHP code. But based on the error desc I know "date_format_locale" table format column coalition was not matching to "date_formats" table "format" column coalition in the SQL server database because the Drupal Core 7.40 updated "date_format_locale" format column coalitation to case sensitive (According to 7.40 release notes "Made the format column in the {date_format_locale} database table case-sensitive, to match the equivalent column in the {date_formats} table"). So I set back "date_format_locale" format column coalitation to "SQL_Latin1_General_CP1_CI_AS" and it fixe the error. Hope this helps.

Anonymous’s picture

Thanks! I did the same and it worked for me as well. I no longer get the error. The pic was quite helpful

david_garcia’s picture

Status: Active » Closed (duplicate)