How to terminte mysql sql file execution without run left statements -


suppose have table named test

create table test  (     id int not null,     primary key (id) ) engine = innodb; 

and sql file 1.sql

 start transaction;  insert test(id) values(1);  select sleep(100);  select * test;  commit; 

we run 1.sql mysql client tool

mysql -uroot < 1.sql 

it block @ "select sleep(100)" statement. if press "ctrl-c", mysql client kill current statement , continue execute left statements. result, insert commit. there method kill sql file execution without execute left statements?

ps: tried "ctrl + \" abort mysql client, make query still executed in server side because of do not send kill query

you can open second connection, check session want kill show processlist, , use sql kill command terminate it.

see http://dev.mysql.com/doc/refman/5.6/en/kill.html

and http://dev.mysql.com/doc/refman/5.6/en/show-processlist.html


Comments

Popular posts from this blog

matlab - "Contour not rendered for non-finite ZData" -

delphi - Indy UDP Read Contents of Adata -

javascript - Any ideas when Firefox is likely to implement lengthAdjust and textLength? -