El Viernes, 18 de Diciembre de 2009, Jeremy Evans escribió:
> On Dec 17, 2:54 pm, Iñaki Baz Castillo <[email protected]> wrote:
> > The author of mysqlplus is inspecting the report right now and perhaps it
> > changes the code not to use "require 'mysql'" anymore.
> 
> As I mentioned in the other thread, I'm willing to accept a patch to
> the mysql adapter to try mysqlplus first, and fallback to mysql if it
> is not available.

I hope the attached path is valid.

Regards.


-- 
Iñaki Baz Castillo <[email protected]>

--

You received this message because you are subscribed to the Google Groups 
"sequel-talk" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/sequel-talk?hl=en.


--- lib/sequel/adapters/mysql.rb        2009-12-18 01:14:03.000000000 +0100
+++ lib/sequel/adapters/mysql_new.rb    2009-12-18 01:14:44.000000000 +0100
@@ -1,5 +1,9 @@
-require 'mysql'
-raise(LoadError, "require 'mysql' did not define Mysql::CLIENT_MULTI_RESULTS!\n  You are probably using the pure ruby mysql.rb driver,\n  which Sequel does not support. You need to install\n  the C based adapter, and make sure that the mysql.so\n  file is loaded instead of the mysql.rb file.\n") unless defined?(Mysql::CLIENT_MULTI_RESULTS)
+begin
+  require "mysqlplus"
+rescue LoadError
+  require "mysql"
+  raise(LoadError, "require 'mysql' did not define Mysql::CLIENT_MULTI_RESULTS!\n  You are probably using the pure ruby mysql.rb driver,\n  which Sequel does not support. You need to install\n  the C based adapter, and make sure that the mysql.so\n  file is loaded instead of the mysql.rb file.\n") unless defined?(Mysql::CLIENT_MULTI_RESULTS)
+end
 Sequel.require %w'shared/mysql utils/stored_procedures', 'adapters'

 module Sequel

Reply via email to