Closed (fixed)
Project:
Drupal core
Component:
profile.module
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
1 Aug 2005 at 12:27 UTC
Updated:
4 Oct 2005 at 20:40 UTC
Jump to comment: Most recent file
This needs confirmation but I am unable to get fields to be shown in the author information block. The 'Link to full user profile' will work, but when I deselect 'Link to full user profile' from admin/block/configure/profile/0 and select the other fields instead, the block fails to materialize.
| Comment | File | Size | Author |
|---|---|---|---|
| #2 | profile_1.patch | 1.12 KB | killes@www.drop.org |
| #1 | profile.module_2.patch | 1.09 KB | tostinni |
Comments
Comment #1
tostinni commentedThis little patch does the trick.
The bug came from the fact that the query retrieving user profiles, didn't take all public fields.
Comment #2
killes@www.drop.org commentedI've looked at the patch, changes "in" to "IN" and removed trailign DOS newlines, and can confirm that it works.
Comment #3
killes@www.drop.org commentedchanging status
Comment #4
dries commentedIs using IN() equivalent to using OR or is one faster than the other?
Comment #5
killes@www.drop.org commentedCvbge and I think that it is equivalent in this case. it is unsure whether it is faster, but IN () is usually regarded as being fast:
http://mysql.com/in
Comment #6
tostinni commentedI'm not a DB expert, but I got a little experience on Oracle (great you can answer ;) but I think it should happen pretty much the same), so IMVHO, I think that they're doing the same, in fact, looking at Oracle explain plan, it's exactly the same between a OR and a IN clause. They both do the same explain plan using "INLIST ITERATOR" in fact, the cost is the same, but explain plan tells me that it takes slightly less bytes to achieve it...
Ok sorry if very off topic and useless, but I thought it worthes to mention that.
Back to our query, I think whatever we put OR or IN clause, we shouldn't expect speed problem with this, as it's very little the change. If we do care about it, I think we should add an INDEX on this column. Also, I think IN clauses in this case (using 2 or more coma separated values) is much clearer than writing a lot of OR.
Comment #7
robertdouglass commentedperformance aside, we can fix the bug, right?
Comment #8
dries commentedCommitted to HEAD.
Looks like MySQL rewrites OR to IN() internally.
Comment #9
(not verified) commentedComment #10
(not verified) commented