mirror of
https://github.com/MariaDB/server.git
synced 2025-08-29 00:08:14 +03:00
Added (rewritten) patch from Percona to get extended statistics in slow.log: - Added handling of 'set' variables to set_var.cc. Changed sql_mode to use this - Added extra logging to slow log of 'Thread_id, Schema, Query Cache hit, Rows sent and Rows examined' - Added optional logging to slow log, through log_slow_verbosity, of query plan statistics - Added new user variables log_slow_rate_limit, log_slow_verbosity, log_slow_filter - Added log-slow-file as synonym for 'slow-log-file', as most slow-log variables starts with 'log-slow' - Added log-slow-time as synonym for long-query-time Some trivial MyISAM optimizations: - In prepare for drop, flush key blocks - Don't call mi_lock_database if my_disable_locking is used ****** Automatic merge with trunc ****** Updated documentation files to reflect MariaDB and not the Maria storage engine or MySQL Added (rewritten) patch from Percona to get extended statistics in slow.log: - Added handling of 'set' variables to set_var.cc. Changed sql_mode to use this - Added extra logging to slow log of 'Thread_id, Schema, Query Cache hit, Rows sent and Rows examined' - Added optional logging to slow log, through log_slow_verbosity, of query plan statistics - Added new user variables log_slow_rate_limit, log_slow_verbosity, log_slow_filter - Added log-slow-file as synonym for 'slow-log-file', as most slow-log variables starts with 'log-slow' - Added log-slow-time as synonym for long-query-time Some trivial MyISAM optimizations: - In prepare for drop, flush key blocks - Don't call mi_lock_database if my_disable_locking is used KNOWN_BUGS.txt: Updated file to reflect MariaDB and not the Maria storage engine ****** Updated file to reflect MariaDB and not the Maria storage engine README: Updated file to reflect MariaDB ****** Updated file to reflect MariaDB mysql-test/r/log_slow.result: Test new options for slow query log ****** Test new options for slow query log mysql-test/r/variables.result: Updated result (old version cut of things at 79 characters) ****** Updated result (old version cut of things at 79 characters) mysql-test/t/log_slow.test: Test new options for slow query log ****** Test new options for slow query log sql/Makefile.am: Added log_slow.h ****** Added log_slow.h sql/event_data_objects.cc: Removed not needed test for enable_slow_log (is done when the flag is tested elsewhere) ****** Removed not needed test for enable_slow_log (is done when the flag is tested elsewhere) sql/events.cc: Use the general make_set() function instead of 'symbolic_mode_representation' ****** Use the general make_set() function instead of 'symbolic_mode_representation' sql/filesort.cc: Added status for used query plans ****** Added status for used query plans sql/log.cc: Reset counters if no query_length (from Percona's patch; Not sure if needed, but can do no harm) Added extra logging to slow log of 'Thread_id, Schema, Query Cache hit, Rows sent and Rows examined' Added optional logging to slow log, through log_slow_verbosity, of query plan statistics Fixed wrong test of error condition ****** Reset counters if no query_length (from Percona's patch; Not sure if needed, but can do no harm) Added extra logging to slow log of 'Thread_id, Schema, Query Cache hit, Rows sent and Rows examined' Added optional logging to slow log, through log_slow_verbosity, of query plan statistics Fixed wrong test of error condition sql/log_slow.h: Defines and variables for log_slow_verbosity and log_slow_filter ****** Defines and variables for log_slow_verbosity and log_slow_filter sql/mysql_priv.h: Include log_slow.h ****** Include log_slow.h sql/mysqld.cc: Added new user variables log_slow_rate_limit, log_slow_verbosity, log_slow_filter Added log-slow-file as synonym for 'slow-log-file', as most slow-log variables starts with 'log-slow' Added log-slow-time as synonym for long-query-time Added note that one should use log-slow-filter instead of log-slow-admin-statements Updated comment from 'slow_query_log_file' ****** Added new user variables log_slow_rate_limit, log_slow_verbosity, log_slow_filter Added log-slow-file as synonym for 'slow-log-file', as most slow-log variables starts with 'log-slow' Added log-slow-time as synonym for long-query-time Added note that one should use log-slow-filter instead of log-slow-admin-statements Updated comment from 'slow_query_log_file' sql/set_var.cc: Added long_slow_time as synonym for long_query_time Added new user variables log_slow_rate_limit, log_slow_verbosity, log_slow_filter dded handling of 'set' variables to set_var.cc. Changed sql_mode to use this ****** Added long_slow_time as synonym for long_query_time Added new user variables log_slow_rate_limit, log_slow_verbosity, log_slow_filter dded handling of 'set' variables to set_var.cc. Changed sql_mode to use this sql/set_var.h: - Added handling of 'set' variables. Changed sql_mode to use this ****** - Added handling of 'set' variables. Changed sql_mode to use this sql/slave.cc: Use global filter also for slaves ****** Use global filter also for slaves sql/sp_head.cc: Simplify saving of general_slow_log state Use the general make_set() function instead of 'symbolic_mode_representation' ****** Simplify saving of general_slow_log state Use the general make_set() function instead of 'symbolic_mode_representation' sql/sql_cache.cc: Added status for used query plans ****** Added status for used query plans sql/sql_class.cc: Remember/restore query_plan_flags over complex statements ****** Remember/restore query_plan_flags over complex statements sql/sql_class.h: Added variables to handle extended slow log statistics ****** Added variables to handle extended slow log statistics sql/sql_parse.cc: Added status for used query plans Added test for filtering slow_query_log ****** Added status for used query plans Added test for filtering slow_query_log sql/sql_select.cc: Added status for used query plans ****** Added status for used query plans sql/sql_show.cc: Use the general make_set() function instead of 'symbolic_mode_representation' ****** Use the general make_set() function instead of 'symbolic_mode_representation' sql/strfunc.cc: Report first error (not last) if something is wrong in a set Removed compiler warning ****** Report first error (not last) if something is wrong in a set Removed compiler warning storage/myisam/mi_extra.c: In prepare for drop, flush key blocks (speed optimization) ****** In prepare for drop, flush key blocks (speed optimization) storage/myisam/mi_locking.c: Don't call mi_lock_database if my_disable_locking is used (speed optimization) ****** Don't call mi_lock_database if my_disable_locking is used (speed optimization)
This directory contains a test suite for the MySQL daemon. To run the currently existing test cases, simply execute ./mysql-test-run in this directory. It will fire up the newly built mysqld and test it. Note that you do not have to have to do "make install", and you could actually have a co-existing MySQL installation. The tests will not conflict with it. All tests must pass. If one or more of them fail on your system, please read the following manual section for instructions on how to report the problem: http://dev.mysql.com/doc/mysql/en/mysql-test-suite.html If you want to use an already running MySQL server for specific tests, use the --extern option to mysql-test-run. Please note that in this mode, the test suite expects you to provide the names of the tests to run. For example, here is the command to run the "alias" and "analyze" tests with an external server: mysql-test-run --extern alias analyze To match your setup, you might also need to provide --socket, --user, and other relevant options. With no test cases named on the command line, mysql-test-run falls back to the normal "non-extern" behavior. The reason for this is that some tests cannot run with an external server. You can create your own test cases. To create a test case, create a new file in the t subdirectory using a text editor. The file should have a .test extension. For example: xemacs t/test_case_name.test In the file, put a set of SQL statements that create some tables, load test data, and run some queries to manipulate it. We would appreciate it if you name your test tables t1, t2, t3 ... (to not conflict too much with existing tables). Your test should begin by dropping the tables you are going to create and end by dropping them again. This ensures that you can run the test over and over again. If you are using mysqltest commands (like result file names) in your test case, you should create the result file as follows: mysql-test-run --record test_case_name or mysqltest --record < t/test_case_name.test If you only have a simple test cases consisting of SQL statements and comments, you can create the test case in one of the following ways: mysql-test-run --record test_case_name mysql test < t/test_case_name.test > r/test_case_name.result mysqltest --record --record-file=r/test_case_name.result < t/test_case_name.test When this is done, take a look at r/test_case_name.result - If the result is incorrect, you have found a bug. In this case, you should edit the test result to the correct results so that we can verify that the bug is corrected in future releases. To submit your test case, put your .test file and .result file(s) into a tar.gz archive, add a README that explains the problem, ftp the archive to ftp://support.mysql.com/pub/mysql/secret/ and send a mail to bugs@lists.mysql.com