Commit graph

77328 commits

Author SHA1 Message Date
Michael Widenius
eb75edfb2b Instead of writing "Errcode" to the log for Slave errors, use "Internal MariaDB error code"
This makes it clear that the error code has nothing to do with errno.


mysql-test/include/mtr_warnings.sql:
  Fixed suppression for new slave error messages
mysql-test/lib/My/Test.pm:
  Use 'send' instead of 'print' to avoid errors about "wrong class ... back attempt"
mysql-test/lib/v1/mtr_report.pl:
  Fixed suppression for new slave error messages
mysql-test/mysql-test-run.pl:
  Fixed suppression for new slave error messages
  Removed warning from perl 5.16.2 about arrays
mysql-test/r/flush_read_lock.result:
  Fixed suppression for new slave error messages
sql/rpl_reporting.cc:
  Instead of writing "Errcode" to the log for Slave errors, use "Internal MariaDB error code"
2013-05-03 01:54:47 +03:00
Michael Widenius
8cdb118a0a Fixed: MDEV-4352; LOAD DATA was not multi-source safe
- Calls to cleanup_load_tmpdir() could delete temporary files for another master connection
- Concurrent LOAD DATA commands from two master connections could use the same file name

Other bug fixes:
- Enlarge buffer for connection names with 'special characters' one can't store in filenames

Optimization:
- Don't do 'lower case' of connection names. We can use cmp_connection_name, where we already have the connection name in lower case.


mysql-test/suite/multi_source/load_data.result:
  Test case for MDEV-4352
mysql-test/suite/multi_source/load_data.test:
  Test case for MDEV-4352
sql/log_event.cc:
  Fixed: MDEV-4352
  - Calls to cleanup_load_tmpdir() could delete temporary files for another master connection
  - Concurrent LOAD DATA commands from two master connections could use the same file name
  
  The fix was to add the connection name (if one exists) to all slave temporary files used by LOAD DATA
sql/rpl_mi.cc:
  Enlarge buffer for connection names with 'special characters' one can't store in filenames
  Use mi->cmp_connection_name for connection file names.
sql/rpl_rli.cc:
  Use mi->cmp_connection_name for connection file names.
sql/slave.cc:
  Removed not needed empty line
sql/sql_const.h:
  Added MAX_FILENAME_MBWIDTH to be able to calculate buffer length for connection_names stored in file names
sql/sql_repl.cc:
  Use mi->cmp_connection_name for connection file names.
2013-05-03 01:50:42 +03:00
unknown
59830e1ab8 MDEV-4446: Incorrect handling of binlog checksum when searching for GTID start position in binlog
When the slave connects, the master skips binlog event groups
until it reaches the position requested by the slave. To
identify event groups, it needs to detect COMMIT events. But
this detection did not correctly handle binlog checksums, so
could incorrectly skip extra groups due to not detecting the
end of an event group.
2013-04-29 10:57:48 +02:00
unknown
ced65e21c6 Fix more failures in buildbot.
Server shutdown timeout of 10 seconds in test cases is too little for heavily
loaded test servers.

Fix innodb_bug12902967 to not fail with wrong error log output if we have
warnings about too few AIO handles for InnoDB.

Fix typo which could lead to unnecessarily replacing GTID event with dummy
event.
2013-04-25 13:25:14 +02:00
unknown
6b97512b21 Add missing check for thd->killed in mysql_binlog_send().
The slave dump thread running on the master only checked thd->killed whenever
it reached the end of a binlog file, not between events. This could
unnecessarily delay server shutdown.

This was found by code inspection while tracking down some occasional "forcing
close of thread..." errors in Buildbot. Hopefully this will fix the failures,
but the fix is correct in any case.

Also increase the wait during server shutdown, 2 seconds is a bit tight in
case of heavy I/O stall, and it seems better to delay shutdown a bit than
force-kill threads unnecessarily.

