From: Christopher Jones Date: Tue, 4 Mar 2008 21:45:55 +0000 (+0000) Subject: Fix bug #41069 (db link crash). Also allow SQLT_AFC (aka CHAR datatype) in oci_bind_... X-Git-Tag: RELEASE_2_0_0a1~255 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=2da1432d752dff5d7eb8a5313673b518d7465b88;p=php Fix bug #41069 (db link crash). Also allow SQLT_AFC (aka CHAR datatype) in oci_bind_by_name --- diff --git a/ext/oci8/oci8_statement.c b/ext/oci8/oci8_statement.c index a97e06aa1c..4f6d21a854 100644 --- a/ext/oci8/oci8_statement.c +++ b/ext/oci8/oci8_statement.c @@ -127,22 +127,13 @@ php_oci_statement *php_oci_statement_create (php_oci_connection *connection, zst Set prefetch buffer size for the statement (we're assuming that one row is ~1K sized) */ int php_oci_statement_set_prefetch(php_oci_statement *statement, long size TSRMLS_DC) { - ub4 prefetch = size * 1024; + ub4 prefetch = size; if (size < 1) { php_error_docref(NULL TSRMLS_CC, E_WARNING, "Number of rows has to be greater than or equal to 1"); return 1; } - PHP_OCI_CALL_RETURN(statement->errcode, OCIAttrSet, (statement->stmt, OCI_HTYPE_STMT, &prefetch, 0, OCI_ATTR_PREFETCH_MEMORY, statement->err)); - - if (statement->errcode != OCI_SUCCESS) { - php_oci_error(statement->err, statement->errcode TSRMLS_CC); - PHP_OCI_HANDLE_ERROR(statement->connection, statement->errcode); - return 1; - } - - prefetch = size; PHP_OCI_CALL_RETURN(statement->errcode, OCIAttrSet, (statement->stmt, OCI_HTYPE_STMT, &prefetch, 0, OCI_ATTR_PREFETCH_ROWS, statement->err)); if (statement->errcode != OCI_SUCCESS) { @@ -1010,8 +1001,8 @@ int php_oci_bind_by_name(php_oci_statement *statement, zstr name, int name_len, case SQLT_LBI: case SQLT_BIN: case SQLT_LNG: - case SQLT_CHR: - /* this is the default case when type was not specified */ + case SQLT_AFC: + case SQLT_CHR: /* SQLT_CHAR is the default value when type was not specified */ if (Z_TYPE_P(var) != IS_NULL) { convert_to_text(var); } diff --git a/ext/oci8/tests/bind_char_1.phpt b/ext/oci8/tests/bind_char_1.phpt new file mode 100644 index 0000000000..23493ce772 --- /dev/null +++ b/ext/oci8/tests/bind_char_1.phpt @@ -0,0 +1,376 @@ +--TEST-- +SELECT oci_bind_by_name with SQLT_AFC aka CHAR +--SKIPIF-- + +--FILE-- + +--EXPECT-- +*** Non-null Data Tests against CHAR*** +Test 1.1: Type: default. Length: default + Querying: +Test 1.2: Type: AFC. Length: default + Querying: + :1: + :abc : + :: +Test 1.3: Type: AFC: Length: 0 + Querying: + Oci_execute error ORA-1460 Exiting Query +Test 1.4: Type: AFC: Length: strlen + Querying: + :1: + :abc : + :: +Test 1.5: Type: AFC. Length: strlen-1 + Querying: + Oci_execute error ORA-1460 Exiting Query +Test 1.6: Type: AFC. Length: strlen+1 + Querying: + :1: + :abc : + :: + + +*** NULL data tests against CHAR *** +Test 2.1: Type: default. Length: default + Querying: +Test 2.2: Type: AFC. Length: default + Querying: +Test 2.3: Type: AFC: Length: 0 + Querying: +Test 2.4: Type: AFC: Length: strlen + Querying: +Test 2.5: Type: AFC. Length: strlen-1 + Querying: +Test 2.6: Type: AFC. Length: strlen+1 + Querying: + + +*** Non-null Data Tests against VARCHAR2*** +Test 3.1: Type: default. Length: default + Querying: + :2: + :: + :abc: +Test 3.2: Type: AFC. Length: default + Querying: + :2: + :: + :abc: +Test 3.3: Type: AFC: Length: 0 + Querying: + Oci_execute error ORA-1460 Exiting Query +Test 3.4: Type: AFC: Length: strlen + Querying: + :2: + :: + :abc: +Test 3.5: Type: AFC. Length: strlen-1 + Querying: + Oci_execute error ORA-1460 Exiting Query +Test 3.6: Type: AFC. Length: strlen+1 + Querying: + :2: + :: + :abc: + + +*** NULL data tests against VARCHAR2 *** +Test 4.1: Type: default. Length: default + Querying: +Test 4.2: Type: AFC. Length: default + Querying: +Test 4.3: Type: AFC: Length: 0 + Querying: +Test 4.4: Type: AFC: Length: strlen + Querying: +Test 4.5: Type: AFC. Length: strlen-1 + Querying: +Test 4.6: Type: AFC. Length: strlen+1 + Querying: +Done +--UEXPECT-- +*** Non-null Data Tests against CHAR*** +Test 1.1: Type: default. Length: default + Querying: +Test 1.2: Type: AFC. Length: default + Querying: + :1: + :abc : + :: +Test 1.3: Type: AFC: Length: 0 + Querying: + Oci_execute error ORA-1460 Exiting Query +Test 1.4: Type: AFC: Length: strlen + Querying: + :1: + :abc : + :: +Test 1.5: Type: AFC. Length: strlen-1 + Querying: + :1: + :abc : + :: +Test 1.6: Type: AFC. Length: strlen+1 + Querying: + :1: + :abc : + :: + + +*** NULL data tests against CHAR *** +Test 2.1: Type: default. Length: default + Querying: +Test 2.2: Type: AFC. Length: default + Querying: +Test 2.3: Type: AFC: Length: 0 + Querying: +Test 2.4: Type: AFC: Length: strlen + Querying: +Test 2.5: Type: AFC. Length: strlen-1 + Querying: +Test 2.6: Type: AFC. Length: strlen+1 + Querying: + + +*** Non-null Data Tests against VARCHAR2*** +Test 3.1: Type: default. Length: default + Querying: + :2: + :: + :abc: +Test 3.2: Type: AFC. Length: default + Querying: + :2: + :: + :abc: +Test 3.3: Type: AFC: Length: 0 + Querying: + Oci_execute error ORA-1460 Exiting Query +Test 3.4: Type: AFC: Length: strlen + Querying: + :2: + :: + :abc: +Test 3.5: Type: AFC. Length: strlen-1 + Querying: + :2: + :: + :abc: +Test 3.6: Type: AFC. Length: strlen+1 + Querying: + :2: + :: + :abc: + + +*** NULL data tests against VARCHAR2 *** +Test 4.1: Type: default. Length: default + Querying: +Test 4.2: Type: AFC. Length: default + Querying: +Test 4.3: Type: AFC: Length: 0 + Querying: +Test 4.4: Type: AFC: Length: strlen + Querying: +Test 4.5: Type: AFC. Length: strlen-1 + Querying: +Test 4.6: Type: AFC. Length: strlen+1 + Querying: +Done diff --git a/ext/oci8/tests/bind_char_2.phpt b/ext/oci8/tests/bind_char_2.phpt new file mode 100644 index 0000000000..3cbc0d9f7b --- /dev/null +++ b/ext/oci8/tests/bind_char_2.phpt @@ -0,0 +1,140 @@ +--TEST-- +SELECT oci_bind_by_name with SQLT_AFC aka CHAR and dates +--SKIPIF-- + +--FILE-- + +--EXPECT-- +Test 1.1: Type: default. Length: default + Querying: + :1: + :2008-04-20: +Test 1.2: Type: AFC. Length: default + Querying: + :1: + :2008-04-20: +Test 1.3: Type: AFC: Length: 0 + Querying: + Oci_execute error ORA-1460 Exiting Query +Test 1.4: Type: AFC: Length: strlen + Querying: + :1: + :2008-04-20: +Test 1.5: Type: AFC. Length: strlen-1 + Querying: + Oci_execute error ORA-1460 Exiting Query +Test 1.6: Type: AFC. Length: strlen+1 + Querying: + :1: + :2008-04-20: +Done +--UEXPECT-- +Test 1.1: Type: default. Length: default + Querying: + :1: + :2008-04-20: +Test 1.2: Type: AFC. Length: default + Querying: + :1: + :2008-04-20: +Test 1.3: Type: AFC: Length: 0 + Querying: + Oci_execute error ORA-1460 Exiting Query +Test 1.4: Type: AFC: Length: strlen + Querying: + :1: + :2008-04-20: +Test 1.5: Type: AFC. Length: strlen-1 + Querying: + :1: + :2008-04-20: +Test 1.6: Type: AFC. Length: strlen+1 + Querying: + :1: + :2008-04-20: +Done diff --git a/ext/oci8/tests/bind_char_3.phpt b/ext/oci8/tests/bind_char_3.phpt new file mode 100644 index 0000000000..b6fb5efbc2 --- /dev/null +++ b/ext/oci8/tests/bind_char_3.phpt @@ -0,0 +1,426 @@ +--TEST-- +PL/SQL oci_bind_by_name with SQLT_AFC aka CHAR to CHAR parameter +--SKIPIF-- + +--FILE-- + +--EXPECTF-- +Test 1.1 In Length: default. In Type: default. Out Length: default. Out Type: default + Executing: + Oci_execute error ORA-6502 +string(3) "abc" +NULL +Test 1.2 In Length: default. In Type: default. Out Length: 10. Out Type: default + Executing: +string(3) "abc" +string(3) "abc" +Test 1.3 In Length: -1. In Type: AFC. Out Length: 10. Out Type: default + Executing: +string(3) "abc" +string(3) "abc" +Test 1.4 In Length: -1. In Type: AFC. Out Length: 10. Out Type: AFC + Executing: +string(3) "abc" +string(10) "abc " +Test 1.5 In Length: strlen. In Type: AFC. Out Length: strlen(input). Out Type: AFC + Executing: +string(3) "abc" +string(3) "abc" +Test 1.6 In Length: strlen. In Type: AFC. Out Length: strlen(input)-1. Out Type: AFC + Executing: + Oci_execute error ORA-6502 +string(3) "abc" +string(3) "abc" +Test 1.7 In Length: strlen. In Type: AFC. Out Length: strlen(input)+1. Out Type: AFC + Executing: +string(3) "abc" +string(4) "abc " + + +Tests with '' + +Test 2.1 In Length: -1. In Type: AFC. Out Length: 10. Out Type: AFC + Executing: +string(0) "" +NULL +Test 2.2 In Length: default. In Type: default. Out Length: 10. Out Type: default + Executing: +string(0) "" +NULL +Test 2.3 In Length: -1. In Type: AFC. Out Length: 10. Out Type: default + Executing: +string(0) "" +NULL +Test 2.4 In Length: -1. In Type: AFC. Out Length: 10. Out Type: AFC + Executing: +string(0) "" +NULL +Test 2.5 In Length: -1. In Type: AFC. Out Length: 0. Out Type: AFC + Executing: +string(0) "" +NULL +Test 2.6 In Length: 0. In Type: AFC. Out Length: 0. Out Type: AFC + Executing: +string(0) "" +NULL +Test 2.7 In Length: 1. In Type: AFC. Out Length: 1. Out Type: AFC + Executing: +string(0) "" +NULL + + +Tests with NULL +Test 3.1 In Length: -1. In Type: AFC. Out Length: 10. Out Type: AFC + Executing: +NULL +NULL +Test 3.2 In Length: default. In Type: default. Out Length: 10. Out Type: default + Executing: +NULL +NULL +Test 3.3 In Length: -1. In Type: AFC. Out Length: 10. Out Type: default + Executing: +NULL +NULL +Test 3.4 In Length: -1. In Type: AFC. Out Length: 10. Out Type: AFC + Executing: +NULL +NULL +Test 3.5 In Length: -1. In Type: AFC. Out Length: 0. Out Type: AFC + Executing: +NULL +NULL +Test 3.6 In Length: -1. In Type: AFC. Out Length: 1. Out Type: AFC + Executing: +NULL +NULL +Done +--UEXPECT-- +Test 1.1 In Length: default. In Type: default. Out Length: default. Out Type: default + Executing: + Oci_execute error ORA-6502 +unicode(3) "abc" +NULL +Test 1.2 In Length: default. In Type: default. Out Length: 10. Out Type: default + Executing: +unicode(3) "abc" +unicode(3) "abc" +Test 1.3 In Length: -1. In Type: AFC. Out Length: 10. Out Type: default + Executing: +unicode(3) "abc" +unicode(3) "abc" +Test 1.4 In Length: -1. In Type: AFC. Out Length: 10. Out Type: AFC + Executing: +unicode(3) "abc" +unicode(20) "abc " +Test 1.5 In Length: strlen. In Type: AFC. Out Length: strlen(input). Out Type: AFC + Executing: +unicode(3) "abc" +unicode(6) "abc " +Test 1.6 In Length: strlen. In Type: AFC. Out Length: strlen(input)-1. Out Type: AFC + Executing: +unicode(3) "abc" +unicode(4) "abc " +Test 1.7 In Length: strlen. In Type: AFC. Out Length: strlen(input)+1. Out Type: AFC + Executing: +unicode(3) "abc" +unicode(8) "abc " + + +Tests with '' + +Test 2.1 In Length: -1. In Type: AFC. Out Length: 10. Out Type: AFC + Executing: +unicode(0) "" +NULL +Test 2.2 In Length: default. In Type: default. Out Length: 10. Out Type: default + Executing: +unicode(0) "" +NULL +Test 2.3 In Length: -1. In Type: AFC. Out Length: 10. Out Type: default + Executing: +unicode(0) "" +NULL +Test 2.4 In Length: -1. In Type: AFC. Out Length: 10. Out Type: AFC + Executing: +unicode(0) "" +NULL +Test 2.5 In Length: -1. In Type: AFC. Out Length: 0. Out Type: AFC + Executing: +unicode(0) "" +NULL +Test 2.6 In Length: 0. In Type: AFC. Out Length: 0. Out Type: AFC + Executing: +unicode(0) "" +NULL +Test 2.7 In Length: 1. In Type: AFC. Out Length: 1. Out Type: AFC + Executing: +unicode(0) "" +NULL + + +Tests with NULL +Test 3.1 In Length: -1. In Type: AFC. Out Length: 10. Out Type: AFC + Executing: +NULL +NULL +Test 3.2 In Length: default. In Type: default. Out Length: 10. Out Type: default + Executing: +NULL +NULL +Test 3.3 In Length: -1. In Type: AFC. Out Length: 10. Out Type: default + Executing: +NULL +NULL +Test 3.4 In Length: -1. In Type: AFC. Out Length: 10. Out Type: AFC + Executing: +NULL +NULL +Test 3.5 In Length: -1. In Type: AFC. Out Length: 0. Out Type: AFC + Executing: +NULL +NULL +Test 3.6 In Length: -1. In Type: AFC. Out Length: 1. Out Type: AFC + Executing: +NULL +NULL +Done diff --git a/ext/oci8/tests/bind_char_4.phpt b/ext/oci8/tests/bind_char_4.phpt new file mode 100644 index 0000000000..3ddcfddd99 --- /dev/null +++ b/ext/oci8/tests/bind_char_4.phpt @@ -0,0 +1,428 @@ +--TEST-- +PL/SQL oci_bind_by_name with SQLT_AFC aka CHAR to VARCHAR2 parameter +--SKIPIF-- + +--FILE-- + +--EXPECTF-- +Test 1.1 In Length: default. In Type: default. Out Length: default. Out Type: default + Executing: + Oci_execute error ORA-6502 +string(3) "abc" +NULL +Test 1.2 In Length: default. In Type: default. Out Length: 10. Out Type: default + Executing: +string(3) "abc" +string(3) "abc" +Test 1.3 In Length: -1. In Type: AFC. Out Length: 10. Out Type: default + Executing: +string(3) "abc" +string(3) "abc" +Test 1.4 In Length: -1. In Type: AFC. Out Length: 10. Out Type: AFC + Executing: +string(3) "abc" +string(10) "abc " +Test 1.5 In Length: strlen. In Type: AFC. Out Length: strlen(input). Out Type: AFC + Executing: +string(3) "abc" +string(3) "abc" +Test 1.6 In Length: strlen. In Type: AFC. Out Length: strlen(input)-1. Out Type: AFC + Executing: + Oci_execute error ORA-6502 +string(3) "abc" +string(3) "abc" +Test 1.7 In Length: strlen. In Type: AFC. Out Length: strlen(input)+1. Out Type: AFC + Executing: +string(3) "abc" +string(4) "abc " + + +Tests with '' + +Test 2.1 In Length: -1. In Type: AFC. Out Length: 10. Out Type: AFC + Executing: +string(0) "" +NULL +Test 2.2 In Length: default. In Type: default. Out Length: 10. Out Type: default + Executing: +string(0) "" +NULL +Test 2.3 In Length: -1. In Type: AFC. Out Length: 10. Out Type: default + Executing: +string(0) "" +NULL +Test 2.4 In Length: -1. In Type: AFC. Out Length: 10. Out Type: AFC + Executing: +string(0) "" +NULL +Test 2.5 In Length: -1. In Type: AFC. Out Length: 0. Out Type: AFC + Executing: +string(0) "" +NULL +Test 2.6 In Length: 0. In Type: AFC. Out Length: 0. Out Type: AFC + Executing: +string(0) "" +NULL +Test 2.7 In Length: 1. In Type: AFC. Out Length: 1. Out Type: AFC + Executing: +string(0) "" +NULL + + +Tests with NULL +Test 3.1 In Length: -1. In Type: AFC. Out Length: 10. Out Type: AFC + Executing: +NULL +NULL +Test 3.2 In Length: default. In Type: default. Out Length: 10. Out Type: default + Executing: +NULL +NULL +Test 3.3 In Length: -1. In Type: AFC. Out Length: 10. Out Type: default + Executing: +NULL +NULL +Test 3.4 In Length: -1. In Type: AFC. Out Length: 10. Out Type: AFC + Executing: +NULL +NULL +Test 3.5 In Length: -1. In Type: AFC. Out Length: 0. Out Type: AFC + Executing: +NULL +NULL +Test 3.6 In Length: -1. In Type: AFC. Out Length: 1. Out Type: AFC + Executing: +NULL +NULL +Done +--UEXPECT-- +Test 1.1 In Length: default. In Type: default. Out Length: default. Out Type: default + Executing: + Oci_execute error ORA-6502 +unicode(3) "abc" +NULL +Test 1.2 In Length: default. In Type: default. Out Length: 10. Out Type: default + Executing: +unicode(3) "abc" +unicode(3) "abc" +Test 1.3 In Length: -1. In Type: AFC. Out Length: 10. Out Type: default + Executing: +unicode(3) "abc" +unicode(3) "abc" +Test 1.4 In Length: -1. In Type: AFC. Out Length: 10. Out Type: AFC + Executing: +unicode(3) "abc" +unicode(20) "abc " +Test 1.5 In Length: strlen. In Type: AFC. Out Length: strlen(input). Out Type: AFC + Executing: +unicode(3) "abc" +unicode(6) "abc " +Test 1.6 In Length: strlen. In Type: AFC. Out Length: strlen(input)-1. Out Type: AFC + Executing: +unicode(3) "abc" +unicode(4) "abc " +Test 1.7 In Length: strlen. In Type: AFC. Out Length: strlen(input)+1. Out Type: AFC + Executing: +unicode(3) "abc" +unicode(8) "abc " + + +Tests with '' + +Test 2.1 In Length: -1. In Type: AFC. Out Length: 10. Out Type: AFC + Executing: +unicode(0) "" +NULL +Test 2.2 In Length: default. In Type: default. Out Length: 10. Out Type: default + Executing: +unicode(0) "" +NULL +Test 2.3 In Length: -1. In Type: AFC. Out Length: 10. Out Type: default + Executing: +unicode(0) "" +NULL +Test 2.4 In Length: -1. In Type: AFC. Out Length: 10. Out Type: AFC + Executing: +unicode(0) "" +NULL +Test 2.5 In Length: -1. In Type: AFC. Out Length: 0. Out Type: AFC + Executing: +unicode(0) "" +NULL +Test 2.6 In Length: 0. In Type: AFC. Out Length: 0. Out Type: AFC + Executing: +unicode(0) "" +NULL +Test 2.7 In Length: 1. In Type: AFC. Out Length: 1. Out Type: AFC + Executing: +unicode(0) "" +NULL + + +Tests with NULL +Test 3.1 In Length: -1. In Type: AFC. Out Length: 10. Out Type: AFC + Executing: +NULL +NULL +Test 3.2 In Length: default. In Type: default. Out Length: 10. Out Type: default + Executing: +NULL +NULL +Test 3.3 In Length: -1. In Type: AFC. Out Length: 10. Out Type: default + Executing: +NULL +NULL +Test 3.4 In Length: -1. In Type: AFC. Out Length: 10. Out Type: AFC + Executing: +NULL +NULL +Test 3.5 In Length: -1. In Type: AFC. Out Length: 0. Out Type: AFC + Executing: +NULL +NULL +Test 3.6 In Length: -1. In Type: AFC. Out Length: 1. Out Type: AFC + Executing: +NULL +NULL +Done diff --git a/ext/oci8/tests/bug41069.phpt b/ext/oci8/tests/bug41069.phpt new file mode 100644 index 0000000000..2bfe07a0b9 --- /dev/null +++ b/ext/oci8/tests/bug41069.phpt @@ -0,0 +1,457 @@ +--TEST-- +Bug #41069 (Oracle crash with certain data over a DB-link when prefetch memory limit used - Oracle bug 6039623) +--SKIPIF-- + +--INI-- +oci8.default_prefetch=5 +--FILE-- + +--EXPECT-- +Test 1: non-DB link case that always worked +array(3) { + [0]=> + array(13) { + ["C1"]=> + string(3) "111" + ["C2"]=> + string(7) "aaaaaaa" + ["C3"]=> + NULL + ["C4"]=> + NULL + ["C5"]=> + string(1) "b" + ["C6"]=> + string(1) "c" + ["C7"]=> + NULL + ["C8"]=> + NULL + ["C9"]=> + string(10) "01/17/2008" + ["C10"]=> + string(10) "01/07/2017" + ["C12"]=> + string(4) "2222" + ["C13"]=> + NULL + ["C15"]=> + string(10) "zzzzzzzzzz" + } + [1]=> + array(13) { + ["C1"]=> + string(3) "112" + ["C2"]=> + string(7) "aaaaaaa" + ["C3"]=> + string(8) "bbbbbbbb" + ["C4"]=> + string(7) "ccccccc" + ["C5"]=> + string(1) "d" + ["C6"]=> + string(1) "e" + ["C7"]=> + string(7) "rrrrrrr" + ["C8"]=> + NULL + ["C9"]=> + string(10) "04/16/2007" + ["C10"]=> + string(10) "04/16/2007" + ["C12"]=> + string(4) "2223" + ["C13"]=> + string(8) "xxxxxxxx" + ["C15"]=> + string(8) "zzzzzzzz" + } + [2]=> + array(13) { + ["C1"]=> + string(3) "113" + ["C2"]=> + string(7) "aaaaaaa" + ["C3"]=> + string(10) "bbbbbbbbbb" + ["C4"]=> + string(6) "cccccc" + ["C5"]=> + string(1) "e" + ["C6"]=> + string(1) "f" + ["C7"]=> + string(4) "dddd" + ["C8"]=> + NULL + ["C9"]=> + string(10) "12/04/2006" + ["C10"]=> + string(10) "12/04/2006" + ["C12"]=> + string(4) "2224" + ["C13"]=> + NULL + ["C15"]=> + string(7) "zzzzzzz" + } +} +Test 2: Should not crash +array(3) { + [0]=> + array(13) { + ["C1"]=> + string(3) "111" + ["C2"]=> + string(7) "aaaaaaa" + ["C3"]=> + NULL + ["C4"]=> + NULL + ["C5"]=> + string(1) "b" + ["C6"]=> + string(1) "c" + ["C7"]=> + NULL + ["C8"]=> + NULL + ["C9"]=> + string(10) "01/17/2008" + ["C10"]=> + string(10) "01/07/2017" + ["C12"]=> + string(4) "2222" + ["C13"]=> + NULL + ["C15"]=> + string(10) "zzzzzzzzzz" + } + [1]=> + array(13) { + ["C1"]=> + string(3) "112" + ["C2"]=> + string(7) "aaaaaaa" + ["C3"]=> + string(8) "bbbbbbbb" + ["C4"]=> + string(7) "ccccccc" + ["C5"]=> + string(1) "d" + ["C6"]=> + string(1) "e" + ["C7"]=> + string(7) "rrrrrrr" + ["C8"]=> + NULL + ["C9"]=> + string(10) "04/16/2007" + ["C10"]=> + string(10) "04/16/2007" + ["C12"]=> + string(4) "2223" + ["C13"]=> + string(8) "xxxxxxxx" + ["C15"]=> + string(8) "zzzzzzzz" + } + [2]=> + array(13) { + ["C1"]=> + string(3) "113" + ["C2"]=> + string(7) "aaaaaaa" + ["C3"]=> + string(10) "bbbbbbbbbb" + ["C4"]=> + string(6) "cccccc" + ["C5"]=> + string(1) "e" + ["C6"]=> + string(1) "f" + ["C7"]=> + string(4) "dddd" + ["C8"]=> + NULL + ["C9"]=> + string(10) "12/04/2006" + ["C10"]=> + string(10) "12/04/2006" + ["C12"]=> + string(4) "2224" + ["C13"]=> + NULL + ["C15"]=> + string(7) "zzzzzzz" + } +} +Done +--UEXPECT-- +Test 1: non-DB link case that always worked +array(3) { + [0]=> + array(13) { + [u"C1"]=> + unicode(3) "111" + [u"C2"]=> + unicode(7) "aaaaaaa" + [u"C3"]=> + NULL + [u"C4"]=> + NULL + [u"C5"]=> + unicode(1) "b" + [u"C6"]=> + unicode(1) "c" + [u"C7"]=> + NULL + [u"C8"]=> + NULL + [u"C9"]=> + unicode(10) "01/17/2008" + [u"C10"]=> + unicode(10) "01/07/2017" + [u"C12"]=> + unicode(4) "2222" + [u"C13"]=> + NULL + [u"C15"]=> + unicode(10) "zzzzzzzzzz" + } + [1]=> + array(13) { + [u"C1"]=> + unicode(3) "112" + [u"C2"]=> + unicode(7) "aaaaaaa" + [u"C3"]=> + unicode(8) "bbbbbbbb" + [u"C4"]=> + unicode(7) "ccccccc" + [u"C5"]=> + unicode(1) "d" + [u"C6"]=> + unicode(1) "e" + [u"C7"]=> + unicode(7) "rrrrrrr" + [u"C8"]=> + NULL + [u"C9"]=> + unicode(10) "04/16/2007" + [u"C10"]=> + unicode(10) "04/16/2007" + [u"C12"]=> + unicode(4) "2223" + [u"C13"]=> + unicode(8) "xxxxxxxx" + [u"C15"]=> + unicode(8) "zzzzzzzz" + } + [2]=> + array(13) { + [u"C1"]=> + unicode(3) "113" + [u"C2"]=> + unicode(7) "aaaaaaa" + [u"C3"]=> + unicode(10) "bbbbbbbbbb" + [u"C4"]=> + unicode(6) "cccccc" + [u"C5"]=> + unicode(1) "e" + [u"C6"]=> + unicode(1) "f" + [u"C7"]=> + unicode(4) "dddd" + [u"C8"]=> + NULL + [u"C9"]=> + unicode(10) "12/04/2006" + [u"C10"]=> + unicode(10) "12/04/2006" + [u"C12"]=> + unicode(4) "2224" + [u"C13"]=> + NULL + [u"C15"]=> + unicode(7) "zzzzzzz" + } +} +Test 2: Should not crash +array(3) { + [0]=> + array(13) { + [u"C1"]=> + unicode(3) "111" + [u"C2"]=> + unicode(7) "aaaaaaa" + [u"C3"]=> + NULL + [u"C4"]=> + NULL + [u"C5"]=> + unicode(1) "b" + [u"C6"]=> + unicode(1) "c" + [u"C7"]=> + NULL + [u"C8"]=> + NULL + [u"C9"]=> + unicode(10) "01/17/2008" + [u"C10"]=> + unicode(10) "01/07/2017" + [u"C12"]=> + unicode(4) "2222" + [u"C13"]=> + NULL + [u"C15"]=> + unicode(10) "zzzzzzzzzz" + } + [1]=> + array(13) { + [u"C1"]=> + unicode(3) "112" + [u"C2"]=> + unicode(7) "aaaaaaa" + [u"C3"]=> + unicode(8) "bbbbbbbb" + [u"C4"]=> + unicode(7) "ccccccc" + [u"C5"]=> + unicode(1) "d" + [u"C6"]=> + unicode(1) "e" + [u"C7"]=> + unicode(7) "rrrrrrr" + [u"C8"]=> + NULL + [u"C9"]=> + unicode(10) "04/16/2007" + [u"C10"]=> + unicode(10) "04/16/2007" + [u"C12"]=> + unicode(4) "2223" + [u"C13"]=> + unicode(8) "xxxxxxxx" + [u"C15"]=> + unicode(8) "zzzzzzzz" + } + [2]=> + array(13) { + [u"C1"]=> + unicode(3) "113" + [u"C2"]=> + unicode(7) "aaaaaaa" + [u"C3"]=> + unicode(10) "bbbbbbbbbb" + [u"C4"]=> + unicode(6) "cccccc" + [u"C5"]=> + unicode(1) "e" + [u"C6"]=> + unicode(1) "f" + [u"C7"]=> + unicode(4) "dddd" + [u"C8"]=> + NULL + [u"C9"]=> + unicode(10) "12/04/2006" + [u"C10"]=> + unicode(10) "12/04/2006" + [u"C12"]=> + unicode(4) "2224" + [u"C13"]=> + NULL + [u"C15"]=> + unicode(7) "zzzzzzz" + } +} +Done