summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorunknown <monty@mysql.com>2005-02-21 20:42:34 +0200
committerunknown <monty@mysql.com>2005-02-21 20:42:34 +0200
commit7eefd9d63599fdf3e8d8b9df9fbd13077e977bec (patch)
tree13d764b4524056457c2e555ea2bd8a9d6d7d1e26
parent8cb6031dd763cbf6dd16e147430dcc4337907f0d (diff)
parent7a43b4c66596277d9629b82e1bc58e5071544778 (diff)
downloadmariadb-git-7eefd9d63599fdf3e8d8b9df9fbd13077e977bec.tar.gz
Merge bk-internal.mysql.com:/home/bk/mysql-5.0
into mysql.com:/home/my/mysql-5.0
-rw-r--r--sql/ha_innodb.cc5
-rw-r--r--sql/item_sum.cc3
2 files changed, 7 insertions, 1 deletions
diff --git a/sql/ha_innodb.cc b/sql/ha_innodb.cc
index fd275b19f77..d6e17b3b5e2 100644
--- a/sql/ha_innodb.cc
+++ b/sql/ha_innodb.cc
@@ -336,6 +336,11 @@ innobase_release_temporary_latches(
/*===============================*/
THD *thd)
{
+ if (!innodb_inited) {
+
+ return;
+ }
+
trx_t *trx= (trx_t*) thd->ha_data[innobase_hton.slot];
if (trx)
innobase_release_stat_resources(trx);
diff --git a/sql/item_sum.cc b/sql/item_sum.cc
index 33cff192d06..9a4798b9dc9 100644
--- a/sql/item_sum.cc
+++ b/sql/item_sum.cc
@@ -656,7 +656,8 @@ my_decimal *Item_sum_sum_distinct::val_decimal(my_decimal *fake)
else
{
double real= val_real();
- double2my_decimal(E_DEC_FATAL_ERROR, real, dec_buffs + curr_dec_buff);
+ curr_dec_buff= 0;
+ double2my_decimal(E_DEC_FATAL_ERROR, real, dec_buffs);
}
return(dec_buffs + curr_dec_buff);
}