Skip to content

Commit e7e313f

Browse files
grooverdansvoj
authored andcommitted
test case for CRC32() SQL function
1 parent 9c2215e commit e7e313f

File tree

2 files changed

+11
-0
lines changed

2 files changed

+11
-0
lines changed

mysql-test/r/func_math.result

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -805,3 +805,9 @@ STDDEV_POP(ROUND(0,@A:=2009))
805805
select 0=0, 0=-0, 0.0= -0.0, 0.0 = -(0.0), 0.0E1=-0.0E1, 0.0E1=-(0.0E1);
806806
0=0 0=-0 0.0= -0.0 0.0 = -(0.0) 0.0E1=-0.0E1 0.0E1=-(0.0E1)
807807
1 1 1 1 1 1
808+
#
809+
# CRC32 tests
810+
#
811+
select CRC32(NULL), CRC32(''), CRC32('MySQL'), CRC32('mysql'), CRC32('01234567'), CRC32('012345678');
812+
CRC32(NULL) CRC32('') CRC32('MySQL') CRC32('mysql') CRC32('01234567') CRC32('012345678')
813+
NULL 0 3259397556 2501908538 763378421 939184570

mysql-test/t/func_math.test

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -600,3 +600,8 @@ SELECT STDDEV_POP(ROUND(0,@A:=2009)) FROM (SELECT 1 UNION SELECT 2) fake_table;
600600
--echo # Test zero
601601
select 0=0, 0=-0, 0.0= -0.0, 0.0 = -(0.0), 0.0E1=-0.0E1, 0.0E1=-(0.0E1);
602602

603+
--echo #
604+
--echo # CRC32 tests
605+
--echo #
606+
607+
select CRC32(NULL), CRC32(''), CRC32('MySQL'), CRC32('mysql'), CRC32('01234567'), CRC32('012345678');

0 commit comments

Comments
 (0)