Also fix some races in test cases that restart the mysqld server. The .expect
file should be changed with --append_file, --remove_file + --write_file
creates a short window where mysqld can error out due to .expect file missing.
2013-04-24 13:05:40 +02:00
Igor Babaev
bb5b0a9f5b Merge from mwl253 2013-04-22 07:40:54 -07:00
unknown
7a565cd961 Make test working on case insensitive file system 2013-04-22 12:18:46 +03:00
Igor Babaev
d312bb0bca Merge mwl253 -> 10.0-base 2013-04-21 22:44:19 -07:00
unknown
c076f7302b Removed comparison of table names. 2013-04-22 06:46:26 +03:00
unknown
30e66dd6e7 decode_histogram fixed to show delta of the last value with maximum. 2013-04-21 22:12:57 +03:00
unknown
3fccd933dd Fix of the test suite. 2013-04-21 21:39:01 +03:00
Igor Babaev
c0034df25e Changed a test case. 2013-04-20 18:18:01 -07:00
unknown
2e830cfbc8 MDEV-4402 A function to visualize histograms data. 2013-04-20 23:30:21 +03:00
Igor Babaev
7efad6330f Merge.
Fixed a wrong result from mysqld--help.test.
2013-04-20 02:24:01 -07:00
Igor Babaev
09a1f410cb Fixed bug mdev-4406.
This bug in the code of get_column_range_cardinality() could lead to
wrong estimates of number of records in ranges for non-nullable columns.
2013-04-20 02:16:55 -07:00
unknown
1a8486a842 MDEV-4345: fixed optimizer_selectivity_sampling_limit default value. 2013-04-19 19:35:13 +03:00
unknown
c44c923156 MDEV-4345: Fixed system variables tests. 2013-04-19 18:59:46 +03:00
unknown
1baf3d7d14 Fix missing reset of debug_sync, which could cause subsequent test to fail. 2013-04-19 15:59:39 +02:00
Vladislav Vaintroub
305e3dea0d MDEV-4398 - remove incorrect fix, replace with correct one - change default to OFF for innodb_use_fallocate 2013-04-19 14:52:05 +02:00
unknown
9441e53653 MDEV-4345
Sampling of selectivity of LIKE predicate.
2013-04-18 22:22:04 +03:00
unknown
71c211d48b Fix race in test case. 2013-04-18 11:17:10 +02:00
Igor Babaev
e46341758d Merge. 2013-04-17 18:10:01 -07:00
Igor Babaev
8c71e7a383 Merge 10.0-base -> mwl253 2013-04-17 18:07:37 -07:00
Igor Babaev
ac8333e46d Fixed a typo/bug that could lead to wrong selectivity numbers for
tables retrieved by range scans.

Added comments forgotten in the previous patch.
2013-04-17 16:15:22 -07:00
Michael Widenius
8b714e507f Changed the client library to only mark memory as THREAD_SPECIFIC if one has called
mysql_options() with MYSQL_OPT_USE_THREAD_SPECIFIC_MEMORY

include/mysql.h:
  Added MYSQL_OPT_USE_THREAD_SPECIFIC_MEMORY
include/mysql.h.pp:
  Updated file
sql-common/client.c:
  Marked client memory as THREAD_SPECIFIC
sql/event_db_repository.cc:
  Fixed compiler warning
sql/slave.cc:
  Marked client memory as THREAD_SPECIFIC
storage/federatedx/federatedx_io_mysql.cc:
  Marked client memory as THREAD_SPECIFIC
storage/federatedx/ha_federatedx.cc:
  Marked client memory as THREAD_SPECIFIC
storage/sphinx/ha_sphinx.cc:
  Marked client memory as THREAD_SPECIFIC
2013-04-17 23:37:06 +03:00
Michael Widenius
8e52698580 Fixed compiler warnings and a not critical memory leak
sql/keycaches.cc:
  Added free_all_rpl_filters() to be able to free all filters at cleanup
sql/keycaches.h:
  Added prototype
sql/rpl_rli.cc:
  Fixed compiler warning
sql/slave.cc:
  Free all rpl_filters at cleanup
sql/sp.cc:
  Fixed compiler warning when not all struct elements was initialized
sql/sql_acl.cc:
  Fixed compiler warning when not all struct elements was initialized
storage/perfschema/table_events_waits.cc:
  Fixed compiler warning when not all struct elements was initialized
storage/perfschema/table_events_waits_summary.cc:
  Fixed compiler warning when not all struct elements was initialized
storage/perfschema/table_ews_global_by_event_name.cc:
  Fixed compiler warning when not all struct elements was initialized
storage/perfschema/table_file_instances.cc:
  Fixed compiler warning when not all struct elements was initialized
storage/perfschema/table_file_summary.cc:
  Fixed compiler warning when not all struct elements was initialized
storage/perfschema/table_performance_timers.cc:
  Fixed compiler warning when not all struct elements was initialized
storage/perfschema/table_setup_consumers.cc:
  Fixed compiler warning when not all struct elements was initialized
storage/perfschema/table_setup_instruments.cc:
  Fixed compiler warning when not all struct elements was initialized
storage/perfschema/table_setup_timers.cc:
  Fixed compiler warning when not all struct elements was initialized
storage/perfschema/table_sync_instances.cc:
  Fixed compiler warning when not all struct elements was initialized
storage/perfschema/table_threads.cc:
  Fixed compiler warning when not all struct elements was initialized
storage/xtradb/os/os0file.c:
  Fixed compiler warning when not all struct elements was initialized
