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.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

tostinni’s picture

Status: Active » Needs review
FileSize
1.09 KB

This little patch does the trick.
The bug came from the fact that the query retrieving user profiles, didn't take all public fields.

killes@www.drop.org’s picture

FileSize
1.12 KB

I've looked at the patch, changes "in" to "IN" and removed trailign DOS newlines, and can confirm that it works.

killes@www.drop.org’s picture

Status: Needs review » Reviewed & tested by the community

changing status

Dries’s picture

Is using IN() equivalent to using OR or is one faster than the other?

killes@www.drop.org’s picture

Cvbge 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

tostinni’s picture

I'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.

robertDouglass’s picture

performance aside, we can fix the bug, right?

Dries’s picture

Status: Reviewed & tested by the community » Fixed

Committed to HEAD.

Looks like MySQL rewrites OR to IN() internally.

Anonymous’s picture

Anonymous’s picture

Status: Fixed » Closed (fixed)