lock_multi.result
来自「视频监控网络部分的协议ddns,的模块的实现代码,请大家大胆指正.」· RESULT 代码 · 共 91 行
RESULT
91 行
drop table if exists t1,t2;create table t1(n int);insert into t1 values (1);lock tables t1 write;update low_priority t1 set n = 4;select n from t1;unlock tables;n4drop table t1;create table t1(n int);insert into t1 values (1);lock tables t1 read;update low_priority t1 set n = 4;select n from t1;unlock tables;n1drop table t1;create table t1 (a int, b int);create table t2 (c int, d int);insert into t1 values(1,1);insert into t1 values(2,2);insert into t2 values(1,2);lock table t1 read;update t1,t2 set c=a where b=d;select c from t2;c2drop table t1;drop table t2;create table t1 (a int);create table t2 (a int);lock table t1 write, t2 write;insert t1 select * from t2;drop table t2;ERROR 42S02: Table 'test.t2' doesn't existdrop table t1;create table t1(a int);lock tables t1 write;show columns from t1;Field Type Null Key Default Extraa int(11) YES NULL unlock tables;drop table t1;CREATE DATABASE mysqltest_1;FLUSH TABLES WITH READ LOCK;DROP DATABASE mysqltest_1;DROP DATABASE mysqltest_1;ERROR HY000: Can't execute the query because you have a conflicting read lockUNLOCK TABLES;DROP DATABASE mysqltest_1;ERROR HY000: Can't drop database 'mysqltest_1'; database doesn't existuse mysql;LOCK TABLES columns_priv WRITE, db WRITE, host WRITE, user WRITE;FLUSH TABLES;use mysql;SELECT user.Select_priv FROM user, db WHERE user.user = db.user LIMIT 1;OPTIMIZE TABLES columns_priv, db, host, user;Table Op Msg_type Msg_textmysql.columns_priv optimize status OKmysql.db optimize status OKmysql.host optimize status OKmysql.user optimize status OKUNLOCK TABLES;Select_privNuse test;use test;CREATE TABLE t1 (c1 int);LOCK TABLE t1 WRITE;FLUSH TABLES WITH READ LOCK;CREATE TABLE t2 (c1 int);UNLOCK TABLES;UNLOCK TABLES;DROP TABLE t1, t2;CREATE TABLE t1 (c1 int);LOCK TABLE t1 WRITE;FLUSH TABLES WITH READ LOCK;CREATE TABLE t2 AS SELECT * FROM t1;ERROR HY000: Table 't2' was not locked with LOCK TABLESUNLOCK TABLES;UNLOCK TABLES;DROP TABLE t1;create table t1 (f1 int(12) unsigned not null auto_increment, primary key(f1)) engine=innodb;lock tables t1 write;alter table t1 auto_increment=0; alter table t1 auto_increment=0; alter table t1 auto_increment=0; alter table t1 auto_increment=0; alter table t1 auto_increment=0; //alter table t1 auto_increment=0; alter table t1 auto_increment=0; alter table t1 auto_increment=0; alter table t1 auto_increment=0; alter table t1 auto_increment=0; //unlock tables;drop table t1;
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?