List:Commits« Previous MessageNext Message »
From:Tatjana Azundris Nuernberg Date:May 12 2011 4:45am
Subject:bzr push into mysql-5.5 branch (tatjana.nuernberg:3376)
View as plain text  
 3376 Tatjana Azundris Nuernberg	2011-05-12 [merge]
      auto-merge

    removed:
      include/my_handler.h
      mysql-test/suite/bugs/
      mysql-test/suite/bugs/combinations
      mysql-test/suite/bugs/data/
      mysql-test/suite/bugs/data/rpl_bug12691.dat
      mysql-test/suite/bugs/r/
      mysql-test/suite/bugs/r/bug57108.result
      mysql-test/suite/bugs/r/rpl_bug12691.result
      mysql-test/suite/bugs/r/rpl_bug31582.result
      mysql-test/suite/bugs/r/rpl_bug31583.result
      mysql-test/suite/bugs/r/rpl_bug33029.result
      mysql-test/suite/bugs/r/rpl_bug38205.result
      mysql-test/suite/bugs/t/
      mysql-test/suite/bugs/t/bug57108-master.opt
      mysql-test/suite/bugs/t/bug57108.test
      mysql-test/suite/bugs/t/rpl_bug12691.test
      mysql-test/suite/bugs/t/rpl_bug31582.test
      mysql-test/suite/bugs/t/rpl_bug31583.test
      mysql-test/suite/bugs/t/rpl_bug33029.test
      mysql-test/suite/bugs/t/rpl_bug38205.test
      mysys/my_gethostbyname.c
      mysys/my_handler.c
      mysys/my_port.c
      storage/innobase/include/thr0loc.h
      storage/innobase/include/thr0loc.ic
      storage/innobase/thr/
      storage/innobase/thr/thr0loc.c
    added:
      include/my_compare.h
      libmysql/authentication_win/
      libmysql/authentication_win/CMakeLists.txt
      libmysql/authentication_win/common.cc
      libmysql/authentication_win/common.h
      libmysql/authentication_win/handshake.cc
      libmysql/authentication_win/handshake.h
      libmysql/authentication_win/handshake_client.cc
      libmysql/authentication_win/log_client.cc
      libmysql/authentication_win/plugin_client.cc
      mysql-test/include/not_crashrep.inc
      mysql-test/r/tablespace.result
      mysql-test/std_data/cluster_7022_table.MYD
      mysql-test/std_data/cluster_7022_table.MYI
      mysql-test/std_data/cluster_7022_table.frm
      mysql-test/suite/innodb/r/innodb_bug59410.result
      mysql-test/suite/innodb/r/innodb_bug59641.result
      mysql-test/suite/innodb/r/innodb_bug60196.result
      mysql-test/suite/innodb/t/innodb_bug59410.test
      mysql-test/suite/innodb/t/innodb_bug59641.test
      mysql-test/suite/innodb/t/innodb_bug60196-master.opt
      mysql-test/suite/innodb/t/innodb_bug60196.test
      mysql-test/t/tablespace.test
      mysys/my_compare.c
    renamed:
      mysql-test/r/partition_not_embedded.result => mysql-test/r/partition_myisam.result
      mysql-test/suite/bugs/r/rpl_bug23533.result => mysql-test/suite/binlog/r/binlog_bug23533.result
      mysql-test/suite/bugs/r/rpl_bug36391.result => mysql-test/suite/binlog/r/binlog_bug36391.result
      mysql-test/suite/bugs/r/rpl_bug37426.result => mysql-test/suite/rpl/r/rpl_bug37426.result
      mysql-test/suite/bugs/t/rpl_bug23533.test => mysql-test/suite/binlog/t/binlog_bug23533.test
      mysql-test/suite/bugs/t/rpl_bug36391-master.opt => mysql-test/suite/binlog/t/binlog_bug36391-master.opt
      mysql-test/suite/bugs/t/rpl_bug36391.test => mysql-test/suite/binlog/t/binlog_bug36391.test
      mysql-test/suite/bugs/t/rpl_bug37426.test => mysql-test/suite/rpl/t/rpl_bug37426.test
      mysql-test/t/partition_not_embedded.test => mysql-test/t/partition_myisam.test
    modified:
      .bzrignore
      BUILD/SETUP.sh
      README
      VERSION
      client/client_priv.h
      client/mysqlbinlog.cc
      client/mysqlslap.c
      client/mysqltest.cc
      cmake/abi_check.cmake
      cmake/maintainer.cmake
      cmake/os/Windows.cmake
      cmake/os/WindowsCache.cmake
      cmd-line-utils/libedit/el.c
      cmd-line-utils/libedit/vi.c
      config.h.cmake
      configure.cmake
      extra/perror.c
      extra/replace.c
      include/decimal.h
      include/heap.h
      include/m_ctype.h
      include/my_global.h
      include/my_net.h
      include/myisam.h
      include/mysql.h
      include/mysql.h.pp
      include/mysql/client_plugin.h
      include/mysql/client_plugin.h.pp
      include/mysql_com.h
      include/violite.h
      libmysql/CMakeLists.txt
      libmysql/libmysql.c
      libmysql/libmysql.def
      mysql-test/collections/default.experimental
      mysql-test/extra/rpl_tests/check_type.inc
      mysql-test/extra/rpl_tests/rpl_extra_col_master.test
      mysql-test/extra/rpl_tests/rpl_extra_col_slave.test
      mysql-test/extra/rpl_tests/rpl_record_compare.test
      mysql-test/extra/rpl_tests/rpl_stop_middle_group.test
      mysql-test/include/ctype_numconv.inc
      mysql-test/include/have_plugin_auth.inc
      mysql-test/include/mix1.inc
      mysql-test/include/mtr_warnings.sql
      mysql-test/include/wait_show_condition.inc
      mysql-test/lib/My/ConfigFactory.pm
      mysql-test/lib/My/Find.pm
      mysql-test/lib/My/SafeProcess/safe_process.pl
      mysql-test/lib/mtr_gcov.pl
      mysql-test/lib/mtr_misc.pl
      mysql-test/mysql-test-run.pl
      mysql-test/r/alter_table.result
      mysql-test/r/archive.result
      mysql-test/r/bootstrap.result
      mysql-test/r/cast.result
      mysql-test/r/ctype_binary.result
      mysql-test/r/ctype_cp1251.result
      mysql-test/r/ctype_latin1.result
      mysql-test/r/ctype_ucs.result
      mysql-test/r/ctype_utf8.result
      mysql-test/r/distinct.result
      mysql-test/r/events_1.result
      mysql-test/r/events_bugs.result
      mysql-test/r/events_restart.result
      mysql-test/r/explain.result
      mysql-test/r/func_analyse.result
      mysql-test/r/func_gconcat.result
      mysql-test/r/func_group.result
      mysql-test/r/func_in.result
      mysql-test/r/func_math.result
      mysql-test/r/func_time.result
      mysql-test/r/gis.result
      mysql-test/r/grant.result
      mysql-test/r/grant2.result
      mysql-test/r/having.result
      mysql-test/r/innodb_mysql_lock.result
      mysql-test/r/innodb_mysql_sync.result
      mysql-test/r/loaddata.result
      mysql-test/r/lowercase_table2.result
      mysql-test/r/metadata.result
      mysql-test/r/mysqladmin.result
      mysql-test/r/mysqlbinlog.result
      mysql-test/r/mysqlbinlog_base64.result
      mysql-test/r/mysqldump.result
      mysql-test/r/mysqlslap.result
      mysql-test/r/order_by.result
      mysql-test/r/packet.result
      mysql-test/r/partition_error.result
      mysql-test/r/partition_symlink.result
      mysql-test/r/plugin_auth.result
      mysql-test/r/plugin_auth_qa.result
      mysql-test/r/plugin_auth_qa_1.result
      mysql-test/r/plugin_auth_qa_2.result
      mysql-test/r/ps.result
      mysql-test/r/shm.result
      mysql-test/r/show_check.result
      mysql-test/r/sp-destruct.result
      mysql-test/r/sp.result
      mysql-test/r/sp_notembedded.result
      mysql-test/r/subselect.result
      mysql-test/r/subselect3.result
      mysql-test/r/system_mysql_db.result
      mysql-test/r/trigger.result
      mysql-test/r/type_ranges.result
      mysql-test/r/type_timestamp.result
      mysql-test/r/variables-notembedded.result
      mysql-test/r/variables.result
      mysql-test/r/view.result
      mysql-test/r/warnings.result
      mysql-test/r/xa.result
      mysql-test/suite/binlog/t/binlog_index.test
      mysql-test/suite/binlog/t/disabled.def
      mysql-test/suite/funcs_1/r/is_columns_is_embedded.result
      mysql-test/suite/funcs_1/r/is_columns_myisam_embedded.result
      mysql-test/suite/funcs_1/r/is_columns_mysql.result
      mysql-test/suite/funcs_1/r/is_columns_mysql_embedded.result
      mysql-test/suite/funcs_1/r/is_statistics_mysql_embedded.result
      mysql-test/suite/funcs_1/r/is_table_constraints_mysql_embedded.result
      mysql-test/suite/funcs_1/r/is_tables_mysql_embedded.result
      mysql-test/suite/funcs_1/r/is_user_privileges.result
      mysql-test/suite/innodb/t/innodb_bug53756.test
      mysql-test/suite/large_tests/r/rpl_slave_net_timeout.result
      mysql-test/suite/large_tests/t/rpl_slave_net_timeout.test
      mysql-test/suite/parts/inc/partition_check_drop.inc
      mysql-test/suite/parts/inc/partition_fail.inc
      mysql-test/suite/parts/inc/partition_layout_check1.inc
      mysql-test/suite/parts/inc/partition_layout_check2.inc
      mysql-test/suite/rpl/r/rpl_circular_for_4_hosts.result
      mysql-test/suite/rpl/r/rpl_extra_col_master_innodb.result
      mysql-test/suite/rpl/r/rpl_extra_col_master_myisam.result
      mysql-test/suite/rpl/r/rpl_heartbeat_basic.result
      mysql-test/suite/rpl/r/rpl_ignore_table.result
      mysql-test/suite/rpl/r/rpl_packet.result
      mysql-test/suite/rpl/r/rpl_row_rec_comp_innodb.result
      mysql-test/suite/rpl/r/rpl_row_rec_comp_myisam.result
      mysql-test/suite/rpl/r/rpl_server_id2.result
      mysql-test/suite/rpl/r/rpl_show_slave_hosts.result
      mysql-test/suite/rpl/r/rpl_slow_query_log.result
      mysql-test/suite/rpl/r/rpl_stm_000001.result
      mysql-test/suite/rpl/r/rpl_stm_start_stop_slave.result
      mysql-test/suite/rpl/r/rpl_stm_stop_middle_group.result
      mysql-test/suite/rpl/r/rpl_stop_slave.result
      mysql-test/suite/rpl/r/rpl_typeconv.result
      mysql-test/suite/rpl/t/rpl_circular_for_4_hosts.test
      mysql-test/suite/rpl/t/rpl_heartbeat_basic.test
      mysql-test/suite/rpl/t/rpl_loaddata_map-master.opt
      mysql-test/suite/rpl/t/rpl_loaddata_map-slave.opt
      mysql-test/suite/rpl/t/rpl_row_rec_comp_myisam.test
      mysql-test/suite/rpl/t/rpl_row_until.test
      mysql-test/suite/rpl/t/rpl_semi_sync.test
      mysql-test/suite/rpl/t/rpl_semi_sync_event.test
      mysql-test/suite/rpl/t/rpl_server_id2.test
      mysql-test/suite/rpl/t/rpl_show_slave_hosts.test
      mysql-test/suite/rpl/t/rpl_slow_query_log.test
      mysql-test/suite/rpl/t/rpl_stm_start_stop_slave.test
      mysql-test/suite/rpl/t/rpl_stop_slave.test
      mysql-test/suite/rpl/t/rpl_sync.test
      mysql-test/suite/rpl/t/rpl_typeconv.test
      mysql-test/suite/sys_vars/r/max_allowed_packet_basic.result
      mysql-test/suite/sys_vars/r/max_allowed_packet_func.result
      mysql-test/t/alter_table.test
      mysql-test/t/archive.test
      mysql-test/t/bootstrap.test
      mysql-test/t/cast.test
      mysql-test/t/crash_commit_before.test
      mysql-test/t/distinct.test
      mysql-test/t/events_1.test
      mysql-test/t/events_bugs.test
      mysql-test/t/events_restart.test
      mysql-test/t/explain.test
      mysql-test/t/func_analyse.test
      mysql-test/t/func_group.test
      mysql-test/t/func_in.test
      mysql-test/t/func_math.test
      mysql-test/t/func_time.test
      mysql-test/t/gis.test
      mysql-test/t/having.test
      mysql-test/t/innodb_mysql_lock.test
      mysql-test/t/innodb_mysql_sync.test
      mysql-test/t/loaddata.test
      mysql-test/t/lowercase_table2.test
      mysql-test/t/myisam_crash_before_flush_keys.test
      mysql-test/t/mysql_client_test-master.opt
      mysql-test/t/mysql_client_test.test
      mysql-test/t/mysqladmin.test
      mysql-test/t/mysqlbinlog.test
      mysql-test/t/mysqlbinlog_base64.test
      mysql-test/t/mysqldump.test
      mysql-test/t/mysqlslap.test
      mysql-test/t/order_by.test
      mysql-test/t/partition_error.test
      mysql-test/t/partition_symlink.test
      mysql-test/t/plugin_auth.test
      mysql-test/t/ps.test
      mysql-test/t/show_check.test
      mysql-test/t/sp-destruct.test
      mysql-test/t/sp.test
      mysql-test/t/subselect.test
      mysql-test/t/trigger.test
      mysql-test/t/type_timestamp.test
      mysql-test/t/variables-notembedded.test
      mysql-test/t/variables.test
      mysql-test/t/view.test
      mysql-test/t/warnings.test
      mysql-test/t/xa.test
      mysys/CMakeLists.txt
      mysys/my_handler_errors.h
      mysys/my_init.c
      mysys/my_thr_init.c
      mysys/mysys_priv.h
      plugin/auth/auth_socket.c
      plugin/fulltext/plugin_example.c
      plugin/semisync/semisync_slave_plugin.cc
      scripts/make_win_bin_dist
      scripts/mysql_system_tables.sql
      scripts/mysql_system_tables_fix.sql
      sql-common/client.c
      sql-common/client_plugin.c
      sql-common/my_time.c
      sql/event_db_repository.cc
      sql/field.cc
      sql/ha_partition.cc
      sql/ha_partition.h
      sql/handler.cc
      sql/handler.h
      sql/hostname.cc
      sql/item.cc
      sql/item.h
      sql/item_cmpfunc.cc
      sql/item_func.cc
      sql/item_func.h
      sql/item_row.cc
      sql/item_strfunc.cc
      sql/item_sum.cc
      sql/item_timefunc.cc
      sql/item_timefunc.h
      sql/log_event.cc
      sql/mdl.h
      sql/my_decimal.h
      sql/mysqld.cc
      sql/mysqld.h
      sql/opt_range.cc
      sql/opt_sum.cc
      sql/rpl_handler.h
      sql/share/errmsg-utf8.txt
      sql/slave.cc
      sql/sp_head.cc
      sql/sql_acl.cc
      sql/sql_admin.cc
      sql/sql_base.cc
      sql/sql_class.cc
      sql/sql_class.h
      sql/sql_cursor.cc
      sql/sql_error.cc
      sql/sql_error.h
      sql/sql_load.cc
      sql/sql_parse.cc
      sql/sql_partition.cc
      sql/sql_plist.h
      sql/sql_prepare.cc
      sql/sql_select.cc
      sql/sql_select.h
      sql/sql_show.cc
      sql/sql_table.cc
      sql/sql_trigger.cc
      sql/sys_vars.cc
      sql/table.cc
      sql/table.h
      sql/transaction.cc
      sql/unireg.cc
      storage/archive/ha_archive.cc
      storage/heap/ha_heap.cc
      storage/heap/ha_heap.h
      storage/innobase/CMakeLists.txt
      storage/innobase/btr/btr0cur.c
      storage/innobase/btr/btr0sea.c
      storage/innobase/buf/buf0buf.c
      storage/innobase/buf/buf0flu.c
      storage/innobase/buf/buf0lru.c
      storage/innobase/buf/buf0rea.c
      storage/innobase/dict/dict0dict.c
      storage/innobase/dict/dict0load.c
      storage/innobase/dict/dict0mem.c
      storage/innobase/fil/fil0fil.c
      storage/innobase/handler/ha_innodb.cc
      storage/innobase/handler/ha_innodb.h
      storage/innobase/handler/handler0alter.cc
      storage/innobase/handler/i_s.cc
      storage/innobase/handler/i_s.h
      storage/innobase/ibuf/ibuf0ibuf.c
      storage/innobase/include/btr0pcur.h
      storage/innobase/include/btr0pcur.ic
      storage/innobase/include/buf0buf.h
      storage/innobase/include/buf0rea.h
      storage/innobase/include/dict0mem.h
      storage/innobase/include/ha_prototypes.h
      storage/innobase/include/ibuf0ibuf.h
      storage/innobase/include/ibuf0ibuf.ic
      storage/innobase/include/log0log.ic
      storage/innobase/include/mtr0mtr.h
      storage/innobase/include/mtr0mtr.ic
      storage/innobase/include/os0sync.h
      storage/innobase/include/os0thread.h
      storage/innobase/include/page0page.h
      storage/innobase/include/rem0rec.h
      storage/innobase/include/rem0rec.ic
      storage/innobase/include/srv0srv.h
      storage/innobase/include/sync0arr.h
      storage/innobase/include/sync0sync.h
      storage/innobase/include/trx0trx.h
      storage/innobase/include/trx0undo.h
      storage/innobase/include/univ.i
      storage/innobase/include/ut0dbg.h
      storage/innobase/include/ut0ut.h
      storage/innobase/log/log0log.c
      storage/innobase/mem/mem0dbg.c
      storage/innobase/mtr/mtr0mtr.c
      storage/innobase/os/os0file.c
      storage/innobase/os/os0sync.c
      storage/innobase/os/os0thread.c
      storage/innobase/page/page0page.c
      storage/innobase/page/page0zip.c
      storage/innobase/row/row0merge.c
      storage/innobase/row/row0mysql.c
      storage/innobase/row/row0sel.c
      storage/innobase/srv/srv0srv.c
      storage/innobase/srv/srv0start.c
      storage/innobase/sync/sync0arr.c
      storage/innobase/sync/sync0rw.c
      storage/innobase/sync/sync0sync.c
      storage/innobase/trx/trx0i_s.c
      storage/innobase/trx/trx0roll.c
      storage/innobase/trx/trx0sys.c
      storage/innobase/trx/trx0trx.c
      storage/innobase/trx/trx0undo.c
      storage/innobase/ut/ut0dbg.c
      storage/myisam/ft_stopwords.c
      storage/myisam/ha_myisam.cc
      storage/myisam/ha_myisam.h
      storage/myisam/mi_check.c
      storage/myisammrg/ha_myisammrg.cc
      storage/myisammrg/ha_myisammrg.h
      storage/ndb/src/kernel/blocks/lgman.cpp
      strings/decimal.c
      tests/mysql_client_test.c
      vio/viosocket.c
      mysql-test/r/partition_myisam.result
      mysql-test/suite/binlog/r/binlog_bug23533.result
      mysql-test/suite/binlog/r/binlog_bug36391.result
      mysql-test/suite/rpl/r/rpl_bug37426.result
      mysql-test/suite/binlog/t/binlog_bug23533.test
      mysql-test/suite/binlog/t/binlog_bug36391.test
      mysql-test/suite/rpl/t/rpl_bug37426.test
      mysql-test/t/partition_myisam.test
