Commit 73dcec76 authored by unknown's avatar unknown
Browse files

Merge siva.hindu.god:/home/tsmith/m/bk/mrg-jan17/51

into  siva.hindu.god:/home/tsmith/m/bk/mrg-jan17/maint/51


client/mysqlbinlog.cc:
  Auto merged
configure.in:
  Auto merged
include/config-win.h:
  Auto merged
include/my_global.h:
  Auto merged
include/my_pthread.h:
  Auto merged
mysql-test/extra/binlog_tests/mix_innodb_myisam_binlog.test:
  Auto merged
mysql-test/mysql-test-run.pl:
  Auto merged
mysql-test/t/disabled.def:
  Auto merged
sql/field.cc:
  Auto merged
sql/field.h:
  Auto merged
sql/log_event.cc:
  Auto merged
sql/mysqld.cc:
  Auto merged
sql/sql_class.h:
  Auto merged
sql/sql_parse.cc:
  Auto merged
sql/table.cc:
  Auto merged
storage/myisam/mi_packrec.c:
  Use local
parents 8ea28e37 64b075e6
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -183,7 +183,7 @@ fi
# (http://samba.org/ccache) is installed, use it.
# We use 'grep' and hope 'grep' will work as expected
# (returns 0 if finds lines)
if ccache -V > /dev/null 2>&1 && test "$CCACHE_GCOV_VERSION_ENABLED" == "1"
if ccache -V > /dev/null 2>&1 && test "$CCACHE_GCOV_VERSION_ENABLED" = "1"
then
  echo "$CC" | grep "ccache" > /dev/null || CC="ccache $CC"
  echo "$CXX" | grep "ccache" > /dev/null || CXX="ccache $CXX"
+1 −1
Original line number Diff line number Diff line
@@ -28,7 +28,7 @@ check_cpu () {
    fi

    # parse CPU flags
    for flag in `$cpuinfo | grep '^flags' | sed -e 's/^flags.*: //'`; do 
    for flag in `$cpuinfo | grep '^flags' | sed -e 's/^flags.*: //' -e 's/[^a-zA-Z0-9_ ]/_/g'`; do 
          eval cpu_flag_$flag=yes
    done
  else
+4 −0
Original line number Diff line number Diff line
@@ -15,6 +15,8 @@
45214442pBGT9KuZEGixBH71jTzbOA
45214a07hVsIGwvwa-WrO-jpeaSwVw
452a92d0-31-8wSzSfZi165fcGcXPA
452c6c6dAjuNghfc1ObZ_UQ5SCl85g
4538a7b0EbDHHkWPbIwxO6ZIDdg6Dg
454a7ef8gdvE_ddMlJyghvOAkKPNOQ
454bb488ijVLOUK_GFjcoISE0GxPUA
454bb9a8AwlGRC_wWLS2sNMoRBMRGw
@@ -30,3 +32,5 @@
4561b2ecZbhuAc0TTDdCdultxUYaMw
4561bde4qWhz1I8tkItXKex5uniipA
4562ba016dYH0JzszOqZ8p6psbKfnQ
45771031yRCoM_ZfONdYchPvVEgLRg
45ae6628gqKTsUFfnoNExadETVIkbA
+9 −7
Original line number Diff line number Diff line
@@ -102,8 +102,10 @@ dist-hook:
tags:
	support-files/build-tags

.PHONY:	init-db bin-dist test test-full test-ps test-nr \
	test-ns test-pr test-unit
.PHONY:	init-db bin-dist \
  test    test-force    test-full    test-force-full    test-force-mem \
  test-pl test-force-pl test-full-pl test-force-full-pl test-force-pl-mem \
  test-unit test-ps test-nr test-pr test-ns test-binlog-statement

# Target 'test' will run the regression test suite using the built server.
#
@@ -118,23 +120,23 @@ test-unit:

test-ps:
	cd mysql-test ; \
	./mysql-test-run.pl $(force) --ps-protocol --mysqld=--binlog-format=mixed
	@PERL@ ./mysql-test-run.pl $(force) --ps-protocol --mysqld=--binlog-format=mixed

test-nr:
	cd mysql-test ; \
	./mysql-test-run.pl $(force) --mysqld=--binlog-format=row
	@PERL@ ./mysql-test-run.pl $(force) --mysqld=--binlog-format=row

test-pr:
	cd mysql-test ; \
	./mysql-test-run.pl $(force) --ps-protocol --mysqld=--binlog-format=row
	@PERL@ ./mysql-test-run.pl $(force) --ps-protocol --mysqld=--binlog-format=row

test-ns:
	cd mysql-test ; \
	./mysql-test-run.pl $(force) --mysqld=--binlog-format=mixed
	@PERL@ ./mysql-test-run.pl $(force) --mysqld=--binlog-format=mixed

test-binlog-statement:
	cd mysql-test ; \
	./mysql-test-run.pl $(force) --mysqld=--binlog-format=statement
	@PERL@ ./mysql-test-run.pl $(force) --mysqld=--binlog-format=statement

test:	test-unit test-ns test-pr

+45 −9
Original line number Diff line number Diff line
@@ -725,6 +725,20 @@ void close_connections()
}


