From 91fe87c7a872ba6c14850bad72b8ec99d383b38d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marko=20M=C3=A4kel=C3=A4?= Date: Wed, 27 Oct 2021 08:41:11 +0300 Subject: [PATCH] MDEV-22166: Fix cmake -DPLUGIN_PARTITION=NO mysql_write_frm(): Correctly enclose code inside #ifdef WITH_PARTITION_STORAGE_ENGINE so that cmake -DPLUGIN_PARTITION=NO builds can succeed. This was broken in commit b7bba721eee42af892178a747fa72a6fc2975c94. --- sql/sql_table.cc | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/sql/sql_table.cc b/sql/sql_table.cc index 76671c3e8ea..c2b73ea4e2b 100644 --- a/sql/sql_table.cc +++ b/sql/sql_table.cc @@ -722,10 +722,10 @@ bool mysql_write_frm(ALTER_PARTITION_PARAM_TYPE *lpt, uint flags) char path[FN_REFLEN+1]; char shadow_path[FN_REFLEN+1]; char shadow_frm_name[FN_REFLEN+1]; - char bak_path[FN_REFLEN+1]; - char bak_frm_name[FN_REFLEN+1]; char frm_name[FN_REFLEN+1]; #ifdef WITH_PARTITION_STORAGE_ENGINE + char bak_path[FN_REFLEN+1]; + char bak_frm_name[FN_REFLEN+1]; char *part_syntax_buf; uint syntax_len; partition_info *part_info= lpt->part_info; @@ -872,8 +872,8 @@ bool mysql_write_frm(ALTER_PARTITION_PARAM_TYPE *lpt, uint flags) CHF_RENAME_FLAG)) DBUG_RETURN(TRUE); } -#else /* !WITH_PARTITION_STORAGE_ENGINE */ DBUG_ASSERT(!(flags & WFRM_WRITE_EXTRACTED)); +#else /* !WITH_PARTITION_STORAGE_ENGINE */ DBUG_ASSERT(!(flags & WFRM_BACKUP_ORIGINAL)); #endif /* !WITH_PARTITION_STORAGE_ENGINE */ if (flags & WFRM_INSTALL_SHADOW)