Closed (duplicate)
Project:
Drupal core
Version:
7.12
Component:
file system
Priority:
Major
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
9 Mar 2012 at 13:23 UTC
Updated:
9 Mar 2012 at 13:48 UTC
To reproduce:
PDOException: SQLSTATE[23000]: Integrity constraint violation: 1062 Duplicate entry 'public://Bomen.jpg' for key 2: INSERT INTO {file_managed} (uid, filename, uri, filemime, filesize, status, timestamp) VALUES (:db_insert_placeholder_0, :db_insert_placeholder_1, :db_insert_placeholder_2, :db_insert_placeholder_3, :db_insert_placeholder_4, :db_insert_placeholder_5, :db_insert_placeholder_6); Array
(
[:db_insert_placeholder_0] => 1
[:db_insert_placeholder_1] => Bomen.jpg
[:db_insert_placeholder_2] => public://Bomen.jpg
[:db_insert_placeholder_3] => image/jpeg
[:db_insert_placeholder_4] => 770042
[:db_insert_placeholder_5] => 0
[:db_insert_placeholder_6] => 1331298860
)(notice I used the files bomen.jpg and Bomen.jpg, the Dutch translation of trees ;-))
The error is obviously due to the fact that the column file_managed.uri is case insensitive (collation utf_general_ci) whereas it should have a case sensitive collation.
Solution: change the column to utf8_bin. This collation is case sensitive.
| Comment | File | Size | Author |
|---|---|---|---|
| core_bug.jpg | 60 KB | bvanmeurs |
Comments
Comment #0.0
bvanmeurs commented.
Comment #1
bvanmeurs commentedSee http://drupal.org/node/966210
Comment #1.0
bvanmeurs commented.