Inconsistency with handling of unique constraints
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
OpenStack Identity (keystone) |
Confirmed
|
Low
|
Unassigned |
Bug Description
We have many unit tests (simple example[1]) that check to see that indexes are case insensitive. The problem is that our current implementation doesn't explicitly make the index case insensitive. That's left up the the RDBMS. This is problematic because in my testing I have seen different results:
- SQLite - is case sensitive
- MySQL - is case insensitive[2]
- PostgreSQL - is case sensitive
My goal was to get the unit tests working on MySQL/PostgreSQL, so I would like to figure out a direction. Should we drop those tests and leave it up to the environment? It's also possible to get SQLAlchemy create the proper index. I've never done it, but I'm sure it's possible.
[references]
1. http://
2. http://
Changed in keystone: | |
assignee: | Swati Jaiswal (curioswati) → nobody |
tags: | added: sql |
Changed in keystone: | |
importance: | Medium → Low |
tags: | added: reviewed-bobcat |
In my opinion, I think we should either try to handle the case insensitivity or very explicitly say that we don't. Users will most likely stumble upon these things and it's better to have some sort of answer. A solution could be to then specify that case sensitivity is supported for some specified platforms.
In MySQL the following approach could be used: http:// stackoverflow. com/a/11067627