summaryrefslogtreecommitdiff
path: root/sql/sql_yacc.yy
diff options
context:
space:
mode:
authorAleksey Midenkov <midenok@gmail.com>2022-11-11 14:37:40 +0300
committerAleksey Midenkov <midenok@gmail.com>2022-11-11 20:54:20 +0300
commit0e6f2757d11502d74d21e4a75fa5247fc3334024 (patch)
tree77a747f319d4ebfc40e6f53740fe10bba15331f6 /sql/sql_yacc.yy
parent08e2c98ec81d6fb23b0a8079107d4c74d3a8ec02 (diff)
downloadmariadb-git-0e6f2757d11502d74d21e4a75fa5247fc3334024.tar.gz
MDEV-29841 More descriptive text for ER_PARTITION_WRONG_TYPEbb-10.7-midenok
For commands (1) alter table t1 add partition (partition p2); (2) alter table t1 add partition (partition px history); It printed the same error message: Wrong partitioning type, expected type: `SYSTEM_TIME` For (1) it is not clear from the syntax that we are trying to add HASH partition. For (2) it is not clear that the table partitioning is different than SYSTEM_TIME. Now it prints what type we are trying to add to what type of partitioning. Fixed warning unused function rename_field_in_list() for compilation without partitioning.
Diffstat (limited to 'sql/sql_yacc.yy')
-rw-r--r--sql/sql_yacc.yy4
1 files changed, 4 insertions, 0 deletions
diff --git a/sql/sql_yacc.yy b/sql/sql_yacc.yy
index 7bf3429642b..99c17b5bbf9 100644
--- a/sql/sql_yacc.yy
+++ b/sql/sql_yacc.yy
@@ -4815,13 +4815,17 @@ opt_part_values:
part_values_in {}
| CURRENT_SYM
{
+#ifdef WITH_PARTITION_STORAGE_ENGINE
if (Lex->part_values_current(thd))
MYSQL_YYABORT;
+#endif
}
| HISTORY_SYM
{
+#ifdef WITH_PARTITION_STORAGE_ENGINE
if (Lex->part_values_history(thd))
MYSQL_YYABORT;
+#endif
}
| DEFAULT
{