1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
|
#
# Verify that MD5() function returns a deterministic result
# when successively supplied with the same constant.
#
SELECT MD5("I love testing");
SELECT MD5("I love testing");
#
# Check that the hash of a constant is identical to the hash
# of the same constant stored in a table column.
#
--disable_warnings
DROP TABLE IF EXISTS t1;
--enable_warnings
CREATE TABLE t1
(
some_text VARCHAR(100) NOT NULL
);
INSERT INTO t1 VALUES ("I love testing");
SELECT MD5("I love testing") = MD5(some_text) FROM t1;
DROP TABLE t1;
|