[MDEV-4466] Partitioned Aria table created by a previous version is recognized as TEST_SQL_DISCOVERY Created: 2013-05-01  Updated: 2013-09-09  Resolved: 2013-06-18

Status: Closed
Project: MariaDB Server
Component/s: None
Affects Version/s: 10.0.2, 5.5.31
Fix Version/s: 10.0.4, 5.5.32

Type: Bug Priority: Major
Reporter: Elena Stepanova Assignee: Sergei Golubchik
Resolution: Fixed Votes: 0
Labels: None

Attachments: File t1#P#p0.MAD     File t1#P#p0.MAI     File t1.frm     File t1.par    
Issue Links:
Duplicate
is duplicated by MDEV-4628 PARTITION - Problem with CONNECT/ARIA... Closed
Relates
relates to MDEV-3808 Better table discovery Closed

 Description   

I create a simple Aria table on MariaDB server 5.5 (or 5.2, or 5.3):

create table t1 (i int) engine=Aria partition by hash(i);

Then I shutdown the server gracefully:

130501 23:29:25  InnoDB: Starting shutdown...
130501 23:29:26  InnoDB: Shutdown completed; log sequence number 1597945
130501 23:29:26 [Note] /home/elenst/bzr/5.5/sql/mysqld: Shutdown complete

Then I create a new clean datadir for 10.0 server and bootstrap it.
Then I copy the table files from 5.5 datadir to the new 10.0 datadir:

t1.frm       
t1.par       
t1#P#p0.MAD  
t1#P#p0.MAI

Then I start 10.0 server, it starts without complaints.
I also run mysql_upgrade (it's optional, doesn't matter whether I do it or not):

...
performance_schema
test
test.t1                                            OK

Then I connect to the server and look at the table:

MariaDB [test]> show create table t1;
+-------+-------------------------------------------------------------------------------------------------------------------------------------+
| Table | Create Table                                                                                                                        |
+-------+-------------------------------------------------------------------------------------------------------------------------------------+
| t1    | CREATE TABLE `t1` (
  `i` int(11) DEFAULT NULL
) ENGINE=TEST_SQL_DISCOVERY DEFAULT CHARSET=latin1
/*!50100 PARTITION BY HASH (i) */ |
+-------+-------------------------------------------------------------------------------------------------------------------------------------+
1 row in set (0.00 sec)

And it behaves like TEST_SQL_DISCOVERY, too:

MariaDB [test]> insert into t1 values (1);
ERROR 1031 (HY000): Storage engine TEST_SQL_DISCOVERY of the table `test`.`t1` doesn't have this option

If I start or build server without TEST_SQL_DISCOVERY, the table is correctly recognized as Aria.

I can't make up a cross-version MTR test, so I will attach the files I copied into 10.0 datadir in the previously described test – that is, files created by 5.5, but never touched by 10.0 yet.



 Comments   
Comment by Elena Stepanova [ 2013-06-10 ]

Increased the priority because we have another bug report, MDEV-4628, which describes a very similar problem but with CONNECT engine instead of TEST_SQL_DISCOVERY.

Comment by Sergei Golubchik [ 2013-06-15 ]

5.5 is affected too

Comment by Sergei Golubchik [ 2013-06-18 ]

pushed in 5.5 and 10.0-base

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