This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| > show engine innodb status; | |
| ------------------------ | |
| LATEST DETECTED DEADLOCK | |
| ------------------------ | |
| 2017-05-08 20:30:05 7f00b9eb6700 | |
| *** (1) TRANSACTION: | |
| TRANSACTION 37152444, ACTIVE 34 sec starting index read | |
| mysql tables in use 1, locked 1 | |
| LOCK WAIT 2 lock struct(s), heap size 360, 1 row lock(s) | |
| MySQL thread id 62732, OS thread handle 0x7f00ba591700, query id 2534379 10.123. 8.23 root updating |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # session 1 | |
| use test; | |
| create table t (i int) engine = InnoDB; | |
| insert into t(i) values(1); | |
| start transaction; | |
| select * from t where i = 1 lock in share mode; | |
| # session 2 | |
| use test; | |
| start transaction; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| interface Model { | |
| public function getConnection(); | |
| public function getDb(); | |
| public function getTableName(); | |
| public function getData(); | |
| public function getFileds(); | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| /** | |
| * basic model | |
| */ | |
| class Model { | |
| protected $connection = 'db'; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # yum list \*openssl\* | |
| yum install -y openssl098e | |
| yum install -y zlib | |
| ln -s /usr/lib64/libssl.so.0.9.8e /usr/lib64/libssl.so.0.9.8 | |
| ln -s /usr/lib64/libcrypto.so.0.9.8e /usr/lib64/libcrypto.so.0.9.8 | |
| ln -s /lib64/libbz2.so.1 /lib64/libbz2.so.1.0 | |
| wget https://bitbucket.org/pypy/pypy/downloads/pypy2-v5.6.0-linux64.tar.bz2 | |
| tar -xf pypy-1.8-linux64.tar.bz2 | |
| cp -r pypy-1.8 /opt | |
| ln -s /opt/pypy-1.8/bin/pypy /usr/local/bin |