1
# Verify that CRC32() function returns a deterministic result
2
# when successively supplied with the same constant.
3
SELECT CRC32("I love testing");
4
SELECT CRC32("I love testing");
7
# Check that the hash of a constant is identical to the hash
8
# of the same constant stored in a table column.
11
DROP TABLE IF EXISTS t1;
15
some_text VARCHAR(100) NOT NULL
17
INSERT INTO t1 VALUES ("I love testing");
18
SELECT CRC32("I love testing") = CRC32(some_text) FROM t1;
20
# Check for error if no parameter provided
21
--error ER_WRONG_PARAMETERS_TO_NATIVE_FCT
23
--error ER_WRONG_PARAMETERS_TO_NATIVE_FCT
24
SELECT CRC32('foo','bar','zoo');
26
# Check that various inputs are processed correctly
29
SELECT CRC32(4294967295);
31
SELECT CRC32('taohuoahusoahusoa haneo uhnteoahu ntoahu saonhu aoeuoa hun');