码迷,mamicode.com
首页 > 数据库 > 详细

mysql

时间:2016-09-09 16:39:10      阅读:193      评论:0      收藏:0      [点我收藏+]

标签:

set sql_mode=‘STRICT_TRANS_TABLES‘ 针对输入合法性检测约束。
外键定义:
[CONSTRAINT [symoll]] FOREIGN KEY
[index_name] (index_col_name....information_schema.)information_schema
REFERENCES tbl_name (index_col_name)
[ON DELETE reference_option]
[ON UPDATE reference_option]
reference_option:
RESTRICT | CASCADE | SET NULL | NO ACTION
视图定义:
CREATE  VIEW view_name [(column_list)]
AS select_statement
[WITH [CASCADE | LOCAL] CHECK OPTION]

查看当前DBServer是否启用分区
show plugins;
查看Innodb当前事务可能存在的锁:
SELECT * FROM information_schema.INNODB_TRX;
SELECT * FROM information_schema.INNODB_LOCKS;
SELECT * FROM information_schema.INNODB_LOCK_WAITS;

select @@tx_isolation;

innodb_lock_wait_timeout:控制等待时间 50S (动态)
innodb_rollback_on_timeout:设定是否在等待超时时对进行中的事务进行回滚操作 (静态)

mysql

标签:

原文地址:http://www.cnblogs.com/moss_tan_jun/p/5856793.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!