Closed (fixed)
Project:
MySite
Version:
5.x-2.14
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
26 Oct 2007 at 04:40 UTC
Updated:
12 Nov 2007 at 22:42 UTC
Currently, if I change the title of my Droplet from 'My Blog' to 'My blog' it will produce an error, "The title must be unique."
I propose that the matching be case-sensitive.
(see attached)
| Comment | File | Size | Author |
|---|---|---|---|
| mysite_7.patch | 2.13 KB | ms2011 |
Comments
Comment #1
agentrickardTwo questions:
-- Is this error produced because the title is matching itself, or do you have two Droplets already ('My blog' and 'My Blog')?
I suspect that the error, in fact, is that we need to exclude the current MID from the query:
Should probably be:
I notice also that uid calls %s instead of %d here, so that's an error as well.
-- Is this sql statement standard across PgSQL and MySQL?
I've never seen the BINARY flag before.
BTW: I appreciate these reviews. Welcome aboard.
Comment #2
ms2011 commentedThe error produced because the title is matching itself; there was only one droplet. To reproduce, create a droplet and then try renaming it by changing case only.
The BINARY operator casts the string following it to a binary string; it is the only way to get case-sensitive string matching done in MySQL that I know of. Not familiar enough with PostgreSQL to know whether it would work there or not.
Comment #3
agentrickardI wasn't able to track down any reference to the BINARY syntax in pgSQL. It may be that you have to CAST the data explicitly.
For now I'm going to ignore the case-sensitive part here and just go with the real bug.
If you find a pgSQL safe version, please post it.
Comment #4
(not verified) commentedAutomatically closed -- issue fixed for two weeks with no activity.