logo       

bk commit into 4.0 tree (1.1495): msg#00423

db.mysql.devel

Subject: bk commit into 4.0 tree (1.1495)

Below is the list of changes that have just been committed into a local
4.0 repository of monty. When monty 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://www.mysql.com/doc/I/n/Installing_source_tree.html

ChangeSet
1.1495 03/04/30 10:15:09 monty@xxxxxxxxxxxxxxx +7 -0
Fix reference to not initialized memory
Changed handing of priv_host to fix bug in FLUSH PRIVILEGES

sql/unireg.h
1.18 03/04/30 10:15:08 monty@xxxxxxxxxxxxxxx +1 -0
Changed handing of priv_host to fix bug in FLUSH PRIVILEGES

sql/sql_parse.cc
1.310 03/04/30 10:15:08 monty@xxxxxxxxxxxxxxx +1 -1
Changed handing of priv_host to fix bug in FLUSH PRIVILEGES

sql/sql_class.h
1.145 03/04/30 10:15:08 monty@xxxxxxxxxxxxxxx +2 -1
Changed handing of priv_host to fix bug in FLUSH PRIVILEGES

sql/sql_acl.h
1.16 03/04/30 10:15:08 monty@xxxxxxxxxxxxxxx +1 -1
Changed handing of priv_host to fix bug in FLUSH PRIVILEGES

sql/sql_acl.cc
1.95 03/04/30 10:15:08 monty@xxxxxxxxxxxxxxx +5 -2
Changed handing of priv_host to fix bug in FLUSH PRIVILEGES

myisam/mi_rkey.c
1.13 03/04/30 10:15:08 monty@xxxxxxxxxxxxxxx +6 -3
Fix reference to not initialized memory

libmysqld/lib_sql.cc
1.39 03/04/30 10:15:08 monty@xxxxxxxxxxxxxxx +1 -1
Changed handing of priv_host to fix bug in FLUSH PRIVILEGES

# 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: monty
# Host: narttu.mysql.fi
# Root: /my/mysql-4.0

--- 1.12/myisam/mi_rkey.c Sun Apr 27 22:12:05 2003
+++ 1.13/myisam/mi_rkey.c Wed Apr 30 10:15:08 2003
@@ -93,13 +93,16 @@
rw_unlock(&share->key_root_lock[inx]);

/* Calculate length of the found key; Used by mi_rnext_same */
- if ((keyinfo->flag & HA_VAR_LENGTH_KEY) && last_used_keyseg)
+ if ((keyinfo->flag & HA_VAR_LENGTH_KEY) && last_used_keyseg &&
+ info->lastpos != HA_OFFSET_ERROR)
info->last_rkey_length= _mi_keylength_part(keyinfo, info->lastkey,
last_used_keyseg);
else
info->last_rkey_length= pack_key_length;
+
+ /* Check if we don't want to have record back, only error message */
if (!buf)
- DBUG_RETURN(info->lastpos==HA_OFFSET_ERROR ? my_errno : 0);
+ DBUG_RETURN(info->lastpos == HA_OFFSET_ERROR ? my_errno : 0);

if (!(*info->read_record)(info,info->lastpos,buf))
{
@@ -109,7 +112,7 @@

info->lastpos = HA_OFFSET_ERROR; /* Didn't find key */

- /* Store key for read next */
+ /* Store last used key as a base for read next */
memcpy(info->lastkey,key_buff,pack_key_length);
info->last_rkey_length= pack_key_length;
bzero((char*) info->lastkey+pack_key_length,info->s->base.rec_reflength);

--- 1.94/sql/sql_acl.cc Tue Apr 29 01:15:09 2003
+++ 1.95/sql/sql_acl.cc Wed Apr 30 10:15:08 2003
@@ -493,7 +493,7 @@

ulong acl_getroot(THD *thd, const char *host, const char *ip, const char *user,
const char *password,const char *message,
- char **priv_user, char **priv_host,
+ char **priv_user, char *priv_host,
bool old_ver, USER_RESOURCES *mqh)
{
ulong user_access=NO_ACCESS;
@@ -623,7 +623,10 @@
*mqh=acl_user->user_resource;
if (!acl_user->user)
*priv_user=(char*) ""; // Change to anonymous user /* purecov:
inspected */
- *priv_host=acl_user->host.hostname;
+ if (acl_user->host.hostname)
+ strmake(priv_host, acl_user->host.hostname, MAX_HOSTNAME);
+ else
+ *priv_host= 0;
break;
}
#ifndef ALLOW_DOWNGRADE_OF_USERS

--- 1.15/sql/sql_acl.h Tue Apr 29 01:15:09 2003
+++ 1.16/sql/sql_acl.h Wed Apr 30 10:15:08 2003
@@ -88,7 +88,7 @@
const char *user, const char *db);
ulong acl_getroot(THD *thd, const char *host, const char *ip, const char *user,
const char *password,const char *scramble,
- char **priv_user, char **priv_host,
+ char **priv_user, char *priv_host,
bool old_ver, USER_RESOURCES *max);
bool acl_check_host(const char *host, const char *ip);
bool check_change_password(THD *thd, const char *host, const char *user);

--- 1.144/sql/sql_class.h Tue Apr 29 01:15:09 2003
+++ 1.145/sql/sql_class.h Wed Apr 30 10:15:08 2003
@@ -351,7 +351,8 @@
db - currently selected database
ip - client IP
*/
- char *host,*user,*priv_user,*priv_host,*db,*ip;
+ char *host,*user,*priv_user,*db,*ip;
+ char priv_host[MAX_HOSTNAME];
/* remote (peer) port */
uint16 peer_port;
/* Points to info-string that will show in SHOW PROCESSLIST */

--- 1.309/sql/sql_parse.cc Tue Apr 29 01:15:09 2003
+++ 1.310/sql/sql_parse.cc Wed Apr 30 10:15:08 2003
@@ -206,7 +206,7 @@
}
thd->master_access=acl_getroot(thd, thd->host, thd->ip, thd->user,
passwd, thd->scramble,
- &thd->priv_user, &thd->priv_host,
+ &thd->priv_user, thd->priv_host,
protocol_version == 9 ||
!(thd->client_capabilities &
CLIENT_LONG_PASSWORD),&ur);

--- 1.17/sql/unireg.h Wed Mar 5 19:43:53 2003
+++ 1.18/sql/unireg.h Wed Apr 30 10:15:08 2003
@@ -55,6 +55,7 @@
#else
#define MAX_REFLENGTH 4 /* Max length for
record ref */
#endif
+#define MAX_HOSTNAME 61 /* len+1 in mysql.user */

#define MAX_FIELD_WIDTH 256 /* Max column width +1 */
#define MAX_TABLES (sizeof(table_map)*8-1) /* Max tables in join */

--- 1.38/libmysqld/lib_sql.cc Tue Apr 29 16:11:43 2003
+++ 1.39/libmysqld/lib_sql.cc Wed Apr 30 10:15:08 2003
@@ -226,7 +226,7 @@
}
thd->master_access=acl_getroot(thd, thd->host, thd->ip, thd->user,
passwd, thd->scramble,
- &thd->priv_user, &thd->priv_host,
+ &thd->priv_user, thd->priv_host,
protocol_version == 9 ||
!(thd->client_capabilities &
CLIENT_LONG_PASSWORD),&ur);

--
MySQL Internals Mailing List
For list archives: http://lists.mysql.com/internals
To unsubscribe:
http://lists.mysql.com/internals?unsub=gcdmd-internals@xxxxxxxxxxx




<Prev in Thread] Current Thread [Next in Thread>
Google Custom Search

News | FAQ | advertise