List:Internals« Previous MessageNext Message »
From:Jay Pipes Date:February 5 2009 3:00am
Subject:Re: why isn't HA_OPEN_TMP_TABLE set on a call to ha_myisam::open?
View as plain text  
MARK CALLAGHAN wrote:
> I would like to know within ha_myisam::open() that the table to be
> opened is a temp table. 

Perhaps this?

if (table->s->tmp_table)
{
   /* you've got a temp table... */

}

 > Code in ha_myisam:open expects the flag
> HA_OPEN_TMP_TABLE to be set in some cases, but it is not set for my
> case. This is true for MySQL 5.0.37 and appears to be true for 5.0.75.
> Why is HA_OPEN_TMP_TABLE not set?

Who knows.  The flags passed to the handler functions are fubar and 
poorly documented and the openfrm() function is a legacy code burial 
ground -- just take a look at open_binary_form() in MySQL 6.0 -- it's 
1031 lines of very dense code that's difficult to understand on a good day.

-jay
Thread
why isn't HA_OPEN_TMP_TABLE set on a call to ha_myisam::open?MARK CALLAGHAN5 Feb
  • Re: why isn't HA_OPEN_TMP_TABLE set on a call to ha_myisam::open?Jay Pipes5 Feb
  • Re: why isn't HA_OPEN_TMP_TABLE set on a call to ha_myisam::open?Konstantin Osipov5 Feb
  • re: why isn't HA_OPEN_TMP_TABLE set on a call to ha_myisam::open?Michael Widenius11 Feb