This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| require File.dirname(__FILE__) + '/test_helper' | |
| m = Mysql.real_connect('localhost','root') | |
| class << m | |
| def safe_query( query ) | |
| begin | |
| send_query( query ) | |
| rescue => e |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| diff --git a/ext/mysql.c b/ext/mysql.c | |
| index b804723..b6a3227 100644 | |
| --- a/ext/mysql.c | |
| +++ b/ext/mysql.c | |
| @@ -61,6 +61,7 @@ struct mysql { | |
| char connection; | |
| char query_with_result; | |
| char blocking; | |
| + int async_in_progress; | |
| }; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| diff --git a/ext/mysql.c b/ext/mysql.c | |
| index b804723..472f0eb 100644 | |
| --- a/ext/mysql.c | |
| +++ b/ext/mysql.c | |
| @@ -61,6 +61,7 @@ struct mysql { | |
| char connection; | |
| char query_with_result; | |
| char blocking; | |
| + char query_sent; | |
| }; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| diff --git a/ext/mysql.c b/ext/mysql.c | |
| index b804723..372edf4 100644 | |
| --- a/ext/mysql.c | |
| +++ b/ext/mysql.c | |
| @@ -61,6 +61,7 @@ struct mysql { | |
| char connection; | |
| char query_with_result; | |
| char blocking; | |
| + char query_sent; | |
| }; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| require File.dirname(__FILE__) + '/test_helper' | |
| c = Mysql.real_connect('localhost','root') | |
| c.send_query('select sleep(1)') | |
| c.send_query('select sleep(1)') |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| diff --git a/ext/mysql.c b/ext/mysql.c | |
| index b804723..d957978 100644 | |
| --- a/ext/mysql.c | |
| +++ b/ext/mysql.c | |
| @@ -798,13 +798,16 @@ static VALUE send_query(VALUE obj, VALUE sql) | |
| { | |
| MYSQL* m = GetHandler(obj); | |
| + free_old_query(m); | |
| + |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| module ActiveSupport | |
| class BufferedLogger | |
| def <<( message ) | |
| info( message ) | |
| end | |
| end | |
| end | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # modified <RAILS_ROOT/script/console overloading the irb executeable ( assumes script/irb ) | |
| #!/usr/bin/env ruby | |
| ARGV << "--irb=#{File.dirname(__FILE__)}/irb" | |
| require File.dirname(__FILE__) + '/../config/boot' | |
| require 'commands/console' | |
| #<RAILS_ROOT>/script/irb or elsewhere | |
| #!/usr/bin/env ruby |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| macbook-pros-computer:Ruby lourens$ sudo dtrace -n 'syscall:::entry/execname == "ruby"/{ @[execname, probefunc] = count() }' | |
| dtrace: description 'syscall:::entry' matched 427 probes | |
| ^C | |
| ruby execve 1 | |
| ruby exit 1 | |
| ruby fork 1 | |
| ruby getdtablesize 1 | |
| ruby kill 1 | |
| ruby mkdir 1 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /* <MYSQL_ROOT>/vio/vio.c */ | |
| /* Copyright (C) 2000 MySQL AB | |
| This program is free software; you can redistribute it and/or modify | |
| it under the terms of the GNU General Public License as published by | |
| the Free Software Foundation; version 2 of the License. | |
| This program is distributed in the hope that it will be useful, | |
| but WITHOUT ANY WARRANTY; without even the implied warranty of |