List:Commits« Previous MessageNext Message »
From:Jorgen Loland Date:November 18 2011 1:56pm
Subject:bzr push into mysql-5.1 branch (jorgen.loland:3641 to 3642) Bug#12997905
View as plain text  
 3642 Jorgen Loland	2011-11-18
      Backmerge of BUG#12997905

    modified:
      sql/field.h
      sql/field_conv.cc
      sql/sql_select.cc
 3641 Karen Langford	2011-11-17 [merge]
      Merge from mysql-5.1.60-release

    added:
      mysql-test/suite/innodb/r/innodb_bug12661768.result
      mysql-test/suite/innodb/t/innodb_bug12661768.test
      mysql-test/suite/innodb_plugin/r/innodb_misc1.result
      mysql-test/suite/innodb_plugin/t/innodb_misc1-master.opt
      mysql-test/suite/innodb_plugin/t/innodb_misc1.test
    modified:
      cmd-line-utils/libedit/histedit.h
      cmd-line-utils/libedit/np/unvis.c
      cmd-line-utils/libedit/np/vis.c
      cmd-line-utils/libedit/read.c
      mysql-test/r/partition_innodb_plugin.result
      mysql-test/r/type_newdecimal.result
      mysql-test/r/view_grant.result
      mysql-test/suite/innodb/r/innodb.result
      mysql-test/suite/innodb/t/innodb.test
      mysql-test/suite/innodb_plugin/r/innodb-index.result
      mysql-test/suite/innodb_plugin/r/innodb.result
      mysql-test/suite/innodb_plugin/t/innodb-index.test
      mysql-test/suite/innodb_plugin/t/innodb.test
      mysql-test/t/partition_innodb_plugin.test
      mysql-test/t/type_newdecimal.test
      mysql-test/t/view_grant.test
      sql/ha_partition.cc
      sql/handler.cc
      sql/my_decimal.h
      sql/sp_head.cc
      sql/sql_cache.cc
      sql/sql_parse.cc
      sql/sql_view.cc
      storage/innobase/btr/btr0btr.c
      storage/innobase/btr/btr0cur.c
      storage/innobase/fsp/fsp0fsp.c
      storage/innobase/handler/ha_innodb.cc
      storage/innobase/include/btr0btr.h
      storage/innobase/include/btr0cur.h
      storage/innobase/include/buf0buf.h
      storage/innobase/include/fsp0fsp.h
      storage/innobase/include/mtr0mtr.h
      storage/innobase/include/mtr0mtr.ic
      storage/innobase/include/page0page.h
      storage/innobase/include/page0page.ic
      storage/innobase/mtr/mtr0mtr.c
      storage/innobase/page/page0page.c
      storage/innobase/row/row0ins.c
      storage/innobase/row/row0row.c
      storage/innobase/row/row0umod.c
      storage/innobase/row/row0upd.c
      storage/innobase/trx/trx0undo.c
      storage/innodb_plugin/ChangeLog
      storage/innodb_plugin/btr/btr0btr.c
      storage/innodb_plugin/btr/btr0cur.c
      storage/innodb_plugin/fsp/fsp0fsp.c
      storage/innodb_plugin/handler/ha_innodb.cc
      storage/innodb_plugin/include/btr0btr.h
      storage/innodb_plugin/include/btr0cur.h
      storage/innodb_plugin/include/btr0cur.ic
      storage/innodb_plugin/include/buf0buf.h
      storage/innodb_plugin/include/buf0buf.ic
      storage/innodb_plugin/include/fsp0fsp.h
      storage/innodb_plugin/include/mtr0mtr.h
      storage/innodb_plugin/include/mtr0mtr.ic
      storage/innodb_plugin/include/page0page.h
      storage/innodb_plugin/include/page0page.ic
      storage/innodb_plugin/mtr/mtr0mtr.c
      storage/innodb_plugin/page/page0cur.c
      storage/innodb_plugin/page/page0page.c
      storage/innodb_plugin/row/row0ins.c
      storage/innodb_plugin/row/row0row.c
      storage/innodb_plugin/row/row0upd.c
      storage/innodb_plugin/trx/trx0undo.c
      strings/decimal.c
      tests/mysql_client_test.c
=== modified file 'sql/field.h'
--- a/sql/field.h	2011-07-03 15:47:37 +0000
+++ b/sql/field.h	2011-11-18 13:47:11 +0000
@@ -2128,6 +2128,23 @@ public:
   uchar *from_null_ptr,*to_null_ptr;
   my_bool *null_row;
   uint	from_bit,to_bit;
+  /**
+    Number of bytes in the fields pointed to by 'from_ptr' and
+    'to_ptr'. Usually this is the number of bytes that are copied from
+    'from_ptr' to 'to_ptr'.
+
+    For variable-length fields (VARCHAR), the first byte(s) describe
+    the actual length of the text. For VARCHARs with length 
+       < 256 there is 1 length byte 
+       >= 256 there is 2 length bytes
+    Thus, if from_field is VARCHAR(10), from_length (and in most cases
+    to_length) is 11. For VARCHAR(1024), the length is 1026. @see
+    Field_varstring::length_bytes
+
+    Note that for VARCHARs, do_copy() will be do_varstring*() which
+    only copies the length-bytes (1 or 2) + the actual length of the
+    text instead of from/to_length bytes. @see get_copy_func()
+  */
   uint from_length,to_length;
   Field *from_field,*to_field;
   String tmp;					// For items

=== modified file 'sql/field_conv.cc'
--- a/sql/field_conv.cc	2011-07-03 15:47:37 +0000
+++ b/sql/field_conv.cc	2011-11-18 13:47:11 +0000
@@ -707,7 +707,7 @@ Copy_field::get_copy_func(Field *to,Fiel
         if (((Field_varstring*) to)->length_bytes !=
             ((Field_varstring*) from)->length_bytes)
           return do_field_string;
-        if (to_length != from_length)
+        else
           return (((Field_varstring*) to)->length_bytes == 1 ?
                   (from->charset()->mbmaxlen == 1 ? do_varstring1 :
                                                     do_varstring1_mb) :

=== modified file 'sql/sql_select.cc'
--- a/sql/sql_select.cc	2011-10-05 09:28:20 +0000
+++ b/sql/sql_select.cc	2011-11-18 13:47:11 +0000
@@ -10647,6 +10647,9 @@ create_tmp_table(THD *thd,TMP_TABLE_PARA
   if (open_tmp_table(table))
     goto err;
 
+  // Make empty record so random data is not written to disk
+  empty_record(table);
+
   thd->mem_root= mem_root_save;
 
   DBUG_RETURN(table);

No bundle (reason: useless for push emails).
Thread
bzr push into mysql-5.1 branch (jorgen.loland:3641 to 3642) Bug#12997905Jorgen Loland21 Nov