Below is the list of changes that have just been committed into a local
5.0 repository of msvensson. When msvensson does a push these changes will
be propagated to the main repository and, within 24 hours after the
push, to the public repository.
For information on how to access the public repository
see http://dev.mysql.com/doc/mysql/en/installing-source-tree.html
ChangeSet
1.2151 06/04/12 12:52:34 msvensson@neptunus.(none) +4 -0
Merge neptunus.(none):/home/msvensson/mysql/mysql-5.0
into neptunus.(none):/home/msvensson/mysql/bug17208/my50-bug17208
sql/sql_acl.cc
1.191 06/04/12 12:52:28 msvensson@neptunus.(none) +0 -0
Auto merged
sql-common/client.c
1.86 06/04/12 12:52:28 msvensson@neptunus.(none) +0 -0
Auto merged
sql/mysqld.cc
1.542 06/04/12 12:52:27 msvensson@neptunus.(none) +0 -0
Auto merged
sql/mysql_priv.h
1.381 06/04/12 12:52:27 msvensson@neptunus.(none) +0 -0
Auto merged
# This is a BitKeeper patch. What follows are the unified diffs for the
# set of deltas contained in the patch. The rest of the patch, the part
# that BitKeeper cares about, is below these diffs.
# User: msvensson
# Host: neptunus.(none)
# Root: /home/msvensson/mysql/bug17208/my50-bug17208/RESYNC
--- 1.380/sql/mysql_priv.h 2006-03-30 15:14:51 +02:00
+++ 1.381/sql/mysql_priv.h 2006-04-12 12:52:27 +02:00
@@ -1307,7 +1307,7 @@
#endif
#ifdef HAVE_OPENSSL
-extern struct st_VioSSLAcceptorFd * ssl_acceptor_fd;
+extern struct st_VioSSLFd * ssl_acceptor_fd;
#endif /* HAVE_OPENSSL */
MYSQL_LOCK *mysql_lock_tables(THD *thd, TABLE **table, uint count,
--- 1.541/sql/mysqld.cc 2006-04-10 17:47:36 +02:00
+++ 1.542/sql/mysqld.cc 2006-04-12 12:52:27 +02:00
@@ -596,7 +596,7 @@
static unsigned long openssl_id_function();
#endif
char *des_key_file;
-struct st_VioSSLAcceptorFd *ssl_acceptor_fd;
+struct st_VioSSLFd *ssl_acceptor_fd;
#endif /* HAVE_OPENSSL */
@@ -1107,7 +1107,10 @@
#endif
#ifdef HAVE_OPENSSL
if (ssl_acceptor_fd)
- my_free((gptr) ssl_acceptor_fd, MYF(MY_ALLOW_ZERO_PTR));
+ {
+ SSL_CTX_free(ssl_acceptor_fd->ssl_context);
+ my_free((gptr) ssl_acceptor_fd, MYF(0));
+ }
#endif /* HAVE_OPENSSL */
#ifdef USE_REGEX
my_regex_end();
--- 1.190/sql/sql_acl.cc 2006-03-20 10:41:56 +01:00
+++ 1.191/sql/sql_acl.cc 2006-04-12 12:52:28 +02:00
@@ -858,8 +858,8 @@
if (acl_user->x509_issuer)
{
DBUG_PRINT("info",("checkpoint 3"));
- char *ptr = X509_NAME_oneline(X509_get_issuer_name(cert), 0, 0);
- DBUG_PRINT("info",("comparing issuers: '%s' and '%s'",
+ char *ptr = X509_NAME_oneline(X509_get_issuer_name(cert), 0, 0);
+ DBUG_PRINT("info",("comparing issuers: '%s' and '%s'",
acl_user->x509_issuer, ptr));
if (strcmp(acl_user->x509_issuer, ptr))
{
--- 1.85/sql-common/client.c 2006-03-10 16:41:09 +01:00
+++ 1.86/sql-common/client.c 2006-04-12 12:52:28 +02:00
@@ -1428,7 +1428,7 @@
mysql->free_me=1;
}
else
- bzero((char*) (mysql),sizeof(*(mysql)));
+ bzero((char*) (mysql), sizeof(*(mysql)));
mysql->options.connect_timeout= CONNECT_TIMEOUT;
mysql->last_used_con= mysql->next_slave= mysql->master = mysql;
mysql->charset=default_charset_info;
@@ -2413,9 +2413,12 @@
my_free(mysql->user,MYF(MY_ALLOW_ZERO_PTR));
my_free(mysql->passwd,MYF(MY_ALLOW_ZERO_PTR));
my_free(mysql->db,MYF(MY_ALLOW_ZERO_PTR));
+#if defined(EMBEDDED_LIBRARY) || MYSQL_VERSION_ID >= 50100
my_free(mysql->info_buffer,MYF(MY_ALLOW_ZERO_PTR));
+ mysql->info_buffer= 0;
+#endif
/* Clear pointers for better safety */
-
mysql->info_buffer=mysql->host_info=mysql->user=mysql->passwd=mysql->db=0;
+ mysql->host_info= mysql->user= mysql->passwd= mysql->db= 0;
}
@@ -2886,6 +2889,36 @@
return mysql->net.last_error;
}
+
+/*
+ Get version number for server in a form easy to test on
+
+ SYNOPSIS
+ mysql_get_server_version()
+ mysql Connection
+
+ EXAMPLE
+ 4.1.0-alfa -> 40100
+
+ NOTES
+ We will ensure that a newer server always has a bigger number.
+
+ RETURN
+ Signed number > 323000
+*/
+
+ulong STDCALL
+mysql_get_server_version(MYSQL *mysql)
+{
+ uint major, minor, version;
+ char *pos= mysql->server_version, *end_pos;
+ major= (uint) strtoul(pos, &end_pos, 10); pos=end_pos+1;
+ minor= (uint) strtoul(pos, &end_pos, 10); pos=end_pos+1;
+ version= (uint) strtoul(pos, &end_pos, 10);
+ return (ulong) major*10000L+(ulong) (minor*100+version);
+}
+
+
/*
mysql_set_character_set function sends SET NAMES cs_name to
the server (which changes character_set_client, character_set_result
@@ -2905,6 +2938,9 @@
{
char buff[MY_CS_NAME_SIZE + 10];
charsets_dir= save_csdir;
+ /* Skip execution of "SET NAMES" for pre-4.1 servers */
+ if (mysql_get_server_version(mysql) < 40100)
+ return 0;
sprintf(buff, "SET NAMES %s", cs_name);
if (!mysql_real_query(mysql, buff, strlen(buff)))
{
| Thread |
|---|
| • bk commit into 5.0 tree (msvensson:1.2151) | msvensson | 12 Apr |