- 11 Mar, 2014 2 commits
-
-
Michael Widenius authored
-
Michael Widenius authored
extra/replace.c: Removed compiler warning sql/unireg.cc: Removed compiler warning storage/maria/ma_blockrec.c: Removed compiler warning storage/maria/ma_dynrec.c: Fixed compiler failure storage/maria/ma_unique.c: Removed compiler warning storage/myisam/mi_check.c: Removed compiler warning storage/myisam/mi_checksum.c: Removed compiler warning
-
- 10 Mar, 2014 1 commit
-
-
Michael Widenius authored
Fixed MDEV-5724 "Server crashes on SQL select containing more group by and left join statements using innodb tables" The problem was that a big record was allocated on the stack, which casued stack to run out. Fixed by using my_safe_alloca() instead of my_alloca() when allocating records. Now only records <= 16384 are allocated on the stack. mysql-test/r/stack-crash.result: Added test case mysql-test/t/stack-crash.test: Added test case storage/maria/ma_blockrec.c: Use my_safe_alloca() instead of my_alloca() storage/maria/ma_dynrec.c: Use my_safe_alloca() instead of my_alloca() storage/maria/maria_def.h: Added MARIA_MAX_RECORD_ON_STACK storage/maria/maria_pack.c: Use my_safe_alloca() instead of my_alloca()
-
- 04 Mar, 2014 9 commits
-
-
Sergey Petrunya authored
- MariaDB-5.5 part of the fix: since we can't easily fix query optimization for I_S tables, run the affected-tablespaces query with semijoin=off. It happens to have a good query plan with that setting. [This is a forward-port to MariaDB 10.0]
-
Sergey Petrunya authored
-
unknown authored
Patch from Tomas Matejicek Add missing error code to is_networ_error(), to allow slave to automatically attempt reconnection also in this case.
-
unknown authored
Patch from Tomas Matejicek Add missing error code to is_networ_error(), to allow slave to automatically attempt reconnection also in this case.
-
unknown authored
-
Sergey Petrunya authored
- MariaDB-5.5 part of the fix: since we can't easily fix query optimization for I_S tables, run the affected-tablespaces query with semijoin=off. It happens to have a good query plan with that setting.
-
unknown authored
The problem was when a GTID event was part of a group commit, and so contained a commit id. The code that replaces GTID with a BEGIN event for old slaves did not correctly handle this case. Fix the code so that the GTID with commit id can also be properly replaced with a BEGIN query event. The extra two bytes are in the BEGIN event replaced with a dummy, empty time zone string.
-
Sergey Petrunya authored
- Make do_fill_table() use join_tab->cache_select->cond if it is present. When join_tab->cache_select->cond is present, join_tab->select_cond doesn't have any conditions that are usable for I_S optimizations.
-
unknown authored
Older master has no GTID events, so such events are not available for deciding on scheduling of event groups and so on. With this patch, we run such events from old masters single-threaded, in the sql driver thread. This seems better than trying to make the parallel code handle the data from older masters; while possible, this would require a lot of testing (as well as possibly some extra overhead in the scheduling of events), which hardly seems worthwhile.
-
- 03 Mar, 2014 2 commits
-
-
Sergey Petrunya authored
- Fix valgrind failure: make test_if_order_by_key() account for extended keys feature.
-
unknown authored
With parallel replication, there can be any number of events queued on in-memory lists in the worker threads. For normal STOP SLAVE, we want to skip executing any remaining events on those lists and stop as quickly as possible. However, for START SLAVE UNTIL, when the UNTIL position is reached in the SQL driver thread, we must _not_ stop until all already queued events for the workers have been executed - otherwise we would stop too early, before the actual UNTIL position had been completely reached. The code did not handle UNTIL correctly, stopping too early due to not executing the queued events to completion. Fix this, and also implement that an explicit STOP SLAVE in the middle (when the SQL driver thread has reached the UNTIL position but the workers have not) _will_ cause an immediate stop.
-
- 27 Feb, 2014 5 commits
-
-
Igor Babaev authored
After constant row substitution some field items become constant items. The range analyzer should take into account this fact when looking for ranges.
-
Alexey Botchkov authored
-
Alexey Botchkov authored
That error 'Can't open the pid file' leads to mysqld crash signal 11 in mysql_audit_general() called with the 'thd' parameter set to NULL. That wasn't checked when the thd->db and thd->db_length were accessed. Fixed by checking for the NULL thd.
-
Sergey Petrunya authored
-
Sergey Petrunya authored
-
- 26 Feb, 2014 5 commits
-
-
unknown authored
-
unknown authored
Clean up and improve the parallel implementation code, mainly related to scheduling of work to threads and handling of stop and errors. Fix a lot of bugs in various corner cases that could lead to crashes or corruption. Fix that a single replication domain could easily grab all worker threads and stall all other domains; now a configuration variable --slave-domain-parallel-threads allows to limit the number of workers. Allow next event group to start as soon as previous group begins the commit phase (as opposed to when it ends it); this allows multiple event groups on the slave to participate in group commit, even when no other opportunities for parallelism are available. Various fixes: - Fix some races in the rpl.rpl_parallel test case. - Fix an old incorrect assertion in Log_event iocache read. - Fix repeated malloc/free of wait_for_commit and rpl_group_info objects. - Simplify wait_for_commit wakeup logic. - Fix one case in queue_for_group_commit() where killing one thread would fail to correctly signal the error to the next, causing loss of the transaction after slave restart. - Fix leaking of pthreads (and their allocated stack) due to missing PTHREAD_CREATE_DETACHED attribute. - Fix how one batch of group-committed transactions wait for the previous batch before starting to execute themselves. The old code had a very complex scheduling where the first transaction was handled differently, with subtle bugs in corner cases. Now each event group is always scheduled for a new worker (in a round-robin fashion amongst available workers). Keep a count of how many transactions have started to commit, and wait for that counter to reach the appropriate value. - Fix slave stop to wait for all workers to actually complete processing; before, the wait was for update of last_committed_sub_id, which happens a bit earlier, and could leave worker threads potentially accessing bits of the replication state that is no longer valid after slave stop. - Fix a couple of places where the test suite would kill a thread waiting inside enter_cond() in connection with debug_sync; debug_sync + kill can crash in rare cases due to a race with mysys_var_current_mutex in this case. - Fix some corner cases where we had enter_cond() but no exit_cond(). - Fix that we could get failure in wait_for_prior_commit() but forget to flag the error with my_error(). - Fix slave stop (both for normal stop and stop due to error). Now, at stop we pick a specific safe point (in terms of event groups executed) and make sure that all event groups before that point are executed to completion, and that no event group after start executing; this ensures a safe place to restart replication, even for non-transactional stuff/DDL. In error stop, make sure that all prior event groups are allowed to execute to completion, and that any later event groups that have started are rolled back, if possible. The old code could leave eg. T1 and T3 committed but T2 not, or it could even leave half a transaction not rolled back in some random worker, which would cause big problems when that worker was later reused after slave restart. - Fix the accounting of amount of events queued for one worker. Before, the amount was reduced immediately as soon as the events were dequeued (which happens all at once); this allowed twice the amount of events to be queued in memory for each single worker, which is not what users would expect. - Fix that an error set during execution of one event was sometimes not cleared before executing the next, causing problems with the error reporting. - Fix incorrect handling of thd->killed in worker threads.
-
Elena Stepanova authored
-
Jan Lindström authored
file storage. Analysis: posix_fallocate was called using 0 as offset and len as desired size. This is not optimal for SSDs. Fix: Call posix_fallocate with correct offset i.e. current file size and extend the file from there len bytes.
-
Jan Lindström authored
on debug build when innodb_use_fallocate=1 Analysis: There was merge error that caused additional call to fil_node_complete_io. Fixed by removing incorrect call and fixed calculation of extended file size.
-
- 25 Feb, 2014 4 commits
-
-
Sergey Petrunya authored
-
Sergey Petrunya authored
- Make is_key_scan_ror() take into account the existence of extended keys.
-
Sergei Golubchik authored
-
Sergey Petrunya authored
-
- 24 Feb, 2014 2 commits
-
-
Sergey Petrunya authored
- Change the default flag value to ON. - Update the testcases to be run extended_keys=ON: = trivial test result updates = If extended_keys setting makes a difference for a testcase, run the testcase with extended_keys=off. There were only a few such cases - Update to vcol_select_innodb looks like a worse plan but it will be gone in 10.0.
-
Alexey Botchkov authored
-
- 22 Feb, 2014 1 commit
-
-
Sergei Golubchik authored
-
- 21 Feb, 2014 2 commits
-
-
Sergei Golubchik authored
-
Igor Babaev authored
update_used_tables for the the where condition to update cached indicators of constant subexpressions. It should be done before further possible simplification of the where condition. This change caused simplification of the executed where conditions in many test cases.
-
- 20 Feb, 2014 3 commits
-
-
Sergei Golubchik authored
-
Sergei Golubchik authored
-
Sergei Golubchik authored
In ::position() federated needs to know an element before the current ("data_cursor") in the single-linked list. Replace list traversal for every ::position() call (which is O(n^2)) with remembering the current element before it's advanced by mysql_fetch_row(). storage/federatedx/federatedx_io_mysql.cc: mdev:5698
-
- 19 Feb, 2014 4 commits
-
-
Sergei Golubchik authored
Use 20-year ssl certificates for mysql-test from RedHat patch
-
Sergei Golubchik authored
On fedora: 1. provide/obsoleve mariadb-* packages 2. MariaDB-common conflicts with mariadb-libs (on filesystem level), but does not provide or obsolete it.
-
Sergei Golubchik authored
* readability fixes * CPackRPM wrapper to fix property leakage between components (cmake bug 13248)
-
Sergei Golubchik authored
might end up having the same query id
-