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
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..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
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..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
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..3f1a908 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
# Sequentially step through all of the available initialization routines, | |
# in order (view execution order in source). | |
def process | |
Rails.configuration = configuration | |
check_ruby_version | |
install_gem_spec_stubs | |
set_load_path | |
add_gem_load_paths | |
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..de9d435 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
HoptoadNotifier::Catcher.class_eval do | |
alias :original_send_to_hoptoad :send_to_hoptoad | |
def send_to_hoptoad data | |
async_hoptoad_notification? ? async_send_to_hoptoad( data ) : original_send_to_hoptoad( data ) | |
end | |
def async_hoptoad_notification? | |
if Object.const_defined?(:EventMachine) |