views:

75

answers:

1

When SHOW WARNINGS after a EXPLAIN EXTENDED shows a

Note 1276 Field or reference 'test.foo.bar' of SELECT #2 was resolved in SELECT #1

what exactly does that mean and what impact does it have? In my case it prevents mysql from using what seems to be a perfectly good index. But it's not about fixing that specific query (as it is an irrelevant test).

I found http://dev.mysql.com/doc/refman/5.0/en/error-messages-server.html but

Error: 1276 SQLSTATE: HY000 (ER_WARN_FIELD_RESOLVED)
Message: Field or reference '%s%s%s%s%s' of SELECT #%d was resolved in SELECT #%d
isn't much of an explaination.

+1  A: 

Read this blog post for an explanation.

In summary, this is a result of correlated subsequeries using a column name resolved in an outer scope.

Jacques René Mesrine