Commit f7c43e4b authored by Rich Prohaska's avatar Rich Prohaska

DB-718 handle errors in tokudb info schema plugins

parent f7ee3d4a
...@@ -1536,10 +1536,12 @@ static int tokudb_file_map_fill_table(THD *thd, TABLE_LIST *tables, COND *cond) ...@@ -1536,10 +1536,12 @@ static int tokudb_file_map_fill_table(THD *thd, TABLE_LIST *tables, COND *cond)
rw_rdlock(&tokudb_hton_initialized_lock); rw_rdlock(&tokudb_hton_initialized_lock);
if (!tokudb_hton_initialized) { if (!tokudb_hton_initialized) {
my_error(ER_PLUGIN_IS_NOT_LOADED, MYF(0), tokudb_hton_name); error = ER_PLUGIN_IS_NOT_LOADED;
error = -1; my_error(error, MYF(0), tokudb_hton_name);
} else { } else {
error = tokudb_file_map(table, thd); error = tokudb_file_map(table, thd);
if (error)
my_error(error, MYF(0));
} }
rw_unlock(&tokudb_hton_initialized_lock); rw_unlock(&tokudb_hton_initialized_lock);
...@@ -1681,10 +1683,12 @@ static int tokudb_fractal_tree_info_fill_table(THD *thd, TABLE_LIST *tables, CON ...@@ -1681,10 +1683,12 @@ static int tokudb_fractal_tree_info_fill_table(THD *thd, TABLE_LIST *tables, CON
rw_rdlock(&tokudb_hton_initialized_lock); rw_rdlock(&tokudb_hton_initialized_lock);
if (!tokudb_hton_initialized) { if (!tokudb_hton_initialized) {
my_error(ER_PLUGIN_IS_NOT_LOADED, MYF(0), tokudb_hton_name); error = ER_PLUGIN_IS_NOT_LOADED;
error = -1; my_error(error, MYF(0), tokudb_hton_name);
} else { } else {
error = tokudb_fractal_tree_info(table, thd); error = tokudb_fractal_tree_info(table, thd);
if (error)
my_error(error, MYF(0));
} }
//3938: unlock the status flag lock //3938: unlock the status flag lock
...@@ -1892,10 +1896,12 @@ static int tokudb_fractal_tree_block_map_fill_table(THD *thd, TABLE_LIST *tables ...@@ -1892,10 +1896,12 @@ static int tokudb_fractal_tree_block_map_fill_table(THD *thd, TABLE_LIST *tables
rw_rdlock(&tokudb_hton_initialized_lock); rw_rdlock(&tokudb_hton_initialized_lock);
if (!tokudb_hton_initialized) { if (!tokudb_hton_initialized) {
my_error(ER_PLUGIN_IS_NOT_LOADED, MYF(0), tokudb_hton_name); error = ER_PLUGIN_IS_NOT_LOADED;
error = -1; my_error(error, MYF(0), tokudb_hton_name);
} else { } else {
error = tokudb_fractal_tree_block_map(table, thd); error = tokudb_fractal_tree_block_map(table, thd);
if (error)
my_error(error, MYF(0));
} }
//3938: unlock the status flag lock //3938: unlock the status flag lock
...@@ -2043,11 +2049,13 @@ static int tokudb_trx_fill_table(THD *thd, TABLE_LIST *tables, COND *cond) { ...@@ -2043,11 +2049,13 @@ static int tokudb_trx_fill_table(THD *thd, TABLE_LIST *tables, COND *cond) {
rw_rdlock(&tokudb_hton_initialized_lock); rw_rdlock(&tokudb_hton_initialized_lock);
if (!tokudb_hton_initialized) { if (!tokudb_hton_initialized) {
my_error(ER_PLUGIN_IS_NOT_LOADED, MYF(0), tokudb_hton_name); error = ER_PLUGIN_IS_NOT_LOADED;
error = -1; my_error(error, MYF(0), tokudb_hton_name);
} else { } else {
struct tokudb_trx_extra e = { thd, tables->table }; struct tokudb_trx_extra e = { thd, tables->table };
error = db_env->iterate_live_transactions(db_env, tokudb_trx_callback, &e); error = db_env->iterate_live_transactions(db_env, tokudb_trx_callback, &e);
if (error)
my_error(error, MYF(0));
} }
rw_unlock(&tokudb_hton_initialized_lock); rw_unlock(&tokudb_hton_initialized_lock);
...@@ -2124,11 +2132,13 @@ static int tokudb_lock_waits_fill_table(THD *thd, TABLE_LIST *tables, COND *cond ...@@ -2124,11 +2132,13 @@ static int tokudb_lock_waits_fill_table(THD *thd, TABLE_LIST *tables, COND *cond
rw_rdlock(&tokudb_hton_initialized_lock); rw_rdlock(&tokudb_hton_initialized_lock);
if (!tokudb_hton_initialized) { if (!tokudb_hton_initialized) {
my_error(ER_PLUGIN_IS_NOT_LOADED, MYF(0), tokudb_hton_name); error = ER_PLUGIN_IS_NOT_LOADED;
error = -1; my_error(error, MYF(0), tokudb_hton_name);
} else { } else {
struct tokudb_lock_waits_extra e = { thd, tables->table }; struct tokudb_lock_waits_extra e = { thd, tables->table };
error = db_env->iterate_pending_lock_requests(db_env, tokudb_lock_waits_callback, &e); error = db_env->iterate_pending_lock_requests(db_env, tokudb_lock_waits_callback, &e);
if (error)
my_error(error, MYF(0));
} }
rw_unlock(&tokudb_hton_initialized_lock); rw_unlock(&tokudb_hton_initialized_lock);
...@@ -2210,11 +2220,13 @@ static int tokudb_locks_fill_table(THD *thd, TABLE_LIST *tables, COND *cond) { ...@@ -2210,11 +2220,13 @@ static int tokudb_locks_fill_table(THD *thd, TABLE_LIST *tables, COND *cond) {
rw_rdlock(&tokudb_hton_initialized_lock); rw_rdlock(&tokudb_hton_initialized_lock);
if (!tokudb_hton_initialized) { if (!tokudb_hton_initialized) {
my_error(ER_PLUGIN_IS_NOT_LOADED, MYF(0), tokudb_hton_name); error = ER_PLUGIN_IS_NOT_LOADED;
error = -1; my_error(error, MYF(0), tokudb_hton_name);
} else { } else {
struct tokudb_locks_extra e = { thd, tables->table }; struct tokudb_locks_extra e = { thd, tables->table };
error = db_env->iterate_live_transactions(db_env, tokudb_locks_callback, &e); error = db_env->iterate_live_transactions(db_env, tokudb_locks_callback, &e);
if (error)
my_error(error, MYF(0));
} }
rw_unlock(&tokudb_hton_initialized_lock); rw_unlock(&tokudb_hton_initialized_lock);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment