- 21 Dec, 2017 1 commit
-
-
Marko Mäkelä authored
row_log_table_apply_insert_low(), row_log_table_apply_update(): When reporting the error_key_num, only count the clustered index if it corresponds to a key in the SQL layer. The assertion failure was probably introduced by the (incomplete) MySQL 5.6.28 bug fix Bug #21364096 THE BOGUS DUPLICATE KEY ERROR IN ONLINE DDL WITH INCORRECT KEY NAME which we are improving. Side note: the fix was incorrectly merged to MySQL 5.7.10; incorrect key names will continue to be reported in MySQL 5.7.
-
- 20 Dec, 2017 4 commits
-
-
Vicențiu Ciorbaru authored
-
Varun Gupta authored
In the function make_sortkey a tmp buffer was defined and in the absence of param->tmp_buffer, tmp buffer used the sort_keys buffer. sort_keys buffer has a length defined in sort_field->length, while param->tmp_buffer is stored in param->rec_length. Make sure to use the appropriate length based on which buffer we are using otherwise we'll overflow. Also added a type cast to size_t during the calculation of the sort keys buffer size to avoid an oveflow if the buffer size exceeds 32 bits.
-
Alexander Barkov authored
An after-fix for MDEV-14008 Assertion failing: `!is_set() || (m_status == DA_OK_BULK && is_bulk_op()) Fixing an additional failure discovered after a merge to 10.2
-
Marko Mäkelä authored
The comment became stale in commit 9f57e595 which removed the parameter "flags".
-
- 19 Dec, 2017 3 commits
-
-
Simon J Mudd authored
-
Vicențiu Ciorbaru authored
Whenever we call merge_role_privileges on a role, we make use of the role->counter variable to check if all it's children have had their privileges merged. Only if all children have had their privileges merged, do we update the privileges on parent. This is done to prevent extra work. The same idea is employed during flush privileges. You only begin merging from "leaf" roles. The recursive calls will merge their parents at some point. A problem arises when we try to "re-merge" a parent. Take the following graph: {noformat} A (0) ---- C (2) ---- D (2) ---- USER / / B (0) ----/ / / E (0) --------------/ {noformat} In parentheses we have the "counter" value right before we start to iterate through the roles hash and propagate values. It represents the number of roles granted to the current role. The order in which we iterate through the roles hash is alphabetical. * First merge A, which leads to decreasing the counter for C to 1. Since C is not 0, we don't proceed with merging into C. * Second we merge B, which leads to decreasing the counter for C to 0. Now we proceed with merging into C. This leads to reducing the counter for D to 1 as part of C merge process. * Third as we iterate through the hash, we see that C has counter 0, thus we start the merge process *again*. This leads to reducing the counter for D to 0! We then attempt to merge D. * Fourth we start merging E. When E sees D as it's parent (according to the code) it attempts to reduce D's counter, which leads to overflow. Now D's counter is a very large number, thus E's privileges are not forwarded to D yet. To correct this behavior we must make sure to only start merging from initial leaf nodes.
-
Vicențiu Ciorbaru authored
When granting a role to another role, DB privileges get propagated. If the grantee had no previous DB privileges, an extra ACL_DB entry is created to house those "indirectly received" privileges. If, afterwards, DB privileges are granted to the grantee directly, we must make sure to not create a duplicate ACL_DB entry.
-
- 18 Dec, 2017 3 commits
-
-
Marko Mäkelä authored
The InnoDB background DROP TABLE queue is something that we should really remove, but are unable to until we remove dict_operation_lock so that DDL and DML operations can be combined in a single transaction. Because the queue is not persistent, it is not crash-safe. In stable versions of MariaDB, we can only try harder to drop all enqueued tables before server shutdown. row_mysql_drop_t::table_id: Replaces table_name. row_drop_tables_for_mysql_in_background(): Do not remove the entry from the list as long as the table exists. In this way, the table should eventually be dropped.
-
Sergei Golubchik authored
MDEV-14641 Incompatible key or row definition between the MariaDB .frm file and the information in the storage engine make sure that mysql_create_frm_image() and fast_alter_partition_table() use the same code to derive HA_OPTION_PACK_RECORD from create_info->row_type.
-
Alexander Barkov authored
-
- 16 Dec, 2017 1 commit
-
-
Oleksandr Byelkin authored
Correctly print separator string in single quotes.
-
- 13 Dec, 2017 5 commits
-
-
Marko Mäkelä authored
trx_rollback_active(): When aborting the rollback, free the query graph.
-
Marko Mäkelä authored
MDEV-12323 Rollback progress log messages during crash recovery are intermixed with unrelated log messages trx_roll_must_shutdown(): During the rollback of recovered transactions, report progress and check if the rollback should be interrupted because of a pending shutdown. trx_roll_max_undo_no, trx_roll_progress_printed_pct: Remove, along with the messages that were interleaved with other messages.
-
Marko Mäkelä authored
-
Marko Mäkelä authored
row_undo_step(), trx_rollback_active(): Abort the rollback of a recovered ordinary transaction if fast shutdown has been initiated. trx_rollback_resurrected(): Convert an aborted-rollback transaction into a fake XA PREPARE transaction, so that fast shutdown can proceed.
-
Marko Mäkelä authored
MDEV-13797 InnoDB may hang if shutdown is initiated soon after startup while rolling back recovered incomplete transactions trx_rollback_resurrected(): If shutdown was initiated, fake all remaining active transactions to XA PREPARE state, so that shutdown can proceed. Also, make the parameter "all" an output that will be assigned to FALSE in this case. trx_rollback_or_clean_recovered(): Remove the shutdown check (it was moved to trx_rollback_resurrected()). trx_undo_free_prepared(): Relax assertions.
-
- 08 Dec, 2017 1 commit
-
-
Alexander Barkov authored
-
- 06 Dec, 2017 1 commit
-
-
Vicențiu Ciorbaru authored
This reverts commit 7603463a. The commit itself is fine, however when disabling volatile, compiler optimizations mess up our double results due to precision differences. Revert the patch till a proper solution is found.
-
- 05 Dec, 2017 1 commit
-
-
Daniel Black authored
This was added in c7964159 but would hurt all other compilers because of Visual Studio. Hopefully this has been fixed now. Signed-off-by: Daniel Black <daniel@linux.vnet.ibm.com>
-
- 30 Nov, 2017 1 commit
-
-
Varun Gupta authored
For BIT field null_bit is not set to 0 even for a field defined as NOT NULL. So now in the function TABLE::create_key_part_by_field, if the bit field is not nullable then the null_bit is explicitly set to 0
-
- 22 Nov, 2017 1 commit
-
-
Ian Gilfillan authored
-
- 20 Nov, 2017 1 commit
-
-
Alexander Barkov authored
-
- 16 Nov, 2017 5 commits
-
-
Jan Lindström authored
Add missing instrumentation to row0ins.cc.
-
Jan Lindström authored
MariaDB adjustments to test case innodb-replace-debug. MariaDB 10.0 does not seem to be affected.
-
Jan Lindström authored
Imported missing test case from MySQL 5.7 for commit 25781c154396dbbc21023786aa3be070057d6999 Author: Annamalai Gurusami <annamalai.gurusami@oracle.com> Date: Mon Feb 24 14:00:03 2014 +0530 Bug #17604730 ASSERTION: *CURSOR->INDEX->NAME == TEMP_INDEX_PREFIX
-
Jan Lindström authored
MariaDB adjustments to test case innodb-replace-debug.
-
Jan Lindström authored
Imported missing test case from MySQL 5.7 for commit 25781c154396dbbc21023786aa3be070057d6999 Author: Annamalai Gurusami <annamalai.gurusami@oracle.com> Date: Mon Feb 24 14:00:03 2014 +0530 Bug #17604730 ASSERTION: *CURSOR->INDEX->NAME == TEMP_INDEX_PREFIX MariaDB 5.5 does not seem to be affected.
-
- 15 Nov, 2017 2 commits
-
-
Alexander Barkov authored
-
Eugene Kosov authored
-
- 14 Nov, 2017 1 commit
-
-
Oleksandr Byelkin authored
Use utf-mb4 if it is possible.
-
- 11 Nov, 2017 1 commit
-
-
Igor Babaev authored
uses alias in HAVING when sql_mode = 'ONLY_FULL_GROUP_BY' This patch corrects the patch for bug#18739: non-standard HAVING extension was allowed in strict ANSI sql mode added in 2006 by commit 4b7c4cd2. As a result of incompleteness of the fix in the above commit if a query with GROUP BY contained an aggregate function with an alias and this alias was used in the HAVING clause of the query the server reported an error when sql_mode was set to 'ONLY_FULL_GROUP_BY'.
-
- 10 Nov, 2017 2 commits
-
-
Sergei Golubchik authored
don't close stdout/stderr, redirect them to /dev/null instead. otherwise redirections like >&2 fail with "invalid file descriptor"
-
Marko Mäkelä authored
-
- 09 Nov, 2017 5 commits
-
-
Sergei Golubchik authored
MDEV-12372 mysqlbinlog --version output is the same on 10.x as on 5.5.x, and contains not only version don't print usage() for --version
-
Sergei Golubchik authored
Some tests are skipped by checks in suite.pm. It is redundant to have an sql-level run-time check in the .inc file itself. In some cases it's not only redundant, but dangerous. After one bug in 10.2 innodb.create_isl_with_direct failed to start InnoDB, but the server started fine (just without InnoDB) and instead of failing, the test was skipped by run-time check in have_innodb.inc. # Conflicts: # mysql-test/include/not_embedded.inc # mysql-test/r/change_user_notembedded.result # mysql-test/suite.pm # mysql-test/t/change_user_notembedded.test
-
Sergei Golubchik authored
-
Sergei Golubchik authored
-
Oleksandr Byelkin authored
MDEV-14164: Unknown column error when adding aggregate to function in oracle style procedure FOR loop Make differentiation between pullout for merge and pulout of outer field during exists2in transformation. In last case the field was outer and so we can safely start from name resolution context of the SELECT where it was pulled. Old behavior lead to inconsistence between list of tables and outer name resolution context (which skips one SELECT for merge purposes) which creates problem vor name resolution.
-
- 07 Nov, 2017 1 commit
-
-
Alexander Barkov authored
-