~ubuntu-branches/ubuntu/precise/mysql-5.5/precise-201203300109

« back to all changes in this revision

Viewing changes to sql/slave.cc

  • 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:
1129
1129
    memcpy(buf_act, buf, read_size);
1130
1130
    snd_size= my_b_gets(f, buf_act + read_size, max_size - read_size);
1131
1131
    if (snd_size == 0 ||
1132
 
        ((snd_size + 1 == max_size - read_size) &&  buf[max_size - 2] != '\n'))
 
1132
        ((snd_size + 1 == max_size - read_size) &&  buf_act[max_size - 2] != '\n'))
1133
1133
    {
1134
1134
      /*
1135
1135
        failure to make the 2nd read or short read again
4208
4208
  if (opt_plugin_dir_ptr && *opt_plugin_dir_ptr)
4209
4209
    mysql_options(mysql, MYSQL_PLUGIN_DIR, opt_plugin_dir_ptr);
4210
4210
 
 
4211
  /* we disallow empty users */
 
4212
  if (mi->user == NULL || mi->user[0] == 0)
 
4213
  {
 
4214
    mi->report(ERROR_LEVEL, ER_SLAVE_FATAL_ERROR,
 
4215
               ER(ER_SLAVE_FATAL_ERROR),
 
4216
               "Invalid (empty) username when attempting to "
 
4217
               "connect to the master server. Connection attempt "
 
4218
               "terminated.");
 
4219
    DBUG_RETURN(1);
 
4220
  }
4211
4221
  while (!(slave_was_killed = io_slave_killed(thd,mi)) &&
4212
4222
         (reconnect ? mysql_reconnect(mysql) != 0 :
4213
4223
          mysql_real_connect(mysql, mi->host, mi->user, mi->password, 0,
4336
4346
  /* This one is not strictly needed but we have it here for completeness */
4337
4347
  mysql_options(mysql, MYSQL_SET_CHARSET_DIR, (char *) charsets_dir);
4338
4348
 
4339
 
  if (io_slave_killed(thd, mi)
 
4349
  if (mi->user == NULL
 
4350
      || mi->user[0] == 0
 
4351
      || io_slave_killed(thd, mi)
4340
4352
      || !mysql_real_connect(mysql, mi->host, mi->user, mi->password, 0,
4341
4353
                             mi->port, 0, 0))
4342
4354
  {