From 1087b3d2f76db3d2b703f37f193b19515a026ed2 Mon Sep 17 00:00:00 2001 From: Lloyd-Pottiger Date: Sun, 6 Nov 2022 10:55:11 +0800 Subject: [PATCH 1/4] degrader to armv8.0 Signed-off-by: Lloyd-Pottiger --- cmake/cpu_features.cmake | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/cmake/cpu_features.cmake b/cmake/cpu_features.cmake index 1e2bdf8122e..b051f55e039 100644 --- a/cmake/cpu_features.cmake +++ b/cmake/cpu_features.cmake @@ -36,7 +36,8 @@ if (ARCH_AARCH64) # [1] https://en.wikipedia.org/wiki/AArch64 option (TIFLASH_ENABLE_ASIMD_SUPPORT "Enable Advanced SIMD support." ON) option (TIFLASH_ENABLE_SVE_SUPPORT "Enable Scalable Vector Extension support." OFF) - option (NO_ARMV81_OR_HIGHER "Disable ARMv8.1 or higher on Aarch64 for maximum compatibility with older/embedded hardware." OFF) + # TODO: default ON, to be changed after CI is updated + option (NO_ARMV81_OR_HIGHER "Disable ARMv8.1 or higher on Aarch64 for maximum compatibility with older/embedded hardware." ON) if (NO_ARMV81_OR_HIGHER) # crc32 is optional in v8.0 and mandatory in v8.1. Enable it as __crc32()* is used in lot's of places and even very old ARM CPUs From b6debe14103d6c4f654edf6a0182f0839f21f07d Mon Sep 17 00:00:00 2001 From: Lloyd-Pottiger Date: Sun, 6 Nov 2022 12:07:55 +0800 Subject: [PATCH 2/4] use asimd default Signed-off-by: Lloyd-Pottiger --- cmake/cpu_features.cmake | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/cmake/cpu_features.cmake b/cmake/cpu_features.cmake index b051f55e039..237605d836e 100644 --- a/cmake/cpu_features.cmake +++ b/cmake/cpu_features.cmake @@ -42,7 +42,12 @@ if (ARCH_AARCH64) if (NO_ARMV81_OR_HIGHER) # crc32 is optional in v8.0 and mandatory in v8.1. Enable it as __crc32()* is used in lot's of places and even very old ARM CPUs # support it. - set (COMPILER_FLAGS "${COMPILER_FLAGS} -march=armv8+crc") + set (TEST_FLAG "-march=armv8+crc") + if (TIFLASH_ENABLE_ASIMD_SUPPORT) + set (TEST_FLAG "${TEST_FLAG}+simd") + add_definitions(-DTIFLASH_ENABLE_ASIMD_SUPPORT=1) + endif () + set (COMPILER_FLAGS "${COMPILER_FLAGS} ${TEST_FLAG}") else () # ARMv8.2 is quite ancient but the lowest common denominator supported by both Graviton 2 and 3 processors [1]. In particular, it # includes LSE (made mandatory with ARMv8.1) which provides nice speedups without having to fall back to compat flag From b824d8cb255df8d2e628f2da7d753883296d8635 Mon Sep 17 00:00:00 2001 From: Lloyd-Pottiger Date: Sun, 6 Nov 2022 21:23:28 +0800 Subject: [PATCH 3/4] set COMPILER_FLAGS directly Signed-off-by: Lloyd-Pottiger --- cmake/cpu_features.cmake | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/cmake/cpu_features.cmake b/cmake/cpu_features.cmake index 237605d836e..4d09329bf97 100644 --- a/cmake/cpu_features.cmake +++ b/cmake/cpu_features.cmake @@ -42,12 +42,11 @@ if (ARCH_AARCH64) if (NO_ARMV81_OR_HIGHER) # crc32 is optional in v8.0 and mandatory in v8.1. Enable it as __crc32()* is used in lot's of places and even very old ARM CPUs # support it. - set (TEST_FLAG "-march=armv8+crc") + set (COMPILER_FLAGS "${COMPILER_FLAGS} -march=armv8+crc") if (TIFLASH_ENABLE_ASIMD_SUPPORT) - set (TEST_FLAG "${TEST_FLAG}+simd") + set (COMPILER_FLAGS "${COMPILER_FLAGS}+simd") add_definitions(-DTIFLASH_ENABLE_ASIMD_SUPPORT=1) endif () - set (COMPILER_FLAGS "${COMPILER_FLAGS} ${TEST_FLAG}") else () # ARMv8.2 is quite ancient but the lowest common denominator supported by both Graviton 2 and 3 processors [1]. In particular, it # includes LSE (made mandatory with ARMv8.1) which provides nice speedups without having to fall back to compat flag From d2ff65a167a12036a3da3e53a8115fcb0d722581 Mon Sep 17 00:00:00 2001 From: Lloyd-Pottiger Date: Sun, 6 Nov 2022 21:41:28 +0800 Subject: [PATCH 4/4] fix fullstack-test Signed-off-by: Lloyd-Pottiger --- tests/fullstack-test2/ddl/alter_pk.test | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/fullstack-test2/ddl/alter_pk.test b/tests/fullstack-test2/ddl/alter_pk.test index a2403013157..0fd62ea4f05 100644 --- a/tests/fullstack-test2/ddl/alter_pk.test +++ b/tests/fullstack-test2/ddl/alter_pk.test @@ -62,7 +62,7 @@ mysql> alter table test.t drop primary key; mysql> drop table if exists test.t_case; ## create table with `source` is nullable ## insert some data and left `source` to be empty -mysql> create table test.t_case (`case_no` varchar(32) not null,`source` varchar(20) default null,`p` varchar(12) DEFAULT NULL,primary key (`case_no`)); +mysql> create table test.t_case (`case_no` varchar(32) not null,`source` varchar(20) default null,`p` varchar(12) DEFAULT NULL,primary key (`case_no`) NONCLUSTERED); mysql> insert into test.t_case(case_no) values ("1"), ("2"), ("3"), ("4"); ## drop the primary key, fill the `source` to be non-empty @@ -88,7 +88,7 @@ mysql> select case_no,p,source from test.t_case; # issue 5859, case 2 mysql> drop table if exists test.t_case; ## create table with `case_no` -mysql> create table test.t_case (`case_no` varchar(32) not null,`p` varchar(12) DEFAULT NULL,primary key (`case_no`)); +mysql> create table test.t_case (`case_no` varchar(32) not null,`p` varchar(12) DEFAULT NULL,primary key (`case_no`) NONCLUSTERED); mysql> insert into test.t_case(case_no) values ("1"), ("2"), ("3"), ("4"); mysql> alter table test.t_case add column `source` varchar(20) not null;