Commit graph

373 commits

Author SHA1 Message Date
Marko Mäkelä
0436a0ff3c Merge bb-10.2-ext into 10.3 2017-12-19 17:28:22 +02:00
Marko Mäkelä
028e91f380 Merge 10.2 into bb-10.2-ext 2017-12-19 17:12:14 +02:00
Marko Mäkelä
8d70097c21 Merge 10.1 to 10.2
Follow-up fix to MDEV-14008: Let Field_double::val_uint() silently
return 0 on error
2017-12-19 16:48:28 +02:00
Alexey Botchkov
6ee9cba745 MDEV-10486 MariaDB 10.x does not update rows_examined in performance_schema tables.
Save the rows_examined counter before it gets emptied.
2017-12-18 15:21:50 +04:00
Marko Mäkelä
34841d2305 Merge bb-10.2-ext into 10.3 2017-12-12 09:57:17 +02:00
Monty
c2118a08b1 Move all kill mutex protection to LOCK_thd_kill
LOCK_thd_data was used to protect both THD data and
ensure that the THD is not deleted while it was in use

This patch moves the THD delete protection to LOCK_thd_kill,
which already protects the THD for kill.

The benefits are:
- More well defined what LOCK_thd_data protects
- LOCK_thd_data usage is now much simpler and easier to verify
- Less chance of deadlocks in SHOW PROCESS LIST as there is less
  chance of interactions between mutexes
- Remove not needed LOCK_thread_count from
  thd_get_error_context_description()
- Fewer mutex taken for thd->awake()

Other things:
- Don't take mysys->var mutex in show processlist to check if thread
  is kill marked
- thd->awake() now automatically takes the LOCK_thd_kill mutex
  (Simplifies code)
- Apc uses LOCK_thd_kill instead of LOCK_thd_data
2017-12-08 13:46:23 +02:00
Marko Mäkelä
a48aa0cd56 Merge bb-10.2-ext into 10.3 2017-11-10 16:12:45 +02:00
Monty
c9f612dbde Add more execution stages (commit, rollback, etc)
This was done to get more information about where time is spent.
Now we can get proper timing for time spent in commit, rollback,
binlog write etc.

Following stages was added:
- Commit
- Commit_implicit
- Rollback
- Rollback implicit
- Binlog write
- Init for update
  - This is used instead of "Init" for insert, update and delete.
- Staring cleanup

Following stages where changed:
- "Unlocking tables" stage reset stage to previous stage at end
- "binlog write" stage resets stage to previous stage at end
- "end" -> "end of update loop"
- "cleaning up" -> "Reset for next command"
- Added stage_searching_rows_for_update when searching for rows
  to be deleted.

Other things:
- Renamed all stages to start with big letter (before there was no
  consitency)
- Increased performance_schema_max_stage_classes from 150 to 160.
- Most of the test changes in performance schema comes from renaming of
  stages.
- Removed duplicate output of variables and inital state in a lot of
  performance schema tests.
  This was done to make it easier to change a default value for a
  performance variable without affecting all tests.
- Added start_server_variables.test to check configuration
- Removed some duplicate "closing tables" stages
- Updated position for "stage_init_update" and "stage_updating" for
  delete, insert and update to be just before update loop (for more
  exact timing).
- Don't set "Checking permissions" twice in a row.
- Remove stage_end stage from creating views (not done for create table
  either).
- Updated default performance history size from 10 to 20 because of new
  stages
