summaryrefslogtreecommitdiffstats
path: root/mysql-test/suite/sysschema/t/fn_format_bytes.test
blob: 418c85c705112a8e8592e74b6dce9839b084a946 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
-- source include/not_embedded.inc
# Tests for sys schema
# Verify the sys.format_bytes() function perfoms as expected

# Passing NULL/nothing should return NULL
SELECT sys.format_bytes(NULL);

# Format bytes
SELECT sys.format_bytes(1);
SELECT sys.format_bytes(1023);

# Format kilobytes
SELECT sys.format_bytes(1024);
SELECT sys.format_bytes(1048575);

# Format megabytes
SELECT sys.format_bytes(1048576);
SELECT sys.format_bytes(1073741823);

# Format gigabytes
SELECT sys.format_bytes(1073741824);
SELECT sys.format_bytes(1099511627775);

# Format terabytes
SELECT sys.format_bytes(1099511627776);
SELECT sys.format_bytes(1125899906842623);

# Formate petabytes
SELECT sys.format_bytes(1125899906842624);
SELECT sys.format_bytes(1125899906842624238947293);