List:Commits« Previous MessageNext Message »
From:konstantin Date:January 11 2006 2:50pm
Subject:bk commit into 5.0 tree (konstantin:1.2036)
View as plain text  
Below is the list of changes that have just been committed into a local
5.0 repository of kostja. When kostja 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.2036 06/01/11 17:49:56 konstantin@stripped +2 -0
  Merge mysql.com:/opt/local/work/mysql-4.1-root
  into  mysql.com:/opt/local/work/mysql-5.0-root

  sql/password.c
    1.39 06/01/11 17:49:48 konstantin@stripped +2 -2
    Manual merge

  sql/item_strfunc.cc
    1.262 06/01/11 17:34:38 konstantin@stripped +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:	konstantin
# Host:	dragonfly.local
# Root:	/opt/local/work/mysql-5.0-root/RESYNC

--- 1.261/sql/item_strfunc.cc	2005-12-03 07:42:27 +03:00
+++ 1.262/sql/item_strfunc.cc	2006-01-11 17:34:38 +03:00
@@ -153,11 +153,13 @@
     SHA1_CONTEXT context;  /* Context used to generate SHA1 hash */
     /* Temporary buffer to store 160bit digest */
     uint8 digest[SHA1_HASH_SIZE];
-    sha1_reset(&context);  /* We do not have to check for error here */
+    mysql_sha1_reset(&context);  /* We do not have to check for error here */
     /* No need to check error as the only case would be too long message */
-    sha1_input(&context,(const unsigned char *) sptr->ptr(), sptr->length());
+    mysql_sha1_input(&context,
+                     (const unsigned char *) sptr->ptr(), sptr->length());
     /* Ensure that memory is free and we got result */
-    if (!( str->alloc(SHA1_HASH_SIZE*2) || (sha1_result(&context,digest))))
+    if (!( str->alloc(SHA1_HASH_SIZE*2) ||
+           (mysql_sha1_result(&context,digest))))
     {
       sprintf((char *) str->ptr(),
       "%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x\

--- 1.38/sql/password.c	2005-10-12 01:58:18 +04:00
+++ 1.39/sql/password.c	2006-01-11 17:49:48 +03:00
@@ -395,15 +395,15 @@
   SHA1_CONTEXT sha1_context;
   uint8 hash_stage2[SHA1_HASH_SIZE];
 
-  sha1_reset(&sha1_context);
+  mysql_sha1_reset(&sha1_context);
   /* stage 1: hash password */
-  sha1_input(&sha1_context, (uint8 *) password, (uint) strlen(password));
-  sha1_result(&sha1_context, (uint8 *) to);
+  mysql_sha1_input(&sha1_context, (uint8 *) password, (uint) strlen(password));
+  mysql_sha1_result(&sha1_context, (uint8 *) to);
   /* stage 2: hash stage1 output */
-  sha1_reset(&sha1_context);
-  sha1_input(&sha1_context, (uint8 *) to, SHA1_HASH_SIZE);
+  mysql_sha1_reset(&sha1_context);
+  mysql_sha1_input(&sha1_context, (uint8 *) to, SHA1_HASH_SIZE);
   /* separate buffer is used to pass 'to' in octet2hex */
-  sha1_result(&sha1_context, hash_stage2);
+  mysql_sha1_result(&sha1_context, hash_stage2);
   /* convert hash_stage2 to hex string */
   *to++= PVERSION41_CHAR;
   octet2hex(to, hash_stage2, SHA1_HASH_SIZE);
@@ -434,20 +434,20 @@
   uint8 hash_stage1[SHA1_HASH_SIZE];
   uint8 hash_stage2[SHA1_HASH_SIZE];
 
-  sha1_reset(&sha1_context);
+  mysql_sha1_reset(&sha1_context);
   /* stage 1: hash password */
-  sha1_input(&sha1_context, (uint8 *) password, (uint) strlen(password));
-  sha1_result(&sha1_context, hash_stage1);
+  mysql_sha1_input(&sha1_context, (uint8 *) password, (uint) strlen(password));
+  mysql_sha1_result(&sha1_context, hash_stage1);
   /* stage 2: hash stage 1; note that hash_stage2 is stored in the database */
-  sha1_reset(&sha1_context);
-  sha1_input(&sha1_context, hash_stage1, SHA1_HASH_SIZE);
-  sha1_result(&sha1_context, hash_stage2);
+  mysql_sha1_reset(&sha1_context);
+  mysql_sha1_input(&sha1_context, hash_stage1, SHA1_HASH_SIZE);
+  mysql_sha1_result(&sha1_context, hash_stage2);
   /* create crypt string as sha1(message, hash_stage2) */;
-  sha1_reset(&sha1_context);
-  sha1_input(&sha1_context, (const uint8 *) message, SCRAMBLE_LENGTH);
-  sha1_input(&sha1_context, hash_stage2, SHA1_HASH_SIZE);
+  mysql_sha1_reset(&sha1_context);
+  mysql_sha1_input(&sha1_context, (const uint8 *) message, SCRAMBLE_LENGTH);
+  mysql_sha1_input(&sha1_context, hash_stage2, SHA1_HASH_SIZE);
   /* xor allows 'from' and 'to' overlap: lets take advantage of it */
-  sha1_result(&sha1_context, (uint8 *) to);
+  mysql_sha1_result(&sha1_context, (uint8 *) to);
   my_crypt(to, (const uchar *) to, hash_stage1, SCRAMBLE_LENGTH);
 }
 
@@ -480,17 +480,17 @@
   uint8 buf[SHA1_HASH_SIZE];
   uint8 hash_stage2_reassured[SHA1_HASH_SIZE];
 
-  sha1_reset(&sha1_context);
+  mysql_sha1_reset(&sha1_context);
   /* create key to encrypt scramble */
-  sha1_input(&sha1_context, (const uint8 *) message, SCRAMBLE_LENGTH);
-  sha1_input(&sha1_context, hash_stage2, SHA1_HASH_SIZE);
-  sha1_result(&sha1_context, buf);
+  mysql_sha1_input(&sha1_context, (const uint8 *) message, SCRAMBLE_LENGTH);
+  mysql_sha1_input(&sha1_context, hash_stage2, SHA1_HASH_SIZE);
+  mysql_sha1_result(&sha1_context, buf);
   /* encrypt scramble */
     my_crypt((char *) buf, buf, (const uchar *) scramble, SCRAMBLE_LENGTH);
   /* now buf supposedly contains hash_stage1: so we can get hash_stage2 */
-  sha1_reset(&sha1_context);
-  sha1_input(&sha1_context, buf, SHA1_HASH_SIZE);
-  sha1_result(&sha1_context, hash_stage2_reassured);
+  mysql_sha1_reset(&sha1_context);
+  mysql_sha1_input(&sha1_context, buf, SHA1_HASH_SIZE);
+  mysql_sha1_result(&sha1_context, hash_stage2_reassured);
   return memcmp(hash_stage2, hash_stage2_reassured, SHA1_HASH_SIZE);
 }
 
Thread
bk commit into 5.0 tree (konstantin:1.2036)konstantin11 Jan