1
0
mirror of https://github.com/mariadb-corporation/mariadb-columnstore-engine.git synced 2025-07-29 08:21:15 +03:00

Merge pull request #1891 from mariadb-SergeyZefirov/MCOL-4673-Regression-calShowPartition-returns-NA

Mcol 4673 regression cal show partition returns na
This commit is contained in:
Roman Nozdrin
2021-05-24 12:10:55 +03:00
committed by GitHub
6 changed files with 54 additions and 24 deletions

View File

@ -1,7 +1,6 @@
#
# MCOL-4614 calShowPartitions() precision loss for huge narrow decimal
#
CREATE FUNCTION calshowpartitions RETURNS STRING SONAME "ha_columnstore.so";
CREATE TABLE t1 (a DECIMAL(17,1)) ENGINE=ColumnStore;
INSERT INTO t1 VALUES (-8999999999999999.9);
SELECT * FROM t1 WHERE a=0;
@ -11,4 +10,3 @@ calshowpartitions('t1','a')
Part# Min Max Status
0.0.1 -8999999999999999.9 -8999999999999999.9 Enabled
DROP TABLE IF EXISTS t1;
DROP FUNCTION calshowpartitions;

View File

@ -1,11 +1,16 @@
--source include/testdb_only.inc
--source ../include/have_columnstore.inc
--echo #
--echo # MCOL-4614 calShowPartitions() precision loss for huge narrow decimal
--echo #
CREATE FUNCTION calshowpartitions RETURNS STRING SONAME "ha_columnstore.so";
let $func_exists=`SELECT COUNT(*) FROM mysql.func WHERE name='calshowpartitions'`;
--disable_query_log
if (!$func_exists)
{
CREATE FUNCTION calshowpartitions RETURNS STRING SONAME "ha_columnstore.so";
}
--enable_query_log
CREATE TABLE t1 (a DECIMAL(17,1)) ENGINE=ColumnStore;
INSERT INTO t1 VALUES (-8999999999999999.9);
@ -13,4 +18,9 @@ SELECT * FROM t1 WHERE a=0;
SELECT calshowpartitions('t1','a');
DROP TABLE IF EXISTS t1;
DROP FUNCTION calshowpartitions;
--disable_query_log
if (!$func_exists)
{
DROP FUNCTION calshowpartitions;
}
--enable_query_log