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:
46
mysql-test/columnstore/basic/t/mcs23_replace.test
Normal file
46
mysql-test/columnstore/basic/t/mcs23_replace.test
Normal file
@ -0,0 +1,46 @@
|
||||
#
|
||||
# Test REPLACE INTO statement
|
||||
# Author: Bharath, bharath.bokka@mariadb.com
|
||||
#
|
||||
-- source ../include/have_columnstore.inc
|
||||
|
||||
--disable_warnings
|
||||
DROP DATABASE IF EXISTS mcs23_db;
|
||||
--enable_warnings
|
||||
|
||||
CREATE DATABASE mcs23_db;
|
||||
USE mcs23_db;
|
||||
|
||||
CREATE TABLE t1(t1_bool BOOLEAN,
|
||||
t1_int INT,
|
||||
t1_decimal DECIMAL(5,2),
|
||||
t1_varchar VARCHAR(10),
|
||||
t1_dt DATETIME
|
||||
)ENGINE=Columnstore;
|
||||
|
||||
INSERT INTO t1 (t1_bool,t1_dt,t1_varchar,t1_decimal,t1_int) VALUES (1,'1011-10-10','abcd',2.34,25);
|
||||
|
||||
# SIMLPE REPLACE STATEMENT
|
||||
REPLACE INTO t1 (t1_bool,t1_dt,t1_varchar,t1_decimal,t1_int) VALUES (1,'1011-10-10','abcd',2.34,25);
|
||||
|
||||
# MULTIPLE ROWS IN SINGLE STATEMENT
|
||||
REPLACE INTO t1 VALUES(0,98,725.2,'aaaaa','1971-11-1'),
|
||||
(1,285,262.22,'bbbbb','9999-9-9 12:22:22');
|
||||
|
||||
# REPLACE...SET
|
||||
REPLACE INTO t1 SET t1_int=1,t1_bool=0,t1_decimal=12.1,t1_varchar='ccccc',t1_dt='7826-2-28';
|
||||
|
||||
# REPLACE...SET...RETURNING
|
||||
REPLACE INTO t1 SET t1_int=2,t1_bool=0,t1_decimal=71.91,t1_varchar='ddddd',t1_dt='3219-12-22' RETURNING *;
|
||||
REPLACE INTO t1 SET t1_int=123,t1_bool=0,t1_decimal=48.91,t1_varchar='eeeee',t1_dt='1976-2-28' RETURNING t1_int as 'Integer',t1_bool as 'boolean value';
|
||||
|
||||
SELECT * FROM t1;
|
||||
|
||||
# Negative scenarios
|
||||
--error 1616
|
||||
REPLACE DELAYED INTO t1 VALUES(0,98,725.2,'aaaaa','1971-11-1');
|
||||
--error 1136
|
||||
REPLACE INTO t1(t1_int,t1_bool) values();
|
||||
|
||||
# Clean up
|
||||
DROP DATABASE mcs23_db;
|
Reference in New Issue
Block a user