~ubuntu-branches/ubuntu/raring/mysql-5.5/raring-proposed

« back to all changes in this revision

Viewing changes to client/mysql_plugin.c

  • Committer: Package Import Robot
  • Author(s): Clint Byrum
  • Date: 2012-02-14 23:59:22 UTC
  • mfrom: (1.1.2)
  • Revision ID: package-import@ubuntu.com-20120214235922-cux5uek1e5l0hje9
Tags: 5.5.20-0ubuntu1
* New upstream release.
* d/mysql-server-5.5.mysql.upstart: Fix stop on to make sure mysql is
  fully stopped before shutdown commences. (LP: #688541) Also simplify
  start on as it is redundant.
* d/control: Depend on upstart version which has apparmor profile load
  script to prevent failure on upgrade from lucid to precise.
  (LP: #907465)
* d/apparmor-profile: need to allow /run since that is the true path
  of /var/run files. (LP: #917542)
* d/control: mysql-server-5.5 has files in it that used to be owned
  by libmysqlclient-dev, so it must break/replace it. (LP: #912487)
* d/rules, d/control: 5.5.20 Fixes segfault on tests with gcc 4.6,
  change compiler back to system default.
* d/rules: Turn off embedded libedit/readline.(Closes: #659566)

Show diffs side-by-side

added added

removed removed

Lines of Context:
929
929
            opt_datadir);
930
930
    goto exit;
931
931
  }
932
 
  if ((error= my_access(opt_plugin_ini, F_OK)))
 
932
  if (opt_plugin_ini && (error= my_access(opt_plugin_ini, F_OK)))
933
933
  {
934
934
    fprintf(stderr, "ERROR: Cannot access plugin config file at '%s'.\n",
935
935
            opt_plugin_ini);
936
936
    goto exit;
937
937
  }
938
 
  if ((error= my_access(opt_mysqld, F_OK)))
 
938
  if (opt_mysqld && (error= my_access(opt_mysqld, F_OK)))
939
939
  {
940
940
    fprintf(stderr, "ERROR: Cannot access mysqld path '%s'.\n",
941
941
            opt_mysqld);
942
942
    goto exit;
943
943
  }
944
 
  if ((error= my_access(opt_my_print_defaults, F_OK)))
 
944
  if (opt_my_print_defaults && (error= my_access(opt_my_print_defaults, F_OK)))
945
945
  {
946
946
    fprintf(stderr, "ERROR: Cannot access my-print-defaults path '%s'.\n",
947
947
            opt_my_print_defaults);
967
967
  int i= 0;
968
968
 
969
969
  const char *paths[]= {
970
 
    opt_basedir, opt_mysqld, opt_my_print_defaults, "/usr",
 
970
    opt_mysqld, opt_basedir, opt_my_print_defaults, "/usr",
971
971
    "/usr/local/mysql", "/usr/sbin", "/usr/share", "/extra", "/extra/debug",
972
972
    "/extra/release", "/bin", "/usr/bin", "/mysql/bin"
973
973
  };
1081
1081
  else
1082
1082
  {
1083
1083
    fprintf(file,
1084
 
            "DELETE FROM mysql.plugin WHERE name = '%s';", plugin_data.name);
 
1084
            "DELETE FROM mysql.plugin WHERE dl = '%s';", plugin_data.so_name);
1085
1085
    if (opt_verbose)
1086
1086
    {
1087
1087
      printf("# Disabling %s...\n", plugin_data.name);
1124
1124
    error= 1;
1125
1125
    goto exit;
1126
1126
  }
1127
 
  printf("# Query: %s", query_str);
 
1127
  printf("# Query: %s\n", query_str);
1128
1128
 
1129
1129
exit:
1130
1130
  if (file)
1160
1160
{
1161
1161
  char bootstrap_cmd[FN_REFLEN];
1162
1162
  int error= 0;
1163
 
  int ret= 0;
1164
1163
 
1165
1164
#ifdef __WIN__
1166
1165
  char *format_str= 0;
1196
1195
  if (error)
1197
1196
    fprintf(stderr,
1198
1197
            "ERROR: Unexpected result from bootstrap. Error code: %d.\n",
1199
 
            ret);
 
1198
            error);
1200
1199
  
1201
1200
  return error;
1202
1201
}