conversion from myisam to innodb failed when create partition table

Open
#64 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
3/5
Estimated time
1-2 days
Newbie friendliness
68/100
Issue type
Bug
Clarity
Clearly specified
Activity status
Quiet
Tech stack
cpp
Domain
databases

Research direction

Start by locating myisam_conversion_innodb and tencent_myisam_conversion_innodb, then trace how the partitioned CREATE TABLE statement handles table and partition engines. Reproduce the supplied SQL with those settings enabled. Done means a MYISAM table with MYISAM partitions is converted so the table and every partition use InnoDB without failing.

Written by the indexing model from the issue text.

Description

Problem:

when myisam_conversion_innodb and tencent_myisam_conversion_innodb are
opened in instance, user execute following statement will fail.

CREATE TABLE trb9 (id INT, name VARCHAR(50), purchased DATE) ENGINE=MYISAM
PARTITION BY RANGE( YEAR(purchased) ) (
PARTITION p0 VALUES LESS THAN (1990) ENGINE=MYISAM,
PARTITION p1 VALUES LESS THAN (1995) ENGINE=MYISAM,
PARTITION p2 VALUES LESS THAN (2000) ENGINE=MYISAM,
PARTITION p3 VALUES LESS THAN (2005) ENGINE=MYISAM
);

the reason for this problem is that myisam_conversion_innodb only
convert the table engine to innodb but the partition engine still be
myisam so table engine and partition engine are different.

Solution:

Convert partition engine to innodb if it is myisam.

Dominant language
C++
Stars
712
Forks
428
Avg merge
5h 43m
Merged PRs (30d)
1

Getting set up

This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from OpenTenBase/TXSQL

All issues in OpenTenBase/TXSQL

Similar issues

More C++ issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.