|
1 | 1 | /*
|
2 |
| - Copyright (c) 2000, 2016, Oracle and/or its affiliates. All rights reserved. |
| 2 | + Copyright (c) 2000, 2018, Oracle and/or its affiliates. All rights reserved. |
3 | 3 |
|
4 | 4 | This program is free software; you can redistribute it and/or modify
|
5 | 5 | it under the terms of the GNU General Public License as published by
|
@@ -4670,56 +4670,47 @@ opt_part_values:
|
4670 | 4670 | {
|
4671 | 4671 | LEX *lex= Lex;
|
4672 | 4672 | partition_info *part_info= lex->part_info;
|
4673 |
| - if (! lex->is_partition_management()) |
| 4673 | + if (part_info->part_type == NOT_A_PARTITION) |
| 4674 | + part_info->part_type= HASH_PARTITION; |
| 4675 | + else if (part_info->part_type == RANGE_PARTITION) |
4674 | 4676 | {
|
4675 |
| - if (part_info->part_type == RANGE_PARTITION) |
4676 |
| - { |
4677 |
| - my_error(ER_PARTITION_REQUIRES_VALUES_ERROR, MYF(0), |
4678 |
| - "RANGE", "LESS THAN"); |
4679 |
| - MYSQL_YYABORT; |
4680 |
| - } |
4681 |
| - if (part_info->part_type == LIST_PARTITION) |
4682 |
| - { |
4683 |
| - my_error(ER_PARTITION_REQUIRES_VALUES_ERROR, MYF(0), |
4684 |
| - "LIST", "IN"); |
4685 |
| - MYSQL_YYABORT; |
4686 |
| - } |
| 4677 | + my_error(ER_PARTITION_REQUIRES_VALUES_ERROR, MYF(0), |
| 4678 | + "RANGE", "LESS THAN"); |
| 4679 | + MYSQL_YYABORT; |
| 4680 | + } |
| 4681 | + else if (part_info->part_type == LIST_PARTITION) |
| 4682 | + { |
| 4683 | + my_error(ER_PARTITION_REQUIRES_VALUES_ERROR, MYF(0), |
| 4684 | + "LIST", "IN"); |
| 4685 | + MYSQL_YYABORT; |
4687 | 4686 | }
|
4688 |
| - else |
4689 |
| - part_info->part_type= HASH_PARTITION; |
4690 | 4687 | }
|
4691 | 4688 | | VALUES LESS_SYM THAN_SYM
|
4692 | 4689 | {
|
4693 | 4690 | LEX *lex= Lex;
|
4694 | 4691 | partition_info *part_info= lex->part_info;
|
4695 |
| - if (! lex->is_partition_management()) |
| 4692 | + if (part_info->part_type == NOT_A_PARTITION) |
| 4693 | + part_info->part_type= RANGE_PARTITION; |
| 4694 | + else if (part_info->part_type != RANGE_PARTITION) |
4696 | 4695 | {
|
4697 |
| - if (part_info->part_type != RANGE_PARTITION) |
4698 |
| - { |
4699 |
| - my_error(ER_PARTITION_WRONG_VALUES_ERROR, MYF(0), |
4700 |
| - "RANGE", "LESS THAN"); |
4701 |
| - MYSQL_YYABORT; |
4702 |
| - } |
| 4696 | + my_error(ER_PARTITION_WRONG_VALUES_ERROR, MYF(0), |
| 4697 | + "RANGE", "LESS THAN"); |
| 4698 | + MYSQL_YYABORT; |
4703 | 4699 | }
|
4704 |
| - else |
4705 |
| - part_info->part_type= RANGE_PARTITION; |
4706 | 4700 | }
|
4707 | 4701 | part_func_max {}
|
4708 | 4702 | | VALUES IN_SYM
|
4709 | 4703 | {
|
4710 | 4704 | LEX *lex= Lex;
|
4711 | 4705 | partition_info *part_info= lex->part_info;
|
4712 |
| - if (! lex->is_partition_management()) |
| 4706 | + if (part_info->part_type == NOT_A_PARTITION) |
| 4707 | + part_info->part_type= LIST_PARTITION; |
| 4708 | + else if (part_info->part_type != LIST_PARTITION) |
4713 | 4709 | {
|
4714 |
| - if (part_info->part_type != LIST_PARTITION) |
4715 |
| - { |
4716 |
| - my_error(ER_PARTITION_WRONG_VALUES_ERROR, MYF(0), |
4717 |
| - "LIST", "IN"); |
4718 |
| - MYSQL_YYABORT; |
4719 |
| - } |
| 4710 | + my_error(ER_PARTITION_WRONG_VALUES_ERROR, MYF(0), |
| 4711 | + "LIST", "IN"); |
| 4712 | + MYSQL_YYABORT; |
4720 | 4713 | }
|
4721 |
| - else |
4722 |
| - part_info->part_type= LIST_PARTITION; |
4723 | 4714 | }
|
4724 | 4715 | part_values_in {}
|
4725 | 4716 | ;
|
|
0 commit comments