<?xml version="1.0" encoding="UTF-8"?>
<commit>
  <added type="array"/>
  <modified type="array">
    <modified>
      <diff>@@ -260,7 +260,6 @@ static void optimize_for_async( VALUE obj )
 
     vio_fastsend( m-&gt;handler.net.vio );
     async_in_progress_set( obj, Qfalse );
-    /*last_connection_identifier(obj);*/
 }
 
 static void schedule_connect(VALUE obj )
@@ -838,13 +837,6 @@ static VALUE readable( int argc, VALUE* argv, VALUE obj )
     return ( vio_poll_read( m-&gt;net.vio, INT2NUM(timeout) ) == 0 ? Qtrue : Qfalse );
 }
 
-/* ready */
-static VALUE ready( VALUE obj )
-{
-    MYSQL* m = GetHandler(obj);
-    return ( m-&gt;status == MYSQL_STATUS_READY ) ? Qtrue : Qfalse;
-}
-
 /* retry */
 static VALUE retry( VALUE obj )
 {
@@ -924,11 +916,13 @@ static VALUE get_result(VALUE obj)
     }
 	if (mysql_read_query_result(m) != 0)
 	    mysql_raise(m);
+	
+	async_in_progress_set( obj, Qfalse );
+    
     if (GetMysqlStruct(obj)-&gt;query_with_result == Qfalse)
       	return obj;
     if (mysql_field_count(m) == 0)
-	    return Qnil;
-    async_in_progress_set( obj, Qfalse ); 
+	    return Qnil; 
     return store_result(obj);
 }
 
@@ -957,15 +951,17 @@ static VALUE async_query(int argc, VALUE* argv, VALUE obj)
 
   rb_scan_args(argc, argv, &quot;11&quot;, &amp;sql, &amp;timeout);
 
-  /*last_connection_identifier( obj );*/
-
   async_in_progress_set( obj, Qfalse );
 
   send_query(obj,sql);
 
-  schedule_query(obj, timeout);
-
-  return get_result(obj);
+  if (GetMysqlStruct(obj)-&gt;query_with_result == Qfalse){
+    async_in_progress_set( obj, Qfalse );
+    return obj;
+  } else {
+    schedule_query(obj, timeout);
+    return get_result(obj);
+  }
 }
 
 #if MYSQL_VERSION_ID &gt;= 40100
@@ -2263,7 +2259,6 @@ void Init_mysql(void)
     rb_define_method(cMysql, &quot;get_result&quot;, get_result, 0);
     rb_define_method(cMysql, &quot;readable?&quot;, readable, -1);
     rb_define_method(cMysql, &quot;retry?&quot;, retry, 0);
-    rb_define_method(cMysql, &quot;ready?&quot;, ready, 0);
     rb_define_method(cMysql, &quot;interrupted?&quot;, interrupted, 0);
     rb_define_method(cMysql, &quot;blocking?&quot;, blocking, 0);
     rb_define_method(cMysql, &quot;socket&quot;, socket, 0);</diff>
      <filename>ext/mysql.c</filename>
    </modified>
  </modified>
  <removed type="array"/>
  <parents type="array">
    <parent>
      <id>85141abf097a375520ca5cf17df4bccc48523d3e</id>
    </parent>
  </parents>
  <author>
    <name>Lourens Naude</name>
    <email>lourens@methodmissing.com</email>
  </author>
  <url>http://github.com/oldmoe/mysqlplus/commit/4e5967bd24d832a26e89de6aa578205c3dde2a0c</url>
  <id>4e5967bd24d832a26e89de6aa578205c3dde2a0c</id>
  <committed-date>2008-10-06T15:32:43-07:00</committed-date>
  <authored-date>2008-10-06T15:32:43-07:00</authored-date>
  <message>Do not schedule &amp;&amp; retrieve the result if #query_with_result is false</message>
  <tree>d00a90e2060a9437c79d9521b05f9454411f351c</tree>
  <committer>
    <name>Lourens Naude</name>
    <email>lourens@methodmissing.com</email>
  </committer>
</commit>
