Commit 0762b00d authored by monty@hundin.mysql.fi's avatar monty@hundin.mysql.fi

Backported fix from 4.0 which caused core dumps for some complex queries.

parent f4da1be1
...@@ -31150,7 +31150,7 @@ mysql> select TRUNCATE(1.999,1); ...@@ -31150,7 +31150,7 @@ mysql> select TRUNCATE(1.999,1);
-> 1.9 -> 1.9
mysql> select TRUNCATE(1.999,0); mysql> select TRUNCATE(1.999,0);
-> 1 -> 1
mysql> select TRUNCATE(-1,999,1); mysql> select TRUNCATE(-1.999,1);
-> -1.9 -> -1.9
@end example @end example
...@@ -1121,7 +1121,8 @@ void end_thread(THD *thd, bool put_in_cache) ...@@ -1121,7 +1121,8 @@ void end_thread(THD *thd, bool put_in_cache)
inline void kill_broken_server() inline void kill_broken_server()
{ {
/* hack to get around signals ignored in syscalls for problem OS's */ /* 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; select_thread_in_use = 0;
kill_server((void*)MYSQL_KILL_SIGNAL); /* never returns */ kill_server((void*)MYSQL_KILL_SIGNAL); /* never returns */
...@@ -1592,8 +1593,8 @@ pthread_handler_decl(handle_shutdown,arg) ...@@ -1592,8 +1593,8 @@ pthread_handler_decl(handle_shutdown,arg)
abort_loop = 1; abort_loop = 1;
// unblock select() // unblock select()
so_cancel( ip_sock); so_cancel(ip_sock);
so_cancel( unix_sock); so_cancel(unix_sock);
return 0; return 0;
} }
......
...@@ -1285,7 +1285,8 @@ and_all_keys(SEL_ARG *key1,SEL_ARG *key2,uint clone_flag) ...@@ -1285,7 +1285,8 @@ and_all_keys(SEL_ARG *key1,SEL_ARG *key2,uint clone_flag)
} }
if (key1->type == SEL_ARG::MAYBE_KEY) 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) for (next=key1->first(); next ; next=next->next)
{ {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment