Loading include/sha1.h +3 −3 Original line number Diff line number Diff line Loading @@ -60,8 +60,8 @@ typedef struct SHA1_CONTEXT C_MODE_START int sha1_reset( SHA1_CONTEXT* ); int sha1_input( SHA1_CONTEXT*, const uint8 *, unsigned int ); int sha1_result( SHA1_CONTEXT* , uint8 Message_Digest[SHA1_HASH_SIZE] ); int mysql_sha1_reset(SHA1_CONTEXT*); int mysql_sha1_input(SHA1_CONTEXT*, const uint8 *, unsigned int); int mysql_sha1_result(SHA1_CONTEXT* , uint8 Message_Digest[SHA1_HASH_SIZE]); C_MODE_END mysql-test/r/ctype_utf8.result +8 −0 Original line number Diff line number Diff line Loading @@ -1070,3 +1070,11 @@ char(a) 1 2 drop table t1; CREATE TABLE t1 (t TINYTEXT CHARACTER SET utf8); INSERT INTO t1 VALUES(REPEAT('a', 100)); CREATE TEMPORARY TABLE t2 SELECT COALESCE(t) AS bug FROM t1; SELECT LENGTH(bug) FROM t2; LENGTH(bug) 100 DROP TABLE t2; DROP TABLE t1; mysql-test/t/ctype_utf8.test +10 −0 Original line number Diff line number Diff line Loading @@ -882,4 +882,14 @@ set names utf8; select distinct char(a) from t1; drop table t1; # # Bug#15581: COALESCE function truncates mutli-byte TINYTEXT values # CREATE TABLE t1 (t TINYTEXT CHARACTER SET utf8); INSERT INTO t1 VALUES(REPEAT('a', 100)); CREATE TEMPORARY TABLE t2 SELECT COALESCE(t) AS bug FROM t1; SELECT LENGTH(bug) FROM t2; DROP TABLE t2; DROP TABLE t1; # End of 4.1 tests mysys/sha1.c +8 −8 Original line number Diff line number Diff line Loading @@ -69,7 +69,7 @@ static void SHA1ProcessMessageBlock(SHA1_CONTEXT*); Initialize SHA1Context SYNOPSIS sha1_reset() mysql_sha1_reset() context [in/out] The context to reset. DESCRIPTION Loading @@ -92,7 +92,7 @@ const uint32 sha_const_key[5]= }; int sha1_reset(SHA1_CONTEXT *context) int mysql_sha1_reset(SHA1_CONTEXT *context) { #ifndef DBUG_OFF if (!context) Loading @@ -119,7 +119,7 @@ int sha1_reset(SHA1_CONTEXT *context) Return the 160-bit message digest into the array provided by the caller SYNOPSIS sha1_result() mysql_sha1_result() context [in/out] The context to use to calculate the SHA-1 hash. Message_Digest: [out] Where the digest is returned. Loading @@ -132,7 +132,7 @@ int sha1_reset(SHA1_CONTEXT *context) != SHA_SUCCESS sha Error Code. */ int sha1_result(SHA1_CONTEXT *context, int mysql_sha1_result(SHA1_CONTEXT *context, uint8 Message_Digest[SHA1_HASH_SIZE]) { int i; Loading Loading @@ -165,7 +165,7 @@ int sha1_result(SHA1_CONTEXT *context, Accepts an array of octets as the next portion of the message. SYNOPSIS sha1_input() mysql_sha1_input() context [in/out] The SHA context to update message_array An array of characters representing the next portion of the message. Loading @@ -176,7 +176,7 @@ int sha1_result(SHA1_CONTEXT *context, != SHA_SUCCESS sha Error Code. */ int sha1_input(SHA1_CONTEXT *context, const uint8 *message_array, int mysql_sha1_input(SHA1_CONTEXT *context, const uint8 *message_array, unsigned length) { if (!length) Loading sql/field.cc +3 −3 Original line number Diff line number Diff line Loading @@ -6949,11 +6949,11 @@ uint32 Field_blob::max_length() switch (packlength) { case 1: return 255; return 255 * field_charset->mbmaxlen; case 2: return 65535; return 65535 * field_charset->mbmaxlen; case 3: return 16777215; return 16777215 * field_charset->mbmaxlen; case 4: return (uint32) 4294967295U; default: Loading Loading
include/sha1.h +3 −3 Original line number Diff line number Diff line Loading @@ -60,8 +60,8 @@ typedef struct SHA1_CONTEXT C_MODE_START int sha1_reset( SHA1_CONTEXT* ); int sha1_input( SHA1_CONTEXT*, const uint8 *, unsigned int ); int sha1_result( SHA1_CONTEXT* , uint8 Message_Digest[SHA1_HASH_SIZE] ); int mysql_sha1_reset(SHA1_CONTEXT*); int mysql_sha1_input(SHA1_CONTEXT*, const uint8 *, unsigned int); int mysql_sha1_result(SHA1_CONTEXT* , uint8 Message_Digest[SHA1_HASH_SIZE]); C_MODE_END
mysql-test/r/ctype_utf8.result +8 −0 Original line number Diff line number Diff line Loading @@ -1070,3 +1070,11 @@ char(a) 1 2 drop table t1; CREATE TABLE t1 (t TINYTEXT CHARACTER SET utf8); INSERT INTO t1 VALUES(REPEAT('a', 100)); CREATE TEMPORARY TABLE t2 SELECT COALESCE(t) AS bug FROM t1; SELECT LENGTH(bug) FROM t2; LENGTH(bug) 100 DROP TABLE t2; DROP TABLE t1;
mysql-test/t/ctype_utf8.test +10 −0 Original line number Diff line number Diff line Loading @@ -882,4 +882,14 @@ set names utf8; select distinct char(a) from t1; drop table t1; # # Bug#15581: COALESCE function truncates mutli-byte TINYTEXT values # CREATE TABLE t1 (t TINYTEXT CHARACTER SET utf8); INSERT INTO t1 VALUES(REPEAT('a', 100)); CREATE TEMPORARY TABLE t2 SELECT COALESCE(t) AS bug FROM t1; SELECT LENGTH(bug) FROM t2; DROP TABLE t2; DROP TABLE t1; # End of 4.1 tests
mysys/sha1.c +8 −8 Original line number Diff line number Diff line Loading @@ -69,7 +69,7 @@ static void SHA1ProcessMessageBlock(SHA1_CONTEXT*); Initialize SHA1Context SYNOPSIS sha1_reset() mysql_sha1_reset() context [in/out] The context to reset. DESCRIPTION Loading @@ -92,7 +92,7 @@ const uint32 sha_const_key[5]= }; int sha1_reset(SHA1_CONTEXT *context) int mysql_sha1_reset(SHA1_CONTEXT *context) { #ifndef DBUG_OFF if (!context) Loading @@ -119,7 +119,7 @@ int sha1_reset(SHA1_CONTEXT *context) Return the 160-bit message digest into the array provided by the caller SYNOPSIS sha1_result() mysql_sha1_result() context [in/out] The context to use to calculate the SHA-1 hash. Message_Digest: [out] Where the digest is returned. Loading @@ -132,7 +132,7 @@ int sha1_reset(SHA1_CONTEXT *context) != SHA_SUCCESS sha Error Code. */ int sha1_result(SHA1_CONTEXT *context, int mysql_sha1_result(SHA1_CONTEXT *context, uint8 Message_Digest[SHA1_HASH_SIZE]) { int i; Loading Loading @@ -165,7 +165,7 @@ int sha1_result(SHA1_CONTEXT *context, Accepts an array of octets as the next portion of the message. SYNOPSIS sha1_input() mysql_sha1_input() context [in/out] The SHA context to update message_array An array of characters representing the next portion of the message. Loading @@ -176,7 +176,7 @@ int sha1_result(SHA1_CONTEXT *context, != SHA_SUCCESS sha Error Code. */ int sha1_input(SHA1_CONTEXT *context, const uint8 *message_array, int mysql_sha1_input(SHA1_CONTEXT *context, const uint8 *message_array, unsigned length) { if (!length) Loading
sql/field.cc +3 −3 Original line number Diff line number Diff line Loading @@ -6949,11 +6949,11 @@ uint32 Field_blob::max_length() switch (packlength) { case 1: return 255; return 255 * field_charset->mbmaxlen; case 2: return 65535; return 65535 * field_charset->mbmaxlen; case 3: return 16777215; return 16777215 * field_charset->mbmaxlen; case 4: return (uint32) 4294967295U; default: Loading