fix tests
authorMichael Wallner <mike@php.net>
Tue, 17 May 2016 10:13:20 +0000 (12:13 +0200)
committerMichael Wallner <mike@php.net>
Tue, 17 May 2016 10:13:20 +0000 (12:13 +0200)
tests/async003.phpt
tests/async004.phpt
tests/async005.phpt
tests/async006.phpt
tests/cancel001.phpt
tests/res001.phpt

index 98726420a3c2782131aaedb13c13edfd69ea1e03..2e72a9fa8dd22d12225828c0168acd52b79eea54 100644 (file)
@@ -26,13 +26,50 @@ do {
 DONE
 --EXPECTF--
 Test
-object(pq\Result)#%d (8) {
+object(pq\Result)#%d (9) {
   ["status"]=>
   int(2)
   ["statusMessage"]=>
   string(9) "TUPLES_OK"
   ["errorMessage"]=>
   string(0) ""
+  ["diag"]=>
+  array(17) {
+    ["severity"]=>
+    NULL
+    ["sqlstate"]=>
+    NULL
+    ["message_primary"]=>
+    NULL
+    ["message_detail"]=>
+    NULL
+    ["message_hint"]=>
+    NULL
+    ["statement_position"]=>
+    NULL
+    ["internal_position"]=>
+    NULL
+    ["internal_query"]=>
+    NULL
+    ["context"]=>
+    NULL
+    ["schema_name"]=>
+    NULL
+    ["table_name"]=>
+    NULL
+    ["column_name"]=>
+    NULL
+    ["datatype_name"]=>
+    NULL
+    ["constraint_name"]=>
+    NULL
+    ["source_file"]=>
+    NULL
+    ["source_line"]=>
+    NULL
+    ["source_function"]=>
+    NULL
+  }
   ["numRows"]=>
   int(1)
   ["numCols"]=>
@@ -44,13 +81,50 @@ object(pq\Result)#%d (8) {
   ["autoConvert"]=>
   int(65535)
 }
-object(pq\Result)#%d (8) {
+object(pq\Result)#%d (9) {
   ["status"]=>
   int(2)
   ["statusMessage"]=>
   string(9) "TUPLES_OK"
   ["errorMessage"]=>
   string(0) ""
+  ["diag"]=>
+  array(17) {
+    ["severity"]=>
+    NULL
+    ["sqlstate"]=>
+    NULL
+    ["message_primary"]=>
+    NULL
+    ["message_detail"]=>
+    NULL
+    ["message_hint"]=>
+    NULL
+    ["statement_position"]=>
+    NULL
+    ["internal_position"]=>
+    NULL
+    ["internal_query"]=>
+    NULL
+    ["context"]=>
+    NULL
+    ["schema_name"]=>
+    NULL
+    ["table_name"]=>
+    NULL
+    ["column_name"]=>
+    NULL
+    ["datatype_name"]=>
+    NULL
+    ["constraint_name"]=>
+    NULL
+    ["source_file"]=>
+    NULL
+    ["source_line"]=>
+    NULL
+    ["source_function"]=>
+    NULL
+  }
   ["numRows"]=>
   int(1)
   ["numCols"]=>
