summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorunknown <monty@hundin.mysql.fi>2002-06-17 15:00:06 +0300
committerunknown <monty@hundin.mysql.fi>2002-06-17 15:00:06 +0300
commitf97e1b6ae19ad9b3d3814edd2475c5a25a7ad9e8 (patch)
treec0636680f89f14107465f59c1b6c514ae2a45b3f
parent77f31df5008efe5e04f78ebca15e0743bd1f2705 (diff)
downloadmariadb-git-f97e1b6ae19ad9b3d3814edd2475c5a25a7ad9e8.tar.gz
Backported fix from 4.0 which caused core dumps for some complex queries.
Docs/manual.texi: Fixed example sql/mysqld.cc: Cleanup
-rw-r--r--Docs/manual.texi2
-rw-r--r--sql/mysqld.cc7
-rw-r--r--sql/opt_range.cc3
3 files changed, 7 insertions, 5 deletions
diff --git a/Docs/manual.texi b/Docs/manual.texi
index 353e0727a22..f987ff94f98 100644
--- a/Docs/manual.texi
+++ b/Docs/manual.texi
@@ -31150,7 +31150,7 @@ mysql> select TRUNCATE(1.999,1);
-> 1.9
mysql> select TRUNCATE(1.999,0);
-> 1
-mysql> select TRUNCATE(-1,999,1);
+mysql> select TRUNCATE(-1.999,1);
-> -1.9
@end example
diff --git a/sql/mysqld.cc b/sql/mysqld.cc
index 08d0f381534..6aad4848242 100644
--- a/sql/mysqld.cc
+++ b/sql/mysqld.cc
@@ -1121,7 +1121,8 @@ void end_thread(THD *thd, bool put_in_cache)
inline void kill_broken_server()
{
/* hack to get around signals ignored in syscalls for problem OS's */
- if (unix_sock == INVALID_SOCKET || (!opt_disable_networking && ip_sock ==INVALID_SOCKET))
+ if (unix_sock == INVALID_SOCKET ||
+ (!opt_disable_networking && ip_sock == INVALID_SOCKET))
{
select_thread_in_use = 0;
kill_server((void*)MYSQL_KILL_SIGNAL); /* never returns */
@@ -1592,8 +1593,8 @@ pthread_handler_decl(handle_shutdown,arg)
abort_loop = 1;
// unblock select()
- so_cancel( ip_sock);
- so_cancel( unix_sock);
+ so_cancel(ip_sock);
+ so_cancel(unix_sock);
return 0;
}
diff --git a/sql/opt_range.cc b/sql/opt_range.cc
index b95b97d670f..42f20c0f767 100644
--- a/sql/opt_range.cc
+++ b/sql/opt_range.cc
@@ -1285,7 +1285,8 @@ and_all_keys(SEL_ARG *key1,SEL_ARG *key2,uint clone_flag)
}
if (key1->type == SEL_ARG::MAYBE_KEY)
{
- key1->left= &null_element; key1->next=0;
+ key1->right= key1->left= &null_element;
+ key1->next= key1->prev= 0;
}
for (next=key1->first(); next ; next=next->next)
{