Commit 0dd0d88e authored by sasha@mysql.sashanet.com's avatar sasha@mysql.sashanet.com
Browse files

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
parent 55543081
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
((@id := kill_id) - kill_id)
0
4
4
+2 −0
Original line number Diff line number Diff line
@a - connection_id()
3

mysql-test/t/kill.test

0 → 100644
+23 −0
Original line number Diff line number Diff line
connect (con1, localhost, root,,test,0, mysql-master.sock);
connect (con2, localhost, root,,test,0, mysql-master.sock);

#remember id of con1
connection con1;
drop table if exists connection_kill;
create table connection_kill (kill_id int);
insert into connection_kill values(connection_id());

#kill con1
connection con2;
select ((@id := kill_id) - kill_id) from connection_kill; 
kill @id;

# verify that con1 is really dead
connection con1;
error 2013;
select 1;

#make sure the server is still alive
connection con2;
select 4;
drop table connection_kill;
+5 −0
Original line number Diff line number Diff line
error 1204;
set @a := foo;
set @a := connection_id() + 3;
select @a - connection_id();
+4 −4
Original line number Diff line number Diff line
@@ -1381,8 +1381,8 @@ static int safe_connect(THD* thd, MYSQL* mysql, MASTER_INFO* mi)
    {
      mysql_log.write(thd, COM_CONNECT_OUT, "%s@%s:%d",
		  mi->user, mi->host, mi->port);
#ifdef STOP_IO_WITH_FD_CLOSE
      thd->set_active_fd(vio_fd(mysql->net.vio));
#ifdef SIGNAL_WITH_VIO_CLOSE
      thd->set_active_vio(mysql->net.vio);
#endif      
    }
  
@@ -1417,8 +1417,8 @@ replication resumed in log '%s' at position %s", glob_mi.user,
		    glob_mi.host, glob_mi.port,
		    RPL_LOG_NAME,
		    llstr(glob_mi.pos,llbuff));
#ifdef STOP_IO_WITH_FD_CLOSE
      thd->set_active_fd(vio_fd(mysql->net.vio));
#ifdef SIGNAL_WITH_VIO_CLOSE
      thd->set_active_vio(mysql->net.vio);
#endif      
    }

Loading