summaryrefslogtreecommitdiff
path: root/strings
diff options
context:
space:
mode:
authorunknown <gluh@eagle.(none)>2007-10-23 19:08:21 +0500
committerunknown <gluh@eagle.(none)>2007-10-23 19:08:21 +0500
commit95a8bb20fb0c43b95347a42f75f91b040ca1babc (patch)
tree6a0f011ed453ad26ca914c42a6e2e8e45ce6b3ce /strings
parentfc800ff76d0c1f47126645c7ec742ae07434056b (diff)
parent6e8919b00d42888bc2ff45cddedba1cf9853a7c5 (diff)
downloadmariadb-git-95a8bb20fb0c43b95347a42f75f91b040ca1babc.tar.gz
Merge mysql.com:/home/gluh/MySQL/Merge/5.1
into mysql.com:/home/gluh/MySQL/Merge/5.1-opt client/client_priv.h: Auto merged client/mysqldump.c: Auto merged include/config-win.h: Auto merged libmysql/libmysql.c: Auto merged mysql-test/mysql-test-run.pl: Auto merged mysql-test/r/create.result: Auto merged mysql-test/r/func_sapdb.result: Auto merged mysql-test/r/information_schema.result: Auto merged mysql-test/r/variables.result: Auto merged mysql-test/t/information_schema.test: Auto merged mysql-test/t/variables.test: Auto merged sql/field.cc: Auto merged sql/ha_partition.cc: Auto merged sql/item_func.cc: Auto merged sql/item_func.h: Auto merged sql/item_sum.cc: Auto merged sql/item_timefunc.h: Auto merged sql/mysql_priv.h: Auto merged sql/protocol.cc: Auto merged sql/set_var.cc: Auto merged sql/sql_acl.cc: Auto merged sql/sql_base.cc: Auto merged sql/sql_class.h: Auto merged sql/sql_insert.cc: Auto merged sql/sql_lex.h: Auto merged sql/sql_parse.cc: Auto merged sql/sql_select.cc: Auto merged sql/sql_yacc.yy: Auto merged sql/table.cc: Auto merged storage/innobase/handler/ha_innodb.cc: Auto merged storage/myisam/sort.c: Auto merged tests/mysql_client_test.c: Auto merged mysql-test/r/query_cache.result: manual merge mysql-test/include/mix1.inc: manual merge mysql-test/r/innodb_mysql.result: manual merge mysql-test/r/type_datetime.result: manual merge mysql-test/r/type_decimal.result: manual merge mysql-test/t/query_cache.test: manual merge mysql-test/t/type_datetime.test: manual merge mysql-test/t/type_decimal.test: manual merge sql/item.cc: manual merge
Diffstat (limited to 'strings')
-rw-r--r--strings/decimal.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/strings/decimal.c b/strings/decimal.c
index f1753c619d1..f457014b2b1 100644
--- a/strings/decimal.c
+++ b/strings/decimal.c
@@ -2329,11 +2329,12 @@ static int do_div_mod(decimal_t *from1, decimal_t *from2,
}
if (unlikely(intg0+frac0 > to->len))
{
- stop1-=to->len-frac0-intg0;
+ stop1-=frac0+intg0-to->len;
frac0=to->len-intg0;
to->frac=frac0*DIG_PER_DEC1;
error=E_DEC_TRUNCATED;
}
+ DBUG_ASSERT(buf0 + (stop1 - start1) <= to->buf + to->len);
while (start1 < stop1)
*buf0++=*start1++;
}