Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Some partitions are missing in copied table #11516

Closed
madhuracj opened this issue Sep 30, 2015 · 4 comments
Closed

Some partitions are missing in copied table #11516

madhuracj opened this issue Sep 30, 2015 · 4 comments
Assignees
Labels
Bug A problem or regression with an existing feature
Milestone

Comments

@madhuracj
Copy link
Contributor

Seen on version 4.5
Create the table with

CREATE TABLE `ss` (
 `id` int(11) NOT NULL,
 `purchased` date NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1
/*!50100 PARTITION BY RANGE (YEAR(purchased))
SUBPARTITION BY HASH (TO_DAYS(purchased))
(PARTITION p0 VALUES LESS THAN (1990)
(SUBPARTITION p0s0 COMMENT = 'a' ENGINE = InnoDB,
 SUBPARTITION p0s1 COMMENT = 'b' ENGINE = InnoDB),
PARTITION p1 VALUES LESS THAN (2000)
(SUBPARTITION p1s0 COMMENT = 'c' ENGINE = InnoDB,
 SUBPARTITION p1s1 COMMENT = 'd' ENGINE = InnoDB),
PARTITION p2 VALUES LESS THAN MAXVALUE
(SUBPARTITION p2s0 COMMENT = 'e' ENGINE = InnoDB,
 SUBPARTITION p2s1 COMMENT = 'f' ENGINE = InnoDB)) */

And try to make a copy of it in table operations page.
Some partitions are missing in the copied table

@madhuracj madhuracj added the Bug A problem or regression with an existing feature label Sep 30, 2015
@madhuracj madhuracj self-assigned this Sep 30, 2015
@udan11
Copy link
Contributor

udan11 commented Sep 30, 2015

This is because of a bug in the SQL parsing library.

This should fix it.

@madhuracj
Copy link
Contributor Author

@udan11
Thank for the fix. I incorporated it in my commit.
There are a couple of points I noted and they are

  1. STORAGE is not used without ENGINE
  2. Only RANGE and LIST type partitions support
[VALUES 
            {LESS THAN {(expr) | MAXVALUE} 
            | 
            IN (value_list)}]

section.

madhuracj added a commit that referenced this issue Sep 30, 2015
Signed-off-by: Madhura Jayaratne <madhura.cj@gmail.com>
@lem9 lem9 added this to the 4.5.1 milestone Sep 30, 2015
@udan11
Copy link
Contributor

udan11 commented Sep 30, 2015

@madhuracj Can you give me an example that wasn't parsed properly due to point 2?

Thanks!

@madhuracj
Copy link
Contributor Author

@udan11

CREATE TABLE `a` (
 `a` int(11) NOT NULL,
 `b` int(11) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1
/*!50100 PARTITION BY HASH (a)
(PARTITION p0 MAX_ROWS = 10 MIN_ROWS = 1 COMMENT = '1' ENGINE = InnoDB,
PARTITION p1 MAX_ROWS = 10 MIN_ROWS = 1 COMMENT = '2' ENGINE = InnoDB) */

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jun 29, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Bug A problem or regression with an existing feature
Projects
None yet
Development

No branches or pull requests

3 participants