Skip to content

Commit 70d4125

Browse files
committed
Updated pdo_odbc, odbc_connect and odbc_pconnect
1 parent 111535a commit 70d4125

File tree

4 files changed

+73
-5
lines changed

4 files changed

+73
-5
lines changed

language-snippets.ent

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1856,6 +1856,31 @@ and <literal xmlns="http://docbook.org/ns/docbook">_</literal> to match a single
18561856
</entry>
18571857
</row>'>
18581858

1859+
<!ENTITY odbc.changelog.credential-params '<row xmlns="http://docbook.org/ns/docbook">
1860+
<entry>8.4.0</entry>
1861+
<entry>
1862+
<parameter>user</parameter> and <parameter>password</parameter> are now nullable
1863+
and are optional parameters with an initial value of &null;.
1864+
</entry>
1865+
</row>
1866+
<row xmlns="http://docbook.org/ns/docbook">
1867+
<entry>8.4.0</entry>
1868+
<entry>
1869+
When passing an empty <type>string</type> to <parameter>password</parameter>, <literal>pwd</literal>
1870+
was not included in the connection string created until now, but the behavior has been changed to include
1871+
it as an empty string. Passing &null; for <parameter>password</parameter> results in the same behavior as before.
1872+
</entry>
1873+
</row>
1874+
<row xmlns="http://docbook.org/ns/docbook">
1875+
<entry>8.4.0</entry>
1876+
<entry>
1877+
Changed the behavior to ignore <parameter>user</parameter> and <parameter>password</parameter> separately when
1878+
<parameter>dsn</parameter> contains <literal>uid</literal> or <literal>pwd</literal>.
1879+
Previously, if included only either <literal>uid</literal> or <literal>pwd</literal> in a <parameter>dsn</parameter>,
1880+
both <parameter>user</parameter> and <parameter>password</parameter> were ignored.
1881+
</entry>
1882+
</row>'>
1883+
18591884
<!ENTITY odbc.changelog.result-param '<row xmlns="http://docbook.org/ns/docbook">
18601885
<entry>8.4.0</entry>
18611886
<entry>

reference/pdo_odbc/reference.xml

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -116,6 +116,41 @@
116116
</variablelist>
117117
</para>
118118
</refsect1>
119+
120+
<refsect1 role="changelog">
121+
&reftitle.changelog;
122+
<informaltable>
123+
<tgroup cols="2">
124+
<thead>
125+
<row>
126+
<entry>&Version;</entry>
127+
<entry>&Description;</entry>
128+
</row>
129+
</thead>
130+
<tbody>
131+
<row>
132+
<entry>8.4.0</entry>
133+
<entry>
134+
When passing an empty <type>string</type> to the password argument in the PDO constructor, <literal>pwd</literal>
135+
was not included in the connection string created until now, but the behavior has been changed to include
136+
it as an empty string. Passing &null; for the password argument in the PDO constructor results in the same
137+
behavior as before.
138+
</entry>
139+
</row>
140+
<row>
141+
<entry>8.4.0</entry>
142+
<entry>
143+
Changed the behavior to ignore the user name argument and the password argument in the PDO constructor
144+
separately when the DSN contains <literal>uid</literal> or <literal>pwd</literal>.
145+
Previously, if included only either <literal>uid</literal> or <literal>pwd</literal> in the DSN,
146+
both the user name argument and the password argument in the PDO constructor were ignored.
147+
</entry>
148+
</row>
149+
</tbody>
150+
</tgroup>
151+
</informaltable>
152+
</refsect1>
153+
119154
<refsect1 role="examples">
120155
&reftitle.examples;
121156
<para>

reference/uodbc/functions/odbc-connect.xml

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,8 @@
1111
<methodsynopsis>
1212
<type class="union"><type>Odbc\Connection</type><type>false</type></type><methodname>odbc_connect</methodname>
1313
<methodparam><type>string</type><parameter>dsn</parameter></methodparam>
14-
<methodparam><type>string</type><parameter>user</parameter></methodparam>
15-
<methodparam><type>string</type><parameter>password</parameter></methodparam>
14+
<methodparam choice="opt"><type class="union"><type>string</type><type>null</type></type><parameter>user</parameter><initializer>&null;</initializer></methodparam>
15+
<methodparam choice="opt"><type class="union"><type>string</type><type>null</type></type><parameter>password</parameter><initializer>&null;</initializer></methodparam>
1616
<methodparam choice="opt"><type>int</type><parameter>cursor_option</parameter><initializer><constant>SQL_CUR_USE_DRIVER</constant></initializer></methodparam>
1717
</methodsynopsis>
1818
<simpara>
@@ -49,6 +49,9 @@
4949
<listitem>
5050
<para>
5151
The username.
52+
This parameter is ignored if <parameter>dsn</parameter> contains <literal>uid</literal>.
53+
If need to connect without specifying a <parameter>user</parameter>,
54+
please pass &null;.
5255
</para>
5356
</listitem>
5457
</varlistentry>
@@ -57,6 +60,9 @@
5760
<listitem>
5861
<para>
5962
The password.
63+
This parameter is ignored if <parameter>dsn</parameter> contains <literal>pwd</literal>.
64+
If need to connect without specifying a <parameter>password</parameter>,
65+
please pass &null;.
6066
</para>
6167
</listitem>
6268
</varlistentry>
@@ -115,6 +121,7 @@
115121
</thead>
116122
<tbody>
117123
&odbc.changelog.connection-return;
124+
&odbc.changelog.credential-params;
118125
</tbody>
119126
</tgroup>
120127
</informaltable>

reference/uodbc/functions/odbc-pconnect.xml

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<?xml version="1.0" encoding="utf-8"?>
22
<!-- $Revision$ -->
3-
<refentry xml:id="function.odbc-pconnect" xmlns="http://docbook.org/ns/docbook">
3+
<refentry xml:id="function.odbc-pconnect" xmlns="http://docbook.org/ns/docbook" xmlns:xi="http://www.w3.org/2001/XInclude">
44
<refnamediv>
55
<refname>odbc_pconnect</refname>
66
<refpurpose>Open a persistent database connection</refpurpose>
@@ -11,8 +11,8 @@
1111
<methodsynopsis>
1212
<type class="union"><type>Odbc\Connection</type><type>false</type></type><methodname>odbc_pconnect</methodname>
1313
<methodparam><type>string</type><parameter>dsn</parameter></methodparam>
14-
<methodparam><type>string</type><parameter>user</parameter></methodparam>
15-
<methodparam><type>string</type><parameter>password</parameter></methodparam>
14+
<methodparam choice="opt"><type class="union"><type>string</type><type>null</type></type><parameter>user</parameter><initializer>&null;</initializer></methodparam>
15+
<methodparam choice="opt"><type class="union"><type>string</type><type>null</type></type><parameter>password</parameter><initializer>&null;</initializer></methodparam>
1616
<methodparam choice="opt"><type>int</type><parameter>cursor_option</parameter><initializer><constant>SQL_CUR_USE_DRIVER</constant></initializer></methodparam>
1717
</methodsynopsis>
1818
<para>
@@ -56,6 +56,7 @@
5656
</thead>
5757
<tbody>
5858
&odbc.changelog.connection-return;
59+
&odbc.changelog.credential-params;
5960
</tbody>
6061
</tgroup>
6162
</informaltable>

0 commit comments

Comments
 (0)