summaryrefslogtreecommitdiff
path: root/sql/sql_parse.cc
diff options
context:
space:
mode:
authorunknown <bell@sanja.is.com.ua>2003-01-30 22:15:44 +0200
committerunknown <bell@sanja.is.com.ua>2003-01-30 22:15:44 +0200
commitc7c45bf28bb76ddce9aa92c4205ab51cde49197f (patch)
tree217655eeaecf53f6696533c8e56d67c74da274b7 /sql/sql_parse.cc
parent7133dab0e742137a1a7299c0203f2b83f7c172b5 (diff)
downloadmariadb-git-c7c45bf28bb76ddce9aa92c4205ab51cde49197f.tar.gz
fixed bug in determinating uncacheable queries
new fatal_error interface to assign is_fatal_error and ne.report_error commant about Item_row mysql-test/r/subselect.result: test of inheritence of uncacheability mysql-test/t/subselect.test: test of inheritence of uncacheability sql/item.cc: new fatal_error interface to assign is_fatal_error and ne.report_error sql/item_func.cc: new fatal_error interface to assign is_fatal_error and ne.report_error sql/item_row.cc: comment about row sql/item_subselect.cc: new fatal_error interface to assign is_fatal_error and ne.report_error (message should be sent by allocate routine sql/log_event.cc: new fatal_error interface to assign is_fatal_error and ne.report_error sql/mysqld.cc: new fatal_error interface to assign is_fatal_error and ne.report_error sql/protocol.cc: new fatal_error interface to assign is_fatal_error and ne.report_error sql/sql_base.cc: new fatal_error interface to assign is_fatal_error and ne.report_error sql/sql_class.cc: new fatal_error interface to assign is_fatal_error and ne.report_error sql/sql_class.h: new fatal_error interface to assign is_fatal_error and ne.report_error sql/sql_delete.cc: new fatal_error interface to assign is_fatal_error and ne.report_error sql/sql_insert.cc: new fatal_error interface to assign is_fatal_error and ne.report_error sql/sql_lex.h: fixed bug in determinating uncacheable queries sql/sql_parse.cc: new fatal_error interface to assign is_fatal_error and ne.report_error sql/sql_prepare.cc: new fatal_error interface to assign is_fatal_error and ne.report_error sql/sql_select.cc: new fatal_error interface to assign is_fatal_error and ne.report_error sql/sql_show.cc: new fatal_error interface to assign is_fatal_error and ne.report_error sql/sql_union.cc: new fatal_error interface to assign is_fatal_error and ne.report_error sql/sql_update.cc: new fatal_error interface to assign is_fatal_error and ne.report_error sql/thr_malloc.cc: new fatal_error interface to assign is_fatal_error and ne.report_error
Diffstat (limited to 'sql/sql_parse.cc')
-rw-r--r--sql/sql_parse.cc20
1 files changed, 10 insertions, 10 deletions
diff --git a/sql/sql_parse.cc b/sql/sql_parse.cc
index a6343a95b9c..4f248348d32 100644
--- a/sql/sql_parse.cc
+++ b/sql/sql_parse.cc
@@ -839,7 +839,7 @@ extern "C" pthread_handler_decl(handle_bootstrap,arg)
if (my_thread_init() || thd->store_globals())
{
close_connection(&thd->net,ER_OUT_OF_RESOURCES);
- thd->fatal_error=1;
+ thd->fatal_error();
goto end;
}
DBUG_ENTER("handle_bootstrap");
@@ -886,7 +886,7 @@ extern "C" pthread_handler_decl(handle_bootstrap,arg)
}
mysql_parse(thd,thd->query,length);
close_thread_tables(thd); // Free tables
- if (thd->fatal_error)
+ if (thd->is_fatal_error)
break;
free_root(&thd->mem_root,MYF(MY_KEEP_PREALLOC));
free_root(&thd->transaction.mem_root,MYF(MY_KEEP_PREALLOC));
@@ -1206,7 +1206,7 @@ bool dispatch_command(enum enum_server_command command, THD *thd,
DBUG_PRINT("query",("%-.4096s",thd->query));
mysql_parse(thd,thd->query, thd->query_length);
- while (!thd->fatal_error && thd->lex.found_colon)
+ while (!thd->is_fatal_error && thd->lex.found_colon)
{
char *packet= thd->lex.found_colon;
/*
@@ -1442,7 +1442,7 @@ bool dispatch_command(enum enum_server_command command, THD *thd,
close_thread_tables(thd); /* Free tables */
}
- if (thd->fatal_error)
+ if (thd->is_fatal_error)
send_error(thd,0); // End of memory ?
time_t start_of_query=thd->start_time;
@@ -2375,8 +2375,8 @@ mysql_execute_command(THD *thd)
}
}
fix_tables_pointers(lex->all_selects_list);
- if (!thd->fatal_error && (result= new multi_delete(thd,aux_tables,
- table_count)))
+ if (!thd->is_fatal_error && (result= new multi_delete(thd,aux_tables,
+ table_count)))
{
res= mysql_select(thd, &select_lex->ref_pointer_array,
select_lex->get_table_list(),
@@ -3085,7 +3085,7 @@ bool check_stack_overrun(THD *thd,char *buf __attribute__((unused)))
{
sprintf(errbuff[0],ER(ER_STACK_OVERRUN),stack_used,thread_stack);
my_message(ER_STACK_OVERRUN,errbuff[0],MYF(0));
- thd->fatal_error=1;
+ thd->fatal_error();
return 1;
}
return 0;
@@ -3155,7 +3155,7 @@ mysql_init_query(THD *thd)
thd->total_warn_count=0; // Warnings for this query
thd->last_insert_id_used= thd->query_start_used= thd->insert_id_used=0;
thd->sent_row_count= thd->examined_row_count= 0;
- thd->fatal_error= thd->rand_used= 0;
+ thd->is_fatal_error= thd->rand_used= 0;
thd->server_status &= ~SERVER_MORE_RESULTS_EXISTS;
DBUG_VOID_RETURN;
}
@@ -3261,7 +3261,7 @@ mysql_parse(THD *thd, char *inBuf, uint length)
if (query_cache_send_result_to_client(thd, inBuf, length) <= 0)
{
LEX *lex=lex_start(thd, (uchar*) inBuf, length);
- if (!yyparse((void *)thd) && ! thd->fatal_error)
+ if (!yyparse((void *)thd) && ! thd->is_fatal_error)
{
if (mqh_used && thd->user_connect &&
check_mqh(thd, lex->sql_command))
@@ -3284,7 +3284,7 @@ mysql_parse(THD *thd, char *inBuf, uint length)
else
{
DBUG_PRINT("info",("Command aborted. Fatal_error: %d",
- thd->fatal_error));
+ thd->is_fatal_error));
#ifndef EMBEDDED_LIBRARY /* TODO query cache in embedded library*/
query_cache_abort(&thd->net);
#endif