- 19 Oct, 2009 1 commit
-
-
Michael Widenius authored
The original code comes, as far as I know, from Google (Mark Callaghan's team) with additional work from Percona, Ourdelta and Weldon Whipple. This code provides the same functionallity, but with a lot of changes to make it faster and better fit the MariaDB infrastucture. Added new status variables: - Com_show_client_statistics, Com_show_index_statistics, Com_show_table_statistics, Com_show_user_statistics - Access_denied_errors, Busy_time (clock time), Binlog_bytes_written, Cpu_time, Empty_queries, Rows_sent, Rows_read Added new variable / startup option 'userstat' to control if user statistics should be enabled or not Added my_getcputime(); Returns cpu time used by this thread. New FLUSH commands: - FLUSH SLOW QUERY LOG - FLUSH TABLE_STATISTICS - FLUSH INDEX_STATISTICS - FLUSH USER_STATISTICS - FLUSH CLIENT_STATISTICS New SHOW commands: - SHOW CLIENT_STATISTICS - SHOW USER_STATISTICS - SHOW TABLE_STATISTICS - SHOW INDEX_STATISTICS New Information schemas: - CLIENT_STATISTICS - USER_STATISTICS - INDEX_STATISTICS - TABLE_STATISTICS Added support for all new flush commands to mysqladmin Added handler::ha_... wrappers for all handler read calls to do statistics counting - Changed all code to use new ha_... calls - Count number of read rows, changed rows and rows read trough an index Added counting of number of bytes sent to binary log (status variable Binlog_bytes_written) Added counting of access denied errors (status variable Access_denied_erors) Bugs fixed: - Fixed bug in add_to_status() and add_diff_to_status() where longlong variables where threated as long - CLOCK_GETTIME was not propely working on Linuxm client/mysqladmin.cc: Added support for all new flush commmands and some common combinations: flush-slow-log flush-table-statistics flush-index-statistics flush-user-statistics flush-client-statistics flush-all-status flush-all-statistics configure.in: Added checking if clock_gettime needs the librt. (Fixes Bug #37639 clock_gettime is never used/enabled in Linux/Unix) include/my_sys.h: Added my_getcputime() include/mysql_com.h: Added LIST_PROCESS_HOST_LEN & new REFRESH target defines mysql-test/r/information_schema.result: New information schema tables added mysql-test/r/information_schema_all_engines.result: New information schema tables added mysql-test/r/information_schema_db.result: New information schema tables added mysql-test/r/log_slow.result: Added testing that flosh slow query logs is accepted mysql-test/r/status_user.result: Basic testing of user, client, table and index statistics mysql-test/t/log_slow.test: Added testing that flosh slow query logs is accepted mysql-test/t/status_user-master.opt: Ensure that we get a fresh restart before running status_user.test mysql-test/t/status_user.test: Basic testing of user, client, table and index statistics mysys/my_getsystime.c: Added my_getcputime() Returns cpu time used by this thread. sql/authors.h: Updated authors to have core and original MySQL developers first. sql/event_data_objects.cc: Updated call to mysql_reset_thd_for_next_command() sql/event_db_repository.cc: Changed to use new ha_... calls sql/filesort.cc: Changed to use new ha_... calls sql/ha_partition.cc: Changed to use new ha_... calls Fixed comment syntax sql/handler.cc: Changed to use new ha_... calls Reset table statistics Added code to update global table and index status Added counting of rows changed sql/handler.h: Added table and index statistics variables Added function reset_statistics() Added handler::ha_... wrappers for all handler read calls to do statistics counting Protected all normal read calls to ensure we use the new calls in the server. Made ha_partition a friend class so that partition code can call the old read functions sql/item_subselect.cc: Changed to use new ha_... calls sql/lex.h: Added keywords for new information schema tables and flush commands sql/log.cc: Added flush_slow_log() Added counting of number of bytes sent to binary log Removed not needed test of thd (It's used before, so it's safe to use) Added THD object to MYSQL_BIN_LOG::write_cache() to simplify statistics counting sql/log.h: Added new parameter to write_cache() Added flush_slow_log() functions. sql/log_event.cc: Updated call to mysql_reset_thd_for_next_command() Changed to use new ha_... calls sql/log_event_old.cc: Updated call to mysql_reset_thd_for_next_command() Changed to use new ha_... calls sql/mysql_priv.h: Updated call to mysql_reset_thd_for_next_command() Added new statistics functions and variables needed by these. sql/mysqld.cc: Added new statistics variables and structures to handle these Added new status variables: - Com_show_client_statistics, Com_show_index_statistics, Com_show_table_statistics, Com_show_user_statistics - Access_denied_errors, Busy_time (clock time), Binlog_bytes_written, Cpu_time, Empty_queries, Rows_set, Rows_read Added new option 'userstat' to control if user statistics should be enabled or not sql/opt_range.cc: Changed to use new ha_... calls sql/opt_range.h: Changed to use new ha_... calls sql/opt_sum.cc: Changed to use new ha_... calls sql/records.cc: Changed to use new ha_... calls sql/set_var.cc: Added variable 'userstat' sql/sp.cc: Changed to use new ha_... calls sql/sql_acl.cc: Changed to use new ha_... calls Added counting of access_denied_errors sql/sql_base.cc: Added call to statistics functions sql/sql_class.cc: Added usage of org_status_var, to store status variables at start of command Added functions THD::update_stats(), THD::update_all_stats() Fixed bug in add_to_status() and add_diff_to_status() where longlong variables where threated as long sql/sql_class.h: Added new status variables to status_var Moved variables that was not ulong in status_var last. Added variables to THD for storing temporary values during statistics counting sql/sql_connect.cc: Variables and functions to calculate user and client statistics Added counting of access_denied_errors and lost_connections sql/sql_cursor.cc: Changed to use new ha_... calls sql/sql_handler.cc: Changed to use new ha_... calls sql/sql_help.cc: Changed to use new ha_... calls sql/sql_insert.cc: Changed to use new ha_... calls sql/sql_lex.h: Added SQLCOM_SHOW_USER_STATS, SQLCOM_SHOW_TABLE_STATS, SQLCOM_SHOW_INDEX_STATS, SQLCOM_SHOW_CLIENT_STATS sql/sql_parse.cc: Added handling of: - SHOW CLIENT_STATISTICS - SHOW USER_STATISTICS - SHOW TABLE_STATISTICS - SHOW INDEX_STATISTICS Added handling of new FLUSH commands: - FLUSH SLOW QUERY LOGS - FLUSH TABLE_STATISTICS - FLUSH INDEX_STATISTICS - FLUSH USER_STATISTICS - FLUSH CLIENT_STATISTICS Added THD parameter to mysql_reset_thd_for_next_command() Added initialization and calls to user statistics functions Added increment of statistics variables empty_queries, rows_sent and access_denied_errors. Added counting of cpu time per query sql/sql_plugin.cc: Changed to use new ha_... calls sql/sql_prepare.cc: Updated call to mysql_reset_thd_for_next_command() sql/sql_select.cc: Changed to use new ha_... calls Indentation changes sql/sql_servers.cc: Changed to use new ha_... calls sql/sql_show.cc: Added counting of access denied errors Added function for new information schema tables: - CLIENT_STATISTICS - USER_STATISTICS - INDEX_STATISTICS - TABLE_STATISTICS Changed to use new ha_... calls sql/sql_table.cc: Changed to use new ha_... calls sql/sql_udf.cc: Changed to use new ha_... calls sql/sql_update.cc: Changed to use new ha_... calls sql/sql_yacc.yy: Add new show and flush commands sql/structs.h: Add name_length to KEY to avoid some strlen Added cache_name to KEY for fast storage of keyvalue in cache Added structs USER_STATS, TABLE_STATS, INDEX_STATS Added function prototypes for statistics functions sql/table.cc: Store db+table+index name into keyinfo->cache_name sql/table.h: Added new information schema tables sql/tztime.cc: Changed to use new ha_... calls
-
- 14 Oct, 2009 2 commits
-
-
Michael Widenius authored
-
Michael Widenius authored
-
- 13 Oct, 2009 2 commits
-
-
Michael Widenius authored
-
Michael Widenius authored
This fixes a race condition in the test system mysql-test/include/maria_empty_logs.inc: Added comment mysql-test/include/wait_for_status_var.inc: Fixed type in variable name. Add ' around variables for better error message mysql-test/mysql-test-run.pl: Remove -skip-falcon (not to be used), add skip-pbxt to bootstrap mysql-test/suite/maria/t/maria_showlog_error-master.opt: Force restart before maria_showlog_error to get rid of status from previous connection
-
- 12 Oct, 2009 5 commits
-
-
Sergey Petrunya authored
-
Sergey Petrunya authored
-
Sergey Petrunya authored
-
Sergey Petrunya authored
-
Sergey Petrunya authored
-
- 11 Oct, 2009 6 commits
-
-
Sergey Petrunya authored
while waiting for output): attempt 2
-
Sergey Petrunya authored
while waiting for output)
-
unknown authored
Remove the run of the parts suite (as it is now included in default list of suite). Add run of PBXT.
-
Sergey Petrunya authored
binary distribution zips.
-
unknown authored
Problem was the use of SHOW PROCESSLIST. This is not fully functional in embedded server, STATE is hardcoded to "Writing to net". Fixed using --replace_result for STATE.
-
unknown authored
The test is supposed to provoke a deadlock, to test a crash of the server in some deadlock scenarios. The problem is that in recent version of MySQL, no deadlock occurs. It is not clear why a deadlock should be expected. One transaction does an insert+delete on primary key value 1 in table t2. The other transaction does an insert on primary key value 123. There seems no reason that these should conflict, so there is no deadlock. (Presumably an earlier version did get a deadlock due to maybe taking excessive locks on the insert+delete of primary key value 1. The table has only one row, so maybe a different locking was used ("Impossible WHERE noticed after reading const tables")) Fix is to have transaction 1 lock PK 1 and transaction 2 lock PK 123. Then have transaction 2 access PK 1 (wait) and transaction 1 access PK 123 (deadlock). It has been checked that this modified test case still crashes the server in the same way prior to fix of the original bug (Bug#24989). mysql-test/include/read_many_rows.inc: Provoke deadlock on same PK value in the two transactions to ensure that the deadlock does occur independently on whatever execution plan is chosen. mysql-test/r/read_many_rows_innodb.result: Result file update.
-
- 10 Oct, 2009 1 commit
-
-
unknown authored
Some result updates necessary due to extra tables and columns added in information_schema in MariaDB (XtraDB, PBXT, microsec_process). Also fix bad merge of two result files; apparently the test case was merged, but the result file was not. mysql-test/suite/funcs_1/datadict/processlist_priv.inc: Handle the new TIME_MS column in information_schema.processlist. mysql-test/suite/funcs_1/datadict/processlist_val.inc: Handle the new TIME_MS column in information_schema.processlist. mysql-test/suite/funcs_1/r/is_columns_is.result: Handle new tables in information_schema. mysql-test/suite/funcs_1/r/is_tables_is.result: Handle new tables in information_schema. mysql-test/suite/funcs_1/r/is_tables_myisam.result: Fix previous bad merge; apparently this file was not merged along with test changes. mysql-test/suite/funcs_1/r/processlist_priv_no_prot.result: Handle the new TIME_MS column in information_schema.processlist. mysql-test/suite/funcs_1/r/processlist_val_no_prot.result: Fix previous bad merge; apparently this file was not merged along with test changes. Also handle the new TIME_MS column in INFORMATION_SCHEMA.PROCESSLIST. mysql-test/suite/funcs_1/t/is_columns_is.test: Since result file includes PBXT information_schema tables, we need PBXT to run this test.
-
- 09 Oct, 2009 3 commits
-
-
unknown authored
Fix some connect options to work with embedded. Disable in --embedded tests that rely on connecting to mysqld externally by spawning mysqltest. Disable in --embedded tests that rely on the mysqltest --list_files command, which does not seem to work properly in --embedded. mysql-test/suite/parts/t/partition_alter1_1_2_innodb.test: Disable in --embedded tests that rely on connecting to mysqld externally by spawning mysqltest. mysql-test/suite/parts/t/partition_alter1_1_2_myisam.test: Disable in --embedded tests that rely on connecting to mysqld externally by spawning mysqltest. mysql-test/suite/parts/t/partition_alter1_1_innodb.test: Disable in --embedded tests that rely on connecting to mysqld externally by spawning mysqltest. mysql-test/suite/parts/t/partition_alter1_1_myisam.test: Disable in --embedded tests that rely on connecting to mysqld externally by spawning mysqltest. mysql-test/suite/parts/t/partition_alter1_2_innodb.test: Disable in --embedded tests that rely on connecting to mysqld externally by spawning mysqltest. mysql-test/suite/parts/t/partition_alter1_2_myisam.test: Disable in --embedded tests that rely on connecting to mysqld externally by spawning mysqltest. mysql-test/suite/parts/t/partition_alter2_1_innodb.test: Disable in --embedded tests that rely on connecting to mysqld externally by spawning mysqltest. mysql-test/suite/parts/t/partition_alter2_1_maria.test: Disable in --embedded tests that rely on connecting to mysqld externally by spawning mysqltest. mysql-test/suite/parts/t/partition_alter2_1_myisam.test: Disable in --embedded tests that rely on connecting to mysqld externally by spawning mysqltest. mysql-test/suite/parts/t/partition_alter2_2_innodb.test: Disable in --embedded tests that rely on connecting to mysqld externally by spawning mysqltest. mysql-test/suite/parts/t/partition_alter2_2_maria.test: Disable in --embedded tests that rely on connecting to mysqld externally by spawning mysqltest. mysql-test/suite/parts/t/partition_alter2_2_myisam.test: Disable in --embedded tests that rely on connecting to mysqld externally by spawning mysqltest. mysql-test/suite/parts/t/partition_alter3_innodb.test: Disable in --embedded tests that rely on the mysqltest --list_files command, which does not seem to work properly in --embedded. mysql-test/suite/parts/t/partition_alter3_myisam.test: Disable in --embedded tests that rely on the mysqltest --list_files command, which does not seem to work properly in --embedded. mysql-test/suite/parts/t/partition_alter4_innodb.test: Disable in --embedded tests that rely on connecting to mysqld externally by spawning mysqltest. mysql-test/suite/parts/t/partition_alter4_myisam.test: Disable in --embedded tests that rely on connecting to mysqld externally by spawning mysqltest. mysql-test/suite/parts/t/partition_basic_innodb.test: Disable in --embedded tests that rely on connecting to mysqld externally by spawning mysqltest. mysql-test/suite/parts/t/partition_basic_myisam.test: Disable in --embedded tests that rely on connecting to mysqld externally by spawning mysqltest. mysql-test/suite/parts/t/partition_basic_symlink_myisam.test: Disable in --embedded tests that rely on connecting to mysqld externally by spawning mysqltest. mysql-test/suite/parts/t/partition_engine_innodb.test: Disable in --embedded tests that rely on connecting to mysqld externally by spawning mysqltest. mysql-test/suite/parts/t/partition_engine_myisam.test: Disable in --embedded tests that rely on connecting to mysqld externally by spawning mysqltest. mysql-test/suite/parts/t/partition_special_innodb.test: Fix some connect options to work with embedded. mysql-test/suite/parts/t/partition_syntax_innodb.test: Disable in --embedded tests that rely on connecting to mysqld externally by spawning mysqltest. mysql-test/suite/parts/t/partition_syntax_myisam.test: Disable in --embedded tests that rely on connecting to mysqld externally by spawning mysqltest.
-
unknown authored
-
unknown authored
The --enable_prepare_warnings allows to not discard warnings from autorepair of crashed table in --ps-protocol mode. Use this to properly fix the parts.partition_recover_myisam and maria.maria-recover tests. Add a test case for the new feature. This also adds missing test coverage for the case where the same warning is thrown in both prepare and execute phase. client/mysqltest.cc: Implement new commands --enable-prepare_warnings and --disable_prepare_warnings. mysql-test/r/mysqltest_ps.result: Add test case for new --enable_prepare_warning mysqltest command. mysql-test/suite/maria/t/maria-recover.test: Better fix of test case using new --enable_prepare_warnings command. mysql-test/suite/parts/t/partition_recover_myisam.test: Fix test failure in --ps-protocol mode. mysql-test/t/mysqltest_ps.test: Add test case for new --enable_prepare_warning mysqltest command.
-
- 08 Oct, 2009 4 commits
-
-
Sergey Petrunya authored
- Include maria_chk and other maria binaries - Include sql/$TARGET/mysqld.lib, like mainline does (but what is that useful for?) - Don't include my_safe_{process,kill} garbage. - call '/bin/find', not just 'find' is that is some incompatible windows command.
-
Sergey Petrunya authored
-
Sergey Petrunya authored
-
unknown authored
-
- 07 Oct, 2009 12 commits
-
-
unknown authored
-
unknown authored
- Don't need any m1 prefix for the first release based on given MySQL version number. - Fix mysql-test-run to understand that some stuff is installed under share/mariadb rather than share/mysql.
-
Sergey Petrunya authored
MBUG#442254: mysql-test-run --embedded fails on Windows with: ERROR: .opt file references 'EXAMPLE_PLUGIN_OPT' - Fix suggested by Kristian on review: ignore the test using mtr's facilities
-
Sergey Petrunya authored
- Part 2. make it really work.
-
Sergey Petrunya authored
-
Sergey Petrunya authored
- Update EXPLAIN results after table elimination - mysqlslap now specifies 'Engine=' in CREATE TABLE instead of using SET storage_engine=... - For some reason, mysqltest logs "connect" command differently when PBXT is the default storage engine. This is probably a bug in mysqltest which we can't be bothered to investigate at the moment, so add --replace mysql-test/suite/pbxt/r/connect.result: Fix pbxt test suite failures: - For some reason, mysqltest logs "connect" command differently when PBXT is the default storage engine. This is probably a bug in mysqltest which we can't be bothered to investigate at the moment, so add --replace mysql-test/suite/pbxt/r/mysqlslap.result: Fix pbxt test suite failures: - mysqlslap now specifies 'Engine=' in CREATE TABLE instead of using SET storage_engine=... mysql-test/suite/pbxt/r/ps_11bugs.result: Fix pbxt test suite failures: - Update EXPLAIN results after table elimination mysql-test/suite/pbxt/r/select.result: Fix pbxt test suite failures: - Update EXPLAIN results after table elimination mysql-test/suite/pbxt/r/union.result: Fix pbxt test suite failures: - Update EXPLAIN results after table elimination mysql-test/suite/pbxt/t/connect.test: Fix pbxt test suite failures: - For some reason, mysqltest logs "connect" command differently when PBXT is the default storage engine. This is probably a bug in mysqltest which we can't be bothered to investigate at the moment, so add --replace
-
unknown authored
-
Arjen Lentz authored
-
unknown authored
-
unknown authored
-
unknown authored
-
unknown authored
-
- 06 Oct, 2009 4 commits