/docs/MyDocs

To get this branch, use:
bzr branch http://darksoft.org/webbzr/docs/MyDocs

« back to all changes in this revision

Viewing changes to Development/database/MySQL/problems.txt

  • Committer: Suren A. Chilingaryan
  • Date: 2019-01-10 05:46:35 UTC
  • Revision ID: csa@suren.me-20190110054635-pk8r99f96cg0pzz7
Update on OpenShift/Gluster/MySQL, added OSInit

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
 a) In the SELECT should not be used names hidding the actual column names. If
 
1
General
 
2
=======
 
3
 - In the SELECT should not be used names hidding the actual column names. If
2
4
 this rule is not obeyed, the INDEXes would not be used!!! Means extremely
3
5
 slow performance
4
6
 
5
 
 b) In MySQL BETWEEN is equivalent of "<=COLUMN<=", in other databases this
 
7
 - In MySQL BETWEEN is equivalent of "<=COLUMN<=", in other databases this
6
8
 works different "<=COLUMN<".
7
9
 
8
 
 c) MyODBC catastrophic failure could be overcome if instead of "Data Source
 
10
 - MyODBC catastrophic failure could be overcome if instead of "Data Source
9
11
 Name" the complete connection string is used. The default database should
10
12
 not be selected.
11
13
 
12
 
 d) Table name length limit is 64 characters
13
 
 
14
 
 e) recovering unicode double conversion in MySQL
15
 
    mysqldump --default-character-set=latin1 -u csa -p backup_hauptspektrometer
16
 
    cat dump.sql | mysql -u csa -p backup_hauptspektrometer
17
 
 
 
14
 
 
15
Locks
 
16
=====
 
17
 - Analyzing stalled locks
 
18
        SHOW PROCESSLIST;
 
19
 InnoDB:
 
20
        SELECT *  FROM INFORMATION_SCHEMA.INNODB_LOCKS  WHERE LOCK_TRX_ID IN (SELECT BLOCKING_TRX_ID FROM INFORMATION_SCHEMA.INNODB_LOCK_WAITS);
 
21
        SELECT *  FROM INFORMATION_SCHEMA.INNODB_LOCKS  WHERE LOCK_TABLE = "adei_katrin.cache600__md5_14047572285591527500dbd1596bab1c";
 
22
        SELECT TRX_ID, TRX_REQUESTED_LOCK_ID, TRX_MYSQL_THREAD_ID, TRX_QUERY FROM INFORMATION_SCHEMA.INNODB_TRX WHERE TRX_STATE = 'LOCK WAIT';
 
23
 
 
24
 Solving:
 
25
    * Either kill it 
 
26
        KILL <id_from_processlist>
 
27
    * or restart MySQL and give it chance to recover