Ruby on Rails | Screencasts | Download | Documentation | Weblog | Community | Source

Ticket #3622 (closed defect: fixed)

Opened 4 years ago

Last modified 4 years ago

[PATCH] Allow for optional username and password in the db2 connector

Reported by: phurley@gmail.com Assigned to: David
Priority: low Milestone:
Component: ActiveRecord Version: 1.0.0
Severity: minor Keywords: db2 nil user password
Cc:

Description

In db2 connector, according to its documentation, user name and password are optional; however, if they are not specified in the database.yml file an invalid use of nil occurs in Connection#connect. Attached if a very simple patch to avoid this error (I just to_s the params making the user name/password fields empty strings if they were nil, which by the way is the default arguments for the function as well).

I was unsure how to insert a connection specific unit test (and create a test database without a user name/password to show the working case), so I was unable to create a test case to demonstrate and verify the problem resolution.

Attachments

allow_optional_username_pass_for_db2.diff (0.5 kB) - added by phurley@gmail.com on 01/26/06 13:50:33.
[PATCH] Simple patch to allow blank user name/password in db2 connections

Change History

01/26/06 13:50:33 changed by phurley@gmail.com

  • attachment allow_optional_username_pass_for_db2.diff added.

[PATCH] Simple patch to allow blank user name/password in db2 connections

02/26/06 00:01:14 changed by david

  • status changed from new to closed.
  • resolution set to fixed.

(In [3655]) Fixed db2 connection with empty user_name and auth options (closes #3622) [phurley@gmail.com]