diff options
author | monty@hundin.mysql.fi <> | 2001-11-26 02:09:45 +0200 |
---|---|---|
committer | monty@hundin.mysql.fi <> | 2001-11-26 02:09:45 +0200 |
commit | e9677eda60069ee8b2175736e25409e6d1eb4c97 (patch) | |
tree | bee3025aa18e97bb13d513402fb12b2c84f783fa | |
parent | 964c292caa48489a3c83504bb4c3adeeac4d9470 (diff) | |
download | mariadb-git-e9677eda60069ee8b2175736e25409e6d1eb4c97.tar.gz |
Add missing exit_cond() to lock_global_read_lock().
-rw-r--r-- | Docs/manual.texi | 6 | ||||
-rw-r--r-- | sql/lock.cc | 1 | ||||
-rw-r--r-- | sql/sql_select.cc | 18 |
3 files changed, 10 insertions, 15 deletions
diff --git a/Docs/manual.texi b/Docs/manual.texi index 49c03857ac1..ab46c1d993e 100644 --- a/Docs/manual.texi +++ b/Docs/manual.texi @@ -7814,7 +7814,7 @@ Some known problems when running MySQL on Linux-Alpha: @itemize @bullet @item Debugging threaded applications like MySQL will not work with -@code{gdb 4.18}. You should download and use gdb 5.0 instead! +@code{gdb 4.18}. You should download and use gdb 5.1 instead! @item If you try linking @code{mysqld} statically when using @code{gcc}, the @@ -52064,7 +52064,9 @@ more information if @code{mysqld} crashes. With some older @code{gdb} versions on Linux you must use @code{run --one-thread} if you want to be able to debug @code{mysqld} threads. In -this case you can only have one thread active at a time. +this case you can only have one thread active at a time. We recommend you +to upgrade to gdb 5.1 ASAP as thread debugging works much better with this +version! When running @code{mysqld} under gdb, you should disable the stack trace with @code{--skip-stack-trace} to be able to catch segfaults within gdb. diff --git a/sql/lock.cc b/sql/lock.cc index d9bc5d43c79..520821629e3 100644 --- a/sql/lock.cc +++ b/sql/lock.cc @@ -543,6 +543,7 @@ bool lock_global_read_lock(THD *thd) while (protect_against_global_read_lock && !thd->killed) pthread_cond_wait(&COND_refresh, &LOCK_open); waiting_for_read_lock--; + thd->exit_cond(old_message); if (thd->killed) { (void) pthread_mutex_unlock(&LOCK_open); diff --git a/sql/sql_select.cc b/sql/sql_select.cc index 2b2dff1bdac..131362167cb 100644 --- a/sql/sql_select.cc +++ b/sql/sql_select.cc @@ -4116,22 +4116,16 @@ do_select(JOIN *join,List<Item> *fields,TABLE *table,Procedure *procedure) if (error == -3) error=0; /* select_limit used */ } - if (!table) /* If sending data to client */ + if (error < 0) + join->result->send_error(0,NullS); /* purecov: inspected */ + else { - if (error < 0) - join->result->send_error(0,NullS); /* purecov: inspected */ - else + if (!table) // If sending data to client { join_free(join); // Unlock all cursors if (join->result->send_eof()) error= -1; } - } - else if (error < 0) - join->result->send_error(0,NullS); /* purecov: inspected */ - - if (error >= 0) - { DBUG_PRINT("info",("%ld records output",join->send_records)); } if (table) @@ -4226,10 +4220,8 @@ sub_select(JOIN *join,JOIN_TAB *join_tab,bool end_of_records) info->file->unlock_row(); } } while (!(error=info->read_record(info))); - if (error > 0) // Fatal error - return -1; } - else if (error > 0) + if (error > 0) // Fatal error return -1; if (!found && on_expr) |