Commit fd29a5bc authored by unknown's avatar unknown

Merge bk-internal.mysql.com:/home/bk/mysql-4.0

into narttu.mysql.fi:/my/mysql-4.0

parents a29adff6 2d5d754c
......@@ -2329,7 +2329,8 @@ com_status(String *buffer __attribute__((unused)),
(void) mysql_fetch_row(result); // Read eof
}
#ifdef HAVE_OPENSSL
if (mysql.net.vio->ssl_ && SSL_get_cipher(mysql.net.vio->ssl_))
if (mysql.net.vio && mysql.net.vio->ssl_ &&
SSL_get_cipher(mysql.net.vio->ssl_))
tee_fprintf(stdout, "SSL:\t\t\tCipher in use is %s\n",
SSL_get_cipher(mysql.net.vio->ssl_));
else
......
......@@ -1282,12 +1282,12 @@ then
AC_MSG_ERROR([On SCO UNIX MySQL must be compiled with gcc. See the Installation chapter in the Reference Manual.]);
fi
AC_MSG_RESULT("yes")
# Hack for SCO UnixWare 7.1
# Hack for SCO UnixWare 7.1.x
#
elif test "$with_named_thread" = "no"
then
AC_MSG_RESULT("no")
AC_MSG_CHECKING("SCO UnixWare 7.1 native threads")
AC_MSG_CHECKING("SCO UnixWare 7.1.x native threads")
if expr "$SYSTEM_TYPE" : ".*sco.*" > /dev/null
then
if test -f /usr/lib/libthread.so -o -f /usr/lib/libthreadT.so
......@@ -1310,11 +1310,11 @@ then
AC_MSG_CHECKING("for gcc")
if expr "$CC" : ".*gcc.*"
then
CC="$CC -pthread -DUNIXWARE_7";
CXX="$CXX -pthread -DUNIXWARE_7";
CC="$CC -pthread -DUNIXWARE_7 -DHAVE_BROKEN_RWLOCK";
CXX="$CXX -pthread -DUNIXWARE_7 -DHAVE_BROKEN_RWLOCK";
else
CC="$CC -Kthread -DUNIXWARE_7";
CXX="$CXX -Kthread -DUNIXWARE_7";
CC="$CC -Kthread -DUNIXWARE_7 -DHAVE_BROKEN_RWLOCK";
CXX="$CXX -Kthread -DUNIXWARE_7 -DHAVE_BROKEN_RWLOCK";
fi
else
{ echo "configure: error: Can't find thread libs on SCO UnixWare7. See the Installation chapter in the Reference Manual." 1>&2; exit 1; };
......@@ -1350,10 +1350,11 @@ then
AC_MSG_CHECKING("for gcc")
if expr "$CC" : ".*gcc.*"
then
{ echo "configure: error: On SCO UnixWare7 MySQL must be compiled with cc. See the Installation chapter in the Reference Manual." 1>&2; exit 1; };
CC="$CC -pthread -DUNIXWARE_7 -DHAVE_BROKEN_RWLOCK";
CXX="$CXX -pthread -DUNIXWARE_7 -DHAVE_BROKEN_RWLOCK";
else
CC="$CC -Kthread -DUNIXWARE_7";
CXX="$CXX -Kthread -DUNIXWARE_7";
CC="$CC -Kthread -DUNIXWARE_7 -DHAVE_BROKEN_RWLOCK";
CXX="$CXX -Kthread -DUNIXWARE_7 -DHAVE_BROKEN_RWLOCK";
fi
AC_MSG_RESULT("yes")
else
......@@ -1385,7 +1386,8 @@ then
AC_MSG_CHECKING("for gcc")
if expr "$CC" : ".*gcc.*"
then
{ echo "configure: error: On OpenUNIX8 and UnixWare7 MySQL must be compiled with cc. See the Installation chapter in the Reference Manual." 1>&2; exit 1; };
CC="$CC -pthread -DUNIXWARE_7 -DHAVE_BROKEN_RWLOCK";
CXX="$CXX -pthread -DUNIXWARE_7 -DHAVE_BROKEN_RWLOCK";
else
CC="$CC -Kthread -DUNIXWARE_7 -DHAVE_BROKEN_RWLOCK";
CXX="$CXX -Kthread -DUNIXWARE_7 -DHAVE_BROKEN_RWLOCK";
......
......@@ -149,10 +149,6 @@ double my_ulonglong2double(unsigned long long A);
C_MODE_END
#endif /* _AIX */
#ifdef UNIXWARE_7
#define pthread_attr_setstacksize(A,B) /* setting stack breaks things */
#endif
#ifdef HAVE_BROKEN_SNPRINTF /* HPUX 10.20 don't have this defined */
#undef HAVE_SNPRINTF
#endif
......
......@@ -59,6 +59,7 @@ char* query_table_status(THD *thd,const char *db,const char *table_name);
#define ACL_CACHE_SIZE 256
#define HASH_PASSWORD_LENGTH 16
#define MAX_PASSWORD_LENGTH 32
#define HOST_CACHE_SIZE 128
#define MAX_ACCEPT_RETRY 10 // Test accept this many times
#define MAX_FIELDS_BEFORE_HASH 32
......
......@@ -250,15 +250,15 @@ Log_event* next_event(RELAY_LOG_INFO* rli);
typedef struct st_master_info
{
char master_log_name[FN_REFLEN];
char host[HOSTNAME_LENGTH+1];
char user[USERNAME_LENGTH+1];
char password[MAX_PASSWORD_LENGTH+1];
my_off_t master_log_pos;
File fd; // we keep the file open, so we need to remember the file pointer
IO_CACHE file;
/* the variables below are needed because we can change masters on the fly */
char host[HOSTNAME_LENGTH+1];
char user[USERNAME_LENGTH+1];
char password[HASH_PASSWORD_LENGTH+1];
pthread_mutex_t data_lock,run_lock;
pthread_cond_t data_cond,start_cond,stop_cond;
THD *io_thd;
......@@ -271,12 +271,11 @@ typedef struct st_master_info
int events_till_abort;
#endif
bool inited;
enum enum_binlog_formats old_format; /* master binlog is in 3.23 format */
enum enum_binlog_formats old_format; /* binlog is in 3.23 format */
volatile bool abort_slave, slave_running;
volatile ulong slave_run_id;
bool ignore_stop_event;
st_master_info()
:fd(-1), io_thd(0), inited(0), old_format(BINLOG_FORMAT_CURRENT),
abort_slave(0),slave_running(0), slave_run_id(0)
......
......@@ -267,9 +267,13 @@ int purge_master_logs(THD* thd, const char* to_log)
{
char search_file_name[FN_REFLEN];
const char* errmsg = 0;
int res;
if (!mysql_bin_log.is_open())
goto end;
mysql_bin_log.make_log_name(search_file_name, to_log);
int res = mysql_bin_log.purge_logs(thd, search_file_name);
res = mysql_bin_log.purge_logs(thd, search_file_name);
switch(res) {
case 0: break;
......@@ -292,9 +296,9 @@ binlog purge"; break;
send_error(&thd->net, 0, errmsg);
return 1;
}
else
send_ok(&thd->net);
end:
send_ok(&thd->net);
return 0;
}
......@@ -886,7 +890,7 @@ int change_master(THD* thd, MASTER_INFO* mi)
if (lex_mi->log_file_name)
strmake(mi->master_log_name, lex_mi->log_file_name,
sizeof(mi->master_log_name));
sizeof(mi->master_log_name)-1);
if (lex_mi->pos)
{
mi->master_log_pos= lex_mi->pos;
......@@ -895,11 +899,11 @@ int change_master(THD* thd, MASTER_INFO* mi)
DBUG_PRINT("info", ("master_log_pos: %d", (ulong) mi->master_log_pos));
if (lex_mi->host)
strmake(mi->host, lex_mi->host, sizeof(mi->host));
strmake(mi->host, lex_mi->host, sizeof(mi->host)-1);
if (lex_mi->user)
strmake(mi->user, lex_mi->user, sizeof(mi->user));
strmake(mi->user, lex_mi->user, sizeof(mi->user)-1);
if (lex_mi->password)
strmake(mi->password, lex_mi->password, sizeof(mi->password));
strmake(mi->password, lex_mi->password, sizeof(mi->password)-1);
if (lex_mi->port)
mi->port = lex_mi->port;
if (lex_mi->connect_retry)
......@@ -1137,7 +1141,6 @@ int show_binlog_info(THD* thd)
int show_binlogs(THD* thd)
{
const char *errmsg;
IO_CACHE *index_file;
char fname[FN_REFLEN];
NET* net = &thd->net;
......@@ -1148,8 +1151,8 @@ int show_binlogs(THD* thd)
if (!mysql_bin_log.is_open())
{
//TODO: Replace with ER() error message
errmsg= "You are not using binary logging";
goto err_with_msg;
send_error(net, 0, "You are not using binary logging");
return 1;
}
field_list.push_back(new Item_empty_string("Log_name", 255));
......@@ -1174,8 +1177,6 @@ int show_binlogs(THD* thd)
send_eof(net);
return 0;
err_with_msg:
send_error(net, 0, errmsg);
err:
mysql_bin_log.unlock_index();
return 1;
......
......@@ -6,7 +6,7 @@ typedef struct st_slave_info
uint32 rpl_recovery_rank, master_id;
char host[HOSTNAME_LENGTH+1];
char user[USERNAME_LENGTH+1];
char password[HASH_PASSWORD_LENGTH+1];
char password[MAX_PASSWORD_LENGTH+1];
uint16 port;
THD* thd;
} SLAVE_INFO;
......
......@@ -21,7 +21,7 @@
strmake(dst,src,length) moves length characters, or until end, of src to
dst and appends a closing NUL to dst.
Note that is strlen(src) >= length then dst[length] will be set to \0
Note that if strlen(src) >= length then dst[length] will be set to \0
strmake() returns pointer to closing null
*/
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment