mariadb/mysql-test/suite/sysschema/t/fn_format_bytes.test
2024-11-26 13:10:01 +04:00

37 lines
932 B
Text

-- source include/not_embedded.inc
# Tests for sys schema
# Verify the sys.format_bytes() function perfoms as expected
# Various protocols display ER_NATIVE_FCT_NAME_COLLISION very differently.
# Disable all of them.
--disable_ps_protocol
--disable_cursor_protocol
--disable_view_protocol
# 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);