diff options
author | Vladislav Vaintroub <wlad@mariadb.com> | 2020-09-07 12:08:26 +0200 |
---|---|---|
committer | Vladislav Vaintroub <wlad@mariadb.com> | 2020-09-07 12:08:26 +0200 |
commit | 30ff61640375ab28abdf87e786d0ce9feb1a9027 (patch) | |
tree | 20dbc27ccbb326cc9e764a6650b6e7e54cf13b2c | |
parent | 2cc9e456933051506acfe20cda5b4fbf9c85c81c (diff) | |
download | mariadb-git-30ff61640375ab28abdf87e786d0ce9feb1a9027.tar.gz |
MDEV-23680 Assertion `data' failed in crcr32_calc_pclmulqdq
Fix DBUG_ASSERT
-rw-r--r-- | mysql-test/main/func_math.result | 6 | ||||
-rw-r--r-- | mysql-test/main/func_math.test | 5 | ||||
-rw-r--r-- | mysys/crc32/crc32_x86.c | 2 |
3 files changed, 12 insertions, 1 deletions
diff --git a/mysql-test/main/func_math.result b/mysql-test/main/func_math.result index 5da1ab02159..37188dab623 100644 --- a/mysql-test/main/func_math.result +++ b/mysql-test/main/func_math.result @@ -3591,5 +3591,11 @@ t2 CREATE TABLE `t2` ( ) ENGINE=MyISAM DEFAULT CHARSET=latin1 DROP TABLE t2, t1; # +# MDEV-23680 Assertion `data' failed in crcr32_calc_pclmulqdq +# +SELECT CRC32(ExtractValue('<a><b/></a>', '/a/b')) AS f; +f +0 +# # End of 10.5 tests # diff --git a/mysql-test/main/func_math.test b/mysql-test/main/func_math.test index 7f8fe9e7e73..6bce8bdaad6 100644 --- a/mysql-test/main/func_math.test +++ b/mysql-test/main/func_math.test @@ -1883,6 +1883,11 @@ CREATE TABLE t2 AS SELECT UUID_SHORT() - a FROM t1; SHOW CREATE TABLE t2; DROP TABLE t2, t1; +--echo # +--echo # MDEV-23680 Assertion `data' failed in crcr32_calc_pclmulqdq +--echo # +SELECT CRC32(ExtractValue('<a><b/></a>', '/a/b')) AS f; + --echo # --echo # End of 10.5 tests diff --git a/mysys/crc32/crc32_x86.c b/mysys/crc32/crc32_x86.c index 48c930e762e..1e5d2a0a089 100644 --- a/mysys/crc32/crc32_x86.c +++ b/mysys/crc32/crc32_x86.c @@ -219,7 +219,7 @@ static inline uint32_t crcr32_calc_pclmulqdq(const uint8_t *data, uint32_t data_ __m128i temp, fold, k; uint32_t n; - DBUG_ASSERT(data); + DBUG_ASSERT(data != NULL || data_len == 0); DBUG_ASSERT(params); if (unlikely(data_len == 0)) |