From: Simon <si...@po...> - 2010-04-20 02:16:51
|
i only just bumped into this after moving mysql away from running on mac os x. it seems the behaviour is different depending on the host file system, and when on a case sensitive file system mixing case is a definite no-no: http://dev.mysql.com/doc/refman/5.0/en/identifier-case-sensitivity.html mysql doesn't seem to care whether the alias is upper or lower, just as long as they are all the same in a single sql statement. i've been poking around EOSQLExpression and it seems EOF itself hardcodes to upper case... alias = "T".concat(String.valueOf(_aliasesByRelationshipPath.count())); ....so i guess changing it to a hard coded upper case isn't going to break anyone after all ?? simon On 20 April 2010 02:52, Michael Schrag <ms...@gm...> wrote: > all this code is really hacky (with the hard-coded presumptions of keypath > aliases), though it's kind of odd that mysql cares about this. i always > assumed someone would eventually say "wtf is this code doing hardcoding > keypath aliases" and that day has finally come :) IIRC, the api for properly > resolving these things is really annoying to use, which is why i bypassed > it. i wonder if we can at least call into the plugin/expression to get the > capitalization right. > > On Apr 19, 2010, at 9:16 PM, Simon wrote: > > just ran into this exception - the bold bits being the interesting ones: > > <com.webobjects.jdbcadaptor.MySQLPlugIn$MySQLExpression: "SELECT RTRIM( > T2.name), *COUNT(t2.name)* AS tagCount FROM job_request t0, *ERTag T2*, > xactivitytag T1 WHERE t0.type = ? AND T1.eRTagId = T2.id AND t0.O_ID = > T1.abstractActivityOID GROUP BY T2.name ORDER BY tagCount DESC LIMIT 0, > 100" withBindings: 1:3(type)>: Next exception:SQL State:42S22 -- error code: > 1054 -- msg: U*nknown column 't2.name' in 'field list'* > * > * > it's caused by line 790 of ERTaggableEntity explicitly using a lower case > "t2" :- > > EOAttribute countAttribute = > ERXEOAccessUtilities.createAggregateAttribute(editingContext, "COUNT", > ERTag.NAME_KEY, _tagEntity.name(), Number.class, "i", "tagCount", "t2"); > > i'm presuming if i were to submit a patch to change that to upper case then > it's likely to break someone else ?? > > Simon > > ps. this is with mysql 5.1 > ------------------------------------------------------------------------------ > Download Intel® Parallel Studio Eval > Try the new software tools for yourself. Speed compiling, find bugs > proactively, and fine-tune applications for parallel performance. > See why Intel Parallel Studio got high marks during beta. > > http://p.sf.net/sfu/intel-sw-dev_______________________________________________ > Wonder-disc mailing list > Won...@li... > https://lists.sourceforge.net/lists/listinfo/wonder-disc > > > |