scripts/mysql_debug/ghetto_profile.rb
# connect to the database and return the handle
# Mysql::CLIENT_MULTI_RESULTS = 131072
connect to the database and return the handle
Mysql::CLIENT_MULTI_RESULTS = 131072
connect to the database and return the handle Mysql :: CLIENT_MULTI_RESULTS = 131072
def connect(host, name, user, pass)
            str = sprintf('DBI:Mysql:database=%s;host=%s;flag=%s', 
                        name, host, 131072)
            begin
                dbh = DBI.connect(str, user, pass)
            rescue => ex
                puts sprintf("[%s] Failed to connect to '%s' with username '%s'", Time.new, str, user) + 
                    "\n\t" + ex.inspect + 
                    "\n\t" + ex.backtrace.join("\n\t") 
                exit
            end
        end
def connect ( host , name , user , pass ) str = sprintf ( 'DBI:Mysql:database=%s;host=%s;flag=%s' , name , host , 131072 ) begin dbh = DBI . connect ( str , user , pass ) rescue => ex puts sprintf ( "[%s] Failed to connect to '%s' with username '%s'" , Time . new , str , user ) + "\n\t" + ex . inspect + "\n\t" + ex . backtrace . join ( "\n\t" ) exit end end
connect to the database and return the handle
Mysql::CLIENT_MULTI_RESULTS = 131072
connect to the database and return the handle Mysql :: CLIENT_MULTI_RESULTS = 131072
host
<not_specific>
name
<not_specific>
user
<not_specific>
pass
<not_specific>