summaryrefslogtreecommitdiff
path: root/sql/log_event.cc
diff options
context:
space:
mode:
authorKonstantin Osipov <kostja@sun.com>2010-02-02 16:58:15 +0300
committerKonstantin Osipov <kostja@sun.com>2010-02-02 16:58:15 +0300
commita6daa9ada052b7b7b09683ea6d565c92f5e15512 (patch)
tree0aec0b83266060d9cc4c9c65ee047b5fd7a83d96 /sql/log_event.cc
parentc6c1ddabaf2d41b362921524d617fbc772c1c9b6 (diff)
parentc3eabe01fc30ee38f64b17fabfd58c6328751660 (diff)
downloadmariadb-git-a6daa9ada052b7b7b09683ea6d565c92f5e15512.tar.gz
Merge next-mr -> next-4284.
Fix Bug#50555 "handler commands crash server in my_hash_first()" as a post-merge fix (the new handler tests are not passing otherwise). - in hash.c, don't call calc_hash if ! my_hash_inited(). - add tests and results for the test case for Bug#50555 mysys/hash.c: Assert that the hash is initialized when it's used. sql/set_var.cc: Check that the hash is initalized before using it (Bug#50555)
Diffstat (limited to 'sql/log_event.cc')
-rw-r--r--sql/log_event.cc6
1 files changed, 3 insertions, 3 deletions
diff --git a/sql/log_event.cc b/sql/log_event.cc
index bce9c84772d..91debbd65da 100644
--- a/sql/log_event.cc
+++ b/sql/log_event.cc
@@ -5363,11 +5363,11 @@ void User_var_log_event::pack_info(Protocol* protocol)
case REAL_RESULT:
double real_val;
float8get(real_val, val);
- if (!(buf= (char*) my_malloc(val_offset + FLOATING_POINT_BUFFER,
+ if (!(buf= (char*) my_malloc(val_offset + MY_GCVT_MAX_FIELD_WIDTH + 1,
MYF(MY_WME))))
return;
- event_len+= my_sprintf(buf + val_offset,
- (buf + val_offset, "%.14g", real_val));
+ event_len+= my_gcvt(real_val, MY_GCVT_ARG_DOUBLE, MY_GCVT_MAX_FIELD_WIDTH,
+ buf + val_offset, NULL);
break;
case INT_RESULT:
if (!(buf= (char*) my_malloc(val_offset + 22, MYF(MY_WME))))