You've already forked mariadb-columnstore-engine
mirror of
https://github.com/mariadb-corporation/mariadb-columnstore-engine.git
synced 2025-08-01 06:46:55 +03:00
MCOL-4674 Fix ColumnStore to run MTR tests in a build directory
This commit is contained in:
41
mysql-test/columnstore/basic/t/mcs42_select_precision.test
Normal file
41
mysql-test/columnstore/basic/t/mcs42_select_precision.test
Normal file
@ -0,0 +1,41 @@
|
||||
#
|
||||
# Test SELECT precision
|
||||
# Author: Bharath, bharath.bokka@mariadb.com
|
||||
#
|
||||
-- source ../include/have_columnstore.inc
|
||||
|
||||
--disable_warnings
|
||||
DROP DATABASE IF EXISTS mcs42_db;
|
||||
--enable_warnings
|
||||
|
||||
CREATE DATABASE mcs42_db;
|
||||
USE mcs42_db;
|
||||
|
||||
SELECT @@sql_mode;
|
||||
CREATE TABLE t (col TINYINT)ENGINE=Columnstore;
|
||||
--error ER_WARN_DATA_OUT_OF_RANGE
|
||||
INSERT INTO t SET col = 128;
|
||||
SELECT col FROM t;
|
||||
--error ER_DIVISION_BY_ZERO
|
||||
INSERT INTO t SET col = 1 / 0;
|
||||
SELECT col FROM t;
|
||||
|
||||
SET sql_mode='';
|
||||
INSERT INTO t SET col = 128;
|
||||
SELECT col FROM t;
|
||||
INSERT INTO t SET col = 1 / 0;
|
||||
SELECT col FROM t;
|
||||
|
||||
CREATE TABLE t1 (col FLOAT)ENGINE=Columnstore;
|
||||
INSERT INTO t1 VALUES (NULL),(2.13),(-2.13),(21.5e0),(-21.5e0),(35.498),(986.512),(-376012.9751);
|
||||
SELECT col, ROUND(col), ROUND(col,1), ROUND(col,-1), ROUND(col,-2), ROUND(col,3) FROM t1;
|
||||
|
||||
SELECT (.1 + .2) = .3;
|
||||
SELECT (.1e0 + .2e0) = .3e0;
|
||||
SELECT .01 * .01;
|
||||
SELECT .1 / .1;
|
||||
|
||||
SET sql_mode=default;
|
||||
|
||||
# Clean UP
|
||||
DROP DATABASE mcs42_db;
|
Reference in New Issue
Block a user