- 11 Feb, 2014 2 commits
-
-
Michael Widenius authored
-
unknown authored
As a side-effect of purge_relay_logs(), sql_slave_skip_counter was silently ignored in GTID mode. But sql_slave_skip_counter in fact is not a good match with GTID. And it is not really needed either, as users can explicitly set @@gtid_slave_pos to skip specific GTIDs, in a way that matches well how GTID replication works. So with this patch, we give an error on attempts to set sql_slave_skip_counter when using GTID, with a suggestion to use gtid_slave_pos instead, if needed.
-
- 10 Feb, 2014 2 commits
- 09 Feb, 2014 1 commit
-
-
unknown authored
Fix a race in test case rpl_gtid_basic. include/sync_with_master_gtid.inc got confused due to two different GTIDs both with the same seq_no=9.
-
- 08 Feb, 2014 3 commits
-
-
unknown authored
The problem is a deadlock between MYSQL_BIN_LOG::reset_logs() and MYSQL_BIN_LOG::mark_xid_done(). The former takes LOCK_log and waits for the latter to complete. But the latter also tries to take LOCK_log; this can lead to a deadlock. There was already code that tries to deal with this, with the flag reset_master_pending. However, there was still a small opportunity for deadlock, when an previous mark_xid_done() is still running when reset_logs() is called and is at the precise point where it first releases LOCK_xid_list and then re-aquires both LOCK_log and LOCK_xid_list. Solve by setting reset_master_pending in reset_logs() before taking LOCK_log. And also count how many invocations of LOCK_xid_list are in the progress of releasing and re-aquiring locks, and in reset_logs() wait for that number to drop to zero after setting reset_master_pending and before taking LOCK_log.
-
unknown authored
Rewrite the gtid_waiting::wait_for_gtid() function. The code was rubbish (and buggy). Now the logic is much clearer. Also fix a missing slave sync that could cause test failure.
-
unknown authored
Couple of small fixes following buildbot testing.
-
- 07 Feb, 2014 2 commits
-
-
unknown authored
Some GTID test cases were using include/wait_condition.inc with a condition like SELECT COUNT(*)=4 FROM t1 to wait for the slave to catch up with the master. This causes races and test failures, as the changes to the tables become visible at the COMMIT of the SQL thread (or even before in case of MyISAM), but the changes to @@gtid_slave_pos only become visible a little bit after the COMMIT. Now that we have MASTER_GTID_WAIT(), just use that to sync up in a GTID-friendly way, wrapped in nice include/save_master_gtid.inc and include/sync_with_master_gtid.inc scripts.
-
unknown authored
MASTER_GTID_WAIT() is similar to MASTER_POS_WAIT(), but works with a GTID position rather than an old-style filename/offset. @@LAST_GTID gives the GTID assigned to the last transaction written into the binlog. Together, the two can be used by applications to obtain the GTID of an update on the master, and then do a MASTER_GTID_WAIT() for that position on any read slave where it is important to get results that are caught up with the master at least to the point of the update. The implementation of MASTER_GTID_WAIT() is implemented in a way that tries to minimise the performance impact on the SQL threads, even in the presense of many waiters on single GTID positions (as from @@LAST_GTID).
-
- 31 Jan, 2014 1 commit
-
-
Alexander Barkov authored
SET(CMAKE_INCLUDE_DIRECTORIES_PROJECT_BEFORE ON) to find header files from the bundled libraries (jemalloc, yassl, readline, pcre, etc) before the ones installed in the system.
-
- 08 Jan, 2014 1 commit
-
-
unknown authored
The problem was a race between the SQL driver thread and the worker threads. The SQL driver thread would set rli->last_master_timestamp to zero to mark that it has caught up with the master, while the worker threads would set it to the timestamp of the executed event. This can happen out-of-order in parallel replication, causing the "caught up" status to be overwritten and Seconds_Behind_Master to wrongly grow when the slave is idle. To fix, introduce a separate flag rli->sql_thread_caught_up to mark that the SQL driver thread is caught up. This avoids issues with worker threads overwriting the SQL driver thread status. In parallel replication, we then make SHOW SLAVE STATUS check in addition that all worker threads are idle before showing Seconds_Behind_Master as 0 due to slave idle.
-
- 05 Feb, 2014 2 commits
-
-
unknown authored
-
Elena Stepanova authored
appears to be unset, or when it contains 'root' even though the user does not have real root permissions
-
- 03 Feb, 2014 1 commit
-
-
Alexander Barkov authored
-
- 31 Jan, 2014 3 commits
-
-
Sergei Golubchik authored
-
Sergei Golubchik authored
-
Elena Stepanova authored
-
- 28 Jan, 2014 9 commits
-
-
unknown authored
-
unknown authored
Set of JOIN_TYPE_OUTER made only once to avoid interference with optimization joins which made only once per query.
-
Sergei Golubchik authored
-
Sergei Golubchik authored
-
Sergei Golubchik authored
-
Sergei Golubchik authored
-
Alexander Barkov authored
on server shutdown after SELECT with CONVERT_TZ It's wrong to return my_empty_string from val_str(). Removing my_empty_string. Using make_empty_result() instead.
-
Sergey Vojtovich authored
INSTALL PLUGIN There was mixed lock order between LOCK_plugin, LOCK_global_system_variables and LOCK_system_variables_hash. This patch ensures that write-lock on LOCK_system_variables_hash doesn't intersect with LOCK_plugin. Fixed by moving initialization/deinitialization of plugin options from plugin_add()/plugin_del() to plugin_initialize()/plugin_deinitalize(). So that plugin options are handled without protection of LOCK_plugin.
-
Alexander Barkov authored
-
- 27 Jan, 2014 5 commits
-
-
Sergei Golubchik authored
-
Sergei Golubchik authored
add patch as a "suggested" dependency to mariadb-test-5.5
-
Sergei Golubchik authored
if two threads were calling mi_assign_to_key_cache() for the same table, one could change share->key_cache while the other was having share->key_cache->op_lock locked. The other thread would crash then, trying to unlock share->key_cache->op_lock (because it would be a different mutex). fixed by caching the value of share->key_cache in a local variable. The thread can still call flush_key_blocks() for an unassigned keycache, but it's harmless.
-
Sergei Golubchik authored
-
Alexander Barkov authored
Assertion `mon > 0 && mon < 13' failed.'
-
- 26 Jan, 2014 8 commits
-
-
Sergei Golubchik authored
-
Sergei Golubchik authored
in some VMs readline thinks that the window size is zero. ignore it.
-
Sergei Golubchik authored
MDEV-5461 Assertion `length <= column->length' fails in write_block_record with functions in select list, GROUP BY, ORDER BY Old code in create_tmp_table(), that created an extra one-byte field (recinfo) before every NULL-able grouping field (Field) in the tmp table, did not actually work. Because the matching code in end_update(), that was supposed to update this byte, was using a wrong offset, updating the first byte of the Field, not a byte before it. Normally this wasn't an issue, because the Field value (written later in end_update) was overwriting this byte anyway. But in this bug the Field was Field_null, with zero length, so end_update() was overwriting the first byte of the following field. And the following field was not-nullable constant, which was stored only once in create_tmp_table and never updated later. Fixed by removing the code that didn't do any useful work anyway.
-
Sergei Golubchik authored
-
Sergei Golubchik authored
-
Michael Widenius authored
Added variable "OLD_MODE" that can be used to turn off the new behavior mysql-test/r/insert.result: Added test case mysql-test/r/mysqld--help.result: Added old_mode mysql-test/suite/sys_vars/r/old_mode_basic.result: Added testing of new variable mysql-test/suite/sys_vars/t/old_mode_basic.test: Added testing of new variable mysql-test/t/insert.test: Added test case sql/sql_class.h: Added bit flags for OLD_MODE sql/sql_insert.cc: Disable duplicate key warnings for INSERT IGNORE of OLD_MODE NO_DUP_KEY_WARNINGS_WITH_IGNORE is used sql/sql_show.cc: Don't show progress reporting on SHOW PROCESSLIST if OLD_MODE NO_PROGRESS_INFO is used sql/sys_vars.cc: Added OLD_MODE
-
Michael Widenius authored
sql/item.h: Added cache for setup_natural_join_row_types sql/sql_base.cc: Cache old value of first_name_resolution_table for next call. (It's not safe to try to recalculate the value as the join structure may have been changed by the optimizer)
-
Michael Widenius authored
Added test cases mysql-test/r/mysql_tzinfo_to_sql_symlink.result: Updated results mysql-test/std_data/zoneinfo/garbage: test file mysql-test/std_data/zoneinfo/ignored.tab: test file mysql-test/t/mysql_tzinfo_to_sql_symlink.test: Added test cases for all options sql/tztime.cc: Better error messages. Fixed wrong place for 'continue'
-