2013-04-17 22:33:33 +03:00
unknown
43fe53acc2 Remove forgotten debug printout in test, was a bit too quick there :-( 2013-04-17 14:11:16 +02:00
unknown
02ef7e0af0 Fix that multi_source tests did not reset @@global.gtid_pos between tests. 2013-04-17 13:35:16 +02:00
unknown
585d7bbfb4 Merge 5.5->10.0-base 2013-04-17 09:39:40 +02:00
Igor Babaev
2e54ad03ad Merge 10.0-base -> mwl253 2013-04-16 10:38:24 -07:00
unknown
4656060f11 debug_sync is only available in debug build. 2013-04-16 18:52:23 +02:00
unknown
0508f766b4 Fixes for stuff seen in buildbot:
- Fix embedded build

 - Backport disable of fallocate, it creates too short ibdata1
   when used with O_DIRECT on old kernels

 - Do not disable innodb during .deb install, we need it for
   mysql.rpl_slave_state table.
2013-04-16 17:36:40 +02:00
unknown
eb95ebf917 Fix race in test case. 2013-04-16 17:33:47 +02:00
Lixun Peng
82eedf4e97 Makeing rpl_filter for each Master_info.
Users can set different repplication filter rules for each replication connection, in my.cnf or command line.
But the rules set online will not record in master.info, it means if users restart MySQL, these rules will lose.
So if users wantn't their replication filter rules lose, they should write the rules in my.cnf.

Users can set rules by 2 ways:
1. Online SET command, "SET connection_name.replication_filter_settings = rules;".
2. In my.cnf, "connection_name.replication_filter_settings = rules".

If no connection_name in my.cnf, this rule will apply for ALL replication connection.
If no connetion_name in SET statement, this rull will apply for default_connection_name.
2013-04-16 19:43:28 +08:00
unknown
58a77aafab MDEV-3882: .deb versions lower than upstream repo, causing install failure
The official Debian Wheezy MySQL packages have versions like 5.5.30+dfsg-xxx.
Such version is larger than 5.5.30-yyy, so apt prefers it.
So use instead 5.5.30+maria-yyy, which is larger and can be pulled in
automatically by apt.

Also included are a couple of fixes for test failures in buildbot.
2013-04-16 09:42:09 +02:00
Igor Babaev
aa052eeb1a Merge mwl253 -> 10.0-base 2013-04-15 22:51:18 -07:00
Igor Babaev
b12b3cae85 Added comments.
Renamed the virtual method middle_point_pos for the class Field to
pos_in_interval.
2013-04-15 22:43:07 -07:00
Igor Babaev
f4cd2b37b1 Merge 10.0-base -> mwl253 2013-04-15 09:16:54 -07:00
Igor Babaev
ab10dc8faf Merge 2013-04-15 08:20:57 -07:00
Sergei Golubchik
30b2c64c4e compiler warnings 2013-04-15 11:19:39 +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
Elena Stepanova
491047a247 MDEV-4394 Part IIa (missing wait condition for IO thread status in info_logs) 2013-04-15 04:13:26 +04:00
Elena Stepanova
f6d2bb168a MDEV-4394 Part II (missing wait condition for IO thread status) 2013-04-15 03:27:21 +04:00
Michael Widenius
757a6b4357 Fixed MDEV-4394 Sporadic failures in multi_source tests
Fixed MDEV-4033 Unable to use slave's temporary directory /tmp - Can't create/write to file '/tmp/SQL_LOAD-' (Errcode: 17 "File exists")
- Cache value of check_temp_dir() to avoid race condition
- Set $rpl_server_count to avoid error in show_rpl_debug_info.inc

mysql-test/suite/multi_source/info_logs.test:
  Set $rpl_server_count
mysql-test/suite/multi_source/multisource.test:
  Set $rpl_server_count
mysql-test/suite/multi_source/relaylog_events.test:
  Set $rpl_server_count
mysql-test/suite/multi_source/reset_slave.test:
  Set $rpl_server_count
mysql-test/suite/multi_source/simple.test:
  Set $rpl_server_count
mysql-test/suite/multi_source/skip_counter.test:
  Set $rpl_server_count
mysql-test/suite/multi_source/status_vars.test:
  Set $rpl_server_count
sql/slave.cc:
  Cache value of check_temp_dir() to avoid race condition
2013-04-14 18:30:05 +03:00
Sergei Golubchik
fc17efc297 compiler warnings 2013-04-14 16:48:16 +02:00
Sergei Golubchik
f57ecb7786 5.5 merge 2013-04-14 10:04:07 +02:00
Sergei Golubchik
d364e64ae2 add missing tests 2013-04-14 10:00:42 +02:00
Igor Babaev
b53bf231cc Fixed compiler complains. 2013-04-13 02:36:30 -07:00
Sergey Petrunya
1fcb3336b7 Temporarily disable show_explain.test 2013-04-13 10:08:30 +01:00
Sergey Petrunya
9bfbe7fbce Merge 2013-04-13 10:01:44 +01:00