1
0
mirror of https://github.com/MariaDB/server.git synced 2026-01-06 05:22:24 +03:00

MDEV-12633 Error from valgrind related to dd_frm_type

"Conditional jump or move depends on uninitialised value in
my_scan_weight_utf8_general_ci, main.mysql_client_test fails in biuldbot
with valgrind"

- Fixed by ensuring that engine_name is set to empty string even in case
  errors in the .frm file
- Added some error checking to ha_table_exists()
This commit is contained in:
Monty
2017-11-02 14:39:54 +02:00
parent d8a9b524f2
commit 5d0153c408
2 changed files with 21 additions and 3 deletions

View File

@@ -5063,10 +5063,15 @@ bool ha_table_exists(THD *thd, const char *db, const char *table_name,
{
char engine_buf[NAME_CHAR_LEN + 1];
LEX_STRING engine= { engine_buf, 0 };
frm_type_enum type;
if (dd_frm_type(thd, path, &engine) != FRMTYPE_VIEW)
if ((type= dd_frm_type(thd, path, &engine)) == FRMTYPE_ERROR)
DBUG_RETURN(0);
if (type != FRMTYPE_VIEW)
{
plugin_ref p= plugin_lock_by_name(thd, &engine, MYSQL_STORAGE_ENGINE_PLUGIN);
plugin_ref p= plugin_lock_by_name(thd, &engine,
MYSQL_STORAGE_ENGINE_PLUGIN);
*hton= p ? plugin_hton(p) : NULL;
if (*hton)
// verify that the table really exists