summaryrefslogtreecommitdiff
path: root/sql
diff options
context:
space:
mode:
authormonty@mysql.com <>2005-10-27 15:15:01 +0300
committermonty@mysql.com <>2005-10-27 15:15:01 +0300
commit1b3ed12017599c53fa674797cfc56cbbc023c934 (patch)
tree7146608f0e572ee9d179f503804c0f2b4ba050f7 /sql
parent192bceafd9d9709b5c4c09747cc629acc8a4664b (diff)
downloadmariadb-git-1b3ed12017599c53fa674797cfc56cbbc023c934.tar.gz
Fixes during review of pushed code
Added back missing return in mysql_delete()
Diffstat (limited to 'sql')
-rw-r--r--sql/log.cc8
-rw-r--r--sql/log_event.h5
-rw-r--r--sql/sql_delete.cc8
3 files changed, 11 insertions, 10 deletions
diff --git a/sql/log.cc b/sql/log.cc
index a881602d510..f9f71e2d55a 100644
--- a/sql/log.cc
+++ b/sql/log.cc
@@ -358,7 +358,7 @@ MYSQL_LOG::MYSQL_LOG()
:bytes_written(0), last_time(0), query_start(0), name(0),
file_id(1), open_count(1), log_type(LOG_CLOSED), write_error(0), inited(0),
need_start_event(1), prepared_xids(0), description_event_for_exec(0),
- description_event_for_queue(0), readers_count(0), reset_pending(false)
+ description_event_for_queue(0), readers_count(0), reset_pending(FALSE)
{
/*
We don't want to initialize LOCK_Log here as such initialization depends on
@@ -965,7 +965,7 @@ bool MYSQL_LOG::reset_logs(THD* thd)
goto err;
}
- reset_pending= true;
+ reset_pending= TRUE;
/*
send update signal just in case so that all reader threads waiting
for log update will leave wait condition
@@ -975,7 +975,7 @@ bool MYSQL_LOG::reset_logs(THD* thd)
if there are active readers wait until all of them will
release opened files
*/
- if (readers_count)
+ while (readers_count)
pthread_cond_wait(&reset_cond, &LOCK_log);
for (;;)
@@ -996,7 +996,7 @@ bool MYSQL_LOG::reset_logs(THD* thd)
my_free((gptr) save_name, MYF(0));
err:
- reset_pending= false;
+ reset_pending= FALSE;
(void) pthread_mutex_unlock(&LOCK_thread_count);
pthread_mutex_unlock(&LOCK_readers);
diff --git a/sql/log_event.h b/sql/log_event.h
index 8acdf015464..7783a97f03f 100644
--- a/sql/log_event.h
+++ b/sql/log_event.h
@@ -430,11 +430,10 @@ enum Log_event_type
/*
Add new events here - right above this comment!
- And change the ENUM_END_EVENT_MARKER below.
- Existing events should never change their numbers
+ Existing events (except ENUM_END_EVENT) should never change their numbers
*/
- ENUM_END_EVENT= 19 /* end marker */
+ ENUM_END_EVENT /* end marker */
};
/*
diff --git a/sql/sql_delete.cc b/sql/sql_delete.cc
index 83f50ba3ac5..c8e0b6c66f9 100644
--- a/sql/sql_delete.cc
+++ b/sql/sql_delete.cc
@@ -158,14 +158,16 @@ bool mysql_delete(THD *thd, TABLE_LIST *table_list, COND *conds,
table->sort.io_cache= (IO_CACHE *) my_malloc(sizeof(IO_CACHE),
MYF(MY_FAE | MY_ZEROFILL));
- if ( !(sortorder=make_unireg_sortorder((ORDER*) order->first, &length)) ||
+ if (!(sortorder= make_unireg_sortorder((ORDER*) order->first,
+ &length)) ||
(table->sort.found_records = filesort(thd, table, sortorder, length,
- select, HA_POS_ERROR,
- &examined_rows))
+ select, HA_POS_ERROR,
+ &examined_rows))
== HA_POS_ERROR)
{
delete select;
free_underlaid_joins(thd, &thd->lex->select_lex);
+ DBUG_RETURN(TRUE);
}
/*
Filesort has already found and selected the rows we want to delete,