summaryrefslogtreecommitdiff
path: root/sql/sql_parse.cc
diff options
context:
space:
mode:
authorunknown <istruewing@stella.local>2007-11-27 19:29:10 +0100
committerunknown <istruewing@stella.local>2007-11-27 19:29:10 +0100
commitb44f0623071bc5754d533e5e1ca50f7bb6ba4d7d (patch)
tree96771b5438e731e696f7b3fd75a500990df07761 /sql/sql_parse.cc
parent551aaa9ca55510466f4395198e705e686c0e970f (diff)
parent7441a8004d89f213f468def79669dd3ca8cd1145 (diff)
downloadmariadb-git-b44f0623071bc5754d533e5e1ca50f7bb6ba4d7d.tar.gz
Merge stella.local:/home2/mydev/mysql-5.1-amain
into stella.local:/home2/mydev/mysql-5.1-axmrg include/my_base.h: Auto merged mysql-test/mysql-test-run.pl: Auto merged mysql-test/suite/ndb/t/disabled.def: Auto merged mysql-test/t/partition.test: Auto merged sql/handler.cc: Auto merged sql/item_cmpfunc.cc: Auto merged sql/slave.cc: Auto merged sql/sql_insert.cc: Auto merged sql/sql_parse.cc: Auto merged sql/sql_select.cc: Auto merged sql/sql_table.cc: Auto merged sql/sql_yacc.yy: Auto merged client/mysql.cc: Manual merge mysql-test/suite/rpl/t/disabled.def: Manual merge
Diffstat (limited to 'sql/sql_parse.cc')
-rw-r--r--sql/sql_parse.cc18
1 files changed, 17 insertions, 1 deletions
diff --git a/sql/sql_parse.cc b/sql/sql_parse.cc
index 01bb18592a1..8ed658df90d 100644
--- a/sql/sql_parse.cc
+++ b/sql/sql_parse.cc
@@ -2120,7 +2120,16 @@ mysql_execute_command(THD *thd)
if (check_global_access(thd, SUPER_ACL | REPL_CLIENT_ACL))
goto error;
pthread_mutex_lock(&LOCK_active_mi);
- res = show_master_info(thd,active_mi);
+ if (active_mi != NULL)
+ {
+ res = show_master_info(thd, active_mi);
+ }
+ else
+ {
+ push_warning(thd, MYSQL_ERROR::WARN_LEVEL_WARN, 0,
+ "the master info structure does not exist");
+ send_ok(thd);
+ }
pthread_mutex_unlock(&LOCK_active_mi);
break;
}
@@ -2988,6 +2997,13 @@ end_with_restore_list:
SELECT_NO_JOIN_CACHE | SELECT_NO_UNLOCK |
OPTION_SETUP_TABLES_DONE,
del_result, unit, select_lex);
+ res|= thd->net.report_error;
+ if (unlikely(res))
+ {
+ /* If we had a another error reported earlier then this will be ignored */
+ del_result->send_error(ER_UNKNOWN_ERROR, "Execution of the query failed");
+ del_result->abort();
+ }
delete del_result;
}
else