status.test
Upload User: tsgydb
Upload Date: 2007-04-14
Package Size: 10674k
Code Size: 0k
Category:

MySQL

Development Platform:

Visual C++

  1. connect (con1,localhost,root,,test,0,mysql-master.sock);
  2. connect (con2,localhost,root,,test,0,mysql-master.sock);
  3. flush status;
  4. show status like 'Table_lock%';
  5. connection con1;
  6. SET SQL_LOG_BIN=0;
  7. drop table if exists t1;
  8. create table t1(n int);
  9. insert into t1 values(1);
  10. connection con2;
  11. lock tables t1 read;
  12. unlock tables;
  13. lock tables t1 read;
  14. connection con1;
  15. --send
  16. update t1 set n = 3;
  17. connection con2;
  18. sleep 0.5;
  19. unlock tables;
  20. connection con1;
  21. reap;
  22. show status like 'Table_lock%';
  23. drop table t1;