List:Commits« Previous MessageNext Message »
From:Brian Aker Date:October 22 2007 6:27am
Subject:bk commit into 5.2 tree (brian:1.2645)
View as plain text  
Below is the list of changes that have just been committed into a local
5.2 repository of brian. When brian does a push these changes will
be propagated to the main repository and, within 24 hours after the
push, to the public repository.
For information on how to access the public repository
see http://dev.mysql.com/doc/mysql/en/installing-source-tree.html

ChangeSet@stripped, 2007-10-21 23:27:11-07:00, brian@stripped +2 -0
  azio.h:
    Removed aio_read_active variable.
  azio.c:
    Removed aio_read_active variable (and assert). Was no longer being used.
    Cleaned up init so that it happens in azread_init(). So no funky variable trick required.

  storage/archive/azio.c@stripped, 2007-10-21 23:25:46-07:00, brian@stripped +9 -24
    Removed aio_read_active variable (and assert). Was no longer being used.
    Cleaned up init so that it happens in azread_init(). So no funky variable trick required.

  storage/archive/azio.h@stripped, 2007-10-21 23:26:55-07:00, brian@stripped +0 -1
    Removed aio_read_active variable.

diff -Nrup a/storage/archive/azio.c b/storage/archive/azio.c
--- a/storage/archive/azio.c	2007-10-21 14:57:03 -07:00
+++ b/storage/archive/azio.c	2007-10-21 23:25:46 -07:00
@@ -759,15 +759,16 @@ int azread_init(azio_stream *s)
   if (returnable == -1)
     return returnable;
 
-#ifdef NOT_YET
   /* Put one in the chamber */
   if (s->method != AZ_METHOD_BLOCK)
   {
     do_aio_cleanup(s);
-    if (!(azio_read(s, s->buffer1, s->pos)))
-      s->aio_inited= 1;
+    s->container.offset= s->pos;
+    s->container.buffer= (unsigned char *)s->buffer1;
+    azio_read(s);
+    s->aio_inited= 1;
   }
-#endif
+
 
   return returnable;
 }
@@ -938,7 +939,6 @@ int azclose (azio_stream *s)
   }
 
   returnable= destroy(s);
-  assert(s->aio_read_active == 0);
 
   switch (s->method)
   {
@@ -1039,22 +1039,12 @@ static void do_aio_cleanup(azio_stream *
 static void get_block(azio_stream *s)
 {
 #ifdef AZIO_AIO
-  if (s->method == AZ_METHOD_AIO && s->mode == 'r' && s->pos < s->check_point)
+  if (s->method == AZ_METHOD_AIO && s->mode == 'r' 
+      && s->pos < s->check_point
+      && s->aio_inited)
   {
-    if (!s->aio_inited)
-    {
-      do_aio_cleanup(s);
-      s->container.offset= s->pos;
-      s->container.buffer= (unsigned char *)s->buffer1;
-      if (azio_read(s))
-        goto use_pread;
-      s->aio_read_active++;
-      s->aio_inited= 1;
-    }
-
     azio_ready(s);
     s->stream.avail_in= (unsigned int)azio_return(s);
-    s->aio_read_active--;
     if ((int)(s->stream.avail_in) == -1)
       goto use_pread;
     else if ((int)(s->stream.avail_in) == 0)
@@ -1072,12 +1062,7 @@ static void get_block(azio_stream *s)
     }
     s->container.buffer= (s->container.buffer == s->buffer2) ? s->buffer1 : s->buffer2;
     s->container.offset= s->pos;
-    if (azio_read(s))
-    {
-      /* If we can't use AIO, set it up so the next query tries before reading */
-      s->aio_inited= 0;
-    }
-    s->aio_read_active++;
+    azio_read(s);
   }
   else
 #endif
diff -Nrup a/storage/archive/azio.h b/storage/archive/azio.h
--- a/storage/archive/azio.h	2007-10-21 14:19:49 -07:00
+++ b/storage/archive/azio.h	2007-10-21 23:26:55 -07:00
@@ -276,7 +276,6 @@ typedef struct azio_stream {
   unsigned int frm_length;   /* Position for start of FRM */
   unsigned int comment_start_pos;   /* Position for start of comment */
   unsigned int comment_length;   /* Position for start of comment */
-  unsigned long long aio_read_active;
 #ifdef AZIO_AIO
   azio_container_st container;
 #endif
Thread
bk commit into 5.2 tree (brian:1.2645)Brian Aker22 Oct