index d40cda81206739522a880541ec184c624c031329..bafc07adef32ca1bd9f575aa0d41f01a2da84a74 100644 (file)
@@ -27,13 +27,50 @@ do {
 DONE
 --EXPECTF--
 Test
-object(pq\Result)#%d (8) {
+object(pq\Result)#%d (9) {
   ["status"]=>
   int(2)
   ["statusMessage"]=>
   string(9) "TUPLES_OK"
   ["errorMessage"]=>
   string(0) ""
+  ["diag"]=>
+  array(17) {
+    ["severity"]=>
+    NULL
+    ["sqlstate"]=>
+    NULL
+    ["message_primary"]=>
+    NULL
+    ["message_detail"]=>
+    NULL
+    ["message_hint"]=>
+    NULL
+    ["statement_position"]=>
+    NULL
+    ["internal_position"]=>
+    NULL
+    ["internal_query"]=>
+    NULL
+    ["context"]=>
+    NULL
+    ["schema_name"]=>
+    NULL
+    ["table_name"]=>
+    NULL
+    ["column_name"]=>
+    NULL
+    ["datatype_name"]=>
+    NULL
+    ["constraint_name"]=>
+    NULL
+    ["source_file"]=>
+    NULL
+    ["source_line"]=>
+    NULL
+    ["source_function"]=>
+    NULL
+  }
   ["numRows"]=>
   int(1)
   ["numCols"]=>
index 343992ac2164b4cddd2e4ad91b866e97a5ec200a..6688b274f36931d519c82b04d9990d183c6ab8cc 100644 (file)
@@ -36,13 +36,50 @@ complete($s);
 DONE
 --EXPECTF--
 Test
-object(pq\Result)#%d (8) {
+object(pq\Result)#%d (9) {
   ["status"]=>
   int(2)
   ["statusMessage"]=>
   string(9) "TUPLES_OK"
   ["errorMessage"]=>
   string(0) ""
+  ["diag"]=>
+  array(17) {
+    ["severity"]=>
+    NULL
+    ["sqlstate"]=>
+    NULL
+    ["message_primary"]=>
+    NULL
+    ["message_detail"]=>
+    NULL
+    ["message_hint"]=>
+    NULL
+    ["statement_position"]=>
+    NULL
+    ["internal_position"]=>
+    NULL
+    ["internal_query"]=>
+    NULL
+    ["context"]=>
+    NULL
+    ["schema_name"]=>
+    NULL
+    ["table_name"]=>
+    NULL
+    ["column_name"]=>
+    NULL
+    ["datatype_name"]=>
+    NULL
+    ["constraint_name"]=>
+    NULL
+    ["source_file"]=>
+    NULL
+    ["source_line"]=>
+    NULL
+    ["source_function"]=>
+    NULL
+  }
   ["numRows"]=>
   int(1)
   ["numCols"]=>
index 775c880a43d23855d517afae49f863db57cc6839..b1bcbb4fbb702f2e94114f1ae89a69ff51313b37 100644 (file)
@@ -30,13 +30,50 @@ do {
 DONE
 --EXPECTF--
 Test
-object(pq\Result)#%d (8) {
+object(pq\Result)#%d (9) {
   ["status"]=>
   int(9)
   ["statusMessage"]=>
   string(12) "SINGLE_TUPLE"
   ["errorMessage"]=>
   string(0) ""
+  ["diag"]=>
+  array(17) {
+    ["severity"]=>
+    NULL
+    ["sqlstate"]=>
+    NULL
+    ["message_primary"]=>
+    NULL
+    ["message_detail"]=>
+    NULL
+    ["message_hint"]=>
+    NULL
+    ["statement_position"]=>
+    NULL
+    ["internal_position"]=>
+    NULL
+    ["internal_query"]=>
+    NULL
+    ["context"]=>
+    NULL
+    ["schema_name"]=>
+    NULL
+    ["table_name"]=>
+    NULL
+    ["column_name"]=>
+    NULL
+    ["datatype_name"]=>
+    NULL
+    ["constraint_name"]=>
+    NULL
+    ["source_file"]=>
+    NULL
+    ["source_line"]=>
+    NULL
+    ["source_function"]=>
+    NULL
+  }
   ["numRows"]=>
   int(1)
   ["numCols"]=>
@@ -48,13 +85,50 @@ object(pq\Result)#%d (8) {
   ["autoConvert"]=>
   int(65535)
 }
-object(pq\Result)#%d (8) {
+object(pq\Result)#%d (9) {
   ["status"]=>
   int(9)
   ["statusMessage"]=>
   string(12) "SINGLE_TUPLE"
   ["errorMessage"]=>
   string(0) ""
+  ["diag"]=>
+  array(17) {
+    ["severity"]=>
+    NULL
+    ["sqlstate"]=>
+    NULL
+    ["message_primary"]=>
+    NULL
+    ["message_detail"]=>
+    NULL
+    ["message_hint"]=>
+    NULL
+    ["statement_position"]=>
+    NULL
+    ["internal_position"]=>
+    NULL
+    ["internal_query"]=>
+    NULL
+    ["context"]=>
+    NULL
+    ["schema_name"]=>
+    NULL
+    ["table_name"]=>
+    NULL
+    ["column_name"]=>
+    NULL
+    ["datatype_name"]=>
+    NULL
+    ["constraint_name"]=>
+    NULL
+    ["source_file"]=>
+    NULL
+    ["source_line"]=>
+    NULL
+    ["source_function"]=>
+    NULL
+  }
   ["numRows"]=>
   int(1)
   ["numCols"]=>
@@ -66,13 +140,50 @@ object(pq\Result)#%d (8) {
   ["autoConvert"]=>
   int(65535)
 }
-object(pq\Result)#%d (8) {
+object(pq\Result)#%d (9) {
   ["status"]=>
   int(9)
   ["statusMessage"]=>
   string(12) "SINGLE_TUPLE"
   ["errorMessage"]=>
   string(0) ""
