提交 fb471821 编写于 作者: H Heikki Linnakangas

Remove redundant tests on AO tables and savepoints.

These are already covered by the 'appendonly' and 'uao_dml/uao_dml' tests
in the main test suite.
上级 989c502f
-- @author prabhd
-- @created 2012-12-05 12:00:00
-- @modified 2012-12-05 12:00:00
-- @tags dml
-- @db_name dmldb
-- @description test: Insert on AO tables within transaction
DROP TABLE IF EXISTS dml_ao;
DROP TABLE
BEGIN;
BEGIN
SAVEPOINT sp1;
SAVEPOINT
DROP TABLE IF EXISTS dml_ao;
psql:dml_ao_transaction_1.sql:11: NOTICE: table "dml_ao" does not exist, skipping
DROP TABLE
CREATE TABLE dml_ao (i int, x text,c char,v varchar, d date, n numeric, t timestamp without time zone, tz time with time zone) with(appendonly=true) distributed by (i) partition by range (i) (partition p1 start(1) end(5),partition p2 start(5) end(8), partition p3 start(8) end(10) );
psql:dml_ao_transaction_1.sql:12: NOTICE: CREATE TABLE will create partition "dml_ao_1_prt_p1" for table "dml_ao"
psql:dml_ao_transaction_1.sql:12: NOTICE: CREATE TABLE will create partition "dml_ao_1_prt_p2" for table "dml_ao"
psql:dml_ao_transaction_1.sql:12: NOTICE: CREATE TABLE will create partition "dml_ao_1_prt_p3" for table "dml_ao"
CREATE TABLE
SAVEPOINT sp2;
SAVEPOINT
INSERT INTO dml_ao values (1,'to be exchanged','a','partition table','12-11-2012',3,'2012-10-09 10:23:54', '2011-08-19 10:23:54+02');
INSERT 0 1
ROLLBACK to sp2;
ROLLBACK
INSERT INTO dml_ao values (1,'exchanged','a','partition table','12-11-2012',3,'2012-10-09 10:23:54', '2011-08-19 10:23:54+02');
INSERT 0 1
RELEASE SAVEPOINT sp1;
RELEASE
COMMIT;
COMMIT
SELECT COUNT(*) FROM dml_ao;
count
-------
1
(1 row)
SELECT x FROM dml_ao;
x
-----------
exchanged
(1 row)
-- @author prabhd
-- @created 2012-12-05 12:00:00
-- @modified 2012-12-05 12:00:00
-- @tags dml
-- @db_name dmldb
-- @description test: Negative test - Update on AO tables within transaction
DROP TABLE IF EXISTS dml_ao;
DROP TABLE
BEGIN;
BEGIN
SAVEPOINT sp1;
SAVEPOINT
DROP TABLE IF EXISTS dml_ao;
psql:dml_ao_transaction_2.sql:11: NOTICE: table "dml_ao" does not exist, skipping
DROP TABLE
CREATE TABLE dml_ao (i int, x text,c char,v varchar, d date, n numeric, t timestamp without time zone, tz time with time zone) with(appendonly=true) distributed by (i) partition by range (i) (partition p1 start(1) end(5),partition p2 start(5) end(8), partition p3 start(8) end(10) );
psql:dml_ao_transaction_2.sql:12: NOTICE: CREATE TABLE will create partition "dml_ao_1_prt_p1" for table "dml_ao"
psql:dml_ao_transaction_2.sql:12: NOTICE: CREATE TABLE will create partition "dml_ao_1_prt_p2" for table "dml_ao"
psql:dml_ao_transaction_2.sql:12: NOTICE: CREATE TABLE will create partition "dml_ao_1_prt_p3" for table "dml_ao"
CREATE TABLE
INSERT INTO dml_ao values (7,'to be exchanged','s','partition table','12-11-2012',3,'2012-10-09 10:23:54', '2011-08-19 10:23:54+02');
INSERT 0 1
SAVEPOINT sp2;
SAVEPOINT
UPDATE dml_ao SET x = 'update_ao';
UPDATE 1
RELEASE SAVEPOINT sp2;
RELEASE
RELEASE SAVEPOINT sp1;
RELEASE
COMMIT;
COMMIT
SELECT COUNT(*) FROM dml_ao;
count
-------
1
(1 row)
SELECT x FROM dml_ao;
x
-----------
update_ao
(1 row)
-- @author prabhd
-- @created 2012-12-05 12:00:00
-- @modified 2012-12-05 12:00:00
-- @tags dml
-- @db_name dmldb
-- @description test: Negative test - Delete on AO tables within transaction
DROP TABLE IF EXISTS dml_ao;
DROP TABLE
BEGIN;
BEGIN
SAVEPOINT sp1;
SAVEPOINT
DROP TABLE IF EXISTS dml_ao;
psql:dml_ao_transaction_3.sql:11: NOTICE: table "dml_ao" does not exist, skipping
DROP TABLE
CREATE TABLE dml_ao (i int, x text,c char,v varchar, d date, n numeric, t timestamp without time zone, tz time with time zone) with(appendonly=true) distributed by (i) partition by range (i) (partition p1 start(1) end(5),partition p2 start(5) end(8), partition p3 start(8) end(10) );
psql:dml_ao_transaction_3.sql:12: NOTICE: CREATE TABLE will create partition "dml_ao_1_prt_p1" for table "dml_ao"
psql:dml_ao_transaction_3.sql:12: NOTICE: CREATE TABLE will create partition "dml_ao_1_prt_p2" for table "dml_ao"
psql:dml_ao_transaction_3.sql:12: NOTICE: CREATE TABLE will create partition "dml_ao_1_prt_p3" for table "dml_ao"
CREATE TABLE
INSERT INTO dml_ao values(generate_series(1,9),'create table with subtransactions','s','subtransaction table','12-11-2012',3,'2012-10-09 10:23:54', '2011-08-19 10:23:54+02');
INSERT 0 9
SAVEPOINT sp2;
SAVEPOINT
DELETE FROM dml_ao;
DELETE 9
RELEASE SAVEPOINT sp2;
RELEASE
RELEASE SAVEPOINT sp1;
RELEASE
COMMIT;
COMMIT
SELECT COUNT(*) FROM dml_ao;
count
-------
0
(1 row)
SELECT x FROM dml_ao;
x
---
(0 rows)
-- @author prabhd
-- @created 2012-12-05 12:00:00
-- @modified 2012-12-05 12:00:00
-- @tags dml
-- @db_name dmldb
-- @description test: Insert on AO tables within transaction
\echo --start_ignore
set gp_enable_column_oriented_table=on;
\echo --end_ignore
DROP TABLE IF EXISTS dml_ao;
BEGIN;
SAVEPOINT sp1;
DROP TABLE IF EXISTS dml_ao;
CREATE TABLE dml_ao (i int, x text,c char,v varchar, d date, n numeric, t timestamp without time zone, tz time with time zone) with(appendonly=true) distributed by (i) partition by range (i) (partition p1 start(1) end(5),partition p2 start(5) end(8), partition p3 start(8) end(10) );
SAVEPOINT sp2;
INSERT INTO dml_ao values (1,'to be exchanged','a','partition table','12-11-2012',3,'2012-10-09 10:23:54', '2011-08-19 10:23:54+02');
ROLLBACK to sp2;
INSERT INTO dml_ao values (1,'exchanged','a','partition table','12-11-2012',3,'2012-10-09 10:23:54', '2011-08-19 10:23:54+02');
RELEASE SAVEPOINT sp1;
COMMIT;
SELECT COUNT(*) FROM dml_ao;
SELECT x FROM dml_ao;
-- @author prabhd
-- @created 2012-12-05 12:00:00
-- @modified 2012-12-05 12:00:00
-- @tags dml
-- @db_name dmldb
-- @description test: Negative test - Update on AO tables within transaction
\echo --start_ignore
set gp_enable_column_oriented_table=on;
\echo --end_ignore
DROP TABLE IF EXISTS dml_ao;
BEGIN;
SAVEPOINT sp1;
DROP TABLE IF EXISTS dml_ao;
CREATE TABLE dml_ao (i int, x text,c char,v varchar, d date, n numeric, t timestamp without time zone, tz time with time zone) with(appendonly=true) distributed by (i) partition by range (i) (partition p1 start(1) end(5),partition p2 start(5) end(8), partition p3 start(8) end(10) );
INSERT INTO dml_ao values (7,'to be exchanged','s','partition table','12-11-2012',3,'2012-10-09 10:23:54', '2011-08-19 10:23:54+02');
SAVEPOINT sp2;
UPDATE dml_ao SET x = 'update_ao';
RELEASE SAVEPOINT sp2;
RELEASE SAVEPOINT sp1;
COMMIT;
SELECT COUNT(*) FROM dml_ao;
SELECT x FROM dml_ao;
-- @author prabhd
-- @created 2012-12-05 12:00:00
-- @modified 2012-12-05 12:00:00
-- @tags dml
-- @db_name dmldb
-- @description test: Negative test - Delete on AO tables within transaction
\echo --start_ignore
set gp_enable_column_oriented_table=on;
\echo --end_ignore
DROP TABLE IF EXISTS dml_ao;
BEGIN;
SAVEPOINT sp1;
DROP TABLE IF EXISTS dml_ao;
CREATE TABLE dml_ao (i int, x text,c char,v varchar, d date, n numeric, t timestamp without time zone, tz time with time zone) with(appendonly=true) distributed by (i) partition by range (i) (partition p1 start(1) end(5),partition p2 start(5) end(8), partition p3 start(8) end(10) );
INSERT INTO dml_ao values(generate_series(1,9),'create table with subtransactions','s','subtransaction table','12-11-2012',3,'2012-10-09 10:23:54', '2011-08-19 10:23:54+02');
SAVEPOINT sp2;
DELETE FROM dml_ao;
RELEASE SAVEPOINT sp2;
RELEASE SAVEPOINT sp1;
COMMIT;
SELECT COUNT(*) FROM dml_ao;
SELECT x FROM dml_ao;
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册