Commit graph

46 commits

Author SHA1 Message Date
Tatiana A. Nurnberg
cf7e2e1db4 manual merge of 28141 2009-10-20 11:00:07 -07:00
Tatiana A. Nurnberg
3f42e4bd24 Bug#28141: Control C on query waiting on lock causes ERROR 1053 (server shutdown)
If a thread is killed in the server, we throw "shutdown" only if one is actually in
progress; otherwise, we throw "query interrupted".

Control-C in the mysql command-line client is "incremental" now.
First Control-C sends KILL QUERY (when connected to 5.0+ server, otherwise, see next)
Next  Control-C sends KILL CONNECTION
Next  Control-C aborts client.

As the first two steps only pertain to an existing query,
Control-C will abort the client right away if no query is running.

client will give more detailed/consistent feedback on Control-C now.
2009-10-19 21:42:10 -07:00
davi@mysql.com/endora.local
c964c0b2cf Bug#34891 sp_notembedded.test fails sporadically
The problem is that since MyISAM's concurrent_insert is on by
default some concurrent SELECT statements might not see changes
made by INSERT statements in other connections, even if the
INSERT statement has returned.

The solution is to disable concurrent_insert so that INSERT
statements returns after the data is actually visible to other
statements.
2008-03-13 14:54:29 -03:00
davi@buzz.(none)
dc6c9312a7 Disable concurrent inserts for the kill.test 2008-02-22 12:26:08 -02:00
kostja@bodhi.(none)
04bf5743b4 Update the failing kill test in the team tree. 2007-11-22 03:48:51 +03:00
anozdrin/alik@station.
e8343ca83d A patch for BUG#19723: kill of active connection yields
different error code depending on platform.

