Bug #7727 BASE_TABLE function for use w/ MERGE tables
Submitted: 7 Jan 2005 7:47 Modified: 29 Sep 2007 11:17
Reporter: Carsten Pedersen Email Updates:
Status: Verified Impact on me:
None 
Category:MySQL Server: MyISAM storage engine Severity:S4 (Feature request)
Version: OS:Any
Assigned to: CPU Architecture:Any
Triage: Triaged: D5 (Feature request)

[7 Jan 2005 7:47] Carsten Pedersen
Description:
In certain contexts, knowing which base table in a MRG_MyISAM definition is desirable.

A function BASE_TABLE() should be implemented to provide this information:

CREATE TABLE a (i int);
INSERT INTO a VALUES (1), (2);
CREATE TABLE b (i int);
INSERT INTO b VALUES (2), (3);
CREATE TABLE c (i int) ENGINE=MRG_MyISAM UNION=(a, b);

SELECT i, BASE_TABLE() AS tbl FROM c;
+---+-----+
| i | tbl |
+---+-----+
| 1 | a   |
| 2 | a   |
| 2 | b   |
| 3 | b   |
+---+-----+

How to repeat:
This is a feature request
[29 Sep 2007 11:17] Valeriy Kravchuk
Thank you for a reasonable feature request.