summaryrefslogtreecommitdiff
path: root/sql/sql_parse.cc
diff options
context:
space:
mode:
authorunknown <bar@bar.myoffice.izhnet.ru>2007-10-30 12:21:44 +0400
committerunknown <bar@bar.myoffice.izhnet.ru>2007-10-30 12:21:44 +0400
commitc45171b01bdb93ebcffeb08c007a5dcfc0fe40e5 (patch)
tree8d498b79e065eb55a66f3846f2a97454b8615e18 /sql/sql_parse.cc
parentfa0e1d6b6b9f93b7ad84f8ba490d0e2de5a4553d (diff)
parent2d380a832d60670ec687fa33c25befeec13b99e0 (diff)
downloadmariadb-git-c45171b01bdb93ebcffeb08c007a5dcfc0fe40e5.tar.gz
Merge abarkov@bk-internal.mysql.com:/home/bk/mysql-5.0
into mysql.com:/home/bar/mysql-work/mysql-5.0-rpl-merge mysql-test/r/ctype_utf8.result: Auto merged mysql-test/r/func_regexp.result: Auto merged mysql-test/t/ctype_utf8.test: Auto merged mysql-test/t/func_regexp.test: Auto merged sql/item_cmpfunc.cc: Auto merged sql/item_cmpfunc.h: Auto merged sql/sql_class.h: Auto merged sql/sql_insert.cc: Auto merged sql/sql_parse.cc: Auto merged sql/sql_update.cc: Auto merged mysql-test/r/ctype_ucs.result: After merge fix mysql-test/t/ctype_ucs.test: After merge fix
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 0a8b92d28c0..16a64c48cdd 100644
--- a/sql/sql_parse.cc
+++ b/sql/sql_parse.cc
@@ -2853,7 +2853,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;
}
@@ -3701,6 +3710,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