1
0
mirror of https://github.com/mariadb-corporation/mariadb-columnstore-engine.git synced 2025-07-30 19:23:07 +03:00

MCOL-4871 This patch adds relevant tests

This commit is contained in:
Roman Nozdrin
2021-12-17 12:51:42 +00:00
parent 7b5845a4aa
commit a31066ff0e
10 changed files with 1129 additions and 0 deletions

View File

@ -0,0 +1,32 @@
DELIMITER $$;
CREATE PROCEDURE show_extent_min_max(schema_arg VARCHAR(64),
table_arg VARCHAR(64),
column_arg VARCHAR(64))
BEGIN
SELECT
c.table_schema,
c.table_name,
c.column_name,
hex(CAST(e.min_value AS SIGNED)),
hex(CAST(e.max_value AS SIGNED))
FROM
information_schema.columnstore_extents e,
information_schema.columnstore_columns c
WHERE c.object_id=e.object_id
AND table_schema=schema_arg
AND table_name=table_arg
AND column_name=column_arg;
END;
$$
DELIMITER ;$$
DELIMITER $$;
CREATE FUNCTION caltrace_extract_block_diagnostics(msg TEXT CHARACTER SET utf8mb4)
RETURNS TEXT CHARACTER SET utf8mb4
BEGIN
RETURN CONCAT(regexp_substr(msg, '(BlocksTouched-[^;]*);'), ' ',
regexp_substr(msg, '(PartitionBlocksEliminated-[^;]*);'));
END;
$$
DELIMITER ;$$

View File

@ -0,0 +1,2 @@
DROP PROCEDURE show_extent_min_max;
DROP FUNCTION caltrace_extract_block_diagnostics;

View File

@ -0,0 +1,25 @@
#
# Functions calgettrace() and calsettrace():
# - normally exist when "mtr --extern" is running
# - do not exist when mtr without --extern is running
#
# This file creates the functions if they do not exist.
#
let $func_exists_calsettrace=`SELECT COUNT(*) FROM mysql.func WHERE name='calsettrace'`;
--disable_query_log
if (!$func_exists_calsettrace)
{
CREATE FUNCTION calsettrace RETURNS INTEGER SONAME "ha_columnstore.so";
}
--enable_query_log
let $func_exists_calgettrace=`SELECT COUNT(*) FROM mysql.func WHERE name='calgettrace'`;
--disable_query_log
if (!$func_exists_calgettrace)
{
CREATE FUNCTION calgettrace RETURNS STRING SONAME "ha_columnstore.so";
}
--enable_query_log

View File

@ -0,0 +1,13 @@
--disable_query_log
if (!$func_exists_calgettrace)
{
DROP FUNCTION calgettrace;
}
--enable_query_log
--disable_query_log
if (!$func_exists_calsettrace)
{
DROP FUNCTION calsettrace;
}
--enable_query_log