ClickHouse/tests/queries/0_stateless/02012_sha512_fixedstring.sql
Bharat Nallan Chakravarthy 23ef9e4770 add tests
2023-12-07 08:57:57 -08:00

22 lines
462 B
SQL

-- Tags: no-fasttest
-- Tag no-fasttest: Depends on OpenSSL
SELECT hex(SHA512(''));
SELECT hex(SHA512('abc'));
SELECT hex(SHA512_256(''));
SELECT hex(SHA512_256('abc'));
DROP TABLE IF EXISTS defaults;
CREATE TABLE defaults
(
s FixedString(20)
)ENGINE = Memory();
INSERT INTO defaults SELECT s FROM generateRandom('s FixedString(20)', 1, 1, 1) LIMIT 20;
SELECT hex(SHA512(s)) FROM defaults;
SELECT hex(SHA512_256(s)) FROM defaults;
DROP TABLE defaults;