void close_statements()
{
  struct st_connection *con;
  DBUG_ENTER("close_statements");
  for (con= connections; con < next_con; con++)
  {
    if (con->stmt)
      mysql_stmt_close(con->stmt);
    con->stmt= 0;
  }
  DBUG_VOID_RETURN;
}


void close_files()
{
  DBUG_ENTER("close_files");
@@ -1246,7 +1260,9 @@ void var_set(const char *var_name, const char *var_name_end,
      v->int_dirty= 0;
      v->str_val_len= strlen(v->str_val);
    }
    strxmov(buf, v->name, "=", v->str_val, NullS);
    my_snprintf(buf, sizeof(buf), "%.*s=%.*s",
                v->name_len, v->name,
                v->str_val_len, v->str_val);
    if (!(v->env_s= my_strdup(buf, MYF(MY_WME))))
      die("Out of memory");
    putenv(v->env_s);
@@ -2906,6 +2922,10 @@ void do_close_connection(struct st_command *command)
	}
      }
#endif
      if (next_con->stmt)
        mysql_stmt_close(next_con->stmt);
      next_con->stmt= 0;

      mysql_close(&con->mysql);
      if (con->util_mysql)
	mysql_close(con->util_mysql);
@@ -2974,7 +2994,12 @@ void safe_connect(MYSQL* mysql, const char *name, const char *host,
    if ((mysql_errno(mysql) == CR_CONN_HOST_ERROR ||
         mysql_errno(mysql) == CR_CONNECTION_ERROR) &&
        failed_attempts < opt_max_connect_retries)
    {
      verbose_msg("Connect attempt %d/%d failed: %d: %s", failed_attempts,
                  opt_max_connect_retries, mysql_errno(mysql),
                  mysql_error(mysql));
      my_sleep(connection_retry_sleep);
    }
    else
    {
      if (failed_attempts > 0)
@@ -4691,10 +4716,9 @@ void run_query_normal(struct st_connection *cn, struct st_command *command,
    }

    /*
      Store the result. If res is NULL, use mysql_field_count to
      determine if that was expected
      Store the result of the query if it will return any fields
    */
    if (!(res= mysql_store_result(mysql)) && mysql_field_count(mysql))
    if (mysql_field_count(mysql) && ((res= mysql_store_result(mysql)) == 0))
    {
      handle_error(command, mysql_errno(mysql), mysql_error(mysql),
		   mysql_sqlstate(mysql), ds);
@@ -4746,7 +4770,10 @@ void run_query_normal(struct st_connection *cn, struct st_command *command,
    }

    if (res)
    {
      mysql_free_result(res);
      res= 0;
    }
    counter++;
  } while (!(err= mysql_next_result(mysql)));
  if (err > 0)
@@ -5103,6 +5130,14 @@ void run_query_stmt(MYSQL *mysql, struct st_command *command,
    dynstr_free(&ds_execute_warnings);
  }


  /* Close the statement if - no reconnect, need new prepare */
  if (mysql->reconnect)
  {
    mysql_stmt_close(stmt);
    cur_con->stmt= NULL;
  }

  /*
    We save the return code (mysql_stmt_errno(stmt)) from the last call sent
    to the server into the mysqltest builtin variable $mysql_errno. This
@@ -5110,10 +5145,7 @@ void run_query_stmt(MYSQL *mysql, struct st_command *command,
  */

  var_set_errno(mysql_stmt_errno(stmt));
#ifndef BUG15518_FIXED
  mysql_stmt_close(stmt);
  cur_con->stmt= NULL;
#endif

  DBUG_VOID_RETURN;
}

@@ -5900,6 +5932,8 @@ int main(int argc, char **argv)
	break;
      case Q_DISABLE_PS_PROTOCOL:
        ps_protocol_enabled= 0;
        /* Close any open statements */
        close_statements();
        break;
      case Q_ENABLE_PS_PROTOCOL:
        ps_protocol_enabled= ps_protocol;
@@ -5909,6 +5943,8 @@ int main(int argc, char **argv)
        break;
      case Q_ENABLE_RECONNECT:
        set_reconnect(&cur_con->mysql, 1);
        /* Close any open statements - no reconnect, need new prepare */
        close_statements();
        break;
      case Q_DISABLE_PARSING:
        if (parsing_disabled == 0)
Loading