2013-02-28 58 views
1

我正在修復EclipseLink的InformixPlatform數據庫支持類以使用我們的Informix 11.70安裝。Informix是否支持創建同名臨時表的多個線程?

需要工作的合同之一由以下代碼表示。該文檔解釋了什麼是需要:

/** 
* INTERNAL: 
* Indicates whether the platform supports local temporary tables. 
* "Local" means that several threads may create 
* temporary tables with the same name. 
    [snip] 
*/ 
public boolean supportsLocalTempTables() { 
    return true; // is this correct? 
} 

/** 
* INTERNAL: 
* Indicates whether the platform supports global temporary tables. 
* "Global" means that an attempt to create temporary table with the same 
* name for the second time results in exception. 
    [snip] 
* Note that this method is ignored in case supportsLocalTempTables() returns true. 
*/ 
public boolean supportsGlobalTempTables() { 
    return false; // is this correct? 
} 

我的感覺是,我應該從我的執行supportsLocalTempTables()返回true,因爲我認爲,Informix的確實支持能力創造,例如,一個臨時表名爲FRED會話1和臨時表從會話2命名爲FRED。我的假設是否正確?

我查閱了the Informix 11.70 InfoCenter topic,但沒有看到任何具體的東西。

回答

3

是的。 Informix中的臨時表對於會話是本地的,只有會話纔可見。 另外,當會話關閉時,所有的臨時表都被丟棄。 因此,在不同的會話中,您可以創建具有相同名稱的臨時表。 無法在會話之間共享對臨時表的訪問。

+0

謝謝,Fernando;我希望爲這些必要的修改修補EclipseLink官方的'InformixPlatform.java';現在我只是重寫它而已。我想確保我有正確的信息。 – 2013-03-01 04:30:33