Commit 354f4d4c authored by mkindahl@dl145h.mysql.com's avatar mkindahl@dl145h.mysql.com
Browse files

Merge mkindahl@bk-internal.mysql.com:/home/bk/mysql-5.1

into  dl145h.mysql.com:/data0/mkindahl/mysql-5.1-rpl-merge
parents b9f860f3 3cfd16da
Loading
Loading
Loading
Loading
+18 −2
Original line number Diff line number Diff line
@@ -1269,12 +1269,12 @@ sig_handler handle_sigint(int sig)

  /* terminate if no query being executed, or we already tried interrupting */
  if (!executing_query || interrupted_query)
    mysql_end(sig);
    goto err;

  kill_mysql= mysql_init(kill_mysql);
  if (!mysql_real_connect(kill_mysql,current_host, current_user, opt_password,
                          "", opt_mysql_port, opt_mysql_unix_port,0))
    mysql_end(sig);
    goto err;

  /* kill_buffer is always big enough because max length of %lu is 15 */
  sprintf(kill_buffer, "KILL /*!50000 QUERY */ %lu", mysql_thread_id(&mysql));
@@ -1283,6 +1283,22 @@ sig_handler handle_sigint(int sig)
  tee_fprintf(stdout, "Query aborted by Ctrl+C\n");

  interrupted_query= 1;

  return;

err:
#ifdef _WIN32
  /*
   When SIGINT is raised on Windows, the OS creates a new thread to handle the
   interrupt. Once that thread completes, the main thread continues running 
   only to find that it's resources have already been free'd when the sigint 
   handler called mysql_end(). 
  */
  mysql_thread_end();
  return;
#else
  mysql_end(sig);
#endif  
}


+1 −1
Original line number Diff line number Diff line
@@ -10,7 +10,7 @@ AC_CANONICAL_SYSTEM
#
# When changing major version number please also check switch statement
# in mysqlbinlog::check_master_version().
AM_INIT_AUTOMAKE(mysql, 5.1.24-rc)
AM_INIT_AUTOMAKE(mysql, 5.1.25-rc)
AM_CONFIG_HEADER([include/config.h:config.h.in])

PROTOCOL_VERSION=10
+31 −0
Original line number Diff line number Diff line
@@ -148,6 +148,37 @@ enum enum_server_command
#define CLIENT_SSL_VERIFY_SERVER_CERT (1UL << 30)
#define CLIENT_REMEMBER_OPTIONS (1UL << 31)

/* Gather all possible capabilites (flags) supported by the server */
#define CLIENT_ALL_FLAGS  (CLIENT_LONG_PASSWORD | \
                           CLIENT_FOUND_ROWS | \
                           CLIENT_LONG_FLAG | \
                           CLIENT_CONNECT_WITH_DB | \
                           CLIENT_NO_SCHEMA | \
                           CLIENT_COMPRESS | \
                           CLIENT_ODBC | \
                           CLIENT_LOCAL_FILES | \
                           CLIENT_IGNORE_SPACE | \
                           CLIENT_PROTOCOL_41 | \
                           CLIENT_INTERACTIVE | \
                           CLIENT_SSL | \
                           CLIENT_IGNORE_SIGPIPE | \
                           CLIENT_TRANSACTIONS | \
                           CLIENT_RESERVED | \
                           CLIENT_SECURE_CONNECTION | \
                           CLIENT_MULTI_STATEMENTS | \
                           CLIENT_MULTI_RESULTS | \
                           CLIENT_SSL_VERIFY_SERVER_CERT | \
                           CLIENT_REMEMBER_OPTIONS)

/*
  Switch off the flags that are optional and depending on build flags
  If any of the optional flags is supported by the build it will be switched
  on before sending to the client during the connection handshake.
*/
#define CLIENT_BASIC_FLAGS (((CLIENT_ALL_FLAGS & ~CLIENT_SSL) \
                                               & ~CLIENT_COMPRESS) \
                                               & ~CLIENT_SSL_VERIFY_SERVER_CERT)

#define SERVER_STATUS_IN_TRANS     1	/* Transaction has started */
#define SERVER_STATUS_AUTOCOMMIT   2	/* Server in auto_commit mode */
#define SERVER_MORE_RESULTS_EXISTS 8    /* Multi query - next query exists */
+0 −1
Original line number Diff line number Diff line
@@ -15,7 +15,6 @@ SELECT * FROM t1 ORDER BY a;
sync_slave_with_master;

connection master;
source include/show_binlog_events.inc;
sync_slave_with_master;
SELECT * FROM t1 ORDER BY a;
connection master;
+12 −4
Original line number Diff line number Diff line
@@ -542,17 +542,25 @@ call p_verify_status_increment(0, 0, 0, 0);

--echo # 16. A function changes non-trans-table.
--echo #
--echo # For row-based logging, there is an extra commit for the
--echo # non-transactional changes saved in the transaction cache to
--echo # the binary log. 
--echo #
select f1();
call p_verify_status_increment(0, 0, 0, 0);
call p_verify_status_increment(0, 0, 1, 0);
commit;
call p_verify_status_increment(0, 0, 0, 0);
call p_verify_status_increment(0, 0, 1, 0);

--echo # 17. Read-only statement, a function changes non-trans-table.
--echo #
--echo # For row-based logging, there is an extra commit for the
--echo # non-transactional changes saved in the transaction cache to
--echo # the binary log. 
--echo #
select f1() from t1;
call p_verify_status_increment(1, 0, 1, 0);
call p_verify_status_increment(1, 0, 2, 0);
commit;
call p_verify_status_increment(1, 0, 1, 0);
call p_verify_status_increment(1, 0, 2, 0);

--echo # 18. Read-write statement: UPDATE, change 0 (transactional) rows. 
--echo #
Loading