On Mac OS X, KILL statement issued to kill the current
connection would return a different error code and message than on
other platforms ('MySQL server has gone away' instead of 'Shutdown
in progress').

The reason for this difference was that on Mac OS X we have macro
SIGNAL_WITH_VIO_CLOSE defined. This macro forces KILL
implementation to close the communication socket of the thread
that is being killed. SIGNAL_WITH_VIO_CLOSE macro is defined on
platforms where just sending a signal is not a reliable mechanism
to interrupt the thread from sleeping on a blocking system call.
In a nutshell, closing the socket is a hack to work around an
operating system bug and awake the blocked thread no matter what.

However, if the thread that is being killed is the same
thread that issued KILL statement, closing the socket leads to a
prematurely lost connection. At the same time it is not necessary
to close the socket in this case, since the thread in question
is not inside a blocking system call.

The fix, therefore, is to not close the socket if the thread that
is being killed is the same that issued KILL statement, even with
defined SIGNAL_WITH_VIO_CLOSE.
2007-11-15 15:35:35 +03:00
dkatz@damien-katzs-computer.local
0d84133a4c Merge damien-katzs-computer.local:/Users/dkatz/50_kill
into  damien-katzs-computer.local:/Users/dkatz/mysql51
2007-06-21 22:08:14 -04:00
dkatz@damien-katzs-computer.local
a393b215fb Bug #29138 'kill' fails in pushbuild
The reason the "reap;" succeeds unexpectedly is because the query was completing(almost always) and the network buffer was big enough to store the query result (sometimes) on Windows, meaning the response was completely sent before the server thread could be killed.

Therefore we use a much longer running query that doesn't have a chance to fully complete before the reap happens, testing the kill properly.
2007-06-21 21:39:52 -04:00
holyfoot/hf@hfmain.(none)
cdda302fc1 Merge mysql.com:/d2/hf/mrg/mysql-5.0-opt
into  mysql.com:/d2/hf/mrg/mysql-5.1-opt
2007-05-31 14:23:45 +05:00
gshchepa/uchum@gleb.loc
e16953dfd8 Fixed bug #28598.
mysqld crashed when a long-running explain query was killed from
another connection.

When the current thread caught a kill signal executing the function
best_extension_by_limited_search it just silently returned to  
the calling function greedy_search without initializing elements of
the join->best_positions array.
However, the greedy_search function ignored thd->killed status
after a calls to the best_extension_by_limited_search function, and
after several calls the greedy_search function used an uninitialized
data from the join->best_positions[idx] to search position in the
join->best_ref array. 
That search failed, and greedy_search tried to call swap_variables
function with NULL argument - that caused a crash.
2007-05-31 12:10:21 +05:00
gshchepa/uchum@gleb.loc
fae737b426 Merge gleb.loc:/home/uchum/work/bk/mysql-5.0-opt
into  gleb.loc:/home/uchum/work/bk/mysql-5.1-opt
2007-05-28 00:22:44 +05:00
evgen@moonbone.local
d1d58b5f1d Bug#27563: Stored functions and triggers wasn't throwing an error when killed.
If a stored function or a trigger was killed it had aborted but no error
was thrown. This allows the caller statement to continue without a notice.
This may lead to a wrong data being inserted/updated to/deleted as in such
cases the correct result of a stored function isn't guaranteed. In the case
of triggers it allows the caller statement to ignore kill signal and to
waste time because of re-evaluation of triggers that always will fail
because thd->killed flag is still on.

Now the Item_func_sp::execute() and the sp_head::execute_trigger() functions
check whether a function or a trigger were killed during execution and
throws an appropriate error if so.
Now the fill_record() function stops filling record if an error was reported
through thd->net.report_error.
2007-05-23 23:24:16 +04:00
msvensson@neptunus.(none)
5817838c06 Merge neptunus.(none):/home/msvensson/mysql/mysql-5.0-maint
into  neptunus.(none):/home/msvensson/mysql/mysql-5.1-maint
2006-12-08 17:10:54 +01:00
msvensson@neptunus.(none)
cb903ec340 Merge neptunus.(none):/home/msvensson/mysql/mysql-4.1-maint
into  neptunus.(none):/home/msvensson/mysql/mysql-5.0-maint
2006-12-08 17:09:43 +01:00
msvensson@neptunus.(none)
9636ead18d Bug#19410 Test 'kill' fails on Windows + SCO 2006-12-08 17:09:07 +01:00
andrey@example.com
c27a88ca2d Better fix for bug#22830
Events: crash with procedure which alters events with function

Post-review CS

This fix also changes the handling of KILL command combined with
subquery. It changes the error message given back to "not supported",
from parse error. The error for CREATE|ALTER EVENT has also been changed
to generate "not supported yet" instead of parse error.
In case of a SP call, the error is "not supported yet". This change
cleans the parser from code which should not belong to there. Still
LEX::expr_allows_subselect is existant because it simplifies the handling
 of SQLCOM_HA_READ which forbids subselects.
2006-11-02 13:51:43 +01:00
serg@serg.mylan
6d6d11787f after merge 2006-03-06 23:43:47 +01:00
serg@serg.mylan
d190e08e4e merged 2006-03-06 20:53:14 +01:00
serg@serg.mylan
e7504b3468 merged 2006-03-06 18:34:38 +01:00
serg@serg.mylan
0b2f4ac3be kill (subquery) - three years old bugfix that never worked 2006-03-06 18:26:39 +01:00
bell@sanja.is.com.ua
6916a4bfe6 Merge sanja.is.com.ua:/home/bell/mysql/bk/mysql-4.1
into  sanja.is.com.ua:/home/bell/mysql/bk/work-5.0
2006-02-07 22:10:44 +02:00
bell@sanja.is.com.ua
5923d50533 kill.test fixed for kill on Mac OS X (which do not send OK) 2006-02-07 13:45:16 +02:00
konstantin@mysql.com
303ad65fb2 Post-merge fixes. 2006-02-03 00:07:36 +03:00
konstantin@mysql.com
98091b152a Merge mysql.com:/opt/local/work/mysql-4.1-root
into  mysql.com:/opt/local/work/mysql-5.0-root
2006-02-02 18:17:18 +03:00
bell@sanja.is.com.ua
4e931d3c45 Excluded posibility of tmp_table_param.copy_field double deletion (BUG#14851). 2006-01-18 13:48:57 +02:00
monty@mysql.com
6e22e29de6 Review fixes of new pushed code
- Fixed tests
- Optimized new code
- Fixed some unlikely core dumps
- Better bug fixes for:
  - #14397 - OPTIMIZE TABLE with an open HANDLER causes a crash
  - #14850 (ERROR 1062 when a quering a view using a Group By on a column that can be null
2006-01-06 00:47:49 +02:00
kent@mysql.com
7743016908 Merge mysql.com:/Users/kent/mysql/bk/mysql-4.1-tmp
into mysql.com:/Users/kent/mysql/bk/mysql-5.0
2005-10-13 12:38:38 +02:00
jimw@mysql.com
a778669efd Tweak kill test to avoid spurious test failure on SCO OpenServer. (Bug #12136) 2005-09-20 09:36:35 -07:00
msvensson@neptunus.(none)
305dc01078 Merge neptunus.(none):/home/msvensson/mysql/mysql-5.0
into  neptunus.(none):/home/msvensson/mysql/bug11316/my50-bug11316
2005-09-01 17:15:37 +02:00
msvensson@neptunus.(none)
4b47ebcfc9 mysqltest improvements, updates after merge + test for 5.0 2005-09-01 17:01:23 +02:00
monty@mysql.com
3eaa953529 Cleanups and optimization during review of new code 2005-08-18 03:12:42 +03:00
monty@mysql.com
15d48525af Merge mysql.com:/home/my/mysql-4.1
into  mysql.com:/home/my/mysql-5.0
2005-07-28 17:09:54 +03:00
monty@mysql.com
3c12d0ae54 Added end marker for tests to make future merges easier 2005-07-28 03:22:47 +03:00
serg@serg.mylan
98601055b6 backport kill.test fix from 5.0 2005-04-11 22:36:07 +02:00
monty@mysql.com
a7c6348192 Fixed errors found during review 2005-04-06 19:43:35 +03:00
jimw@mysql.com
bb215f648b Merge 2005-04-04 23:03:56 -07:00
jimw@mysql.com
9c86b35194 Fix reconnect when using prepared statements, and add
--disable_reconnect and --enable_reconnect to mysqltest
so that it can be tested properly. (Bug #8866)
2005-03-28 09:59:41 -08:00
jimw@mysql.com
146994ed4c Fix 'kill' test to actually test that the connection has
been killed.
2005-03-18 16:17:10 -08:00
guilhem@mysql.com
91d1cf4931 Fix for BUG#8783 kill.test must always sleep 2 seconds, even if
mysql-test-run runs with --sleep=10; otherwise GET_LOCK() times out
before being killed so we get 0 instead of NULL. Verified that it
works on our powermacg5 where the test was failing.
2005-02-24 19:13:55 +01:00
bell@51.0.168.192.in-addr.arpa
3cb61419bd get time for thread switching 2005-02-24 03:25:53 +02:00
bell@sanja.is.com.ua
e9ad508542 Fixed problem of sending ERROR to client after OK or EOF (BUG#6804) 2005-01-20 10:41:37 +02:00
monty@mashka.mysql.fi
1f6ecc0cd3 Changed mysql-test to print warnings for not existing table to DROP TABLE
Cleaned up test; Removed wrong DROP TABLE commands and use standard table and database names.
changed store_warning() -> push_warning_print()
2003-01-06 01:48:59 +02:00
monty@hundin.mysql.fi
88aff4bf85 Updated manual about embedded version.
Speed up column-completion in 'mysql'
Don't use ISAM if HAVE_ISAM is not defined
A lot of fixes for the embedded version.  All libraries are now included in libmysqld.a
Changed arguments to convert_dirname() to make it more general.
Renamed files in the 'merge' directory to all use a common prefix.
Don't compile both assembler and C functions on x86
2001-10-08 04:58:07 +03:00
monty@donna.mysql.fi
5487d7a8c0 Fixed bug in send in mysqltest
Removed usage of @r/result as this made life hard when testing different
table handlers.
Allow concurrent inserts if no update/binary log.
Don't remove key_cache at flush tables.
Fixed bug in SELECT DISTINCT SUM()...
2001-03-25 01:02:26 +02:00
monty@donna.mysql.fi
d0722d73b0 Added fix for using variables with distinct 2001-03-15 03:55:48 +02:00
sasha@mysql.sashanet.com
0dd0d88e8f changed signal by fd close to signal by vio_close
added support for kill expr
fixed coredump in set @a := foo;
added testcase for user_var
added testcase for kill
2001-03-13 23:07:12 -07:00