Merge pull request #2166 from citusdata/version_bump_windows

Fix regression tests in AppVeyor
pull/2169/head
Marco Slot 2018-05-11 22:27:48 +02:00 committed by GitHub
commit cce658ad8c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
8 changed files with 61 additions and 65 deletions

View File

@ -1,6 +1,6 @@
# Citus extension
comment = 'Citus distributed database'
default_version = '7.4-1'
default_version = '7.4-3'
module_pathname = '$libdir/citus'
relocatable = false
schema = pg_catalog

View File

@ -87,6 +87,8 @@ ERROR: cannot compute count (distinct) approximation
HINT: You need to have the hll extension loaded.
-- Check that approximate count(distinct) works at a table in a schema other than public
-- create necessary objects
SET citus.next_shard_id TO 20000000;
SET citus.next_placement_id TO 20000000;
CREATE SCHEMA test_count_distinct_schema;
CREATE TABLE test_count_distinct_schema.nation_hash(
n_nationkey integer not null,
@ -94,15 +96,9 @@ CREATE TABLE test_count_distinct_schema.nation_hash(
n_regionkey integer not null,
n_comment varchar(152)
);
SELECT master_create_distributed_table('test_count_distinct_schema.nation_hash', 'n_nationkey', 'hash');
master_create_distributed_table
---------------------------------
(1 row)
SELECT master_create_worker_shards('test_count_distinct_schema.nation_hash', 4, 2);
master_create_worker_shards
-----------------------------
SELECT create_distributed_table('test_count_distinct_schema.nation_hash', 'n_nationkey', 'hash');
create_distributed_table
--------------------------
(1 row)

View File

@ -393,20 +393,20 @@ WHERE user_id IN (SELECT user_id
FROM users_test_table
UNION
SELECT user_id
FROM events_test_table) returning *;
user_id | value_1 | value_2 | value_3
---------+---------+---------+---------
8 | 4 | 13 | 0
20 | 4 | | 0
20 | 4 | | 0
20 | 4 | | 0
4 | 4 | 9 | 0
4 | 4 | 17 | 0
16 | 4 | | 0
6 | 4 | 11 | 0
6 | 4 | 15 | 0
2 | 4 | 7 | 0
2 | 4 | 19 | 0
FROM events_test_table) returning value_3;
value_3
---------
0
0
0
0
0
0
0
0
0
0
0
(11 rows)
UPDATE users_test_table
@ -750,11 +750,11 @@ ERROR: more than one row returned by a subquery used as an expression
CONTEXT: while executing command on localhost:57637
-- Cursors are not supported
BEGIN;
DECLARE test_cursor CURSOR FOR SELECT * FROM users_test_table;
DECLARE test_cursor CURSOR FOR SELECT * FROM users_test_table ORDER BY user_id;
FETCH test_cursor;
user_id | value_1 | value_2 | value_3
---------+---------+---------+---------
8 | 4 | 0 | 0
1 | 2 | 5 | 0
(1 row)
UPDATE users_test_table SET value_2 = 5 WHERE CURRENT OF test_cursor;

View File

@ -416,20 +416,20 @@ WHERE user_id IN (SELECT user_id
FROM users_test_table
UNION
SELECT user_id
FROM events_test_table) returning *;
user_id | value_1 | value_2 | value_3
---------+---------+---------+---------
8 | 4 | 13 | 0
20 | 4 | | 0
20 | 4 | | 0
20 | 4 | | 0
4 | 4 | 9 | 0
4 | 4 | 17 | 0
16 | 4 | | 0
6 | 4 | 11 | 0
6 | 4 | 15 | 0
2 | 4 | 7 | 0
2 | 4 | 19 | 0
FROM events_test_table) returning value_3;
value_3
---------
0
0
0
0
0
0
0
0
0
0
0
(11 rows)
UPDATE users_test_table
@ -773,11 +773,11 @@ ERROR: more than one row returned by a subquery used as an expression
CONTEXT: while executing command on localhost:57637
-- Cursors are not supported
BEGIN;
DECLARE test_cursor CURSOR FOR SELECT * FROM users_test_table;
DECLARE test_cursor CURSOR FOR SELECT * FROM users_test_table ORDER BY user_id;
FETCH test_cursor;
user_id | value_1 | value_2 | value_3
---------+---------+---------+---------
8 | 4 | 0 | 0
1 | 2 | 5 | 0
(1 row)
UPDATE users_test_table SET value_2 = 5 WHERE CURRENT OF test_cursor;