=== modified file 'mysql-test/r/type_newdecimal.result'
--- a/mysql-test/r/type_newdecimal.result	2010-09-23 12:38:24 +0000
+++ b/mysql-test/r/type_newdecimal.result	2011-05-12 03:05:12 +0000
@@ -1920,4 +1920,17 @@ SELECT SUM(DISTINCT a) FROM t1;
 SUM(DISTINCT a)
 0.0000
 DROP TABLE t1;
+#
+# Bug#55436: buffer overflow in debug binary of dbug_buff in
+#            Field_new_decimal::store_value
+#
+SET SQL_MODE='';
+CREATE TABLE t1(f1 DECIMAL(44,24)) ENGINE=MYISAM;
+INSERT INTO t1 SET f1 = -64878E-85;
+Warnings:
+Note	1265	Data truncated for column 'f1' at row 1
+SELECT f1 FROM t1;
+f1
+0.000000000000000000000000
+DROP TABLE IF EXISTS t1;
 End of 5.1 tests

=== modified file 'mysql-test/t/type_newdecimal.test'
--- a/mysql-test/t/type_newdecimal.test	2010-09-23 12:38:24 +0000
+++ b/mysql-test/t/type_newdecimal.test	2011-05-12 03:05:12 +0000
@@ -1519,4 +1519,19 @@ SELECT AVG(DISTINCT a) FROM t1;
 SELECT SUM(DISTINCT a) FROM t1;
 DROP TABLE t1;
 
