summaryrefslogtreecommitdiff
path: root/storage/maria
Commit message (Collapse)AuthorAgeFilesLines
* Fix clang -Winconsistent-missing-overrideMarko Mäkelä2020-11-021-18/+16
|
* Merge branch '10.4' into 10.5Oleksandr Byelkin2020-11-011-0/+1
|\
| * Merge branch '10.3' into 10.4Oleksandr Byelkin2020-10-311-0/+1
| |\
| | * MDEV-23222 SIGSEG in maria_create() because of double freeMonty2020-10-291-0/+1
| | | | | | | | | | | | | | | | | | | | | The crash happens because a double free in the case CREATE TABLE fails because there is a conflicting tables on disk. Fixed by ensuring that the double free can't happen.
* | | Merge 10.4 into 10.5Marko Mäkelä2020-10-301-0/+3
|\ \ \ | |/ /
| * | Merge 10.3 into 10.4Marko Mäkelä2020-10-291-0/+3
| |\ \ | | |/
| | * MDEV-21201 No records produced in information_schema query, depending on ↵Sergei Golubchik2020-10-231-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | projection Reimplement MDEV-14275 Improving memory utilization for information schema Postpone temp table instantiation until after setup_fields(). Replace all unused (not marked in read_set) columns in an I_S table with CHAR(0). This can drastically reduce the footprint of a MEMORY table (a TABLE_CATALOG alone is 1538 bytes per row). This does not change the engine. If the table was decided to be Aria (because of, say, blobs) then after optimization it'll stay Aria even if all blobs were removed. Note 1: when transforming table structure, share->blob_fields is preserved, otherwise Aria might switch from DYNAMIC to STATIC row format and expect a special field for a deleted mark, which create_tmp_tabe didn't provide. Note 2: optimizer was doing handler::info() (to know the number of rows) before the temp table is populated. That didn't make much sense. Now it's done before the table is even instantiated. Preserve the old behavior and report 0 rows. This reverts e2664ee8362 and a8458a2345e
* | | S3 plugin fails to load depending on loaded storage enginesSergei Golubchik2020-10-242-9/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | storage engines are generally initialized in some random order (by iterating the hash of plugin names). S3 fails if it's initialized before Aria. But it looks that while S3 needs Aria, it does not need Aria to be initialized before S3. S3 copies maria_hton and then overwrites every single member of it, so it can handle Aria being initialized after S3.
* | | MDEV-23648 s3.partition_move 'innodb' test failure - object deleted before ↵Monty2020-10-212-1/+2
| | | | | | | | | | | | | | | | | | | | | copy attempted Updated submodule libmarias3 which fixes the problem Enabled disable S3 tests.
* | | Update S3 engine to maturity GammaMonty2020-10-211-1/+1
| | |
* | | MDEV-23730 s3.replication_partition 'innodb,mix' segvMonty2020-10-211-4/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This failure was caused because of several bugs: - Someone had removed s3-slave-ignore-updates=1 from slave.cnf, which caused the slave to remove files that the master was working on. - Bug in ha_partition::change_partitions() that didn't reset m_new_file in case of errors. This caused crashes in ha_maria::extra() as the maria handler was called on files that was already closed. - In ma_pagecache there was a bug that when one got a read error one a big block (s3 block), it left the flag PCBLOCK_BIG_READ on for the page which cased an assert when the page where flushed. - Flush all cached tables in case of ignored ALTER TABLE Note that when merging code from 10.3, that fixes the partition bug, use the code from this patch instead. Changes to ma_pagecache.cc written or reviewed by Sanja
* | | MDEV-23691 S3 storage engine: delayed slave can drop the tableMonty2020-10-214-14/+40
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This commit fixed the problems with S3 after the "DROP TABLE FORCE" changes. It also fixes all failing replication S3 tests. A slave is delayed if it is trying to execute replicated queries on a table that is already converted to S3 by the master later in the binlog. Fixes for replication events on S3 tables for delayed slaves: - INSERT and INSERT ... SELECT and CREATE TABLE are ignored but written to the binary log. UPDATE & DELETE will be fixed in a future commit. Other things: - On slaves with --s3-slave-ignore-updates set, allow S3 tables to be opened in read-write mode. This was done to be able to ignore-but-replicate queries like insert. Without this change any open of an S3 table failed with 'Table is read only' which is too early to be able to replicate the original query. - Errors are now printed if handler::extra() call fails in wait_while_tables_are_used(). - Error message for row changes are changed from HA_ERR_WRONG_COMMAND to HA_ERR_TABLE_READONLY. - Disable some maria_extra() calls for S3 tables. This could cause S3 tables to fail in some cases. - Added missing thr_lock_delete() to ma_open() in case of failure. - Removed from mysql_prepare_insert() the not needed argument 'table'.
* | | Merge branch '10.4' into 10.5Sujatha2020-09-292-2/+9
|\ \ \ | |/ /
| * | MDEV-23296 Assertion `block->type == PAGECACHE_EMPTY_PAGE.. with ↵Monty2020-09-251-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | aria_max_sort_file_size=0 When maria_drop_all_indexes() reset the key files, it didn't flush the page cache. This confused the cache as there where old key blocks marked with LSN in it and repair tried to overwrite these with PLAIN blocks which is not allowed.
| * | MDEV-17665 Assertion `!share and other errors on concurrent Aria operationsMonty2020-09-251-2/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fixes also: MDEV-22674 Server crash in compare_bin ... restore_table_state_after_repair The bug was that the 'can_enable_index' variable in MyISAM and Aria was not properly set and reset for bulk insert. Because of this, insert...select was trying to recreate indexes while another thread was using it, causing crashes in page cache.
* | | Update libmarias3 to PR#92: updated PR#91, adds capability to support port ↵Sergei Petrunia2020-09-081-0/+0
| | | | | | | | | | | | number
* | | Update libmarias3 to PR#91 which adds capability to specify port numberSergei Petrunia2020-09-081-0/+0
| | |
* | | MDEV-23662: Make S3 Storage Engine usable with MinIOSergei Petrunia2020-09-083-0/+23
| | | | | | | | | | | | | | | Add @@s3_port and @@s3_use_http. One can set these to access the local MinIO, for example.
* | | Merge 10.4 into 10.5Marko Mäkelä2020-09-041-11/+5
|\ \ \ | |/ /
| * | Merge 10.3 into 10.4Marko Mäkelä2020-09-031-3/+3
| |\ \ | | |/
| | * Merge 10.2 into 10.3Marko Mäkelä2020-09-031-3/+3
| | |\
| | | * Merge 10.1 into 10.2Marko Mäkelä2020-09-011-3/+3
| | | |\ | | | | | | | | | | | | | | | This also fixes MDEV-20464.
| | | | * MDEV-23569 temporary tables can overwrite existing filesSergei Golubchik2020-08-251-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | for internal temporary tables: don't use realpath(), and let them overwrite whatever orphan temp files might've left in the tmpdir (see main.error_simulation test). for user created temporary tables: we have to use realpath(), (see 3a726ab6e2e, remember DATA/INDEX DIRECTORY). don't allow them to overwrite existing files. This bug was reported by RACK911 LABS
* | | | | Reduce number of syncs to create a transactional aria table from 6 to 3Monty2020-08-201-1/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This was possible because we can create any missing aria files from the aria transactional log The 3 remaining syncs are: - .frm file - Directory where frm file is - Aria log file
* | | | | Merge 10.4 into 10.5Marko Mäkelä2020-08-201-1/+1
|\ \ \ \ \ | |/ / / /
* | | | | Merge 10.4 into 10.5Marko Mäkelä2020-08-142-2/+2
|\ \ \ \ \ | |/ / / /
| * | | | Merge 10.3 into 10.4, except MDEV-22543Marko Mäkelä2020-08-132-3/+3
| |\ \ \ \ | | |/ / / | | | | | | | | | | Also, fix GCC -Og -Wmaybe-uninitialized in run_backup_stage()
| | * | | Merge 10.2 into 10.3Marko Mäkelä2020-08-132-3/+3
| | |\ \ \ | | | |/ /
| | | * | Fix GCC 10.2.0 -Og -Wmaybe-uninitializedMarko Mäkelä2020-08-112-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | For some reason, GCC emits more -Wmaybe-uninitialized warnings when using the flag -Og than when using -O2. Many of the warnings look genuine.
* | | | | fixup 58e759a9393f76e558c016a3f84656401b9de1ce: clang ↵Marko Mäkelä2020-08-071-1/+1
| | | | | | | | | | | | | | | | | | | | -Winconsistent-missing-override
* | | | | Added 'final' to some classes to improve generated codeMichael Widenius2020-08-042-89/+94
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Final added to: - All reasonable classes inhereted from Field - All classes inhereted from Protocol - Almost all Handler classes - Some important Item classes The stripped size of mariadbd is just 4K smaller, but several object files showed notable improvements in common execution paths. - Checked field.o and item_sum.o Other things: - Added 'override' to a few class functions touched by this patch. - Removed 'virtual' from a new class functions that had/got 'override' - Changed Protocol_discard to inherit from Protocol instad of Protocol_text
* | | | | Merge branch '10.4' into 10.5Oleksandr Byelkin2020-08-041-0/+1
|\ \ \ \ \ | |/ / / /
| * | | | Merge branch '10.3' into 10.4Oleksandr Byelkin2020-08-031-0/+1
| |\ \ \ \ | | |/ / /
| | * | | Merge branch '10.2' into 10.3Oleksandr Byelkin2020-08-031-0/+1
| | |\ \ \ | | | |/ /
| | | * | Merge branch '10.1' into 10.2Oleksandr Byelkin2020-08-021-0/+1
| | | |\ \ | | | | |/
| | | | * MDEV-18496 Crash when Aria encryption is enabled but plugin not availableSergei Golubchik2020-07-291-0/+1
| | | | | | | | | | | | | | | | | | | | fix uninitialized struct member
* | | | | MDEV-23362: s3 postfix libz -> zDaniel Black2020-08-041-2/+2
| | | | |
* | | | | MDEV-23362: s3 - link to zlibDaniel Black2020-08-041-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | The function uncompress from the zlib libraries is used in s3_get_object in s3_func.c.
* | | | | MDEV-22980: Allow plugin-maturity=alpha so S3 plugin loadsOtto Kekäläinen2020-08-011-8/+18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Verified by running before and after: mariadb --skip-column-names -e "select plugin_name, plugin_status, plugin_type, plugin_library, plugin_license from information_schema.all_plugins order by plugin_name, plugin_library" Nothing else but exactly this line changed so there are no side effects: -S3 NOT INSTALLED STORAGE ENGINE ha_s3.so GPL +S3 ACTIVE STORAGE ENGINE ha_s3.so GPL Also enrich config file with link to KB and unify option syntax and standard comments.
* | | | | MDEV-23176: s3 curl library path fixDaniel Black2020-07-281-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | On FreeBSD (and possibly elsewhere) the FindPackage(curl) may have found the curl library in a non-standard directory. We use the exposed path as a library path to correct linking.
* | | | | Merge 10.4 into 10.5Marko Mäkelä2020-07-212-0/+5
|\ \ \ \ \ | |/ / / /
| * | | | MDEV-21953 deadlock between BACKUP STAGE BLOCK_COMMIT and parallel repl.Monty2020-07-212-0/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The issue was: T1, a parallel slave worker thread, is waiting for another worker thread to commit. While waiting, it has the MDL_BACKUP_COMMIT lock. T2, working for mariabackup, is doing BACKUP STAGE BLOCK_COMMIT and blocks all commits. This causes a deadlock as the thread T1 is waiting for can't commit. Fixed by moving locking of MDL_BACKUP_COMMIT from ha_commit_trans() to commit_one_phase_2() Other things: - Added a new argument to ha_comit_one_phase() to signal if the transaction was a write transaction. - Ensured that ha_maria::implicit_commit() is always called under MDL_BACKUP_COMMIT. This code is not needed in 10.5 - Ensure that MDL_Request values 'type' and 'ticket' are always initialized. This makes it easier to check the state of the MDL_Request. - Moved thd->store_globals() earlier in handle_rpl_parallel_thread() as thd->init_for_queries() could use a MDL that could crash if store_globals where not called. - Don't call ha_enable_transactions() in THD::init_for_queries() as this is both slow (uses MDL locks) and not needed.
| * | | | Merge remote-tracking branch 'origin/10.3' into 10.4Monty2020-07-031-1/+1
| |\ \ \ \ | | |/ / /
| | * | | Don't copy uninitialized bytes when copying varstringsMonty2020-07-021-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When using field_conv(), which is called in case of field1=field2 copy in fill_records(), full varstring's was copied, including unitialized bytes. This caused valgrind to compilain about usage of unitialized bytes when using Aria static length records. Fixed by not using memcpy when copying varstrings but instead just copy the real bytes.
* | | | | Add man page for new command aria_s3_copyOtto Kekäläinen2020-07-081-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Based on output of 'aria_s3_copy --help'. Also fix a typo in command help.
* | | | | fix clang buildEugene Kosov2020-06-253-17/+18
| | | | |
* | | | | Fix "unresolved external symbol" link errors with MSVCVladislav Vaintroub2020-06-191-1/+3
| | | | |
* | | | | S3 is pluggable nowSergei Golubchik2020-06-1912-112/+112
| | | | |
* | | | | cleanup: Aria headersSergei Golubchik2020-06-195-15/+284
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | include/maria.h is a common header included in half of the server, if should only contain definitions and declarations that are used outside of storage/maria internal definitions and declarations should be in maria_def.h also remove few duplicate declarations
* | | | | MDEV-20302 Server hangs upon concurrent SELECT from partitioned S3Oleksandr Byelkin2020-06-191-10/+18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Second attempt to fix same bug: Use the same queue for all READ operations. Release queues for all used pages. This fixes a hang in the s3.alter2 test case