summaryrefslogtreecommitdiff
path: root/storage/maria
Commit message (Collapse)AuthorAgeFilesLines
* post mergeOleksandr Byelkin2018-09-071-9/+9
|
* Merge branch '11.0' into 10.1Oleksandr Byelkin2018-09-061-3/+11
|\
| * Merge branch '5.5' into 10.0bb-10.0-merge-sanjaOleksandr Byelkin2018-09-031-5/+13
| |\
| | * MDEV-16682 Assertion `(buff[7] & 7) == HEAD_PAGE' failedMonty2018-09-031-5/+13
| | | | | | | | | | | | Missed one file in last push...
* | | compiler warnings (clang 4.0.1 on i386)Sergei Golubchik2018-09-042-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | extra/mariabackup/fil_cur.cc:361:42: warning: format specifies type 'unsigned long' but the argument has type 'ib_int64_t' (aka 'long long') [-Wformat] extra/mariabackup/fil_cur.cc:376:9: warning: format specifies type 'unsigned long' but the argument has type 'ib_int64_t' (aka 'long long') [-Wformat] sql/handler.cc:6196:45: warning: format specifies type 'unsigned long' but the argument has type 'wsrep_trx_id_t' (aka 'unsigned long long') [-Wformat] sql/log.cc:1681:16: warning: format specifies type 'unsigned long' but the argument has type 'size_t' (aka 'unsigned int') [-Wformat] sql/log.cc:1687:16: warning: format specifies type 'unsigned long' but the argument has type 'size_t' (aka 'unsigned int') [-Wformat] sql/wsrep_sst.cc:1388:86: warning: format specifies type 'long' but the argument has type 'wsrep_seqno_t' (aka 'long long') [-Wformat] sql/wsrep_sst.cc:232:86: warning: format specifies type 'long' but the argument has type 'wsrep_seqno_t' (aka 'long long') [-Wformat] storage/connect/filamdbf.cpp:450:47: warning: format specifies type 'short' but the argument has type 'int' [-Wformat] storage/connect/filamdbf.cpp:970:47: warning: format specifies type 'short' but the argument has type 'int' [-Wformat] storage/connect/inihandl.cpp:197:16: warning: address of array 'key->name' will always evaluate to 'true' [-Wpointer-bool-conversion] storage/innobase/btr/btr0scrub.cc:151:17: warning: format specifies type 'long' but the argument has type 'int' [-Wformat] storage/innobase/buf/buf0buf.cc:5085:8: warning: nonnull parameter 'bpage' will evaluate to 'true' on first encounter [-Wpointer-bool-conversion] storage/innobase/fil/fil0crypt.cc:2454:5: warning: format specifies type 'long' but the argument has type 'int' [-Wformat] storage/innobase/handler/ha_innodb.cc:18685:7: warning: format specifies type 'unsigned long' but the argument has type 'wsrep_trx_id_t' (aka 'unsigned long long') [-Wformat] storage/innobase/row/row0mysql.cc:3319:5: warning: format specifies type 'long' but the argument has type 'int' [-Wformat] storage/innobase/row/row0mysql.cc:3327:5: warning: format specifies type 'long' but the argument has type 'int' [-Wformat] storage/maria/ma_norec.c:35:10: warning: implicit conversion from 'int' to 'my_bool' (aka 'char') changes value from 131 to -125 [-Wconstant-conversion] storage/maria/ma_norec.c:42:10: warning: implicit conversion from 'int' to 'my_bool' (aka 'char') changes value from 131 to -125 [-Wconstant-conversion] storage/maria/ma_test2.c:1009:12: warning: format specifies type 'unsigned long' but the argument has type 'size_t' (aka 'unsigned int') [-Wformat] storage/maria/ma_test2.c:1010:12: warning: format specifies type 'unsigned long' but the argument has type 'size_t' (aka 'unsigned int') [-Wformat] storage/mroonga/ha_mroonga.cpp:9189:44: warning: use of logical '&&' with constant operand [-Wconstant-logical-operand] storage/mroonga/vendor/groonga/lib/expr.c:4987:22: warning: comparison of constant -1 with expression of type 'grn_operator' is always false [-Wtautological-constant-out-of-range-compare] storage/xtradb/btr/btr0scrub.cc:151:17: warning: format specifies type 'long' but the argument has type 'int' [-Wformat] storage/xtradb/buf/buf0buf.cc:5047:8: warning: nonnull parameter 'bpage' will evaluate to 'true' on first encounter [-Wpointer-bool-conversion] storage/xtradb/fil/fil0crypt.cc:2454:5: warning: format specifies type 'long' but the argument has type 'int' [-Wformat] storage/xtradb/row/row0mysql.cc:3324:5: warning: format specifies type 'long' but the argument has type 'int' [-Wformat] storage/xtradb/row/row0mysql.cc:3332:5: warning: format specifies type 'long' but the argument has type 'int' [-Wformat] unittest/sql/mf_iocache-t.cc:120:35: warning: format specifies type 'unsigned long' but the argument has type 'int' [-Wformat] unittest/sql/mf_iocache-t.cc:96:35: note: expanded from macro 'INFO_TAIL'
* | | MDEV-15797 Assertion `thd->killed != 0' failed in ha_maria::enable_indexesMonty2018-08-276-6/+19
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Problem was that a parallel open of a table, overwrote info->state that was in used by repair. Fixed by changing _ma_tmp_disable_logging_for_table() to use a new state buffer state.no_logging to store the temporary state. Other things: - Use original number of rows when retrying repair to get rid of a potential warning "Number of rows changed from X to Y" - Changed maria_commit() to make it easier to merge with 10.4 - If table is not locked (like with show commands), use the global number of rows as the local number may not be up to date. (Minor not critical fix) - Added some missing DBUG_RETURN
* | | Merge remote-tracking branch 'origin/10.0' into 10.1Alexander Barkov2018-06-201-1/+1
|\ \ \ | |/ /
| * | Merge remote-tracking branch 'origin/5.5' into 10.0Alexander Barkov2018-06-201-1/+1
| |\ \ | | |/
| | * MDEV-16534 PPC64: Unexpected error with a negative value into auto-increment ↵Alexander Barkov2018-06-201-1/+1
| | | | | | | | | | | | columns in HEAP, MyISAM, ARIA
* | | Merge remote-tracking branch 'origin/10.0' into 10.1Alexander Barkov2018-06-191-32/+187
|\ \ \ | |/ /
| * | Merge remote-tracking branch 'origin/5.5' into 10.0Alexander Barkov2018-06-191-32/+187
| |\ \ | | |/
| | * MDEV-15113: Hang in Aria loghandlerOleksandr Byelkin2018-06-121-32/+187
| | | | | | | | | | | | | | | Added unregistering writers in case of log error. Added more debugging control about adding/removing writers to the buffers.
* | | Merge branch '10.0-galera' into 10.1Vicențiu Ciorbaru2018-06-123-8/+8
|\ \ \
| * \ \ Merge remote-tracking branch 'origin/5.5-galera' into 10.0-galeraJan Lindström2018-05-074-13/+13
| |\ \ \
| | * \ \ Merge tag 'mariadb-5.5.60' into 5.5-galeraJan Lindström2018-04-243-6/+9
| | |\ \ \
| | * | | | MDEV-8743: protect myisam/aria MYI with O_CLOEXECDaniel Black2018-03-021-2/+2
| | | | | |
| | * | | | MDEV-8743: protect myisam/aria MYD files and aria log filesDaniel Black2018-03-023-6/+6
| | | | | |
* | | | | | Merge remote-tracking branch 'origin/10.0' into 10.1Monty2018-05-2413-113/+188
|\ \ \ \ \ \ | | |_|_|/ / | |/| | | |
| * | | | | Fixes for Aria transaction handling with lock tablesMonty2018-05-2213-113/+188
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | MDEV-10130 Assertion `share->in_trans == 0' failed in storage/maria/ma_close.c MDEV-10378 Assertion `trn' failed in virtual int ha_maria::start_stmt The problem was that maria_handler->trn was not properly reset at commit/rollback and ha_maria::exernal_lock() could get confused because. There was some old code in ha_maria::implicit_commit() that tried to take care of this, but it was not bullet proof. Fixed by adding list of all tables that is part of the maria transaction to TRN. A nice side effect was of the fix is that loops in ha_maria::implict_commit() got to be much simpler. Other things: - Fixed a bug in mysql_admin_table() where argument open_for_modify was wrongly reset for the next table in the chain - rollback admin command also in case of fatal error. - Split _ma_set_trn_for_table() to three version to simplify code and debugging. - Several new asserts to detect the original problem (that file was not properly removed from trn before calling ma_close())
* | | | | | Merge branch '10.0' into 10.1Sergei Golubchik2018-05-192-1/+14
|\ \ \ \ \ \ | |/ / / / /
| * | | | | Merge branch '5.5' into 10.0Sergei Golubchik2018-05-192-0/+9
| |\ \ \ \ \ | | | |_|_|/ | | |/| | |
| | * | | | MDEV-654 Assertion `share->now_transactional' failed in flush_log_for_bitmap ↵Monty2018-05-152-0/+9
| | | |_|/ | | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | on concurrent workload with Aria tables Problem was that we the bitmap needs to be flushed before disabling logging of redo entires, as writing the bitmap to disk by background checkpoint may cause redo entries.
| * | | | Fix that FLUSH TABLES FOR EXPORT also works for Aria tables.Monty2018-05-161-1/+1
| | | | | | | | | | | | | | | | | | | | - Added missing test case for MyISAM
| * | | | MDEV-14943 Alter table ORDER BY bugMonty2018-05-152-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Problem was that if copy_data_between_tables() didn't do proper clean up in case of failures: - copy object was not properly freed - end_bulk_insert() was not called - mysql_trans_prepare_alter_copy_data() set THD->transaction.on to false which was not properly restored The last part caused a crash in Aria as Aria depends on that THD is correct. Other things: - Reset info->switched_transactional after usage (safety) - Reset bulk_insert_single_undo (safety)
* | | | | MDEV-14265 - RPMLint warning: shared-lib-calls-exitSergey Vojtovich2018-03-165-5/+5
| | | | | | | | | | | | | | | | | | | | Eliminated last exit() call from libmysqld.
* | | | | Merge branch '10.0' into 10.1Sergei Golubchik2018-02-221-3/+4
|\ \ \ \ \ | |/ / / /
| * | | | Merge branch '5.5' into 10.0Sergei Golubchik2018-02-221-5/+5
| |\ \ \ \ | | |/ / / | | | / / | | |/ / | |/| |
| | * | MDEV-13748 Assertion `status_var.local_memory_used == 0 || ↵Sergei Golubchik2018-02-141-5/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | !debug_assert_on_not_freed_memory' failed in virtual THD::~THD after query with INTERSECT my_safe_alloca()/my_safe_afree() work as alloca() or malloc()/free() depending on the memory size to allocate, that is, depending on reclength here. They only work correctly if reclength doesn't change in the middle.
* | | | Fixed performance problem with Aria in find_head()Monty2018-02-172-32/+212
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | For some simple benchmarks, a majority of time was spend in find_head() which tries to find the best place to put the record. The result of this patch is a 2x or more speedup for inserts without keys for format PAGE. All changes are only related to how rows are stored Should fix some of the problems mentioned in: MDEV-8132 Temporary tables using Aria with very poor performance MDEV-9079 Aria very slow for internal temporary tables MDEV-5841 Mariadb very poor temporary performance The following changes where done: - For rows with a small row length that fits into a page (818 bytes with 8192 pages), stop as soon as we hit a match. - Added markers full_head_size and full_tail_size that tells us where to start searching on the bitmap page - Ensure that page->used_size is correctly updated when bitmap grows. This allows us to stop searching at used_size - Added code to check that the bitmap variables are correct. - Fixed a wrong test where we set "first_bitmap_with_space". This shouldn't have caused any notable problems.
* | | | Merge branch 'github/10.0' into 10.1Sergei Golubchik2018-02-029-32/+73
|\ \ \ \ | |/ / /
| * | | Merge remote-tracking branch '5.5' into 10.0Vicențiu Ciorbaru2018-01-248-31/+72
| |\ \ \ | | |/ /
| | * | Free memory in unit tests. Makes ASAN happier.Sergei Golubchik2018-01-222-1/+4
| | |/
| | * compiler warningSergei Golubchik2018-01-151-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | gcc 6 issues a warning about a suspicious construct while(0); { some code }
| | * Fixed misleading voariable names.Oleksandr Byelkin2018-01-111-9/+9
| | |
| | * MDEV-14690: Assertion `page_link == &fake_link' failed in pagecache_write_partOleksandr Byelkin2018-01-111-11/+29
| | | | | | | | | | | | | | | Fix the call to correspond protocoll of pagecache call. Fix of misleading variables names.
| | * MDEV-8200 aria bug with insert select and lock tablesMonty2018-01-115-9/+26
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This bug happens when locking the same Aria "transactional" table (page format) more then once with LOCK TABLES and inserting into one of them with INSERT ... SELECT when the table is empty. Fixed by ensuring we don't use fast bulk insert if table is opened twice with LOCK TABLES (as this changes table->s->state) Code changes: - Added use_count to MARIA_USED_TABLES to be able to check if table is opened twice for a statement/lock table - Don't clear history or reset info->start_state if we don't have versioning. One reason for the bug was was that info->start_state was set to point to different states for the two tables. If there is no versioning info->start_state should always point to info->s->state.common. Other things: - Fixed also some typos that was noticed while scanning the code - More DBUG_PRINT
| * | Fix for MDEV-14141 Crash in print_keydup_error()Monty2018-01-241-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | May also fix: MDEV-14970 "MariaDB crashed with signal 11 and Aria table" I am not able to reproduce a crash, however there was no protection in print_keydup_error() if the storage engine reported the wrong key number. This patch adds such a protection and should stop any further crashes in this case. Other things: - Added extra protection in Aria to not set errkey to more than number of keys. (Don't think this is cause of this crash, but better safe than sorry) - Extend test_if_equal_repl_errors() to handle different cases of ER_DUP_ENTRY. This is just mainly precaution for the future.
* | | Merge 10.0 into 10.1Marko Mäkelä2018-01-031-7/+7
|\ \ \ | |/ /
| * | Merge 5.5 into 10.0Marko Mäkelä2018-01-031-7/+7
| |\ \ | | |/
| | * Silence some -Wimplicit-fallthrough by proper spellingMarko Mäkelä2018-01-031-7/+7
| | |
* | | Merge 10.0 into 10.1Marko Mäkelä2017-12-121-1/+0
|\ \ \ | |/ /
| * | Fix a -Wimplicit-fallthrough warningMarko Mäkelä2017-11-101-1/+0
| | |
* | | Merge branch '10.0' into 10.1Sergei Golubchik2017-10-223-4/+3
|\ \ \ | |/ /
| * | Merge branch '5.5' into 10.0Sergei Golubchik2017-10-183-4/+3
| |\ \ | | |/
| | * MDEV-13459 Warnings, when compiling with gcc-7.xSergei Golubchik2017-10-173-2/+4
| | | | | | | | | | | | mostly caused by -Wimplicit-fallthrough
| | * MDEV-13595: mariadb-10.2.8/storage/maria/ma_loghandler.c:2730]: (style) ↵Oleksandr Byelkin2017-10-051-1/+1
| | | | | | | | | | | | | | | | | | Array index 'chunk_offset' is used before limits check. In fact just a cosmetic fix, code was safe because translog_get_first_chunk_offset return offsets inside the page.
* | | cleanup: reduce code duplicationSergei Golubchik2017-09-271-34/+23
| | | | | | | | | | | | | | | remove copy-pasted code, fix meaningless comparison. followup for ea2162b6aae
* | | MDEV-11846: ERROR 1114 (HY000) table full when performing GROUP BYVarun Gupta2017-09-241-8/+33
| | | | | | | | | | | | | | | The problem is there is an overflow for the key_file_length. Added the maximum limit for the key_file_length
* | | Merge branch '10.0' into 10.1Sergei Golubchik2017-08-083-4/+5
|\ \ \ | |/ /
| * | Merge remote-tracking branch 'origin/5.5' into 10.0Vicențiu Ciorbaru2017-07-252-4/+4
| |\ \ | | |/