diff options
Diffstat (limited to 'src/test/modules/libpq_pipeline/traces')
9 files changed, 365 insertions, 0 deletions
diff --git a/src/test/modules/libpq_pipeline/traces/disallowed_in_pipeline.trace b/src/test/modules/libpq_pipeline/traces/disallowed_in_pipeline.trace new file mode 100644 index 0000000..dd6df03 --- /dev/null +++ b/src/test/modules/libpq_pipeline/traces/disallowed_in_pipeline.trace @@ -0,0 +1,6 @@ +F 13 Query "SELECT 1" +B 33 RowDescription 1 "?column?" NNNN 0 NNNN 4 -1 0 +B 11 DataRow 1 1 '1' +B 13 CommandComplete "SELECT 1" +B 5 ReadyForQuery I +F 4 Terminate diff --git a/src/test/modules/libpq_pipeline/traces/multi_pipelines.trace b/src/test/modules/libpq_pipeline/traces/multi_pipelines.trace new file mode 100644 index 0000000..4b9ab07 --- /dev/null +++ b/src/test/modules/libpq_pipeline/traces/multi_pipelines.trace @@ -0,0 +1,23 @@ +F 21 Parse "" "SELECT $1" 1 NNNN +F 19 Bind "" "" 0 1 1 '1' 1 0 +F 6 Describe P "" +F 9 Execute "" 0 +F 4 Sync +F 21 Parse "" "SELECT $1" 1 NNNN +F 19 Bind "" "" 0 1 1 '1' 1 0 +F 6 Describe P "" +F 9 Execute "" 0 +F 4 Sync +B 4 ParseComplete +B 4 BindComplete +B 33 RowDescription 1 "?column?" NNNN 0 NNNN 4 -1 0 +B 11 DataRow 1 1 '1' +B 13 CommandComplete "SELECT 1" +B 5 ReadyForQuery I +B 4 ParseComplete +B 4 BindComplete +B 33 RowDescription 1 "?column?" NNNN 0 NNNN 4 -1 0 +B 11 DataRow 1 1 '1' +B 13 CommandComplete "SELECT 1" +B 5 ReadyForQuery I +F 4 Terminate diff --git a/src/test/modules/libpq_pipeline/traces/nosync.trace b/src/test/modules/libpq_pipeline/traces/nosync.trace new file mode 100644 index 0000000..d99aac6 --- /dev/null +++ b/src/test/modules/libpq_pipeline/traces/nosync.trace @@ -0,0 +1,92 @@ +F 34 Parse "" "SELECT repeat('xyzxz', 12)" 0 +F 14 Bind "" "" 0 0 1 0 +F 6 Describe P "" +F 9 Execute "" 0 +F 34 Parse "" "SELECT repeat('xyzxz', 12)" 0 +F 14 Bind "" "" 0 0 1 0 +F 6 Describe P "" +F 9 Execute "" 0 +F 34 Parse "" "SELECT repeat('xyzxz', 12)" 0 +F 14 Bind "" "" 0 0 1 0 +F 6 Describe P "" +F 9 Execute "" 0 +F 34 Parse "" "SELECT repeat('xyzxz', 12)" 0 +F 14 Bind "" "" 0 0 1 0 +F 6 Describe P "" +F 9 Execute "" 0 +F 34 Parse "" "SELECT repeat('xyzxz', 12)" 0 +F 14 Bind "" "" 0 0 1 0 +F 6 Describe P "" +F 9 Execute "" 0 +F 34 Parse "" "SELECT repeat('xyzxz', 12)" 0 +F 14 Bind "" "" 0 0 1 0 +F 6 Describe P "" +F 9 Execute "" 0 +F 34 Parse "" "SELECT repeat('xyzxz', 12)" 0 +F 14 Bind "" "" 0 0 1 0 +F 6 Describe P "" +F 9 Execute "" 0 +F 34 Parse "" "SELECT repeat('xyzxz', 12)" 0 +F 14 Bind "" "" 0 0 1 0 +F 6 Describe P "" +F 9 Execute "" 0 +F 34 Parse "" "SELECT repeat('xyzxz', 12)" 0 +F 14 Bind "" "" 0 0 1 0 +F 6 Describe P "" +F 9 Execute "" 0 +F 34 Parse "" "SELECT repeat('xyzxz', 12)" 0 +F 14 Bind "" "" 0 0 1 0 +F 6 Describe P "" +F 9 Execute "" 0 +F 4 Flush +B 4 ParseComplete +B 4 BindComplete +B 31 RowDescription 1 "repeat" NNNN 0 NNNN 65535 -1 0 +B 70 DataRow 1 60 'xyzxzxyzxzxyzxzxyzxzxyzxzxyzxzxyzxzxyzxzxyzxzxyzxzxyzxzxyzxz' +B 13 CommandComplete "SELECT 1" +B 4 ParseComplete +B 4 BindComplete +B 31 RowDescription 1 "repeat" NNNN 0 NNNN 65535 -1 0 +B 70 DataRow 1 60 'xyzxzxyzxzxyzxzxyzxzxyzxzxyzxzxyzxzxyzxzxyzxzxyzxzxyzxzxyzxz' +B 13 CommandComplete "SELECT 1" +B 4 ParseComplete +B 4 BindComplete +B 31 RowDescription 1 "repeat" NNNN 0 NNNN 65535 -1 0 +B 70 DataRow 1 60 'xyzxzxyzxzxyzxzxyzxzxyzxzxyzxzxyzxzxyzxzxyzxzxyzxzxyzxzxyzxz' +B 13 CommandComplete "SELECT 1" +B 4 ParseComplete +B 4 BindComplete +B 31 RowDescription 1 "repeat" NNNN 0 NNNN 65535 -1 0 +B 70 DataRow 1 60 'xyzxzxyzxzxyzxzxyzxzxyzxzxyzxzxyzxzxyzxzxyzxzxyzxzxyzxzxyzxz' +B 13 CommandComplete "SELECT 1" +B 4 ParseComplete +B 4 BindComplete +B 31 RowDescription 1 "repeat" NNNN 0 NNNN 65535 -1 0 +B 70 DataRow 1 60 'xyzxzxyzxzxyzxzxyzxzxyzxzxyzxzxyzxzxyzxzxyzxzxyzxzxyzxzxyzxz' +B 13 CommandComplete "SELECT 1" +B 4 ParseComplete +B 4 BindComplete +B 31 RowDescription 1 "repeat" NNNN 0 NNNN 65535 -1 0 +B 70 DataRow 1 60 'xyzxzxyzxzxyzxzxyzxzxyzxzxyzxzxyzxzxyzxzxyzxzxyzxzxyzxzxyzxz' +B 13 CommandComplete "SELECT 1" +B 4 ParseComplete +B 4 BindComplete +B 31 RowDescription 1 "repeat" NNNN 0 NNNN 65535 -1 0 +B 70 DataRow 1 60 'xyzxzxyzxzxyzxzxyzxzxyzxzxyzxzxyzxzxyzxzxyzxzxyzxzxyzxzxyzxz' +B 13 CommandComplete "SELECT 1" +B 4 ParseComplete +B 4 BindComplete +B 31 RowDescription 1 "repeat" NNNN 0 NNNN 65535 -1 0 +B 70 DataRow 1 60 'xyzxzxyzxzxyzxzxyzxzxyzxzxyzxzxyzxzxyzxzxyzxzxyzxzxyzxzxyzxz' +B 13 CommandComplete "SELECT 1" +B 4 ParseComplete +B 4 BindComplete +B 31 RowDescription 1 "repeat" NNNN 0 NNNN 65535 -1 0 +B 70 DataRow 1 60 'xyzxzxyzxzxyzxzxyzxzxyzxzxyzxzxyzxzxyzxzxyzxzxyzxzxyzxzxyzxz' +B 13 CommandComplete "SELECT 1" +B 4 ParseComplete +B 4 BindComplete +B 31 RowDescription 1 "repeat" NNNN 0 NNNN 65535 -1 0 +B 70 DataRow 1 60 'xyzxzxyzxzxyzxzxyzxzxyzxzxyzxzxyzxzxyzxzxyzxzxyzxzxyzxzxyzxz' +B 13 CommandComplete "SELECT 1" +F 4 Terminate diff --git a/src/test/modules/libpq_pipeline/traces/pipeline_abort.trace b/src/test/modules/libpq_pipeline/traces/pipeline_abort.trace new file mode 100644 index 0000000..cf6ccec --- /dev/null +++ b/src/test/modules/libpq_pipeline/traces/pipeline_abort.trace @@ -0,0 +1,62 @@ +F 42 Query "DROP TABLE IF EXISTS pq_pipeline_demo" +B NN NoticeResponse S "NOTICE" V "NOTICE" C "00000" M "table "pq_pipeline_demo" does not exist, skipping" F "SSSS" L "SSSS" R "SSSS" \x00 +B 15 CommandComplete "DROP TABLE" +B 5 ReadyForQuery I +F 99 Query "CREATE UNLOGGED TABLE pq_pipeline_demo(id serial primary key, itemno integer,int8filler int8);" +B 17 CommandComplete "CREATE TABLE" +B 5 ReadyForQuery I +F 60 Parse "" "INSERT INTO pq_pipeline_demo(itemno) VALUES ($1)" 1 NNNN +F 19 Bind "" "" 0 1 1 '1' 1 0 +F 6 Describe P "" +F 9 Execute "" 0 +F 39 Parse "" "SELECT no_such_function($1)" 1 NNNN +F 19 Bind "" "" 0 1 1 '1' 1 0 +F 6 Describe P "" +F 9 Execute "" 0 +F 60 Parse "" "INSERT INTO pq_pipeline_demo(itemno) VALUES ($1)" 1 NNNN +F 19 Bind "" "" 0 1 1 '2' 1 0 +F 6 Describe P "" +F 9 Execute "" 0 +F 4 Sync +F 60 Parse "" "INSERT INTO pq_pipeline_demo(itemno) VALUES ($1)" 1 NNNN +F 19 Bind "" "" 0 1 1 '3' 1 0 +F 6 Describe P "" +F 9 Execute "" 0 +F 4 Sync +B 4 ParseComplete +B 4 BindComplete +B 4 NoData +B 15 CommandComplete "INSERT 0 1" +B NN ErrorResponse S "ERROR" V "ERROR" C "42883" M "function no_such_function(integer) does not exist" H "No function matches the given name and argument types. You might need to add explicit type casts." P "8" F "SSSS" L "SSSS" R "SSSS" \x00 +B 5 ReadyForQuery I +B 4 ParseComplete +B 4 BindComplete +B 4 NoData +B 15 CommandComplete "INSERT 0 1" +B 5 ReadyForQuery I +F 26 Parse "" "SELECT 1; SELECT 2" 0 +F 14 Bind "" "" 0 0 1 0 +F 6 Describe P "" +F 9 Execute "" 0 +F 4 Sync +B NN ErrorResponse S "ERROR" V "ERROR" C "42601" M "cannot insert multiple commands into a prepared statement" F "SSSS" L "SSSS" R "SSSS" \x00 +B 5 ReadyForQuery I +F 54 Parse "" "SELECT 1.0/g FROM generate_series(3, -1, -1) g" 0 +F 14 Bind "" "" 0 0 1 0 +F 6 Describe P "" +F 9 Execute "" 0 +F 4 Sync +B 4 ParseComplete +B 4 BindComplete +B 33 RowDescription 1 "?column?" NNNN 0 NNNN 65535 -1 0 +B 32 DataRow 1 22 '0.33333333333333333333' +B 32 DataRow 1 22 '0.50000000000000000000' +B 32 DataRow 1 22 '1.00000000000000000000' +B NN ErrorResponse S "ERROR" V "ERROR" C "22012" M "division by zero" F "SSSS" L "SSSS" R "SSSS" \x00 +B 5 ReadyForQuery I +F 40 Query "SELECT itemno FROM pq_pipeline_demo" +B 31 RowDescription 1 "itemno" NNNN 2 NNNN 4 -1 0 +B 11 DataRow 1 1 '3' +B 13 CommandComplete "SELECT 1" +B 5 ReadyForQuery I +F 4 Terminate diff --git a/src/test/modules/libpq_pipeline/traces/pipeline_idle.trace b/src/test/modules/libpq_pipeline/traces/pipeline_idle.trace new file mode 100644 index 0000000..83ee415 --- /dev/null +++ b/src/test/modules/libpq_pipeline/traces/pipeline_idle.trace @@ -0,0 +1,32 @@ +F 16 Parse "" "SELECT 1" 0 +F 14 Bind "" "" 0 0 1 0 +F 6 Describe P "" +F 9 Execute "" 0 +F 4 Flush +B 4 ParseComplete +B 4 BindComplete +B 33 RowDescription 1 "?column?" NNNN 0 NNNN 4 -1 0 +B 11 DataRow 1 1 '1' +B 13 CommandComplete "SELECT 1" +F 16 Parse "" "SELECT 2" 0 +F 14 Bind "" "" 0 0 1 0 +F 6 Describe P "" +F 9 Execute "" 0 +F 4 Flush +B 4 ParseComplete +B 4 BindComplete +B 33 RowDescription 1 "?column?" NNNN 0 NNNN 4 -1 0 +B 11 DataRow 1 1 '2' +B 13 CommandComplete "SELECT 1" +F 49 Parse "" "SELECT pg_catalog.pg_advisory_unlock(1,1)" 0 +F 14 Bind "" "" 0 0 1 0 +F 6 Describe P "" +F 9 Execute "" 0 +F 4 Flush +B 4 ParseComplete +B 4 BindComplete +B 43 RowDescription 1 "pg_advisory_unlock" NNNN 0 NNNN 1 -1 0 +B NN NoticeResponse S "WARNING" V "WARNING" C "01000" M "you don't own a lock of type ExclusiveLock" F "SSSS" L "SSSS" R "SSSS" \x00 +B 11 DataRow 1 1 'f' +B 13 CommandComplete "SELECT 1" +F 4 Terminate diff --git a/src/test/modules/libpq_pipeline/traces/prepared.trace b/src/test/modules/libpq_pipeline/traces/prepared.trace new file mode 100644 index 0000000..1a7de5c --- /dev/null +++ b/src/test/modules/libpq_pipeline/traces/prepared.trace @@ -0,0 +1,18 @@ +F 68 Parse "select_one" "SELECT $1, '42', $1::numeric, interval '1 sec'" 1 NNNN +F 16 Describe S "select_one" +F 4 Sync +B 4 ParseComplete +B 10 ParameterDescription 1 NNNN +B 113 RowDescription 4 "?column?" NNNN 0 NNNN 4 -1 0 "?column?" NNNN 0 NNNN 65535 -1 0 "numeric" NNNN 0 NNNN 65535 -1 0 "interval" NNNN 0 NNNN 16 -1 0 +B 5 ReadyForQuery I +F 10 Query "BEGIN" +B 10 CommandComplete "BEGIN" +B 5 ReadyForQuery T +F 43 Query "DECLARE cursor_one CURSOR FOR SELECT 1" +B 19 CommandComplete "DECLARE CURSOR" +B 5 ReadyForQuery T +F 16 Describe P "cursor_one" +F 4 Sync +B 33 RowDescription 1 "?column?" NNNN 0 NNNN 4 -1 0 +B 5 ReadyForQuery T +F 4 Terminate diff --git a/src/test/modules/libpq_pipeline/traces/simple_pipeline.trace b/src/test/modules/libpq_pipeline/traces/simple_pipeline.trace new file mode 100644 index 0000000..5c94749 --- /dev/null +++ b/src/test/modules/libpq_pipeline/traces/simple_pipeline.trace @@ -0,0 +1,12 @@ +F 21 Parse "" "SELECT $1" 1 NNNN +F 19 Bind "" "" 0 1 1 '1' 1 0 +F 6 Describe P "" +F 9 Execute "" 0 +F 4 Sync +B 4 ParseComplete +B 4 BindComplete +B 33 RowDescription 1 "?column?" NNNN 0 NNNN 4 -1 0 +B 11 DataRow 1 1 '1' +B 13 CommandComplete "SELECT 1" +B 5 ReadyForQuery I +F 4 Terminate diff --git a/src/test/modules/libpq_pipeline/traces/singlerow.trace b/src/test/modules/libpq_pipeline/traces/singlerow.trace new file mode 100644 index 0000000..83043e1 --- /dev/null +++ b/src/test/modules/libpq_pipeline/traces/singlerow.trace @@ -0,0 +1,59 @@ +F 38 Parse "" "SELECT generate_series(42, $1)" 0 +F 20 Bind "" "" 0 1 2 '44' 1 0 +F 6 Describe P "" +F 9 Execute "" 0 +F 38 Parse "" "SELECT generate_series(42, $1)" 0 +F 20 Bind "" "" 0 1 2 '45' 1 0 +F 6 Describe P "" +F 9 Execute "" 0 +F 38 Parse "" "SELECT generate_series(42, $1)" 0 +F 20 Bind "" "" 0 1 2 '46' 1 0 +F 6 Describe P "" +F 9 Execute "" 0 +F 4 Sync +B 4 ParseComplete +B 4 BindComplete +B 40 RowDescription 1 "generate_series" NNNN 0 NNNN 4 -1 0 +B 12 DataRow 1 2 '42' +B 12 DataRow 1 2 '43' +B 12 DataRow 1 2 '44' +B 13 CommandComplete "SELECT 3" +B 4 ParseComplete +B 4 BindComplete +B 40 RowDescription 1 "generate_series" NNNN 0 NNNN 4 -1 0 +B 12 DataRow 1 2 '42' +B 12 DataRow 1 2 '43' +B 12 DataRow 1 2 '44' +B 12 DataRow 1 2 '45' +B 13 CommandComplete "SELECT 4" +B 4 ParseComplete +B 4 BindComplete +B 40 RowDescription 1 "generate_series" NNNN 0 NNNN 4 -1 0 +B 12 DataRow 1 2 '42' +B 12 DataRow 1 2 '43' +B 12 DataRow 1 2 '44' +B 12 DataRow 1 2 '45' +B 12 DataRow 1 2 '46' +B 13 CommandComplete "SELECT 5" +B 5 ReadyForQuery I +F 36 Parse "" "SELECT generate_series(0, 0)" 0 +F 14 Bind "" "" 0 0 1 0 +F 6 Describe P "" +F 9 Execute "" 0 +F 4 Flush +B 4 ParseComplete +B 4 BindComplete +B 40 RowDescription 1 "generate_series" NNNN 0 NNNN 4 -1 0 +B 11 DataRow 1 1 '0' +B 13 CommandComplete "SELECT 1" +F 16 Parse "" "SELECT 1" 0 +F 14 Bind "" "" 0 0 1 0 +F 6 Describe P "" +F 9 Execute "" 0 +F 4 Flush +B 4 ParseComplete +B 4 BindComplete +B 33 RowDescription 1 "?column?" NNNN 0 NNNN 4 -1 0 +B 11 DataRow 1 1 '1' +B 13 CommandComplete "SELECT 1" +F 4 Terminate diff --git a/src/test/modules/libpq_pipeline/traces/transaction.trace b/src/test/modules/libpq_pipeline/traces/transaction.trace new file mode 100644 index 0000000..1dcc237 --- /dev/null +++ b/src/test/modules/libpq_pipeline/traces/transaction.trace @@ -0,0 +1,61 @@ +F 79 Query "DROP TABLE IF EXISTS pq_pipeline_tst;CREATE TABLE pq_pipeline_tst (id int)" +B NN NoticeResponse S "NOTICE" V "NOTICE" C "00000" M "table "pq_pipeline_tst" does not exist, skipping" F "SSSS" L "SSSS" R "SSSS" \x00 +B 15 CommandComplete "DROP TABLE" +B 17 CommandComplete "CREATE TABLE" +B 5 ReadyForQuery I +F 24 Parse "rollback" "ROLLBACK" 0 +F 13 Parse "" "BEGIN" 0 +F 14 Bind "" "" 0 0 1 0 +F 6 Describe P "" +F 9 Execute "" 0 +F 18 Parse "" "SELECT 0/0" 0 +F 14 Bind "" "" 0 0 1 0 +F 6 Describe P "" +F 9 Execute "" 0 +F 22 Bind "" "rollback" 0 0 1 1 +F 6 Describe P "" +F 9 Execute "" 0 +F 46 Parse "" "INSERT INTO pq_pipeline_tst VALUES (1)" 0 +F 14 Bind "" "" 0 0 1 0 +F 6 Describe P "" +F 9 Execute "" 0 +F 4 Sync +F 46 Parse "" "INSERT INTO pq_pipeline_tst VALUES (2)" 0 +F 14 Bind "" "" 0 0 1 0 +F 6 Describe P "" +F 9 Execute "" 0 +F 4 Sync +F 22 Bind "" "rollback" 0 0 1 1 +F 6 Describe P "" +F 9 Execute "" 0 +F 46 Parse "" "INSERT INTO pq_pipeline_tst VALUES (3)" 0 +F 14 Bind "" "" 0 0 1 0 +F 6 Describe P "" +F 9 Execute "" 0 +F 4 Sync +F 4 Sync +B 4 ParseComplete +B 4 ParseComplete +B 4 BindComplete +B 4 NoData +B 10 CommandComplete "BEGIN" +B 4 ParseComplete +B NN ErrorResponse S "ERROR" V "ERROR" C "22012" M "division by zero" F "SSSS" L "SSSS" R "SSSS" \x00 +B 5 ReadyForQuery E +B NN ErrorResponse S "ERROR" V "ERROR" C "25P02" M "current transaction is aborted, commands ignored until end of transaction block" F "SSSS" L "SSSS" R "SSSS" \x00 +B 5 ReadyForQuery E +B 4 BindComplete +B 4 NoData +B 13 CommandComplete "ROLLBACK" +B 4 ParseComplete +B 4 BindComplete +B 4 NoData +B 15 CommandComplete "INSERT 0 1" +B 5 ReadyForQuery I +B 5 ReadyForQuery I +F 34 Query "SELECT * FROM pq_pipeline_tst" +B 27 RowDescription 1 "id" NNNN 1 NNNN 4 -1 0 +B 11 DataRow 1 1 '3' +B 13 CommandComplete "SELECT 1" +B 5 ReadyForQuery I +F 4 Terminate |