Bug #10548 Merge table is created successfully on tables which are not present
Submitted: 11 May 2005 12:12 Modified: 12 May 2005 20:49
Reporter: Disha Email Updates:
Status: Not a Bug Impact on me:
None 
Category:MySQL Server Severity:S2 (Serious)
Version:5.0.5-beta-nt OS:Windows (Windows 2000 Server)
Assigned to: CPU Architecture:Any

[11 May 2005 12:12] Disha
Description:
We have created a merge table 't3' with union of table 't1' and 't2' ,where table 't1' and 't2' are not created.Table 't3' is created successfully .When we execute 'show tables' statement ,table t3 is displayed.

How to repeat:
1.Set delimiter 
         delimiter //

2. Select database ie execute the following SQL statement:
          use test//

3. Create an MERGE table 't3' i.e execute the following SQL statement:
           CREATE TABLE t3 (a INT NOT NULL AUTO_INCREMENT,message CHAR(20), INDEX(a))TYPE=MERGE UNION=(t1,t2) INSERT_METHOD=LAST//

4. Execute 'Show tables' statement:
              show tables//

5. Insert values in table 't3' ie execute the following statement:
             Insert into total values(1,'aaa')//

Observed : Step 5 gives an error message 'ERROR 1017 (HY000): Can't find file: 't3' (errno: 2)'

Expected Result: At step 3 it should give an error message while creating a merge table 't3'

Actual Result: At step 3 it successfully creates table 't3'.
[11 May 2005 13:59] MySQL Verification Team
Verified on Linux
[12 May 2005 20:49] Sergei Golubchik
Thank you for taking the time to write to us, but this is not
a bug. Please double-check the documentation available at
http://www.mysql.com/documentation/ and the instructions on
how to report a bug at http://bugs.mysql.com/how-to-report.php

Additional info:

See http://dev.mysql.com/doc/mysql/en/merge-storage-engine.html
Manual does not specify that all MyISAM table must exist when a MERGE of them is created.
[12 Jul 2005 11:54] Disha
Hi,
Here is what is observed:

CREATE TABLE t3 (a INT NOT NULL AUTO_INCREMENT,message CHAR(20),
INDEX(a))TYPE=MERGE UNION=(t1,t2) INSERT_METHOD=LAST//

show tables// 
Select * from t3//

Observed : 
Show tables lists table t3 which means that te table is created.
However, on execution of "Select *....",error msg displayed is:
'ERROR 1017 (HY000): Can't find file:'t3' (errno: 2)'.

The current behaviour does not seem acceptable, simply because as per the Information_Schema, table t3 exists, whereas the table t3 is not usable.