1
0
mirror of https://github.com/MariaDB/server.git synced 2025-08-08 11:22:35 +03:00

tests: func_math, correct crc32 for mariadb

Differences:

MariaDB doesn't support a JSON type therefore the crc32 on those values
are different.

JSON extract syntax is different.

loaddata_utf8 has 3 duplicate lines removed compared to MySQL version.
This commit is contained in:
Daniel Black
2018-04-21 15:44:55 +10:00
committed by Sergey Vojtovich
parent 1a011e5b5a
commit 7f89d9c9e3
2 changed files with 8 additions and 12 deletions

View File

@@ -836,8 +836,8 @@ DROP TABLE IF EXISTS t1;
CREATE TABLE t1 (a JSON);
INSERT INTO t1 VALUES ('{"name" : "goodyear"}'),
('{"name" : "verygood-year"}');
SELECT a->>'$.name', CRC32(a) FROM t1;
SELECT CRC32(a->>'$.name') FROM t1 WHERE a->>'$.name' = 'goodyear';
SELECT a, CRC32(a) FROM t1;
SELECT CRC32(json_query(a, '$.name')) FROM t1 WHERE json_query(a, '$.name') = 'goodyear';
SELECT CRC32(REPLACE(JSON_EXTRACT(a, "$.name"),'\"',''))
FROM t1 WHERE JSON_EXTRACT(a, "$.name") = 'goodyear';
DROP TABLE t1;