diff options
author | Konstantin Osipov <kostja@sun.com> | 2010-02-02 16:58:15 +0300 |
---|---|---|
committer | Konstantin Osipov <kostja@sun.com> | 2010-02-02 16:58:15 +0300 |
commit | a6daa9ada052b7b7b09683ea6d565c92f5e15512 (patch) | |
tree | 0aec0b83266060d9cc4c9c65ee047b5fd7a83d96 /sql/sql_show.cc | |
parent | c6c1ddabaf2d41b362921524d617fbc772c1c9b6 (diff) | |
parent | c3eabe01fc30ee38f64b17fabfd58c6328751660 (diff) | |
download | mariadb-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/sql_show.cc')
-rw-r--r-- | sql/sql_show.cc | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/sql/sql_show.cc b/sql/sql_show.cc index 54d1400e3af..6d9554919ee 100644 --- a/sql/sql_show.cc +++ b/sql/sql_show.cc @@ -1468,7 +1468,7 @@ int store_create_info(THD *thd, TABLE_LIST *table_list, String *packet, show_table_options, NULL, NULL)))) { - packet->append(STRING_WITH_LEN("\n/*!50100")); + table->part_info->set_show_version_string(packet); packet->append(part_syntax, part_syntax_len); packet->append(STRING_WITH_LEN(" */")); my_free(part_syntax, MYF(0)); @@ -2166,7 +2166,8 @@ static bool show_status_array(THD *thd, const char *wild, value= ((char *) status_var + (ulong) value); /* fall through */ case SHOW_DOUBLE: - end= buff + my_sprintf(buff, (buff, "%f", *(double*) value)); + /* 6 is the default precision for '%f' in sprintf() */ + end= buff + my_fcvt(*(double *) value, 6, buff, NULL); break; case SHOW_LONG_STATUS: value= ((char *) status_var + (ulong) value); |