~percona-core/percona-server/5.1

« back to all changes in this revision

Viewing changes to patches/remove_fcntl_excessive_calls.patch

  • Committer: Stewart Smith
  • Date: 2011-11-24 08:14:40 UTC
  • Revision ID: stewart@flamingspork.com-20111124081440-jffloqgkbgytzgl5
remove now unneeded patches as we're part of a happy bzr tree

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
# name       : remove_fcntl_excessive_calls.patch
2
 
# introduced : 12
3
 
# maintainer : Oleg
4
 
#
5
 
#!!! notice !!!
6
 
# Any small change to this file in the main branch
7
 
# should be done or reviewed by the maintainer!
8
 
--- /dev/null
9
 
+++ b/patch_info/remove_fcntl_excessive_calls.info
10
 
@@ -0,0 +1,6 @@
11
 
+File=remove_fcntl_excessive_calls.patch
12
 
+Name=remove fcntl excessive calls
13
 
+Version=1.0
14
 
+Author=This is a port of the official fix.
15
 
+License=GPL
16
 
+Comment=
17
 
--- a/sql/net_serv.cc
18
 
+++ b/sql/net_serv.cc
19
 
@@ -64,7 +64,7 @@
20
 
   can't normally do this the client should have a bigger max_allowed_packet.
21
 
 */
22
 
 
23
 
-#if defined(__WIN__) || !defined(MYSQL_SERVER)
24
 
+#if (defined(__WIN__) || !defined(MYSQL_SERVER)) && !defined(NO_ALARM)
25
 
   /* The following is because alarms doesn't work on windows. */
26
 
 #define NO_ALARM
27
 
 #endif
28
 
@@ -139,7 +139,7 @@
29
 
   if (vio != 0)                                        /* If real connection */
30
 
   {
31
 
     net->fd  = vio_fd(vio);                    /* For perl DBI/DBD */
32
 
-#if defined(MYSQL_SERVER) && !defined(__WIN__)
33
 
+#if defined(MYSQL_SERVER) && !defined(__WIN__) && !defined(NO_ALARM)
34
 
     if (!(test_flags & TEST_BLOCKING))
35
 
     {
36
 
       my_bool old_mode;
37
 
@@ -617,7 +617,7 @@
38
 
     if ((long) (length= vio_write(net->vio,pos,(size_t) (end-pos))) <= 0)
39
 
     {
40
 
       my_bool interrupted = vio_should_retry(net->vio);
41
 
-#if !defined(__WIN__)
42
 
+#if !defined(NO_ALARM) && !defined(__WIN__)
43
 
       if ((interrupted || length == 0) && !thr_alarm_in_use(&alarmed))
44
 
       {
45
 
         if (!thr_alarm(&alarmed, net->write_timeout, &alarm_buff))
46
 
@@ -673,7 +673,7 @@
47
 
     pos+=length;
48
 
     update_statistics(thd_increment_bytes_sent(length));
49
 
   }
50
 
-#ifndef __WIN__
51
 
+#if !defined(NO_ALARM) && !defined(__WIN__)
52
 
  end:
53
 
 #endif
54
 
 #ifdef HAVE_COMPRESS
55
 
@@ -805,6 +805,7 @@
56
 
     thr_alarm(&alarmed,net->read_timeout,&alarm_buff);
57
 
 #else
58
 
   /* Read timeout is set in my_net_set_read_timeout */
59
 
+  DBUG_ASSERT(net_blocking);
60
 
 #endif /* NO_ALARM */
61
 
 
62
 
     pos = net->buff + net->where_b;            /* net->packet -4 */
63
 
@@ -819,7 +820,7 @@
64
 
 
65
 
          DBUG_PRINT("info",("vio_read returned %ld  errno: %d",
66
 
                             (long) length, vio_errno(net->vio)));
67
 
-#if !defined(__WIN__) || defined(MYSQL_SERVER)
68
 
+#if !defined(NO_ALARM) && (!defined(__WIN__) || defined(MYSQL_SERVER))
69
 
          /*
70
 
            We got an error that there was no data on the socket. We now set up
71
 
            an alarm to not 'read forever', change the socket to non blocking