+--echo #
+--echo # Bug#55436: buffer overflow in debug binary of dbug_buff in
+--echo #            Field_new_decimal::store_value
+--echo #
+
+# this threw memory warnings on Windows. Also make sure future changes
+# don't change these results, as per usual.
+SET SQL_MODE='';
+CREATE TABLE t1(f1 DECIMAL(44,24)) ENGINE=MYISAM;
+INSERT INTO t1 SET f1 = -64878E-85;
+SELECT f1 FROM t1;
+DROP TABLE IF EXISTS t1;
+
+
+
 --echo End of 5.1 tests

=== modified file 'sql/field.cc'
--- a/sql/field.cc	2011-04-12 10:13:15 +0000
+++ b/sql/field.cc	2011-05-12 04:32:06 +0000
@@ -2608,7 +2608,7 @@ bool Field_new_decimal::store_value(cons
   DBUG_ENTER("Field_new_decimal::store_value");
 #ifndef DBUG_OFF
   {
-    char dbug_buff[DECIMAL_MAX_STR_LENGTH+1];
+    char dbug_buff[DECIMAL_MAX_STR_LENGTH+2];
     DBUG_PRINT("enter", ("value: %s", dbug_decimal_as_string(dbug_buff, decimal_value)));
   }
 #endif
@@ -2623,7 +2623,7 @@ bool Field_new_decimal::store_value(cons
   }
 #ifndef DBUG_OFF
   {
-    char dbug_buff[DECIMAL_MAX_STR_LENGTH+1];
+    char dbug_buff[DECIMAL_MAX_STR_LENGTH+2];
     DBUG_PRINT("info", ("saving with precision %d  scale: %d  value %s",
                         (int)precision, (int)dec,
                         dbug_decimal_as_string(dbug_buff, decimal_value)));
@@ -2692,7 +2692,7 @@ int Field_new_decimal::store(const char 
   }
 
 #ifndef DBUG_OFF
-  char dbug_buff[DECIMAL_MAX_STR_LENGTH+1];
+  char dbug_buff[DECIMAL_MAX_STR_LENGTH+2];
   DBUG_PRINT("enter", ("value: %s",
                        dbug_decimal_as_string(dbug_buff, &decimal_value)));
 #endif

=== modified file 'sql/my_decimal.cc'
--- a/sql/my_decimal.cc	2010-12-21 12:00:26 +0000
+++ b/sql/my_decimal.cc	2011-05-12 03:05:12 +0000
@@ -99,10 +99,11 @@ int my_decimal2string(uint mask, const m
     UNSIGNED. Hence the buffer for a ZEROFILLed value is the length
     the user requested, plus one for a possible decimal point, plus
     one if the user only wanted decimal places, but we force a leading
-    zero on them. Because the type is implicitly UNSIGNED, we do not
-    need to reserve a character for the sign. For all other cases,
-    fixed_prec will be 0, and my_decimal_string_length() will be called
-    instead to calculate the required size of the buffer.
+    zero on them, plus one for the '\0' terminator. Because the type
+    is implicitly UNSIGNED, we do not need to reserve a character for
+    the sign. For all other cases, fixed_prec will be 0, and
+    my_decimal_string_length() will be called instead to calculate the
+    required size of the buffer.
   */
   int length= (fixed_prec
                ? (fixed_prec + ((fixed_prec == fixed_dec) ? 1 : 0) + 1)
@@ -332,7 +333,7 @@ print_decimal_buff(const my_decimal *dec
 
 const char *dbug_decimal_as_string(char *buff, const my_decimal *val)
 {
-  int length= DECIMAL_MAX_STR_LENGTH;
+  int length= DECIMAL_MAX_STR_LENGTH + 1;     /* minimum size for buff */
   if (!val)
     return "NULL";
   (void)decimal2string((decimal_t*) val, buff, &length, 0,0,0);

=== modified file 'sql/my_decimal.h'
--- a/sql/my_decimal.h	2011-03-03 14:25:41 +0000
+++ b/sql/my_decimal.h	2011-05-12 04:32:06 +0000
@@ -62,7 +62,7 @@ typedef struct st_mysql_time MYSQL_TIME;
 
 /**
   maximum length of string representation (number of maximum decimal
-  digits + 1 position for sign + 1 position for decimal point)
+  digits + 1 position for sign + 1 position for decimal point, no terminator)
 */
 #define DECIMAL_MAX_STR_LENGTH (DECIMAL_MAX_POSSIBLE_PRECISION + 2)
 
@@ -243,6 +243,7 @@ inline uint32 my_decimal_precision_to_le
 inline
 int my_decimal_string_length(const my_decimal *d)
 {
+  /* length of string representation including terminating '\0' */
   return decimal_string_size(d);
 }
 

=== modified file 'strings/decimal.c'
--- a/strings/decimal.c	2011-03-03 14:25:41 +0000
+++ b/strings/decimal.c	2011-05-12 04:32:06 +0000
@@ -312,8 +312,8 @@ int decimal_actual_fraction(decimal_t *f
       from            - value to convert
       to              - points to buffer where string representation
                         should be stored
-      *to_len         - in:  size of to buffer
-                        out: length of the actually written string
+      *to_len         - in:  size of to buffer (incl. terminating '\0')
+                        out: length of the actually written string (excl. '\0')
       fixed_precision - 0 if representation can be variable length and
                         fixed_decimals will not be checked in this case.
                         Put number as with fixed point position with this
@@ -330,6 +330,7 @@ int decimal2string(const decimal_t *from
                    int fixed_precision, int fixed_decimals,
                    char filler)
 {
+  /* {intg_len, frac_len} output widths; {intg, frac} places in input */
   int len, intg, frac= from->frac, i, intg_len, frac_len, fill;
   /* number digits before decimal point */
   int fixed_intg= (fixed_precision ?

No bundle (reason: useless for push emails).
Thread
bzr push into mysql-5.5 branch (tatjana.nuernberg:3376) Tatjana Azundris Nuernberg12 May