File tree Expand file tree Collapse file tree 1 file changed +2
-10
lines changed
src/MySqlConnector/MySqlClient Expand file tree Collapse file tree 1 file changed +2
-10
lines changed Original file line number Diff line number Diff line change @@ -293,16 +293,8 @@ private void DoClose()
293293 // KILL QUERY will kill a subsequent query if the command it was intended to cancel has already completed.
294294 // In order to handle this case, we issue a dummy query to catch the QueryInterrupted exception.
295295 // See https://bugs.mysql.com/bug.php?id=45679
296- var killClearCommand = new MySqlCommand ( "SELECT * FROM fake_table LIMIT 0;" , connection ) ;
297- try
298- {
299- killClearCommand . ExecuteReader ( ) ;
300- }
301- catch ( MySqlException ex )
302- {
303- if ( ex . Number != ( int ) MySqlErrorCode . QueryInterrupted && ex . Number != ( int ) MySqlErrorCode . NoSuchTable )
304- throw ;
305- }
296+ var killClearCommand = new MySqlCommand ( "DO SLEEP(0);" , connection ) ;
297+ killClearCommand . ExecuteNonQuery ( ) ;
306298 }
307299
308300 Command . ReaderClosed ( ) ;
You can’t perform that action at this time.
0 commit comments