From 68f60cd695333372ff602b3030f5d6b7399ec375 Mon Sep 17 00:00:00 2001 From: Timofey Turenko Date: Tue, 17 Jun 2025 00:18:38 +0300 Subject: [PATCH] Add functions including into MTR tests --- .../t/MCOL-5572-autoincrement-filtering.test | 1 + .../columnstore/basic/t/cal_named_udfs.test | 1 + .../basic/t/mcs98_moda_function.test | 1 + .../columnstore/bugfixes/mcol_4465.test | 1 + mysql-test/columnstore/include/functions.inc | 63 +++++++++++++++++++ 5 files changed, 67 insertions(+) create mode 100644 mysql-test/columnstore/include/functions.inc diff --git a/mysql-test/columnstore/basic/t/MCOL-5572-autoincrement-filtering.test b/mysql-test/columnstore/basic/t/MCOL-5572-autoincrement-filtering.test index 513d41df7..de9d88014 100644 --- a/mysql-test/columnstore/basic/t/MCOL-5572-autoincrement-filtering.test +++ b/mysql-test/columnstore/basic/t/MCOL-5572-autoincrement-filtering.test @@ -1,4 +1,5 @@ --source ../include/have_columnstore.inc +--source ../include/functions.inc SET default_storage_engine=columnstore; diff --git a/mysql-test/columnstore/basic/t/cal_named_udfs.test b/mysql-test/columnstore/basic/t/cal_named_udfs.test index f127716d2..d097511b8 100644 --- a/mysql-test/columnstore/basic/t/cal_named_udfs.test +++ b/mysql-test/columnstore/basic/t/cal_named_udfs.test @@ -1,4 +1,5 @@ -- source ../include/have_columnstore.inc +--source ../include/functions.inc --disable_warnings DROP DATABASE IF EXISTS cal_test_db; diff --git a/mysql-test/columnstore/basic/t/mcs98_moda_function.test b/mysql-test/columnstore/basic/t/mcs98_moda_function.test index 5d70bf61a..148f355b4 100644 --- a/mysql-test/columnstore/basic/t/mcs98_moda_function.test +++ b/mysql-test/columnstore/basic/t/mcs98_moda_function.test @@ -4,6 +4,7 @@ # # Test MODA with various numeric types -- source ../include/have_columnstore.inc +--source ../include/functions.inc --disable_warnings DROP DATABASE IF EXISTS mcs98_db; --enable_warnings diff --git a/mysql-test/columnstore/bugfixes/mcol_4465.test b/mysql-test/columnstore/bugfixes/mcol_4465.test index 59f078ca1..25503f6d5 100644 --- a/mysql-test/columnstore/bugfixes/mcol_4465.test +++ b/mysql-test/columnstore/bugfixes/mcol_4465.test @@ -1,4 +1,5 @@ --source ../include/have_columnstore.inc +--source ../include/functions.inc --disable_warnings DROP DATABASE IF EXISTS mcol_4465; --enable_warnings diff --git a/mysql-test/columnstore/include/functions.inc b/mysql-test/columnstore/include/functions.inc new file mode 100644 index 000000000..9d9602aa3 --- /dev/null +++ b/mysql-test/columnstore/include/functions.inc @@ -0,0 +1,63 @@ +--disable_query_log +CREATE OR REPLACE FUNCTION mcsgetstats RETURNS STRING SONAME 'ha_columnstore.so'; +CREATE OR REPLACE FUNCTION calgetstats RETURNS STRING SONAME 'ha_columnstore.so'; +CREATE OR REPLACE FUNCTION mcssettrace RETURNS INTEGER SONAME 'ha_columnstore.so'; +CREATE OR REPLACE FUNCTION calsettrace RETURNS INTEGER SONAME 'ha_columnstore.so'; +CREATE OR REPLACE FUNCTION mcssetparms RETURNS STRING SONAME 'ha_columnstore.so'; +CREATE OR REPLACE FUNCTION calsetparms RETURNS STRING SONAME 'ha_columnstore.so'; +CREATE OR REPLACE FUNCTION mcsflushcache RETURNS INTEGER SONAME 'ha_columnstore.so'; +CREATE OR REPLACE FUNCTION calflushcache RETURNS INTEGER SONAME 'ha_columnstore.so'; +CREATE OR REPLACE FUNCTION mcsgettrace RETURNS STRING SONAME 'ha_columnstore.so'; +CREATE OR REPLACE FUNCTION calgettrace RETURNS STRING SONAME 'ha_columnstore.so'; +CREATE OR REPLACE FUNCTION mcsgetversion RETURNS STRING SONAME 'ha_columnstore.so'; +CREATE OR REPLACE FUNCTION calgetversion RETURNS STRING SONAME 'ha_columnstore.so'; +CREATE OR REPLACE FUNCTION calonlinealter RETURNS INTEGER SONAME 'ha_columnstore.so'; +CREATE OR REPLACE FUNCTION mcsviewtablelock RETURNS STRING SONAME 'ha_columnstore.so'; +CREATE OR REPLACE FUNCTION calviewtablelock RETURNS STRING SONAME 'ha_columnstore.so'; +CREATE OR REPLACE FUNCTION mcscleartablelock RETURNS STRING SONAME 'ha_columnstore.so'; +CREATE OR REPLACE FUNCTION calcleartablelock RETURNS STRING SONAME 'ha_columnstore.so'; +CREATE OR REPLACE FUNCTION mcslastinsertid RETURNS INTEGER SONAME 'ha_columnstore.so'; +CREATE OR REPLACE FUNCTION callastinsertid RETURNS INTEGER SONAME 'ha_columnstore.so'; +CREATE OR REPLACE FUNCTION mcsgetsqlcount RETURNS STRING SONAME 'ha_columnstore.so'; +CREATE OR REPLACE FUNCTION calgetsqlcount RETURNS STRING SONAME 'ha_columnstore.so'; +CREATE OR REPLACE FUNCTION idbpm RETURNS INTEGER SONAME 'ha_columnstore.so'; +CREATE OR REPLACE FUNCTION idbdbroot RETURNS INTEGER SONAME 'ha_columnstore.so'; +CREATE OR REPLACE FUNCTION idbsegment RETURNS INTEGER SONAME 'ha_columnstore.so'; +CREATE OR REPLACE FUNCTION idbsegmentdir RETURNS INTEGER SONAME 'ha_columnstore.so'; +CREATE OR REPLACE FUNCTION idbextentrelativerid RETURNS INTEGER SONAME 'ha_columnstore.so'; +CREATE OR REPLACE FUNCTION idbblockid RETURNS INTEGER SONAME 'ha_columnstore.so'; +CREATE OR REPLACE FUNCTION idbextentid RETURNS INTEGER SONAME 'ha_columnstore.so'; +CREATE OR REPLACE FUNCTION idbextentmin RETURNS STRING SONAME 'ha_columnstore.so'; +CREATE OR REPLACE FUNCTION idbextentmax RETURNS STRING SONAME 'ha_columnstore.so'; +CREATE OR REPLACE FUNCTION idbpartition RETURNS STRING SONAME 'ha_columnstore.so'; +CREATE OR REPLACE FUNCTION idblocalpm RETURNS INTEGER SONAME 'ha_columnstore.so'; +CREATE OR REPLACE FUNCTION mcssystemready RETURNS INTEGER SONAME 'ha_columnstore.so'; +CREATE OR REPLACE FUNCTION mcssystemreadonly RETURNS INTEGER SONAME 'ha_columnstore.so'; +CREATE OR REPLACE FUNCTION mcssystemprimary RETURNS INTEGER SONAME 'ha_columnstore.so'; +CREATE OR REPLACE FUNCTION mcs_emindex_size RETURNS INTEGER SONAME 'ha_columnstore.so'; +CREATE OR REPLACE FUNCTION mcs_emindex_free RETURNS INTEGER SONAME 'ha_columnstore.so'; +CREATE OR REPLACE FUNCTION columnstore_dataload RETURNS STRING SONAME 'ha_columnstore.so'; +CREATE OR REPLACE AGGREGATE FUNCTION regr_avgx RETURNS REAL SONAME 'libregr_mysql.so'; +CREATE OR REPLACE AGGREGATE FUNCTION regr_avgy RETURNS REAL SONAME 'libregr_mysql.so'; +CREATE OR REPLACE AGGREGATE FUNCTION regr_count RETURNS INTEGER SONAME 'libregr_mysql.so'; +CREATE OR REPLACE AGGREGATE FUNCTION regr_slope RETURNS REAL SONAME 'libregr_mysql.so'; +CREATE OR REPLACE AGGREGATE FUNCTION regr_intercept RETURNS REAL SONAME 'libregr_mysql.so'; +CREATE OR REPLACE AGGREGATE FUNCTION regr_r2 RETURNS REAL SONAME 'libregr_mysql.so'; +CREATE OR REPLACE AGGREGATE FUNCTION corr RETURNS REAL SONAME 'libregr_mysql.so'; +CREATE OR REPLACE AGGREGATE FUNCTION regr_sxx RETURNS REAL SONAME 'libregr_mysql.so'; +CREATE OR REPLACE AGGREGATE FUNCTION regr_syy RETURNS REAL SONAME 'libregr_mysql.so'; +CREATE OR REPLACE AGGREGATE FUNCTION regr_sxy RETURNS REAL SONAME 'libregr_mysql.so'; +CREATE OR REPLACE AGGREGATE FUNCTION covar_pop RETURNS REAL SONAME 'libregr_mysql.so'; +CREATE OR REPLACE AGGREGATE FUNCTION covar_samp RETURNS REAL SONAME 'libregr_mysql.so'; +CREATE OR REPLACE AGGREGATE FUNCTION distinct_count RETURNS INTEGER SONAME 'libudf_mysql.so'; +CREATE OR REPLACE FUNCTION caldisablepartitions RETURNS STRING SONAME 'ha_columnstore.so'; +CREATE OR REPLACE FUNCTION calenablepartitions RETURNS STRING SONAME 'ha_columnstore.so'; +CREATE OR REPLACE FUNCTION caldroppartitions RETURNS STRING SONAME 'ha_columnstore.so'; +CREATE OR REPLACE FUNCTION calshowpartitions RETURNS STRING SONAME 'ha_columnstore.so'; +CREATE OR REPLACE FUNCTION caldroppartitionsbyvalue RETURNS STRING SONAME 'ha_columnstore.so'; +CREATE OR REPLACE FUNCTION caldisablepartitionsbyvalue RETURNS STRING SONAME 'ha_columnstore.so'; +CREATE OR REPLACE FUNCTION calenablepartitionsbyvalue RETURNS STRING SONAME 'ha_columnstore.so'; +CREATE OR REPLACE FUNCTION calshowpartitionsbyvalue RETURNS STRING SONAME 'ha_columnstore.so'; +CREATE OR REPLACE AGGREGATE FUNCTION moda RETURNS STRING SONAME 'libregr_mysql.so'; +CREATE OR REPLACE FUNCTION mcs_set_ddldebug_level RETURNS STRING SONAME 'ha_columnstore.so'; +--enable_query_log