You've already forked mariadb-columnstore-engine
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:
32
mysql-test/columnstore/include/ctype_extent_proc_create.inc
Normal file
32
mysql-test/columnstore/include/ctype_extent_proc_create.inc
Normal 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 ;$$
|
@ -0,0 +1,2 @@
|
||||
DROP PROCEDURE show_extent_min_max;
|
||||
DROP FUNCTION caltrace_extract_block_diagnostics;
|
@ -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
|
||||
|
@ -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
|
Reference in New Issue
Block a user