This problem is "documented" in two bugs:
http://bugs.mysql.com/bug.php?id=36073
http://bugs.mysql.com/bug.php?id=20001
Why in the world is this just a "documentation fix"? There have
been a number of occasions when I've tried to write generic
stored procedures that might want to analyze information about
temporary tables. For instance, given a SELECT statement, I want
to determine what datatypes each select clause produces. A fairly
straightforward way to do this might be to run a "create
temporary table xyz as (SELECT ... LIMIT 0), to produce an empty
temporary table to analyze. This doesn't work however, because
there isn't any information on xyz in the information schema!
Worse, SHOW statements don't work as a PREPARED STATEMENT so
there isn't any way to determine this information in …
May
19
2008
More MySQL idiocy, or "Why does INFORMATION_SCHEMA fail to show information about TEMPORARY tables?"