~clint-fewbar/ubuntu/natty/mysql-5.1/merge-5.1.49-2

« back to all changes in this revision

Viewing changes to include/my_getopt.h

  • Committer: Bazaar Package Importer
  • Author(s): Chuck Short
  • Date: 2010-08-04 13:18:27 UTC
  • mfrom: (1.2.2 upstream) (2.1.5 sid)
  • Revision ID: james.westby@ubuntu.com-20100804131827-4tjg88vr9dd49s3k
Tags: 5.1.49-1ubuntu1
* Merge from debian unstable:
  + debian/control:
     * Update maintainer according to spec.
     * Move section from "misc" to "database".
     * Added libmysqlclient16-dev an empty transitional package. 
     * Added mysql-client-core-5.1 package.
     * Suggest mailx for mysql-server-5.1
     * Add mysql-testsuite package so you can run the testsuite seperately.
  + debian/additions/my.cnf:
    * Remove language options. Error message files are located in a different directory in Mysql
      5.0. Setting the language option to use /usr/share/mysql/english breaks Mysql 5.0. Both 5.0
      and 5.1 use a different value that works. (LP: #316974)
  + Add apparmor profile:
    + debian/apparmor-profile: apparmor-profile
    + debian/rules, debian/mysql-server-5.1.files: install apparmor profile
    + debian/mysql-server-5.1.dirs: add etc/apparmor.d/fore-complain
    + debian/mysql-server-5.1.postrm: remove symlink in force-complain/ on purge.
    + debian/mysql-server-5.1.README.Debian: add apparmor documentation.
    + debian/additions/my.cnf: Add warning about apparmor. (LP: #201799)
    + debian/mysql-server-5.1.postinst: reload apparmor profiles
  * Convert the package from sysvinit to upstart:
    + debian/mysql-server-5.1.mysql.upstart: Add upstart script.
    + debian/mysql-server-5.1.mysql.init: Dropped, unused now with upstart.
    + debian/additions/mysqld_safe_syslog.cnf: Dropped, unused now with upstart.
    + debian/additons/my.cnf: Remove pid declaration and setup error logging to /var/log/mysql since
      we're not piping anything around logger anymore.
    + debian/rules, debian/mysql-server-5.1.logcheck.ignore.{paranoid,worstation},
      debian/mysql-server-5.1.logcheck.ignore.server: : Remove references to mysqld_safe
    + debian/patches/38_scripts_mysqld_safe.sh_signals.dpatch: Dropped
  * Added -fno-strict-aliasing to CFLAGS to get around mysql testsuite build failures.
  * Add Apport hook (LP: #354188):
    + debian/mysql-server-5.1.py: apport package hook
    + debian/rules: Make it installable
  * debian/mysql-server-5.1.mysql-server.logrotate: Check to see if mysql is running before
    running logrotate. (LP: #513135)
  * Make the testsuite installable. (LP: #530752)
    + debian/mysql-server-5.1.files, debian/rules: install apport package hook
  * debian/mysql-server-5.1.preinst: Set mysql user's home directory
    to /nonexistent to protect against having the /var/lib/mysql
    user-writeable. If an attacker can trick mysqld into creating
    dot files in the home directory, he could do .rhost-like attacks
    on the system. (LP: #293258)
  * debian/control: mysql-client-5.1 should depend on mysql-core-client-5.1.
    (LP: #590952) 

Show diffs side-by-side

added added

removed removed

Lines of Context:
45
45
  const char *name;                     /* Name of the option */
46
46
  int        id;                        /* unique id or short option */
47
47
  const char *comment;                  /* option comment, for autom. --help */
48
 
  uchar      **value;                   /* The variable value */
49
 
  uchar      **u_max_value;             /* The user def. max variable value */
 
48
  void       *value;                    /* The variable value */
 
49
  void       *u_max_value;              /* The user def. max variable value */
50
50
  struct st_typelib *typelib;           /* Pointer to possible values */
51
 
  ulong     var_type;
 
51
  ulong      var_type;                  /* Must match the variable type */
52
52
  enum get_opt_arg_type arg_type;
53
53
  longlong   def_value;                 /* Default value */
54
54
  longlong   min_value;                 /* Min allowed value */
58
58
  void       *app_type;                 /* To be used by an application */
59
59
};
60
60
 
61
 
typedef my_bool (* my_get_one_option) (int, const struct my_option *, char * );
62
 
typedef void (* my_error_reporter) (enum loglevel level, const char *format, ... );
 
61
typedef my_bool (*my_get_one_option)(int, const struct my_option *, char *);
 
62
typedef void (*my_error_reporter)(enum loglevel level, const char *format, ...);
 
63
/**
 
64
  Used to retrieve a reference to the object (variable) that holds the value
 
65
  for the given option. For example, if var_type is GET_UINT, the function
 
66
  must return a pointer to a variable of type uint. A argument is stored in
 
67
  the location pointed to by the returned pointer.
 
68
*/
 
69
typedef void *(*my_getopt_value)(const char *, uint, const struct my_option *,
 
70
                                 int *);
63
71
 
64
72
extern char *disabled_my_option;
65
73
extern my_bool my_getopt_print_errors;
71
79
extern void my_cleanup_options(const struct my_option *options);
72
80
extern void my_print_help(const struct my_option *options);
73
81
extern void my_print_variables(const struct my_option *options);
74
 
extern void my_getopt_register_get_addr(uchar ** (*func_addr)(const char *, uint,
75
 
                                        const struct my_option *, int *));
 
82
extern void my_getopt_register_get_addr(my_getopt_value);
76
83
 
77
84
ulonglong getopt_ull_limit_value(ulonglong num, const struct my_option *optp,
78
85
                                 my_bool *fix);