Skip to content

Commit 1cbe2ff

Browse files
committed
ha_mroonga: support HA_EXTRA_ABORT_ALTER_COPY for MariaDB >= 10.11.12
## Issue We got the following error when we built Mroonga with MariaDB. ``` /home/buildbot/storage/mroonga/ha_mroonga.cpp:471:10: error: enumeration value 'HA_EXTRA_ABORT_ALTER_COPY' not handled in switch [-Werror=switch] ``` ## Cause MariaDB 10.11.12 introduced a new `HA_EXTRA_ABORT_ALTER_COPY` operation for the ha_extra_function enum to handle aborting ALTER TABLE COPY operations. ## Solution This change adds support for this new operation. ref: MariaDB/server@f388222
1 parent 01f5470 commit 1cbe2ff

File tree

3 files changed

+10
-0
lines changed

3 files changed

+10
-0
lines changed

CMakeLists.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -339,6 +339,7 @@ else()
339339
mrn_build_flag("-Wall")
340340
mrn_build_flag("-Wextra")
341341
mrn_build_flag("-Wsuggest-override")
342+
mrn_build_flag("-Wswitch")
342343
mrn_build_flag("-Wno-unused-parameter")
343344
mrn_build_flag("-Wno-strict-aliasing")
344345
mrn_build_flag("-Wno-deprecated")

ha_mroonga.cpp

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -657,6 +657,11 @@ static const char* mrn_inspect_extra_function(enum ha_extra_function operation)
657657
case HA_EXTRA_END_ALTER_COPY:
658658
inspected = "HA_EXTRA_END_ALTER_COPY";
659659
break;
660+
# ifdef MRN_HAVE_HA_EXTRA_ABORT_ALTER_COPY
661+
case HA_EXTRA_ABORT_ALTER_COPY:
662+
inspected = "HA_EXTRA_ABORT_ALTER_COPY";
663+
break;
664+
# endif
660665
# ifdef MRN_HAVE_HA_EXTRA_NO_AUTOINC_LOCKING
661666
case HA_EXTRA_NO_AUTOINC_LOCKING:
662667
inspected = "HA_EXTRA_NO_AUTOINC_LOCKING";

ha_mroonga.hpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -97,6 +97,10 @@ extern "C" {
9797
# define MRN_HAVE_HA_EXTRA_NO_READ_LOCKING
9898
#endif
9999

100+
#if (defined(MRN_MARIADB_P) && MYSQL_VERSION_ID >= 101112)
101+
# define MRN_HAVE_HA_EXTRA_ABORT_ALTER_COPY
102+
#endif
103+
100104
#if (defined(MRN_MARIADB_P) && \
101105
((MYSQL_VERSION_ID >= 100600 && MYSQL_VERSION_ID < 100616) || \
102106
(MYSQL_VERSION_ID >= 101100 && MYSQL_VERSION_ID < 101106)))

0 commit comments

Comments
 (0)