+  ["diag"]=>
+  array(17) {
+    ["severity"]=>
+    NULL
+    ["sqlstate"]=>
+    NULL
+    ["message_primary"]=>
+    NULL
+    ["message_detail"]=>
+    NULL
+    ["message_hint"]=>
+    NULL
+    ["statement_position"]=>
+    NULL
+    ["internal_position"]=>
+    NULL
+    ["internal_query"]=>
+    NULL
+    ["context"]=>
+    NULL
+    ["schema_name"]=>
+    NULL
+    ["table_name"]=>
+    NULL
+    ["column_name"]=>
+    NULL
+    ["datatype_name"]=>
+    NULL
+    ["constraint_name"]=>
+    NULL
+    ["source_file"]=>
+    NULL
+    ["source_line"]=>
+    NULL
+    ["source_function"]=>
+    NULL
+  }
   ["numRows"]=>
   int(1)
   ["numCols"]=>
@@ -84,13 +195,50 @@ object(pq\Result)#%d (8) {
   ["autoConvert"]=>
   int(65535)
 }
-object(pq\Result)#%d (8) {
+object(pq\Result)#%d (9) {
   ["status"]=>
   int(2)
   ["statusMessage"]=>
   string(9) "TUPLES_OK"
   ["errorMessage"]=>
   string(0) ""
+  ["diag"]=>
+  array(17) {
+    ["severity"]=>
+    NULL
+    ["sqlstate"]=>
+    NULL
+    ["message_primary"]=>
+    NULL
+    ["message_detail"]=>
+    NULL
+    ["message_hint"]=>
+    NULL
+    ["statement_position"]=>
+    NULL
+    ["internal_position"]=>
+    NULL
+    ["internal_query"]=>
+    NULL
+    ["context"]=>
+    NULL
+    ["schema_name"]=>
+    NULL
+    ["table_name"]=>
+    NULL
+    ["column_name"]=>
+    NULL
+    ["datatype_name"]=>
+    NULL
+    ["constraint_name"]=>
+    NULL
+    ["source_file"]=>
+    NULL
+    ["source_line"]=>
+    NULL
+    ["source_function"]=>
+    NULL
+  }
   ["numRows"]=>
   int(0)
   ["numCols"]=>
index 5ccdf43198089f239ef4107b596bc56530d8f143..708591f30f01a56475321bab8453e770aa234cf1 100644 (file)
@@ -24,13 +24,50 @@ DONE
 --EXPECTF--
 Test
 bool(true)
-object(pq\Result)#%d (8) {
+object(pq\Result)#%d (9) {
   ["status"]=>
   int(7)
   ["statusMessage"]=>
   string(11) "FATAL_ERROR"
   ["errorMessage"]=>
   string(47) "ERROR:  canceling statement due to user request"
+  ["diag"]=>
+  array(17) {
+    ["severity"]=>
+    string(5) "ERROR"
+    ["sqlstate"]=>
+    string(5) "57014"
+    ["message_primary"]=>
+    string(39) "canceling statement due to user request"
+    ["message_detail"]=>
+    NULL
+    ["message_hint"]=>
+    NULL
+    ["statement_position"]=>
+    NULL
+    ["internal_position"]=>
+    NULL
+    ["internal_query"]=>
+    NULL
+    ["context"]=>
+    NULL
+    ["schema_name"]=>
+    NULL
+    ["table_name"]=>
+    NULL
+    ["column_name"]=>
+    NULL
+    ["datatype_name"]=>
+    NULL
+    ["constraint_name"]=>
+    NULL
+    ["source_file"]=>
+    string(10) "postgres.c"
+    ["source_line"]=>
+    string(4) "2988"
+    ["source_function"]=>
+    string(17) "ProcessInterrupts"
+  }
   ["numRows"]=>
   int(0)
   ["numCols"]=>
index d42524a466c3bfc1318792d41ebba3c785facbb3..b2a36670a8830dded2914385b40c78e0f4dac90e 100644 (file)
@@ -58,13 +58,19 @@ Warning: pq\Result not initialized in %s on line %d
 Warning: pq\Result not initialized in %s on line %d
 
 Warning: pq\Result not initialized in %s on line %d
-object(pq\Result)#%d (8) {
+
+Warning: pq\Result not initialized in %s on line %d
+
+Warning: pq\Result not initialized in %s on line %d
+object(pq\Result)#%d (9) {
   ["status"]=>
   NULL
   ["statusMessage"]=>
   NULL
   ["errorMessage"]=>
   NULL
+  ["diag"]=>
+  NULL
   ["numRows"]=>
   int(0)
   ["numCols"]=>
@@ -76,7 +82,7 @@ object(pq\Result)#%d (8) {
   ["autoConvert"]=>
   int(65535)
 }
-array(9) {
+array(10) {
   ["dummy"]=>
   int(2)
   ["status"]=>
@@ -85,6 +91,8 @@ array(9) {
   NULL
   ["errorMessage"]=>
   NULL
+  ["diag"]=>
+  NULL
   ["numRows"]=>
   int(0)
   ["numCols"]=>