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

Ticket #5723 (closed enhancement: fixed)

Opened 3 years ago

Last modified 3 years ago

[PATCH] mysql 4.1+ authentication support for ruby/mysql

Reported by: jimw@mysql.com Assigned to: bitsweat
Priority: normal Milestone: 1.2
Component: ActiveRecord Version: 1.1.1
Severity: normal Keywords: mysql
Cc: bitsweat

Description

This patch adds support to Ruby/MySQL for the new authentication handshake that was introduced in MySQL 4.1, along with the other protocol changes made at that time. It also updates some of the hardcoded constants, and handles the new parameter for the shutdown command.

The patch is against version 0.2.6 of Ruby/MySQL.

(This was sent upstream, but I'm also submitting it here to get more feedback.)

Attachments

ruby-mysql-4.1-auth.diff (12.2 kB) - added by jimw@mysql.com on 08/05/06 00:22:17.
Patch to add 4.1-style authentication support
ar_mysql.patch (6.1 kB) - added by bitsweat on 08/05/06 02:23:54.
fwiw - 0.26 mysql.rb vs the AR mysql.rb
ruby-mysql-ar-fix.diff (1.8 kB) - added by jimw@mysql.com on 08/17/06 19:33:37.
patch to do auth fallback in ar's version of mysql.rb
ruby-mysql-ar-fix.2.diff (1.8 kB) - added by jimw@mysql.com on 08/24/06 11:25:09.
patch to do auth fallback in ar's version of mysql.rb

Change History

08/05/06 00:22:17 changed by jimw@mysql.com

  • attachment ruby-mysql-4.1-auth.diff added.

Patch to add 4.1-style authentication support

08/05/06 02:05:34 changed by bitsweat

  • owner changed from David to bitsweat.
  • version set to 1.1.1.
  • milestone set to 1.2.

Wow, nice! Could you do a diff against lib/active_record/vendor/mysql.rb on svn trunk as well? It has local patches which conflict with this patch.

08/05/06 02:23:54 changed by bitsweat

  • attachment ar_mysql.patch added.

fwiw - 0.26 mysql.rb vs the AR mysql.rb

08/17/06 19:33:37 changed by jimw@mysql.com

  • attachment ruby-mysql-ar-fix.diff added.

patch to do auth fallback in ar's version of mysql.rb

08/17/06 19:34:24 changed by jimw@mysql.com

Okay, so I guess I shouldn't have trusted seeing the 0.2.5 version number in AR's version of mysql.rb to judge it as being out-of-date relative to the upstream. Attached is a patch to fix the fallback to old-style authentication to AR's version of mysql.rb. And change the version number so nobody makes the same mistake that I did.

08/24/06 10:34:54 changed by bitsweat

  • cc set to bitsweat.

Several changes made to the local 0.2.5 mysql.rb were also submitted upstream. The author did not respond to any of the changes.

Could you upload a new patch? Trac seems to have misplaced your last attachment.

08/24/06 11:25:09 changed by jimw@mysql.com

  • attachment ruby-mysql-ar-fix.2.diff added.

patch to do auth fallback in ar's version of mysql.rb

09/04/06 17:55:28 changed by david

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

(In [4990]) Fixed the Ruby/MySQL adapter we ship with Active Record to work with the new authentication handshake that was introduced in MySQL 4.1, along with the other protocol changes made at that time (closes #5723) [jimw@mysql.com]