mirror of
https://github.com/mariadb-corporation/mariadb-columnstore-engine.git
synced 2025-04-18 21:44:02 +03:00
47 lines
2.7 KiB
Plaintext
47 lines
2.7 KiB
Plaintext
# -------------------------------------------------------------- #
|
|
# Test case migrated from regression test suite: bug3488.sql
|
|
#
|
|
# Author: Daniel Lee, daniel.lee@mariadb.com
|
|
# -------------------------------------------------------------- #
|
|
#
|
|
--source ../include/have_columnstore.inc
|
|
#
|
|
USE tpch1;
|
|
#
|
|
--disable_warnings
|
|
drop table if exists bug3488;
|
|
--enable_warnings
|
|
|
|
create table bug3488 (c1 bigint, c2 decimal(18,2), c3 float, c4 double, c5 char(120), c6 varchar(120)) engine=columnstore;
|
|
insert into bug3488 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, format(c1, -2), format(c1, 0), format(c1, 2) from bug3488;
|
|
select c2, format(c2, -2), format(c2, 0), format(c2, 2) from bug3488;
|
|
select c4, format(c4, -2), format(c4, 0), format(c4, 2) from bug3488;
|
|
select c5, format(c5, -2), format(c5, 0), format(c5, 2) from bug3488;
|
|
select c6, format(c6, -2), format(c6, 0), format(c6, 2) from bug3488;
|
|
|
|
select c1, format(c1, -2), format(c1, 0), format(c1, 2) from (select * from bug3488) sub;
|
|
select c2, format(c2, -2), format(c2, 0), format(c2, 2) from (select * from bug3488) sub;
|
|
select c4, format(c4, -2), format(c4, 0), format(c4, 2) from (select * from bug3488) sub;
|
|
select c5, format(c5, -2), format(c5, 0), format(c5, 2) from (select * from bug3488) sub;
|
|
select c6, format(c6, -2), format(c6, 0), format(c6, 2) from (select * from bug3488) sub;
|
|
|
|
--disable_warnings
|
|
drop table bug3488;
|
|
--enable_warnings
|
|
#
|
|
|