- Ensure that ps_enabled is correct (to be used in a later patch)
2017-11-05 22:23:31 +02:00
Alexander Barkov
5d3ed9acdd (Part#2) MDEV-13049 Querying INFORMATION_SCHEMA becomes slow in MariaDB 10.1
This is a 10.3 specific part of MDEV-13049.
It disables automatic sorting for
"SELECT .. FROM INFORMATION_SCHEMA.{SCHEMATA|TABLES}"
and adjusts the affected tests accordingly.
2017-10-31 13:00:20 +04:00
Sergei Golubchik
cb1e76e4de Merge branch '10.1' into 10.2 2017-08-17 11:38:34 +02:00
Sergei Golubchik
e95d65d7d0 fix sporadic failures of perfschema.privilege_table_io
it used to fail if main.create_drop_role was run before it
2017-08-08 09:56:10 +02:00
Vicențiu Ciorbaru
786ad0a158 Merge remote-tracking branch 'origin/5.5' into 10.0 2017-07-25 00:41:54 +03:00
Alexander Barkov
d023156782 MDEV-8692 prefschema test failures on ARM (on Debian build system)
A few tests assumes that the CYCLE timer is always available,
which is not true on some platforms (e.g. ARM).
Fixing the tests not to reply on the CYCLE availability.
2017-07-17 12:34:58 +02:00
Sergei Golubchik
f6633bf058 Merge branch '10.1' into 10.2 2017-07-05 19:08:55 +02:00
Sergei Golubchik
d4007f2e73 disable getopt prefix matching in mtr bootstrap
it was disabled in mtr tests in 4280b25ed8
2017-06-22 12:56:33 +02:00
Marko Mäkelä
2d8fdfbde5 Merge 10.1 into 10.2
Replace have_innodb_zip.inc with innodb_page_size_small.inc.
2017-06-08 12:45:08 +03:00
Elena Stepanova
994a5f29f1 On a build without performance schema the test failed
performance-schema options in option files should be loose. The tests
will be skipped after have_perfschema.inc check, but if options aren't
loose, the failure happens on server startup, before the check
2017-05-26 19:53:29 +03:00
Marko Mäkelä
8f643e2063 Merge 10.1 into 10.2 2017-05-23 11:09:47 +03:00
Marko Mäkelä
65e1399e64 Merge 10.0 into 10.1
Significantly reduce the amount of InnoDB, XtraDB and Mariabackup
code changes by defining pfs_os_file_t as something that is
transparently compatible with os_file_t.
2017-05-20 08:41:20 +03:00
Vicențiu Ciorbaru
f1861297f0 Merge branch 'merge-perfschema-5.6' into 10.0 2017-05-16 14:07:50 +03:00
Vicențiu Ciorbaru
24ff179311 5.6.36 2017-05-16 13:53:15 +03:00
Sergei Golubchik
da4d71d10d Merge branch '10.1' into 10.2 2017-03-30 12:48:42 +02:00
Sergei Golubchik
bbf0c9d4c3 cleanup: pfs_upgrade* tests 2017-03-21 11:37:31 +01:00
Marko Mäkelä
adc91387e3 Merge 10.0 into 10.1 2017-03-03 13:27:12 +02:00
Sergey Vojtovich
71f53bf72d MDEV-11221 - main.events_restart failed in bb
This is an addition to original fix. Buildbot revealed another sporadic failure
in perfschema.threads_mysql test. Tests relies on data stored in
performance_schema.threads, while performing waits on
information_schema.processlist. These tables are not updated synchronously.

Fixed by performing waits on performance_schema.threads instead.
2017-03-02 12:35:31 +04:00
Nirbhay Choubey
8b2e642aa2 MDEV-7635: Update tests to adapt to the new default sql_mode 2017-02-10 06:30:42 -05:00
Marko Mäkelä
2e67e66c3a Merge 10.0 into 10.1 2017-02-08 08:53:34 +02:00
Elena Stepanova
c46d140961 MDEV-11764 perfschema.table_name fails in buildbot
There is only one select that returns a result set in this test.
It needs to be sorted
2017-02-01 02:12:35 +02:00
Monty
1afb17047a Fixed bugs found by mysql-test-run:
- privilege_table_io.test didn't properly reset roles_mapping
- Fixed memory allocation problem with CHECK CONSTRAINT, found when
  running --valgrind main.check_constraint
2017-01-11 09:18:35 +02:00
Sergei Golubchik
4a5d25c338 Merge branch '10.1' into 10.2 2016-12-29 13:23:18 +01:00
Sergei Golubchik
66d9696596 Merge branch '10.0' into 10.1 2016-09-28 17:55:28 +02:00
Sergei Golubchik
e3124a8cd7 5.6.33 2016-09-27 17:57:28 +02:00
Sergei Golubchik
77ce4ead81 Merge branch '5.5' into 10.0 2016-09-27 09:21:19 +02:00
Sergei Golubchik
d876f4bd5e disable session_track_schema for perfschema.socket_summary_by_instance_func
because it counts number of bytes sent and expects it to be independent
from the database name length
2016-09-21 13:20:24 +02:00
Sergei Golubchik
7ae555c114 Merge branch 'mysql/5.5' into 5.5
80% reverted
2016-09-11 20:51:09 +02:00
Monty
bbfb5d7c74 Fixed failures for privilege_table_io and wsrep_cluster_address_basic
- Sometimes privilege_table_io printed double rows of roles_mapping
  - Fixed by forcing restart of server when running test
- Wsrep_cluster_address_basic failed in some combinations because
  wsrep_cluster_address was set to NULL
  - Fixed by ensuring it's never set to NULL, only empty string
2016-08-29 20:33:25 +03:00
Sergei Golubchik
15f60c1a73 5.7.13 2016-07-28 15:52:12 +02:00
Christopher Powers
6986645c79 Bug#14111584 PB2: PERFSCHEMA.AGGREGATE FAILS ON PB2 SPORADICALLY
Permanently removed test case perfschema.aggregate.

The Performance Schema is generally lock-free, allowing for
race conditions that might arise from multi-threaded operation
which occasionally results in temporary and/or minor variances
when aggregating statistics. This test needs to be redesigned
to accommodate such variances.
2016-06-30 20:42:29 +02:00
Sergei Golubchik
932646b1ff Merge branch '10.1' into 10.2 2016-06-30 16:38:05 +02:00
Sergei Golubchik
3361aee591 Merge branch '10.0' into 10.1 2016-06-28 22:01:55 +02:00
Sergei Golubchik
61a880d02c Merge branch 'merge-perfschema-5.6' into 10.0 2016-06-21 15:47:55 +02:00
Sergei Golubchik
72d23896d6 5.6.30 2016-04-26 19:06:20 +02:00
Sergey Vojtovich
282497dd6d MDEV-6720 - enable connection log in mysqltest by default 2016-03-31 10:11:16 +04:00
Sergei Golubchik
f67a2211ec Merge branch '10.1' into 10.2 2016-03-23 22:36:46 +01:00
Monty
06b4556452 Fixed failures from changing values of thread_stack and thread_cache_size
Added --thread_cache_size=0 to some tests that was depending on not having
a thread cache.
2016-03-23 15:11:30 +02:00
Sergei Petrunia
dfa22c5d39 Don't select 'digest' column from PERFORMANCE_SCHEMA.events_statements_history_long
Its value changes depending on the parser constants, so it changes
every time somebody makes a change in the parser
2016-03-22 18:24:09 +03:00
Sergei Golubchik
3b0c7ac1f9 Merge branch '10.0' into 10.1 2016-03-21 13:02:53 +01:00
Otto Kekäläinen
1777fd5f55 Fix spelling: occurred, execute, which etc 2016-03-04 02:09:37 +02:00
Sergei Golubchik
a5679af1b1 Merge branch '10.0' into 10.1 2016-02-23 21:35:05 +01:00
Elena Stepanova
2c79f57530 MDEV-9464 perfschema.global_read_lock fails when executed after perfschema.dml_setup_instruments
dml_setup_instruments did not restore settings in setup_instruments table
after updating it as a part of the test flow
2016-02-12 03:47:25 +02:00
Sergei Golubchik
a2bcee626d Merge branch '10.0' into 10.1 2015-12-21 21:24:22 +01:00
Sergei Golubchik
b418e97826 Merge branch 'merge/merge-perfschema-5.6' into 10.0 2015-12-13 17:19:18 +01:00
Sergei Golubchik
6bb292f1bc 5.6.28 2015-12-13 10:15:55 +01:00
Sergei Golubchik
beded7d9c9 Merge branch '10.0' into 10.1 2015-11-19 15:52:14 +01:00
Alexander Barkov
59dd58b17e MDEV-8692 prefschema test failures on ARM (on Debian build system)
A few tests assumes that the CYCLE timer is always available,
which is not true on some platforms (e.g. ARM).
Fixing the tests not to reply on the CYCLE availability.
2015-10-30 10:10:43 +04:00
Sergei Golubchik
dfb74dea30 Merge branch '10.0' into 10.1 2015-10-12 00:37:58 +02:00
Sergei Golubchik
2ca4141af1 Merge branch 'merge-perfschema-5.6' into 10.0 2015-10-09 18:24:17 +02:00
Sergei Golubchik
1b41eed5d1 5.6.27 2015-10-09 17:22:53 +02:00
Sergei Golubchik
cfeedbfd3e Merge branch '5.5' into 10.0 2015-10-09 17:12:26 +02:00
Sergei Golubchik
82e9f6d948 Merge remote-tracking branch 'mysql/5.5' into 5.5 2015-10-08 22:54:24 +02:00
Oleksandr Byelkin
e3982cead2 MDEV-6066: Merge new defaults from 5.6 and 5.7 (defaults changed, QC can be stopped with no-zero size) 2015-09-04 10:33:56 +02:00
Sergei Golubchik
530a6e7481 Merge branch '10.0' into 10.1
referenced_by_foreign_key2(), needed for InnoDB to compile,
was taken from 10.0-galera
2015-09-03 12:58:41 +02:00
Sergei Golubchik
0a99293db3 Merge branch 'merge-perfschema-5.6' into 10.0
5.6.26
2015-08-03 16:34:59 +02:00
Sergei Golubchik
167c540048 5.6.26 2015-08-03 13:05:40 +02:00
Christopher Powers
49667f0441 Bug#21374104 SETUP_TIMERS INITIALIZATION ASSUMES CYCLE TIMER IS ALWAYS AVAILABLE
For WAIT events, fall back to other timers if CYCLE is not available.
2015-07-10 20:42:33 +02:00
Sergei Golubchik
658992699b Merge tag 'mariadb-10.0.20' into 10.1 2015-06-27 20:35:26 +02:00
Sergei Golubchik
ede08808e9 Merge branch 'merge-perfschema-5.6' into 10.0 2015-06-16 12:47:58 +02:00
Sergei Golubchik
3c3724991e 5.6.25 2015-06-16 11:00:33 +02:00
Sergei Golubchik
3288f2667a include the correct IPv6 check in perfschema tests 2015-06-15 11:07:59 +02:00
Sergei Golubchik
a453a28040 MDEV-8083 MTR is broken on systems with IPv6 disabled
disable IPv6 globally in mysql-test, only use it
in dedicated IPv6 tests (where it is enabled per-test)
2015-06-15 11:07:58 +02:00
Sergei Golubchik
5091a4ba75 Merge tag 'mariadb-10.0.19' into 10.1 2015-06-01 15:51:25 +02:00
Sergey Vojtovich
0fcc350f73 MDEV-7922 - ERROR 1939 (HY000): Engine PERFORMANCE_SCHEMA failed to discover
table

Performance schema discovery fails if connection has no active database set.

This happened due to restriction in SQL parser: table name with no database name
is ambiguous in such case.

Fixed by temporary substitution of default database with being discovered table
database.
2015-05-07 20:45:46 +04:00
Sergei Golubchik
1d3ea9ecd8 perfschema 5.6.24
including the big commit
  commit 305130361bf72726de220f3d2b2787395e10be61
  Author: Marc Alff <marc.alff@oracle.com>
  Date:   Tue Feb 10 11:31:32 2015 +0100

      WL#8354 BACKPORT DIGEST IMPROVEMENTS TO MYSQL 5.6

(with the following commits) and related changes in sql/
2015-05-05 15:23:47 +02:00
Sergei Golubchik
d71d411905 5.6.24 2015-05-04 22:16:00 +02:00
Kristian Nielsen
167332597f Merge 10.0 -> 10.1.
Conflicts:
	mysql-test/suite/multi_source/multisource.result
	sql/sql_base.cc
2015-04-17 15:18:44 +02:00
Sergey Vojtovich
6bd24deab4 MDEV-7728 - Improve xid cache scalability by using lock-free hash
XID cache is now based on lock-free hash.
Also fixed lf_hash_destroy() to call alloc destructor.

Note that previous implementation had race condition when thread was accessing
XA owned by different thread. This new implementation doesn't fix it either.
2015-03-16 19:07:51 +04:00
Elena Stepanova
6fc0a8af24 MDEV-7187 perfschema.aggregate fails sporadically in buildbot
During slow execution, e.g. under valgrind, there was a chance
that Aria checkpoint would happen while P_S tables were being
queried; it could cause different data in joined P_S, and
thus combinations of results that the test did not expect.

Fixed by disabling Aria checkpoints for the test.
2015-03-08 23:12:19 +02:00
Sergei Golubchik
4280b25ed8 --getopt-prefix-matching command-line option 2015-02-10 10:21:15 +01:00
Sergei Golubchik
4b21cd21fe Merge branch '10.0' into merge-wip 2015-01-31 21:48:47 +01:00
Sergei Golubchik
b0a8e07357 P_S 5.6.22 2015-01-21 14:53:40 +01:00
Sergei Golubchik
05c002d0ff 5.6.22 2015-01-19 00:12:51 +01:00
Sergey Vojtovich
6dbc48ca79 MDEV-7324 - Lock-free hash for table definition cache 2014-12-28 19:46:18 +04:00
Kristian Nielsen
826d7c68d2 MDEV-7342: Test failure in perfschema.setup_instruments_defaults
Fix a possible race in the test case when restarting the server.

Make sure we have disconnected before waiting for the reconnect
that signals that the server is back up. Otherwise, we may in
rare cases continue the test while the old server is shutting
down, eventually leading to "connection lost" failure.
2014-12-18 11:59:08 +01:00
Sergei Golubchik
853077ad7e Merge branch '10.0' into bb-10.1-merge
Conflicts:
	.bzrignore
	VERSION
	cmake/plugin.cmake
	debian/dist/Debian/control
	debian/dist/Ubuntu/control
	mysql-test/r/join_outer.result
	mysql-test/r/join_outer_jcl6.result
	mysql-test/r/null.result
	mysql-test/r/old-mode.result
	mysql-test/r/union.result
	mysql-test/t/join_outer.test
	mysql-test/t/null.test
	mysql-test/t/old-mode.test
	mysql-test/t/union.test
	packaging/rpm-oel/mysql.spec.in
	scripts/mysql_config.sh
	sql/ha_ndbcluster.cc
	sql/ha_ndbcluster_binlog.cc
	sql/ha_ndbcluster_cond.cc
	sql/item_cmpfunc.h
	sql/lock.cc
	sql/sql_select.cc
	sql/sql_show.cc
	sql/sql_update.cc
	sql/sql_yacc.yy
	storage/innobase/buf/buf0flu.cc
	storage/innobase/fil/fil0fil.cc
	storage/innobase/include/srv0srv.h
	storage/innobase/lock/lock0lock.cc
	storage/tokudb/CMakeLists.txt
	storage/xtradb/buf/buf0flu.cc
	storage/xtradb/fil/fil0fil.cc
	storage/xtradb/include/srv0srv.h
	storage/xtradb/lock/lock0lock.cc
	support-files/mysql.spec.sh
2014-12-02 22:25:16 +01:00
Elena Stepanova
aee7e67101 MDEV-7075 perfschema.mks_timer-6258 test not skipped on builds without perfschema
Added a call for the include file
2014-11-12 05:40:21 +04:00
Kristian Nielsen
2b4445e60e Fix test failure in perfschema.myisam_file_io when perfschema is not compiled into the server. 2014-10-20 09:36:41 +02:00
Sergei Golubchik
f62c12b405 Merge 10.0.14 into 10.1 2014-10-15 12:59:13 +02:00
Monty
cc8aed3eb7 MDEV 4427: query timeouts
Added MAX_STATEMENT_TIME user variable to automaticly kill queries after a given time limit has expired.

- Added timer functions based on pthread_cond_timedwait
- Added kill_handlerton() to signal storage engines about kill/timeout
- Added support for GRANT ... MAX_STATEMENT_TIME=#
- Copy max_statement_time to current user, if stored in mysql.user
- Added status variable max_statement_time_exceeded
- Added KILL_TIMEOUT
- Removed digest hash from performance schema tests as they change all the time.
- Updated test results that changed because of the new user variables or new fields in mysql.user

This functionallity is inspired by work done by Davi Arnaut at twitter.
Test case is copied from Davi's work.

Documentation can be found at
https://kb.askmonty.org/en/how-to-limittimeout-queries/

mysql-test/r/mysqld--help.result:
  Updated for new help message
mysql-test/suite/perfschema/r/all_instances.result:
  Added new mutex
mysql-test/suite/sys_vars/r/max_statement_time_basic.result:
  Added testing of max_statement_time
mysql-test/suite/sys_vars/t/max_statement_time_basic.test:
  Added testing of max_statement_time
mysql-test/t/max_statement_time.test:
  Added testing of max_statement_time
mysys/CMakeLists.txt:
  Added thr_timer
mysys/my_init.c:
mysys/mysys_priv.h:
  Added new mutex and condition variables
  Added new mutex and condition variables
mysys/thr_timer.c:
  Added timer functions based on pthread_cond_timedwait()
  This can be compiled with HAVE_TIMER_CREATE to benchmark agains timer_create()/timer_settime()
sql/lex.h:
  Added MAX_STATEMENT_TIME
sql/log_event.cc:
  Safety fix (timeout should be threated as an interrupted query)
sql/mysqld.cc:
  Added support for timers
  Added status variable max_statement_time_exceeded
sql/share/errmsg-utf8.txt:
  Added ER_QUERY_TIMEOUT
sql/signal_handler.cc:
  Added support for KILL_TIMEOUT
sql/sql_acl.cc:
  Added support for GRANT ... MAX_STATEMENT_TIME=#
  Copy max_statement_time to current user
sql/sql_class.cc:
  Added timer functionality to THD.
  Added thd_kill_timeout()
sql/sql_class.h:
  Added timer functionality to THD.
  Added KILL_TIMEOUT
  Added max_statement_time variable in similar manner as long_query_time was done.
sql/sql_connect.cc:
  Added handling of max_statement_time_exceeded
sql/sql_parse.cc:
  Added starting and stopping timers for queries.
sql/sql_show.cc:
  Added max_statement_time_exceeded for user/connects status in MariaDB 10.0
sql/sql_yacc.yy:
  Added support for GRANT ... MAX_STATEMENT_TIME=# syntax, to be enabled in 10.0
sql/structs.h:
  Added max_statement_time user resource
sql/sys_vars.cc:
  Added max_statement_time variables
mysql-test/suite/roles/create_and_drop_role_invalid_user_table.test
  Removed test as we require all fields in mysql.user table.
scripts/mysql_system_tables.sql
scripts/mysql_system_tables_data.sql
scripts/mysql_system_tables_fix.sql
  Updated mysql.user with new max_statement_time field
2014-10-07 11:37:36 +03:00
Michael Widenius
e167c48a9f Fixed randomly failing test 2014-09-15 23:52:40 +03:00
Jan Lindström
ab150128ce MDEV-6247: Merge 10.0-galera to 10.1.
Merged lp:maria/maria-10.0-galera up to revision 3880.

    Added a new functions to handler API to forcefully abort_transaction,
    producing fake_trx_id, get_checkpoint and set_checkpoint for XA. These
    were added for future possiblity to add more storage engines that
    could use galera replication.
2014-08-27 13:15:37 +03:00
Jan Lindström
df4dd593f2 MDEV-6247: Merge 10.0-galera to 10.1.
Merged lp:maria/maria-10.0-galera up to revision 3879.

Added a new functions to handler API to forcefully abort_transaction,
producing fake_trx_id, get_checkpoint and set_checkpoint for XA. These
were added for future possiblity to add more storage engines that
could use galera replication.
2014-08-26 15:43:46 +03:00
Sergey Vojtovich
f1c1c04a34 MDEV-4262 - P_S discovery
Discover P_S tables automatically.

Most of this patch is code clean-up:
- removed tests and code responsible for P_S tables correctness verification
- always return error from ha_perfschema::create()
- install/upgrade scripts won't create P_S tables anymore
2014-08-19 15:18:18 +04:00
Sergei Golubchik
59cea2e1bf MDEV-6258 MariaDB 10.0 performance schema timestamps relative to epoch
don't use the interval timer when absolute time values are needed
2014-06-05 09:03:55 +02:00
Sergei Golubchik
5ffe939a6c perfschema 5.6.17 2014-05-07 16:12:16 +02:00
Sergei Golubchik
f55a0a6ad2 after perfschema-mergetree merge - update tests and results 2014-05-07 10:21:58 +02:00
Sergei Golubchik
374f0751a2 null-merge from perfschema-5.6 merge tree
(only new files and small style changes are accepted)
2014-05-07 10:21:41 +02:00
Sergei Golubchik
04bce7b569 5.6.17 2014-05-07 10:04:30 +02:00
Sergei Golubchik
06d874ba90 perfschema 5.6.10 initial commit.
5.6 files
2014-05-06 23:22:16 +02:00
Sergei Golubchik
d74414399d perfschema 5.6.10 initial commit.
10.0 files
2014-05-06 23:20:50 +02:00
Sergei Golubchik
97687f2888 Fix hostcache_ipv4_blocked and hostcache_ipv6_blocked to pass.
Don't abort plugin reads whem mpvio->make_it_fail is set - this can leak information.
2014-03-26 22:32:10 +01:00
Sergey Vojtovich
e4fde57712 MDEV-5864 - Reduce usage of LOCK_open: TABLE_SHARE::tdc.free_tables
Let TABLE_SHARE::tdc.free_tables, TABLE_SHARE::tdc.all_tables,
TABLE_SHARE::tdc.flushed and corresponding invariants be protected by
per-share TABLE_SHARE::tdc.LOCK_table_share instead of global LOCK_open.
2014-03-20 11:11:13 +04:00
Sergey Vojtovich
1da6d6880b MDEV-5220 - [PATCH] MariaDB 10.0.4 doesn't compile without perfschema
Fixed the following compilation errors and test failures:
- maria SE: "stage_waiting_for_a_resource" wasn't declared w/o PFS
- sql_repl.h: PSI_mutex_key is not available in non-PFS builds
- mysqld.cc: pfs_param is not available in non-PFS builds
- mysqld.cc: init_show_explain_psi_keys() is not available in non-PFS builds
- mysqld.cc: call net_before_header_psi, net_after_header_psi even if PFS
  is not available so that thread enters stage_init at proper time. Fixes
  sp-threads and a few tests in funcs_1.
- myisam_file_io.opt: added missing loose prefix
2013-11-14 18:00:00 +04:00
Sergei Golubchik
598552db94 make mtr_check to monitor mysql.plugin table too.
fix tests to clean up properly
2013-11-02 19:49:05 +01:00
unknown
c776f5ac26 Client attributes 2013-10-03 18:00:44 +03:00
Sergei Golubchik
fcf87600a2 MDEV-4865 Change related to --log option/variable was merged partially
Complete the merge of magne.mahre@oracle.com-20101102115354-vxcaxminmzglzalk
(WL#5185 Remove deprecated 5.1 features)
2013-08-13 13:35:36 +02:00
Sergei Golubchik
b7b5f6f1ab 10.0-monty merge
includes:
* remove some remnants of "Bug#14521864: MYSQL 5.1 TO 5.5 BUGS PARTITIONING"
* introduce LOCK_share, now LOCK_ha_data is strictly for engines
* rea_create_table() always creates .par file (even in "frm-only" mode)
* fix a 5.6 bug, temp file leak on dummy ALTER TABLE
2013-07-21 16:39:19 +02:00
unknown
7ac5a1d362 MDEV-4710 Merge Performance Schema test cases from MySQL 5.6.10
Merged all perfschema tests, except for the following:
perfschema.part_table_io
perfschema.binlog_mix perfschema.binlog_row perfschema.binlog_stmt
perfschema.statement_digest_consumers perfschema.statement_digest
privilege.inc privilege.result
2013-07-10 15:30:17 +03:00
unknown
54999b2863 Merge performance schema test cases from MySQL 5.6.10
Merged the majority of the PFS test cases.
There are still 19 failing test cases that need more attention.
2013-07-08 15:19:50 +03:00
unknown
9c1285ba6c MDEV-4058
MySQL 5.6.10 performance schema: merge of the test files for the host_cache table

With this patch, all tests perfschema.hostcache_* pass.
There are still some additional unmerged minor changes to these tests
in mysql 5.6.10.
2013-07-03 22:34:12 +03:00
unknown
5f0d489da8 MDEV-4058
MySQL 5.6.10 performance schema: merge of the test files for the host_cache table
2013-07-03 12:19:03 +03:00
unknown
0e7410a154 Merge 10.0-base -> 10.0 (GTID). 2013-04-17 15:17:01 +02:00
Sergei Golubchik
a9035be5b7 10.0-base merge 2013-04-15 15:09:22 +02:00
unknown
665a31af2b MDEV-26: Global transaction ID. First alpha release.
Merge of 10.0-mdev26 feature tree into 10.0-base.

Global transaction ID is prepended to each event group in the binlog.

Slave connect can request to start from GTID position instead of specifying
file name/offset of master binlog. This facilitates easy switch to a new
master.

Slave GTID state is stored in a table mysql.rpl_slave_state, which can be
InnoDB to get crash-safe slave state.

GTID includes a replication domain ID, allowing to keep track of distinct
positions for each of multiple masters.
2013-04-15 10:55:27 +02:00
Sergei Golubchik
993ea79f2d 5.5 merge 2013-03-27 23:41:02 +01:00
unknown
d9f975d08b MDEV-26: Global transaction ID
Adjust full test suite to work with GTID.

Huge patch, mainly due to having to update .result file for all SHOW BINLOG
EVENTS and mysqlbinlog outputs, where the new GTID events pop up.

Everything was painstakingly checked to be still correct and valid .result
file updates.
2013-03-26 10:35:34 +01:00
Michael Widenius
d8986fd6c3 Speed up connection time:
-Change my_rnd() slightly to make it safer if two threads use it at the same time.
-Avoid some sprintf and strmov in vio.
-Changed thread_count to be automaticly incremented (instead of under LOCK_thread_count).
-Thread cache now uses LOCK_thread_cache instead of LOCK_thread_count.
-Moved delete thd out from LOCK_thread_count.
-Save some mysql_cond_broadcast(&COND_thread_count) calls.
-Removed call to getsockname() during connect.
-Initialize random generator without locks.

Other things:
-Fixed test cases that depends on changes for LOCK_grant
-Added thread_safe_decrement32() and thread_safe_increment32()
-Removed sql_rnd_with_mutex() and get_thread_running()
-In check_table_access() don't lock LOCK_grant if we can resolve the grant with user or db level grants (the normal case).
-Don't use a lock for setting THD->query_id.
-Fixed bug where thd->set_query_id() could be set to same value by multiple threads.

Thanks to Yoshinori Matsunobu for the benchmark of connection speed and to
Domas Mituzas for the inspiration for many of the fixes.


include/violite.h:
  Change desc to a string pointer
mysql-test/suite/perfschema/r/all_instances.result:
  Added new mutex
mysql-test/suite/perfschema/t/func_mutex.test:
  Test for LOCK_system_variables_hash instead of LOCK_grant, as LOCK_grant is not anymore always taken for SELECT's.
mysys/my_gethwaddr.c:
  More DBUG
mysys/my_rnd.c:
  Change my_rnd() slightly to make it safer if two threads use it at the same time.
sql/event_scheduler.cc:
  Changed thread_count to be automically incremented
  Moved some safe things out from LOCK_thread_count.
  Simplify deleting of THD for running thread.
sql/mysqld.cc:
  Changed thread_count to be automically incremented
  Thread cache now uses LOCK_thread_cache instead of LOCK_thread_count
  Added delete_running_thd()
  Moved delete thd out from LOCK_thread_count
  More DBUG
  Only call  mysql_cond_broadcast(&COND_thread_count) if thread_count is 0
  Removed call to getsockname() (old not anymore needed check)
sql/mysqld.h:
  Removed sql_rnd_with_mutex() (not needed anymore)
  Removed not used function get_thread_running()
  Added thread_safe_decrement32() and thread_safe_increment32()
  Simplified dec_thread_running() and inc_thread_running()
  next_query_id() should return the original value for global_query_id, not the next one.
  (Bug introduced with MySQL 5.5 merge).
sql/sql_acl.cc:
  In check_table_access() don't lock LOCK_grant if we can resolve the grant with user or db level grants (the normal case).
sql/sql_class.cc:
  Removed thd_lock_thread_count() and thd_unlock_thread_count()
  Initialize random generator without locks
  Don't use a lock for setting THD->query_id.
  (This is only accessed by thread owning the THD)
sql/sql_class.h:
  Don't use a lock for setting THD->query_id.
sql/sql_insert.cc:
  Changed thread_count to be automically incremented
sql/sql_parse.cc:
  Changed thread_count to be automically incremented
  Fixed bug where thd->set_query_id() could be set to same value by multiple threads.
vio/vio.c:
  Don't generate 'desc' with sprintf/strmov. Assign a pointer instead.
  (Good enough as this is just for debugging)
2013-03-25 11:13:42 +02:00
Sergei Golubchik
8161c6772d merge with mysql-5.5.30 minus few incorrect or not applicable changesets 2013-02-28 18:42:49 +01:00
Sergei Golubchik
ab83952f29 10.0-base merge 2013-01-31 09:48:19 +01:00
Sergei Golubchik
0af4b6c6ee 5.5 merge 2013-01-29 15:10:47 +01:00
Sergei Golubchik
d3935adf7a mysql-5.5.29 merge 2013-01-15 19:13:32 +01:00
Igor Babaev
1ef07d0845 Merge 10.0-base -> 10.0.
Also fixed a bug in sql_update.cc: the code of mysql_update() lacked
a call of set_statistics_for_table().
2013-01-10 22:33:23 -08:00
Marc Alff
cc2df0069d Bug#16060864 SEGMENTATION FAULT IN PERFORMANCE_SCHEMA WITH HISTORY SIZE 0
Before this fix, configuring the server with:
- performance_schema_events_waits_history_size=0
- performance_schema_events_waits_history_long_size=0
could cause a crash in the performance schema.

These settings to 0 are intended to be valid and supported,
and are in fact working properly in mysql 5.6 and up already.

This fix backports the code fix and test cases from mysql 5.6
to the mysql 5.5 release.
2013-01-02 11:00:55 +01:00
Marc Alff
7a84630765 Bug#16060864 SEGMENTATION FAULT IN PERFORMANCE_SCHEMA WITH HISTORY SIZE 0
Before this fix, configuring the server with:
- performance_schema_events_waits_history_size=0
- performance_schema_events_waits_history_long_size=0
could cause a crash in the performance schema.

These settings to 0 are intended to be valid and supported,
and are in fact working properly in mysql 5.6 and up already.

This fix backports the code fix and test cases from mysql 5.6
to the mysql 5.5 release.
2013-01-02 11:00:55 +01:00
Sergei Golubchik
47f5632d60 MDEV-3837 Assertion `table->read_set == &table->def_read_set' failed on updating a performance_schema table
This was failing not only for P_S, but for any engine that had
HA_PRIMARY_KEY_REQUIRED_FOR_DELETE flag set (in the tree - only P_S and federated).
Because of this flag, read_set and write_set were (possibly) changed
on update. But later the code modified these bitmaps and restored them to the default
state, losing HA_PRIMARY_KEY_REQUIRED_FOR_DELETE related changes.

sql/handler.cc:
  small optimization.
  don't change the *write* set only because all columns has to be *read*
2012-12-15 21:54:18 +01:00
Sergei Golubchik
e1f681c99b 10.0-base -> 10.0-monty 2012-10-19 20:38:59 +02:00
Sergei Golubchik
ef8dda8303 update test results in --ps-protocol
disable the test that's broken upstream
2012-10-05 12:37:22 +02:00
Sergei Golubchik
474fe6d9d9 fixes for test failures
and small collateral changes

mysql-test/lib/My/Test.pm:
  somehow with "print" we get truncated writes sometimes
mysql-test/suite/perfschema/r/digest_table_full.result:
  md5 hashes of statement digests differ, because yacc token codes are different in mariadb
mysql-test/suite/perfschema/r/dml_handler.result:
  host table is not ported over yet
mysql-test/suite/perfschema/r/information_schema.result:
  host table is not ported over yet
mysql-test/suite/perfschema/r/nesting.result:
  this differs, because we don't rewrite general log queries, and multi-statement
  packets are logged as a one entry. this result file is identical to what mysql-5.6.5
  produces with the --log-raw option.
mysql-test/suite/perfschema/r/relaylog.result:
  MariaDB modifies the binlog index file directly, while MySQL 5.6 has a feature "crash-safe binlog index" and modifies a special "crash-safe" shadow copy of the index file and then moves it over. That's why this test shows "NONE" index file writes in MySQL and "MANY" in MariaDB.
mysql-test/suite/perfschema/r/server_init.result:
  MariaDB initializes the "manager" resources from the "manager" thread, and starts this thread only when --flush-time is not 0. MySQL 5.6 initializes "manager" resources unconditionally on server startup.
mysql-test/suite/perfschema/r/stage_mdl_global.result:
  this differs, because MariaDB disables query cache when query_cache_size=0. MySQL does not
  do that, and this causes useless mutex locks and waits.
mysql-test/suite/perfschema/r/statement_digest.result:
  md5 hashes of statement digests differ, because yacc token codes are different in mariadb
mysql-test/suite/perfschema/r/statement_digest_consumers.result:
  md5 hashes of statement digests differ, because yacc token codes are different in mariadb
mysql-test/suite/perfschema/r/statement_digest_long_query.result:
  md5 hashes of statement digests differ, because yacc token codes are different in mariadb
mysql-test/suite/rpl/r/rpl_mixed_drop_create_temp_table.result:
  will be updated to match 5.6 when alfranio.correia@oracle.com-20110512172919-c1b5kmum4h52g0ni and anders.song@greatopensource.com-20110105052107-zoab0bsf5a6xxk2y are merged
mysql-test/suite/rpl/r/rpl_non_direct_mixed_mixing_engines.result:
  will be updated to match 5.6 when anders.song@greatopensource.com-20110105052107-zoab0bsf5a6xxk2y is merged
2012-09-27 20:09:46 +02:00
Marc Alff
3d7d345620 Local merge 2012-09-07 19:38:04 +02:00
Marc Alff
e5f925b066 Bug#14100113 - PERFSCHEMA.FUNC_MUTEX FAILS WITH RESULT CONTENT MISMATCH OCCASIONALLY ON PB2
Improved the robustness of the func_mutex test.
2012-09-07 11:09:22 +02:00
Marc Alff
8a2aa03bff Bug#14072995 - PERFSCHEMA.FUNC_FILE_IO FAILS WITH RESULT CONTENT MISMATCH OCASSIONALLY ON PB2
Improved the robustness of the func_file_io tests.
2012-09-07 11:07:20 +02:00
Marc Alff
f5019f97e2 Local merge 2012-09-07 19:38:04 +02:00
Marc Alff
c8f3c8de40 Bug#14100113 - PERFSCHEMA.FUNC_MUTEX FAILS WITH RESULT CONTENT MISMATCH OCCASIONALLY ON PB2
Improved the robustness of the func_mutex test.
2012-09-07 11:09:22 +02:00
Marc Alff
1480843a71 Bug#14072995 - PERFSCHEMA.FUNC_FILE_IO FAILS WITH RESULT CONTENT MISMATCH OCASSIONALLY ON PB2
Improved the robustness of the func_file_io tests.
2012-09-07 11:07:20 +02:00
Marc Alff
9bc328a41a Bug#13417440 : 63340: ARCHIVE FILE IO NOT INSTRUMENTED
WARNING

This patch is for mysql-5.5 only,
to be null-merged to mysql-5.6 and mysql-trunk.

This is a partial rollback of the file io instrumentation,
removing the instrumentation for mysql_file_stat in the archive engine.

See the bug comments for details.
2012-08-24 10:01:59 +02:00
Marc Alff
30f8c145d2 Bug#13417440 : 63340: ARCHIVE FILE IO NOT INSTRUMENTED
WARNING

This patch is for mysql-5.5 only,
to be null-merged to mysql-5.6 and mysql-trunk.

This is a partial rollback of the file io instrumentation,
removing the instrumentation for mysql_file_stat in the archive engine.

See the bug comments for details.
2012-08-24 10:01:59 +02:00
Igor Babaev
822e5da0d0 Merge 5.5->5.5-mwl248 2012-08-14 12:42:14 -07:00
Michael Widenius
60589aeee0 Next part of merge. See TODO for details 2012-08-14 17:23:34 +03:00
Sergei Golubchik
d11829654c merge with MySQL 5.5.27
manually checked every change, reverted incorrect or stupid changes.
2012-08-09 17:22:00 +02:00
Igor Babaev
47fae7f08f Added procedures to delete records by keys from statistical tables.
Now when a table is dropped the statistics on the table is removed 
from the statistical tables. If the table is altered in such a way
that a column is dropped or the type of the column is changed then
statistics on the column is removed from the table column_stat.
It also triggers removal of the statistics on the indexes who use
this column as its component.

Added procedures that changes the names of the tables or columns
in the statistical tables for. 
These procedures are used when tables/columns are renamed.

Also partly re-factored the code that introduced the persistent
statistical tables.

Added test cases into statistics.test to cover the new code.
2012-07-10 16:34:39 -07:00
Mayank Prasad
608c2c018e Bug#13417440 : 63340: ARCHIVE FILE IO NOT INSTRUMENTED
Details:
 - Modified test case to make sure its run for all and not only
   for archive Storage Engine.
2012-07-03 09:55:51 +05:30
Mayank Prasad
9f4f06996b Bug#13417440 : 63340: ARCHIVE FILE IO NOT INSTRUMENTED
Details:
 - Modified test case to make sure its run for all and not only
   for archive Storage Engine.
2012-07-03 09:55:51 +05:30
Tor Didriksen
6e2ce8739c Bug#13417440 : 63340: ARCHIVE FILE IO NOT INSTRUMENTED
Followup patch: wrong result unless archive storage engine is available.
2012-06-05 12:27:20 +02:00
Tor Didriksen
25383ff615 Bug#13417440 : 63340: ARCHIVE FILE IO NOT INSTRUMENTED
Followup patch: wrong result unless archive storage engine is available.
2012-06-05 12:27:20 +02:00
Mayank Prasad
b2888adb70 PB2 Failure Fix : Disabled the test case in correct manner. 2012-05-25 15:44:27 +05:30
Mayank Prasad
1c1b16e304 PB2 Failure Fix : Disabled the test case in correct manner. 2012-05-25 15:44:27 +05:30
Mayank Prasad
efe42792b3 Bug#13417440 : 63340: ARCHIVE FILE IO NOT INSTRUMENTED
Details:
 - Archive storage engine file access were not instrumented and thus
   were not shown in PS tables.
      
Fix:
 - Added instrumentation code by using PS Apis for I/O.
2012-05-24 23:00:32 +05:30
Mayank Prasad
c678b1a994 Bug#13417440 : 63340: ARCHIVE FILE IO NOT INSTRUMENTED
Details:
 - Archive storage engine file access were not instrumented and thus
   were not shown in PS tables.
      
Fix:
 - Added instrumentation code by using PS Apis for I/O.
2012-05-24 23:00:32 +05:30
Marc Alff
be7a6d93cc Improved the test performance_schema.func_file_io,
so that investigating test failures is easier.

Detect cases when @before_count / @after_count is NULL.
2012-05-23 10:21:35 +02:00
Marc Alff
7d3ae34e75 Improved the test performance_schema.func_file_io,
so that investigating test failures is easier.

Detect cases when @before_count / @after_count is NULL.
2012-05-23 10:21:35 +02:00
Sergei Golubchik
c39877071a overlay support for mysql-test-run and mysqltest
mysql-test-run auto-disables all optional plugins.


mysql-test/include/default_client.cnf:
  no @OPT.plugindir anymore
mysql-test/include/default_mysqld.cnf:
  don't disable plugins manually - mtr can do it better
mysql-test/suite/innodb/t/innodb_bug47167.test:
  mtr now uses suite-dir as an include path
mysql-test/suite/innodb/t/innodb_file_format.test:
  mtr now uses suite-dir as an include path
mysql-test/t/partition_binlog.test:
  this test uses partitions
storage/example/mysql-test/mtr/t/source.result:
  update results. as mysqltest includes the correct overlayed include
storage/innobase/handler/ha_innodb.cc:
  the assert is wrong
2012-02-23 07:50:11 +01:00