[MDEV-598] LP:1002162 - Temporary MERGE table with temporary underlying is broken by ALTER Created: 2012-05-21  Updated: 2014-04-11  Resolved: 2014-04-11

Status: Closed
Project: MariaDB Server
Component/s: None
Affects Version/s: None
Fix Version/s: 5.5.35, 10.0.7, 5.1.73, 5.2.15, 5.3.13

Type: Bug Priority: Minor
Reporter: Igor Babaev Assignee: Unassigned
Resolution: Fixed Votes: 0
Labels: Launchpad

Attachments: XML File LPexportBug1002162.xml    

 Description   

MySQL Bug#57657 is reproducible in MariaDB 5.5

MariaDB [test]> create temporary table t1_temp(i int);
Query OK, 0 rows affected (0.02 sec)
 
MariaDB [test]> create temporary table tm_temp_temp (i int) engine=merge union=(t1_temp) insert_method=last;
Query OK, 0 rows affected (0.00 sec)
 
MariaDB [test]> alter table tm_temp_temp insert_method=first;
ERROR 1168 (HY000): Unable to open underlying table which is differently defined or of non-MyISAM type or doesn't exist
MariaDB [test]> check table tm_temp_temp;
+-------------------+-------+----------+-----------------------------------------------------------------------------------------------------+
| Table             | Op    | Msg_type | Msg_text                                                                                            |
+-------------------+-------+----------+-----------------------------------------------------------------------------------------------------+
| test.tm_temp_temp | check | Error    | Table 'test.t1_temp' is differently defined or of non-MyISAM type or doesn't exist                  |
| test.tm_temp_temp | check | Error    | Unable to open underlying table which is differently defined or of non-MyISAM type or doesn't exist |
| test.tm_temp_temp | check | error    | Corrupt                                                                                             |
+-------------------+-------+----------+-----------------------------------------------------------------------------------------------------+
3 rows in set (0.00 sec)



 Comments   
Comment by Rasmus Johansson (Inactive) [ 2012-05-21 ]

Launchpad bug id: 1002162

Comment by Sergei Golubchik [ 2013-01-01 ]

fixed in 5.6 only

Comment by Elena Stepanova [ 2014-04-11 ]

The bug was fixed in 5.1 tree and up by the following revision:

revno: 3210
revision-id: sergii@pisem.net-20131129192105-0excqx2i9sj6wt8l
parent: bar@mnogosearch.org-20131114120932-8byc3si7yycaejd3
fixes bug: https://mariadb.atlassian.net/browse/MDEV-5266
committer: Sergei Golubchik <sergii@pisem.net>
branch nick: 5.1
timestamp: Fri 2013-11-29 20:21:05 +0100
message:
  MDEV-5266 MySQL:57657 - Temporary MERGE table with temporary underlying is broken by ALTER
  
  Fix ha_myisammrg::update_create_info() to do what ha_myisammrg::append_create_info() does -
  take sub-table names from TABLE_LIST, not reverse engineer tablefile names.
  
  Backport praveenkumar.hulakund@oracle.com-20120127081643-u7dxy23i8yyqarm7 from mysql-5.6

Generated at Thu Feb 08 06:29:56 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.