~ubuntu-branches/ubuntu/quantal/mysql-5.5/quantal-security

« back to all changes in this revision

Viewing changes to mysys/errors.c

  • Committer: Package Import Robot
  • Author(s): Seth Arnold
  • Date: 2013-04-18 18:15:39 UTC
  • mfrom: (1.1.12)
  • Revision ID: package-import@ubuntu.com-20130418181539-7uo1w041b4h2ulbs
Tags: 5.5.31-0ubuntu0.12.10.1
* SECURITY UPDATE: Update to 5.5.31 to fix security issues (LP: #1170516)
  - http://www.oracle.com/technetwork/topics/security/cpuapr2013-1899555.html
* debian/patches/71_disable_rpl_tests.patch: refreshed.
* debian/patches/fix-mysqldump-test.patch: removed, fixed differently
  upstream

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
/* Copyright (c) 2000, 2010, Oracle and/or its affiliates. All rights reserved.
 
1
/* Copyright (c) 2000, 2013, Oracle and/or its affiliates. All rights reserved.
2
2
 
3
3
   This program is free software; you can redistribute it and/or modify
4
4
   it under the terms of the GNU General Public License as published by
99
99
}
100
100
#endif
101
101
 
 
102
/*
 
103
 We cannot call my_error/my_printf_error here in this function.
 
104
  Those functions will set status variable in diagnostic area
 
105
  and there is no provision to reset them back.
 
106
  Here we are waiting for free space and will wait forever till
 
107
  space is created. So just giving warning in the error file
 
108
  should be enough.
 
109
*/
102
110
void wait_for_free_space(const char *filename, int errors)
103
111
{
104
 
  if (errors == 0)
105
 
    my_error(EE_DISK_FULL,MYF(ME_BELL | ME_NOREFRESH),
 
112
  if (!(errors % MY_WAIT_GIVE_USER_A_MESSAGE))
 
113
  {
 
114
    my_printf_warning(EE(EE_DISK_FULL),
106
115
             filename,my_errno,MY_WAIT_FOR_USER_TO_FIX_PANIC);
107
 
  if (!(errors % MY_WAIT_GIVE_USER_A_MESSAGE))
108
 
    my_printf_error(EE_DISK_FULL,
109
 
                    "Retry in %d secs. Message reprinted in %d secs",
110
 
                    MYF(ME_BELL | ME_NOREFRESH),
 
116
    my_printf_warning("Retry in %d secs. Message reprinted in %d secs",
111
117
                    MY_WAIT_FOR_USER_TO_FIX_PANIC,
112
118
                    MY_WAIT_GIVE_USER_A_MESSAGE * MY_WAIT_FOR_USER_TO_FIX_PANIC );
 
119
  }
 
120
  DBUG_EXECUTE_IF("simulate_no_free_space_error",
 
121
                 {
 
122
                   (void) sleep(1);
 
123
                   return;
 
124
                 });
113
125
  (void) sleep(MY_WAIT_FOR_USER_TO_FIX_PANIC);
114
126
}
115
127