Translation of Summary of Part 1 of "Methods for searching errors in SQL application" just published

There is not much new content this week. Just summary of what was written before.




Summary.



In the summary of this part I'd want to recommend following:



Try to find a query which causes inconsistent behavior



Use log files:



  1. General query log

  2. Log files in your application

  3. MySQL Proxy or any other suitable proxy

  4. Others



Analyze what is wrong, then solve the problem using your findings



Below I place a list of methods which we studied in the first part.


Method #1: use output operator to output query in exactly same way in which RDBMS gets it.



Method #2: use general query log if you need to find which exact query causes wrong behavior of your application.



Method #3: after you found a query which causes the problem run it using command line client and analyze result.



Method #4: try to modify SQL in such a way what you get correct result. Use search engines to find a workaround.



Method #5: use EXPLAIN EXTENDED for finding how optimized (and executing) SQL query.



Method #6: convert DML queries to corresponding SELECT to examine which rows will be modified.



Method #7: repeat your scenario backward step-by-step until you found the problem query.



Method #8: always check result of the query! Use means of your connector or interface of interactive client.



Method #9: tune your application in such a way so it will write queries to log files itself.



Method #10: use MySQL Proxy or any other proxy.


Full text (which now is same as posted above) is here


Comments:

Post a Comment:
  • HTML Syntax: NOT allowed
About

Working blog of Sveta Smirnova - MySQL Senior Principal Support Engineer working in Bugs Analysis Support Group

Search

Categories
Archives
« April 2014
SunMonTueWedThuFriSat
  
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
   
       
Today