View File

@ -632,7 +632,7 @@ COPY numbers_hash FROM STDIN WITH (FORMAT 'csv');
-- verify each placement is active
SELECT shardid, shardstate, nodename, nodeport
FROM pg_dist_shard_placement join pg_dist_shard using(shardid)
WHERE logicalrelid = 'numbers_hash'::regclass order by placementid, shardid, nodeport;
WHERE logicalrelid = 'numbers_hash'::regclass order by shardid, nodeport;
-- create a reference table
CREATE TABLE numbers_reference(a int, b int);
@ -647,7 +647,7 @@ CREATE TABLE numbers_hash_other(a int, b int);
SELECT create_distributed_table('numbers_hash_other', 'a');
SELECT shardid, shardstate, nodename, nodeport
FROM pg_dist_shard_placement join pg_dist_shard using(shardid)
WHERE logicalrelid = 'numbers_hash_other'::regclass order by placementid, shardid, nodeport;
WHERE logicalrelid = 'numbers_hash_other'::regclass order by shardid, nodeport;
-- manually corrupt pg_dist_shard such that both copies of one shard is placed in
-- worker_1. This is to test the behavior when no replica of a shard is accessible.
@ -675,7 +675,7 @@ COPY numbers_hash FROM STDIN WITH (FORMAT 'csv');
-- verify shards in the first worker as marked invalid
SELECT shardid, shardstate, nodename, nodeport
FROM pg_dist_shard_placement join pg_dist_shard using(shardid)
WHERE logicalrelid = 'numbers_hash'::regclass order by placementid, shardid, nodeport;
WHERE logicalrelid = 'numbers_hash'::regclass order by shardid, nodeport;
-- try to insert into a reference table copy should fail
COPY numbers_reference FROM STDIN WITH (FORMAT 'csv');
@ -702,7 +702,7 @@ COPY numbers_hash_other FROM STDIN WITH (FORMAT 'csv');
-- since copy has failed altogether
SELECT shardid, shardstate, nodename, nodeport
FROM pg_dist_shard_placement join pg_dist_shard using(shardid)
WHERE logicalrelid = 'numbers_hash_other'::regclass order by placementid, shardid, nodeport;
WHERE logicalrelid = 'numbers_hash_other'::regclass order by shardid, nodeport;
-- re-enable test_user on the first worker
\c - :default_user - :worker_1_port
@ -748,7 +748,7 @@ SELECT count(a) FROM numbers_hash;
-- verify shard is still marked as valid
SELECT shardid, shardstate, nodename, nodeport
FROM pg_dist_shard_placement join pg_dist_shard using(shardid)
WHERE logicalrelid = 'numbers_hash'::regclass order by placementid, shardid, nodeport;
WHERE logicalrelid = 'numbers_hash'::regclass order by shardid, nodeport;
DROP TABLE numbers_hash;
SELECT * FROM run_command_on_workers('DROP USER test_user');

View File

