You've already forked mariadb-columnstore-engine
mirror of
https://github.com/mariadb-corporation/mariadb-columnstore-engine.git
synced 2025-07-29 08:21:15 +03:00
MCOL-4674 Fix ColumnStore to run MTR tests in a build directory
This commit is contained in:
36
mysql-test/columnstore/basic/t/mcs227_div_function.test
Normal file
36
mysql-test/columnstore/basic/t/mcs227_div_function.test
Normal file
@ -0,0 +1,36 @@
|
||||
#
|
||||
# Test DIV function
|
||||
# Author: Bharath, bharath.bokka@mariadb.com
|
||||
#
|
||||
-- source ../include/have_columnstore.inc
|
||||
|
||||
--disable_warnings
|
||||
DROP DATABASE IF EXISTS mcs227_db;
|
||||
--enable_warnings
|
||||
|
||||
CREATE DATABASE mcs227_db;
|
||||
USE mcs227_db;
|
||||
|
||||
CREATE TABLE t1
|
||||
(
|
||||
t1_INT INT,
|
||||
t1_DECIMAL DECIMAL(12,5)
|
||||
)ENGINE=Columnstore;
|
||||
INSERT INTO t1 VALUES(1, 1234.567),(20, 111.2345),(24, 98765.4321);
|
||||
|
||||
SELECT t1_INT, t1_INT DIV 2 FROM t1 ORDER BY 1;
|
||||
SELECT t1_INT, t1_INT DIV 2.4 FROM t1 ORDER BY 1;
|
||||
SELECT t1_INT, t1_INT DIV 4.7 FROM t1 ORDER BY 1;
|
||||
SELECT t1_DECIMAL, t1_DECIMAL DIV 2 FROM t1 ORDER BY 1;
|
||||
SELECT t1_DECIMAL, t1_DECIMAL DIV 2.4 FROM t1 ORDER BY 1;
|
||||
SELECT t1_DECIMAL, t1_DECIMAL DIV 4.7 FROM t1 ORDER BY 1;
|
||||
|
||||
# Bug. Columnstore doesn't warn 'Division by 0'
|
||||
SELECT t1_INT DIV 0 FROM t1 LIMIT 1;
|
||||
SELECT t1_DECIMAL DIV 0 FROM t1 LIMIT 1;
|
||||
|
||||
SELECT 0 DIV t1_INT FROM t1 LIMIT 1;
|
||||
SELECT 0 DIV t1_DECIMAL FROM t1 LIMIT 1;
|
||||
|
||||
# Clean UP
|
||||
DROP DATABASE mcs227_db;
|
Reference in New Issue
Block a user