mirror of
https://github.com/mariadb-corporation/mariadb-columnstore-engine.git
synced 2025-04-26 11:48:52 +03:00
41 lines
2.2 KiB
Plaintext
41 lines
2.2 KiB
Plaintext
# -------------------------------------------------------------- #
|
|
# Test case migrated from regression test suite: bug3483.sql
|
|
#
|
|
# Author: Daniel Lee, daniel.lee@mariadb.com
|
|
# -------------------------------------------------------------- #
|
|
#
|
|
--source ../include/have_columnstore.inc
|
|
#
|
|
USE tpch1;
|
|
#
|
|
--disable_warnings
|
|
drop table if exists bug3483;
|
|
--enable_warnings
|
|
|
|
create table bug3483 (c1 bigint, c2 decimal(18,2), c3 float, c4 double, c5 char(120), c6 varchar(120)) engine=columnstore;
|
|
insert into bug3483 values
|
|
(1, 1.1, 1.1, 1.1, '1.1', '1.1'),
|
|
(1234567890, 1234567890.1, 1234567890.1, 1234567890.1, '1234567890.1', '1234567890.1'),
|
|
(1234567890, 1234567890.8, 1234567890.8, 1234567890.8, '1234567890.8', '1234567890.8'),
|
|
(1.234567890e10, 1.2345678901e10, 1.2345678901e10, 1.2345678901e10, '1.2345678901e10', '1.2345678901e10'),
|
|
(1234567890, 1234567890123456.78, 1.2345678901e20, 1.2345678901e208, '12345678901234567890', '12345678901234567890'),
|
|
(1234567890, 1234567890987654.32, 1.2345678901e38, 1.2345678901e308, '12345678901234567890123456789012345678901234567890', '1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890'),
|
|
(-1, -1.1, -1.1, -1.1, '-1.1', '-1.1'),
|
|
(-1234567890, -1234567890.1, -1234567890.1, -1234567890.1, '-1234567890.1', '-1234567890.1'),
|
|
(-1234567890, -1234567890.8, -1234567890.8, -1234567890.8, '-1234567890.8', '-1234567890.8'),
|
|
(-1.234567890e10, -1.2345678901e10, -1.2345678901e10, -1.2345678901e10, '-1.2345678901e10', '-1.2345678901e10'),
|
|
(-1234567890, -1234567890123456.78, -1.2345678901e20, -1.2345678901e208, '-12345678901234567890', '-12345678901234567890'),
|
|
(-1234567890, -1234567890987654.32, -1.2345678901e38, -1.2345678901e308, '-12345678901234567890123456789012345678901234567890', '-1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890');
|
|
|
|
select c1, ceil(c1), ceiling(c1), floor(c1), truncate(c1, 2) from bug3483;
|
|
select c2, ceil(c2), ceiling(c2), floor(c2), truncate(c2, 2) from bug3483;
|
|
select c4, ceil(c4), ceiling(c4), floor(c4) from bug3483;
|
|
select c5, ceil(c5), ceiling(c5), floor(c5), truncate(c5, 2) from bug3483;
|
|
select c6, ceil(c6), ceiling(c6), floor(c6), truncate(c6, 2) from bug3483;
|
|
|
|
--disable_warnings
|
|
drop table bug3483;
|
|
--enable_warnings
|
|
#
|
|
|