@ -826,15 +826,15 @@ COPY numbers_hash FROM STDIN WITH (FORMAT 'csv');
-- verify each placement is active
SELECT shardid, shardstate, nodename, nodeport
FROM pg_dist_shard_placement join pg_dist_shard using(shardid)
WHERE logicalrelid = 'numbers_hash'::regclass order by placementid, shardid, nodeport;
WHERE logicalrelid = 'numbers_hash'::regclass order by shardid, nodeport;
shardid | shardstate | nodename | nodeport
---------+------------+-----------+----------
560171 | 1 | localhost | 57638
560171 | 1 | localhost | 57637
560171 | 1 | localhost | 57638
560172 | 1 | localhost | 57637
560172 | 1 | localhost | 57638
560173 | 1 | localhost | 57638
560173 | 1 | localhost | 57637
560173 | 1 | localhost | 57638
560174 | 1 | localhost | 57637
560174 | 1 | localhost | 57638
(8 rows)
@ -858,17 +858,17 @@ SELECT create_distributed_table('numbers_hash_other', 'a');
SELECT shardid, shardstate, nodename, nodeport
FROM pg_dist_shard_placement join pg_dist_shard using(shardid)
WHERE logicalrelid = 'numbers_hash_other'::regclass order by placementid, shardid, nodeport;
WHERE logicalrelid = 'numbers_hash_other'::regclass order by shardid, nodeport;
shardid | shardstate | nodename | nodeport
---------+------------+-----------+----------
560176 | 1 | localhost | 57637
560176 | 1 | localhost | 57638
560177 | 1 | localhost | 57638
560177 | 1 | localhost | 57637
560177 | 1 | localhost | 57638
560178 | 1 | localhost | 57637
560178 | 1 | localhost | 57638
560179 | 1 | localhost | 57638
560179 | 1 | localhost | 57637
560179 | 1 | localhost | 57638
(8 rows)
-- manually corrupt pg_dist_shard such that both copies of one shard is placed in
@ -897,15 +897,15 @@ CONTEXT: COPY numbers_hash, line 6: "6,6"
-- verify shards in the first worker as marked invalid
SELECT shardid, shardstate, nodename, nodeport
FROM pg_dist_shard_placement join pg_dist_shard using(shardid)
WHERE logicalrelid = 'numbers_hash'::regclass order by placementid, shardid, nodeport;
WHERE logicalrelid = 'numbers_hash'::regclass order by shardid, nodeport;
shardid | shardstate | nodename | nodeport
---------+------------+-----------+----------
560171 | 1 | localhost | 57638
560171 | 3 | localhost | 57637
560171 | 1 | localhost | 57638
560172 | 3 | localhost | 57637
560172 | 1 | localhost | 57638
560173 | 1 | localhost | 57638
560173 | 3 | localhost | 57637
560173 | 1 | localhost | 57638
560174 | 3 | localhost | 57637
560174 | 1 | localhost | 57638
(8 rows)
@ -941,17 +941,17 @@ CONTEXT: COPY numbers_hash_other, line 1: "1,1"
-- since copy has failed altogether
SELECT shardid, shardstate, nodename, nodeport
FROM pg_dist_shard_placement join pg_dist_shard using(shardid)
WHERE logicalrelid = 'numbers_hash_other'::regclass order by placementid, shardid, nodeport;
WHERE logicalrelid = 'numbers_hash_other'::regclass order by shardid, nodeport;
shardid | shardstate | nodename | nodeport
---------+------------+-----------+----------
560176 | 1 | localhost | 57637
560176 | 1 | localhost | 57637
560177 | 1 | localhost | 57638
560177 | 1 | localhost | 57637
560177 | 1 | localhost | 57638
560178 | 1 | localhost | 57637
560178 | 1 | localhost | 57638
560179 | 1 | localhost | 57638
560179 | 1 | localhost | 57637
560179 | 1 | localhost | 57638
(8 rows)
-- re-enable test_user on the first worker
@ -993,15 +993,15 @@ SELECT count(a) FROM numbers_hash;
-- verify shard is still marked as valid
SELECT shardid, shardstate, nodename, nodeport
FROM pg_dist_shard_placement join pg_dist_shard using(shardid)
WHERE logicalrelid = 'numbers_hash'::regclass order by placementid, shardid, nodeport;
WHERE logicalrelid = 'numbers_hash'::regclass order by shardid, nodeport;
shardid | shardstate | nodename | nodeport
---------+------------+-----------+----------
560180 | 1 | localhost | 57638
560180 | 1 | localhost | 57637
560180 | 1 | localhost | 57638
560181 | 1 | localhost | 57637
560181 | 1 | localhost | 57638
560182 | 1 | localhost | 57638
560182 | 1 | localhost | 57637
560182 | 1 | localhost | 57638
560183 | 1 | localhost | 57637
560183 | 1 | localhost | 57638
(8 rows)

View File

@ -306,7 +306,7 @@ WHERE user_id IN (SELECT user_id
FROM users_test_table
UNION
SELECT user_id
FROM events_test_table) returning *;
FROM events_test_table) returning value_3;
UPDATE users_test_table
SET value_1 = 4
@ -634,7 +634,7 @@ WHERE users_test_table.user_id = (SELECT user_id
-- Cursors are not supported
BEGIN;
DECLARE test_cursor CURSOR FOR SELECT * FROM users_test_table;
DECLARE test_cursor CURSOR FOR SELECT * FROM users_test_table ORDER BY user_id;
FETCH test_cursor;
UPDATE users_test_table SET value_2 = 5 WHERE CURRENT OF test_cursor;
ROLLBACK;

View File

@ -5,7 +5,7 @@
#define CITUS_EDITION "community"
/* Extension version expected by this Citus build */
#define CITUS_EXTENSIONVERSION "7.4-1"
#define CITUS_EXTENSIONVERSION "7.4-3"
/* Citus major version as a string */
#define CITUS_MAJORVERSION "7.4"