#At file:///home/lsoares/Workspace/bzr/work/bugfixing/51787/post-push-fix/mysql-next-mr-bugfixing/ based on revid:joerg@stripped
3129 Luis Soares 2010-03-12
BUG#51716 post push fix.
There are two issues fixed here:
1. We needed to update the result file, for some of
mysqlbinlog_* tests, because now the some padding chars
are not output anymore.
2. We needed to change the Field_string::pack so that
for BINARY types the padding chars are not packed
(lengthsp will return full length for these types).
modified:
mysql-test/r/mysqlbinlog_row_innodb.result
mysql-test/r/mysqlbinlog_row_myisam.result
sql/field.cc
=== modified file 'mysql-test/r/mysqlbinlog_row_innodb.result'
--- a/mysql-test/r/mysqlbinlog_row_innodb.result 2010-01-12 12:07:09 +0000
+++ b/mysql-test/r/mysqlbinlog_row_innodb.result 2010-03-12 12:05:53 +0000
@@ -2405,10 +2405,10 @@ BEGIN
### @38='' /* STRING(0) meta=65024 nullable=1 is_null=0 */
### @39='' /* STRING(3) meta=65027 nullable=1 is_null=0 */
### @40='' /* STRING(765) meta=57085 nullable=1 is_null=0 */
-### @41='\x00' /* STRING(2) meta=65026 nullable=1 is_null=0 */
+### @41='' /* STRING(2) meta=65026 nullable=1 is_null=0 */
### @42='' /* STRING(0) meta=65024 nullable=1 is_null=0 */
-### @43='\x00' /* STRING(2) meta=65026 nullable=1 is_null=0 */
-### @44='\x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x!
00 \x00 \
+### @43='' /* STRING(2) meta=65026 nullable=1 is_null=0 */
+### @44='' /* STRING(510) meta=61182 nullable=1 is_null=0 */
### @45='' /* VARSTRING(0) meta=0 nullable=1 is_null=0 */
### @46='' /* VARSTRING(1) meta=1 nullable=1 is_null=0 */
### @47='' /* VARSTRING(255) meta=255 nullable=1 is_null=0 */
@@ -2767,10 +2767,10 @@ BEGIN
### @38='' /* STRING(0) meta=65024 nullable=1 is_null=0 */
### @39='' /* STRING(3) meta=65027 nullable=1 is_null=0 */
### @40='' /* STRING(765) meta=57085 nullable=1 is_null=0 */
-### @41='\x00' /* STRING(2) meta=65026 nullable=1 is_null=0 */
+### @41='' /* STRING(2) meta=65026 nullable=1 is_null=0 */
### @42='' /* STRING(0) meta=65024 nullable=1 is_null=0 */
-### @43='\x00' /* STRING(2) meta=65026 nullable=1 is_null=0 */
-### @44='\x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x!
00 \x00 \
+### @43='' /* STRING(2) meta=65026 nullable=1 is_null=0 */
+### @44='' /* STRING(510) meta=61182 nullable=1 is_null=0 */
### @45='' /* VARSTRING(0) meta=0 nullable=1 is_null=0 */
### @46='' /* VARSTRING(1) meta=1 nullable=1 is_null=0 */
### @47='' /* VARSTRING(255) meta=255 nullable=1 is_null=0 */
@@ -3020,10 +3020,10 @@ BEGIN
### @38='' /* STRING(0) meta=65024 nullable=1 is_null=0 */
### @39='' /* STRING(3) meta=65027 nullable=1 is_null=0 */
### @40='' /* STRING(765) meta=57085 nullable=1 is_null=0 */
-### @41='\x00' /* STRING(2) meta=65026 nullable=1 is_null=0 */
+### @41='' /* STRING(2) meta=65026 nullable=1 is_null=0 */
### @42='' /* STRING(0) meta=65024 nullable=1 is_null=0 */
-### @43='\x00' /* STRING(2) meta=65026 nullable=1 is_null=0 */
-### @44='\x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x!
00 \x00 \
+### @43='' /* STRING(2) meta=65026 nullable=1 is_null=0 */
+### @44='' /* STRING(510) meta=61182 nullable=1 is_null=0 */
### @45='' /* VARSTRING(0) meta=0 nullable=1 is_null=0 */
### @46='' /* VARSTRING(1) meta=1 nullable=1 is_null=0 */
### @47='' /* VARSTRING(255) meta=255 nullable=1 is_null=0 */
@@ -3552,10 +3552,10 @@ BEGIN
### @38='' /* STRING(0) meta=65024 nullable=1 is_null=0 */
### @39='' /* STRING(3) meta=65027 nullable=1 is_null=0 */
### @40='' /* STRING(765) meta=57085 nullable=1 is_null=0 */
-### @41='\x00' /* STRING(2) meta=65026 nullable=1 is_null=0 */
+### @41='' /* STRING(2) meta=65026 nullable=1 is_null=0 */
### @42='' /* STRING(0) meta=65024 nullable=1 is_null=0 */
-### @43='\x00' /* STRING(2) meta=65026 nullable=1 is_null=0 */
-### @44='\x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x!
00 \x00 \
+### @43='' /* STRING(2) meta=65026 nullable=1 is_null=0 */
+### @44='' /* STRING(510) meta=61182 nullable=1 is_null=0 */
### @45='' /* VARSTRING(0) meta=0 nullable=1 is_null=0 */
### @46='' /* VARSTRING(1) meta=1 nullable=1 is_null=0 */
### @47='' /* VARSTRING(255) meta=255 nullable=1 is_null=0 */
=== modified file 'mysql-test/r/mysqlbinlog_row_myisam.result'
--- a/mysql-test/r/mysqlbinlog_row_myisam.result 2010-01-12 12:07:09 +0000
+++ b/mysql-test/r/mysqlbinlog_row_myisam.result 2010-03-12 12:05:53 +0000
@@ -2405,10 +2405,10 @@ BEGIN
### @38='' /* STRING(0) meta=65024 nullable=1 is_null=0 */
### @39='' /* STRING(3) meta=65027 nullable=1 is_null=0 */
### @40='' /* STRING(765) meta=57085 nullable=1 is_null=0 */
-### @41='\x00' /* STRING(2) meta=65026 nullable=1 is_null=0 */
+### @41='' /* STRING(2) meta=65026 nullable=1 is_null=0 */
### @42='' /* STRING(0) meta=65024 nullable=1 is_null=0 */
-### @43='\x00' /* STRING(2) meta=65026 nullable=1 is_null=0 */
-### @44='\x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x!
00 \x00 \
+### @43='' /* STRING(2) meta=65026 nullable=1 is_null=0 */
+### @44='' /* STRING(510) meta=61182 nullable=1 is_null=0 */
### @45='' /* VARSTRING(0) meta=0 nullable=1 is_null=0 */
### @46='' /* VARSTRING(1) meta=1 nullable=1 is_null=0 */
### @47='' /* VARSTRING(255) meta=255 nullable=1 is_null=0 */
@@ -2773,10 +2773,10 @@ BEGIN
### @38='' /* STRING(0) meta=65024 nullable=1 is_null=0 */
### @39='' /* STRING(3) meta=65027 nullable=1 is_null=0 */
### @40='' /* STRING(765) meta=57085 nullable=1 is_null=0 */
-### @41='\x00' /* STRING(2) meta=65026 nullable=1 is_null=0 */
+### @41='' /* STRING(2) meta=65026 nullable=1 is_null=0 */
### @42='' /* STRING(0) meta=65024 nullable=1 is_null=0 */
-### @43='\x00' /* STRING(2) meta=65026 nullable=1 is_null=0 */
-### @44='\x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x!
00 \x00 \
+### @43='' /* STRING(2) meta=65026 nullable=1 is_null=0 */
+### @44='' /* STRING(510) meta=61182 nullable=1 is_null=0 */
### @45='' /* VARSTRING(0) meta=0 nullable=1 is_null=0 */
### @46='' /* VARSTRING(1) meta=1 nullable=1 is_null=0 */
### @47='' /* VARSTRING(255) meta=255 nullable=1 is_null=0 */
@@ -3028,10 +3028,10 @@ BEGIN
### @38='' /* STRING(0) meta=65024 nullable=1 is_null=0 */
### @39='' /* STRING(3) meta=65027 nullable=1 is_null=0 */
### @40='' /* STRING(765) meta=57085 nullable=1 is_null=0 */
-### @41='\x00' /* STRING(2) meta=65026 nullable=1 is_null=0 */
+### @41='' /* STRING(2) meta=65026 nullable=1 is_null=0 */
### @42='' /* STRING(0) meta=65024 nullable=1 is_null=0 */
-### @43='\x00' /* STRING(2) meta=65026 nullable=1 is_null=0 */
-### @44='\x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x!
00 \x00 \
+### @43='' /* STRING(2) meta=65026 nullable=1 is_null=0 */
+### @44='' /* STRING(510) meta=61182 nullable=1 is_null=0 */
### @45='' /* VARSTRING(0) meta=0 nullable=1 is_null=0 */
### @46='' /* VARSTRING(1) meta=1 nullable=1 is_null=0 */
### @47='' /* VARSTRING(255) meta=255 nullable=1 is_null=0 */
@@ -3568,10 +3568,10 @@ BEGIN
### @38='' /* STRING(0) meta=65024 nullable=1 is_null=0 */
### @39='' /* STRING(3) meta=65027 nullable=1 is_null=0 */
### @40='' /* STRING(765) meta=57085 nullable=1 is_null=0 */
-### @41='\x00' /* STRING(2) meta=65026 nullable=1 is_null=0 */
+### @41='' /* STRING(2) meta=65026 nullable=1 is_null=0 */
### @42='' /* STRING(0) meta=65024 nullable=1 is_null=0 */
-### @43='\x00' /* STRING(2) meta=65026 nullable=1 is_null=0 */
-### @44='\x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x!
00 \x00 \
+### @43='' /* STRING(2) meta=65026 nullable=1 is_null=0 */
+### @44='' /* STRING(510) meta=61182 nullable=1 is_null=0 */
### @45='' /* VARSTRING(0) meta=0 nullable=1 is_null=0 */
### @46='' /* VARSTRING(1) meta=1 nullable=1 is_null=0 */
### @47='' /* VARSTRING(255) meta=255 nullable=1 is_null=0 */
=== modified file 'sql/field.cc'
--- a/sql/field.cc 2010-03-10 17:33:51 +0000
+++ b/sql/field.cc 2010-03-12 12:05:53 +0000
@@ -6613,7 +6613,20 @@ uchar *Field_string::pack(uchar *to, con
local_char_length= my_charpos(field_charset, from, from+length,
local_char_length);
set_if_smaller(length, local_char_length);
- length= field_charset->cset->lengthsp(field_charset, (const char*) from, length);
+
+ /*
+ TODO: change charset interface to add a new function that does
+ the following or add a flag to lengthsp to do it itself
+ (this is for not packing padding adding bytes in BINARY
+ fields).
+ */
+ if (field_charset->mbmaxlen == 1)
+ {
+ while (length && from[length-1] == field_charset->pad_char)
+ length --;
+ }
+ else
+ length= field_charset->cset->lengthsp(field_charset, (const char*) from, length);
// Length always stored little-endian
*to++= (uchar) length;
Attachment: [text/bzr-bundle] bzr/luis.soares@sun.com-20100312120553-o7ubd8xs3o14cxhb.bundle
| Thread |
|---|
| • bzr commit into mysql-next-mr-bugfixing branch (luis.soares:3129)Bug#51716 | Luis Soares | 12 Mar 2010 |