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

executor: fix the location of the partition in the "show create table" result #10685

Closed
wants to merge 1 commit into from

Conversation

zimulala
Copy link
Contributor

@zimulala zimulala commented Jun 3, 2019

What problem does this PR solve?

CREATE TABLE t (a int, id int(11) NOT NULL AUTO_INCREMENT, PRIMARY KEY(id)) AUTO_INCREMENT=4 comment="testing"
     PARTITION BY RANGE (id) (PARTITION p0 VALUES LESS THAN (6))

Execute the SQL of show create table t.
Before:

+-------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| Table | Create Table                                                                                                                                                                                                                                                                   |
+-------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| t     | CREATE TABLE `t` (
  `a` int(11) DEFAULT NULL,
  `id` int(11) NOT NULL AUTO_INCREMENT,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin
PARTITION BY RANGE ( `id` ) (
  PARTITION p0 VALUES LESS THAN (6)
) AUTO_INCREMENT=4 COMMENT='testing' |
+-------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+

After:

+-------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| Table | Create Table                                                                                                                                                                                                                                                                   |
+-------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| t     | CREATE TABLE `t` (
  `a` int(11) DEFAULT NULL,
  `id` int(11) NOT NULL AUTO_INCREMENT,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin
PARTITION BY RANGE ( `id` ) (
  PARTITION p0 VALUES LESS THAN (6)
) AUTO_INCREMENT=4 COMMENT='testing' |
+-------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+

What is changed and how it works?

Update the position of display the partitions information.

Check List

Tests

  • Unit test

Related changes

  • Need to cherry-pick to the release branch

@zimulala zimulala added type/bugfix This PR fixes a bug. sig/execution SIG execution labels Jun 3, 2019
@codecov
Copy link

codecov bot commented Jun 3, 2019

Codecov Report

Merging #10685 into master will not change coverage.
The diff coverage is 100%.

@@             Coverage Diff             @@
##             master     #10685   +/-   ##
===========================================
  Coverage   78.3658%   78.3658%           
===========================================
  Files           414        414           
  Lines         87704      87704           
===========================================
  Hits          68730      68730           
+ Misses        13840      13839    -1     
- Partials       5134       5135    +1

1 similar comment
@codecov
Copy link

codecov bot commented Jun 3, 2019

Codecov Report

Merging #10685 into master will not change coverage.
The diff coverage is 100%.

@@             Coverage Diff             @@
##             master     #10685   +/-   ##
===========================================
  Coverage   78.3658%   78.3658%           
===========================================
  Files           414        414           
  Lines         87704      87704           
===========================================
  Hits          68730      68730           
+ Misses        13840      13839    -1     
- Partials       5134       5135    +1

@zimulala
Copy link
Contributor Author

zimulala commented Jun 3, 2019

Duplicated #10682

@zimulala zimulala closed this Jun 3, 2019
@zimulala zimulala deleted the show-partition branch June 3, 2019 14:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
sig/execution SIG execution type/bugfix This PR fixes a bug.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant