summaryrefslogtreecommitdiff
path: root/storage
Commit message (Collapse)AuthorAgeFilesLines
* MDEV-14024 PCRE2.Alexey Botchkov2019-12-214-40/+2
| | | | Related changes in the server code.
* MDEV-21353 Assertion failures due to btr_pcur_restore_pos() misbehavingMarko Mäkelä2019-12-201-7/+7
| | | | | | | | | | In commit befde6e97e8d14eb120fa28a012474dce2b7c185 a bogus condition was added, aiming to avoid debug assertion failures during ALTER TABLE...IMPORT TABLESPACE. page_cur_delete_rec(): Remove the bogus condition, and replace the use of buf_block_modify_clock_inc() with a lower-level operation that skips the debug checks that would fail during IMPORT.
* check I/O buffer size and alignment in InnoDBEugene Kosov2019-12-191-0/+5
|
* Cleanup: Remove fil_space_get_flags()Marko Mäkelä2019-12-183-43/+2
| | | | | Replace fil_space_get_flags(space) == ULINT_UNDEFINED with the functionally equivalent fil_space_get_size(space) == 0.
* MDEV-12353 preparation: Remove UNIV_LOG_LSN_DEBUGMarko Mäkelä2019-12-175-103/+0
| | | | | | | The debug instrumentation with the MLOG_LSN pseudo-record has not been used for debugging for years. Let us remove this code now. It would have to be removed as part of MDEV-12353 or MDEV-14425 anyway, when implementing a new redo log file format.
* MDEV-21174: Fix the WITH_INNODB_EXTRA_DEBUG buildMarko Mäkelä2019-12-161-2/+2
| | | | | | One reference to PageConverter::m_page_zip_ptr was not adjusted commit 745fd4b39f8aff6300682502ed2ddf61ee343866 when the data member was removed.
* Merge 10.4 into 10.5Marko Mäkelä2019-12-16132-4041/+2988
|\
| * Merge 10.3 into 10.4Marko Mäkelä2019-12-1381-3608/+2388
| |\ | | | | | | | | | | | | We disable the MDEV-21189 test galera.galera_partition because it times out.
| | * Merge 10.2 into 10.3Marko Mäkelä2019-12-1367-800/+834
| | |\
| | | * MDEV-20950 Reduce size of record offsetsbb-10.2-MDEV-20950-stack-offsetsEugene Kosov2019-12-1366-745/+792
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | offset_t: this is a type which represents one record offset. It's unsigned short int. a lot of functions: replace ulint with offset_t btr_pcur_restore_position_func(), page_validate(), row_ins_scan_sec_index_for_duplicate(), row_upd_clust_rec_by_insert_inherit_func(), row_vers_impl_x_locked_low(), trx_undo_prev_version_build(): allocate record offsets on the stack instead of waiting for rec_get_offsets() to allocate it from mem_heap_t. So, reducing memory allocations. RECORD_OFFSET, INDEX_OFFSET: now it's less convenient to store pointers in offset_t* array. One pointer occupies now several offset_t. And those constant are start indexes into array to places where to store pointer values REC_OFFS_HEADER_SIZE: adjusted for the new reality REC_OFFS_NORMAL_SIZE: increase size from 100 to 300 which means less heap allocations. And sizeof(offset_t[REC_OFFS_NORMAL_SIZE]) now is 600 bytes which is smaller than previous 800 bytes. REC_OFFS_SEC_INDEX_SIZE: adjusted for the new reality rem0rec.h, rem0rec.ic, rem0rec.cc: various arguments, return values and local variables types were changed to fix numerous integer conversions issues. enum field_type_t: offset types concept was introduces which replaces old offset flags stuff. Like in earlier version, 2 upper bits are used to store offset type. And this enum represents those types. REC_OFFS_SQL_NULL, REC_OFFS_MASK: removed get_type(), set_type(), get_value(), combine(): these are convenience functions to work with offsets and it's types rec_offs_base()[0]: still uses an old scheme with flags REC_OFFS_COMPACT and REC_OFFS_EXTERNAL rec_offs_base()[i]: these have type offset_t now. Two upper bits contains type.
| | * | Merge 10.2 into 10.3Marko Mäkelä2019-12-1215-2798/+1542
| | |\ \ | | | |/
| | | * MDEV-14482 - Cache line contention on ut_rnd_interval()Marko Mäkelä2019-12-103-23/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | InnoDB RNG maintains global state, causing otherwise unnecessary bus traffic. Even worse, this is cross-mutex traffic. That is, different mutexes suffer from contention. Fixed delay of 4 was verified to give best throughput by OLTP update index and read-write benchmarks on Intel Broadwell (2/20/40) and ARM (1/46/46). This is a backport of ce0479006523bc72ed6abb703bd1f87ff256fd8a from MariaDB Server 10.3.
| | | * MDEV-21256: Replace the 64-bit LCG with a 32-bit Galois LFSRMarko Mäkelä2019-12-102-21/+30
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We should not need anywhere near 32 bits of entropy, so we might just limit ourselves to a 32-bit random number generator. Also, it might be cheaper to use exclusive-or, bit shifting and conditional jumps, instead of multiplication and addition. We use relaxed atomic operations on the global random number generator state in order in an attempt to silence any warnings about race conditions. There is an obvious race condition between the load and store in ut_rnd_gen(), but we do not think that it matters much that the state of the random number generator could 'stutter'. This change seems makes the 'uncompress_ops' nondeterministic in innodb_zip.cmp_per_index after the restart. It looks like there is an inherent race condition in the test, because the table could be opened for InnoDB statistics recalculation already before innodb_cmp_per_index_enabled was set. We might end up having uncompress_ops anywhere between 0 and 9, or perhaps even more. Let us remove that part of the test.
| | | * MDEV-21256: Simplify ut_rnd_interval()Marko Mäkelä2019-12-107-105/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | ut_rnd_interval(): Remove the first parameter, which was mostly passed as 0. Implement as a simple wrapper around ut_rnd_gen(). Trivially return 0 if the size of the interval is smaller than 2. ut_rnd_ulint_counter, ut_rnd_gen_next_ulint(), ut_rnd_gen_ulint(): Remove.
| | | * MDEV-21256: Reduce the use of ut_rnd_gen_next_ulint()Marko Mäkelä2019-12-105-105/+39
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | ut_rnd_set_seed(): Unused function; remove. ut_rnd_gen(): Renamed from page_cur_lcg_prng(). ut_rnd_current: The internal state of ut_rnd_gen(). page_cur_open_on_rnd_user_rec(): Replace linear search with page_rec_get_nth().
| | | * Cleanup: Replace a redundant statement with an assertionMarko Mäkelä2019-12-091-1/+1
| | | |
| | | * MDEV-21254 Remove unused keywords from the InnoDB SQL parserMarko Mäkelä2019-12-098-2630/+1486
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The InnoDB internal SQL parser, which is used for updating the InnoDB data dictionary tables (to be removed in MDEV-11655), persistent statistics (to be refactored in MDEV-15020) and fulltext indexes, implements some unused keywords and built-in functions: OUT BINARY BLOB INTEGER FLOAT SUM DISTINCT READ COMPACT BLOCK_SIZE TO_CHAR TO_NUMBER BINARY_TO_NUMBER REPLSTR SYSDATE PRINTF ASSERT RND RND_STR ROW_PRINTF UNSIGNED Also, procedures are never declared with parameters. Only one top-level procedure is declared and invoked at a time, and parameters are being passed via pars_info_t.
| * | | optimize crash recoveryEugene Kosov2019-12-121-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | recv_dblwr_t::list is used for appending to the beginning and iterating through its elements. std::deque fits better for that purpose because it does less allocations than std::forward_list and provides better memory locality.
| * | | MDEV-21260 Innodb/Wjndows do not report error when trying open volumes on ↵Vladislav Vaintroub2019-12-121-3/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | UNC paths fil_node_t::find_metadata() tries to find out whether file is on an SSD, and the disk sector size. On Windows, it opens the corresponding volume for finding this data. This does not go well, if datadir is on network path/UNC. The volume name is invalid, CreateFile() function fails, and a cryptic (from the end user perspective) error is reported. Like this [ERROR] InnoDB: File \\.\\\workpc\work: 'CreateFile()' returned OS error 203. The fix is not to report error if open volume failed, and the path was not on fixed disk, i.e not on HDD or SSD. This is not a fatal error, there is a fallback anyway.
| * | | Merge branch '10.3' into 10.4Oleksandr Byelkin2019-12-0955-473/+652
| |\ \ \ | | |/ /
| | * | MDEV-21172 Memory leak after failed ADD PRIMARY KEYMarko Mäkelä2019-12-051-1/+2
| | | |
| | * | Merge branch '10.2' into 10.3Oleksandr Byelkin2019-12-0433-397/+551
| | |\ \ | | | |/
| | | * Merge remote-tracking branch 'connect/10.2' into 10.2Oleksandr Byelkin2019-12-0327-348/+529
| | | |\
| | | | * - Fix MDEV-13782Olivier Bertrand2019-11-266-34/+53
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Problem with NOT LIKE queries. modified: storage/connect/ha_connect.cc modified: sql/item_cmpfunc.h - Fix MDEV-21084 Misusage of strncat could cause buffer overflow. modified: storage/connect/reldef.cpp modified: storage/connect/tabcmg.cpp modified: storage/connect/tabjson.cpp modified: storage/connect/tabrest.cpp modified: storage/connect/tabxml.cpp
| | | | * These changed were made after pulling 10.2.30 from originOlivier Bertrand2019-11-244-41/+44
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | --------------------------------------------------------- - Temporarily fix MDEV-13782 by commenting out LIKE_FUNC in CondFilter modified: storage/connect/ha_connect.cc - Remove use of hack tables modified: storage/connect/connect.cc modified: storage/connect/connect.h modified: storage/connect/ha_connect.cc modified: storage/connect/xtable.h
| | | | * Fix compile error (missing declaration) in tabrest.cppOlivier Bertrand2019-11-212-14/+19
| | | | |
| | | | * Fix compile error (missing declaration) in tabrest.cppOlivier Bertrand2019-11-211-5/+5
| | | | |
| | | | * Fix compile error (imcomplete switch) in ha_connect.ccOlivier Bertrand2019-11-211-0/+4
| | | | |
| | | | * These changed were made after pulling 10.2.30 from originOlivier Bertrand2019-11-213043-28773/+39519
| | | | |\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | --------------------------------------------------------- - Temporarily fix MDEV-13782 by commenting out LIKE_FUNC i, CondFilter modified: storage/connect/ha_connect.cc - Make Rest available for MariaDB binary distributed versions. modified: storage/connect/CMakeLists.txt - Remove unused declaration modified: storage/connect/filter.h
| | | | * | Fix missing declaration in tabrest.cpp causing compiling failure on LinuxOlivier Bertrand2019-11-161-1/+1
| | | | | |
| | | | * | =====================================================================Olivier Bertrand2019-11-1619-266/+412
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This new CONNECT version 1.07 fully implements NOSQL support. It allows working on JSON or XML data retrieved as REST query results from all binary distributions of MariaDB when cpprestsdk is installed and the GetRest library is available. ===================================================================== - Make Rest available for MariaDB binary distributed versions. Change RestGet function so it can be called from a library. modified: storage/connect/CMakeLists.txt modified: storage/connect/restget.cpp modified: storage/connect/tabrest.cpp - Make column FLAG option available to discovery functions. modified: storage/connect/ha_connect.cc modified: storage/connect/plgdbsem.h - Update CONNECT version number and date. modified: storage/connect/ha_connect.cc - Move OEMColumns function from mycat.cc to reldef.cpp. modified: storage/connect/mycat.cc modified: storage/connect/reldef.cpp - Allocate tables as TABREF (was RELDEF) modified: storage/connect/mycat.cc modified: storage/connect/mycat.h - Fix MDEV-20845 by commenting out TIMEOUT setting. modified: storage/connect/myconn.cpp - Call DefineAM before calling GetColCatInfo. Column offset is now based on record format instead of table type. The RECFM_VCT format was added. This enables tables to specify the record format and is useful in particular for OEM tables. modified: storage/connect/plgdbsem.h modified: storage/connect/reldef.cpp modified: storage/connect/reldef.h modified: storage/connect/tabdos.cpp modified: storage/connect/tabdos.h modified: storage/connect/tabfix.cpp modified: storage/connect/tabfmt.cpp modified: storage/connect/tabmysql.cpp modified: storage/connect/tabutil.cpp modified: storage/connect/tabutil.h modified: storage/connect/tabvct.cpp modified: storage/connect/xindex.cpp
| | | * | | Merge branch '10.1' into 10.2Oleksandr Byelkin2019-12-032-3/+9
| | | |\ \ \
| | | | * | | cleanup: replace exit(1) with abort()Eugene Kosov2019-11-301-3/+3
| | | | | | |
| | | | * | | InnoDB: log unsuccessful calls to pthread_attr_init() and pthread_create() ↵Eugene Kosov2019-11-301-2/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | before crash
| | | | * | | cleanup: remove always true condition to fix clang warningEugene Kosov2019-11-191-1/+1
| | | | | | |
| | | * | | | check parameters of io_submit() and LinuxAIOHandler::reserve_slot()Eugene Kosov2019-12-031-0/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Ensure that pointer to a buffer which is used for both reads and writes is properly aligned. I've intentially put permanent check right before io_submit() call instead of the time of setting iocb date. I think that'll make check better. LinuxAIOHandler::resever_slot(): check arguments alignment in debug builds
| | | * | | | InnoDB: Remove unused get_wkb_of_default_point()Marko Mäkelä2019-12-032-45/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The function get_wkb_of_default_point() should never have been added, and the cleanup in commit 56ff6f1b0b248befb80675ba36a3251c7844f410 should have removed it. The unnecessary code was added in mysql/mysql-server@0a27b72171c4449f506ad4e93df8c29fead1ed72 and mostly disabled in mysql/mysql-server@8f11af7734509821b654f2c330dff5374c89073c. In MariaDB, the types DATA_POINT and DATA_VAR_POINT are never used. Instead, DATA_GEOMETRY continues to be used since 10.2.2, introduced by mysql/mysql-server@673bad7c7e17701b69e29d0fbc4e2d68c1a7b613 in MySQL 5.7.1.
| | * | | | | Update innodb_i_s_tables_disabled.result post typo fixVicențiu Ciorbaru2019-12-031-1/+1
| | | | | | |
| | * | | | | MDEV-13564 follow-up: Harden an assertionMarko Mäkelä2019-12-031-2/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | mlog_write_initial_log_record_low(): Do not allow the MLOG_TRUNCATE record to be written.
| | * | | | | Merge remote-tracking branch 10.2 into 10.3Jan Lindström2019-12-027-48/+290
| | |\ \ \ \ \ | | | |/ / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: mysql-test/suite/galera/t/galera_binlog_event_max_size_max-master.opt mysql-test/suite/innodb/r/innodb-mdev-7513.result mysql-test/suite/innodb/t/innodb-mdev-7513.test mysql-test/suite/wsrep/disabled.def storage/innobase/ibuf/ibuf0ibuf.cc
| | | * | | | fix double io_destroy() + cleanupEugene Kosov2019-11-261-12/+13
| | | | | | |
| | | * | | | MDEV-21152 Bogus debug assertion btr_pcur_is_after_last_in_tree() in ibuf codeMarko Mäkelä2019-11-261-4/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | As noted in commit abd45cdc38e72ce329365ffe0df4c6f8c319b407 a search with PAGE_CUR_GE may land on the supremum record on a leaf page that is not the rightmost leaf page. This could occur when all keys on the current page are smaller than the search key, and the smallest key on the successor page is larger than the search key. Hence, after a failed PAGE_CUR_GE search, assertions btr_pcur_is_after_last_in_tree() are bogus and should be replaced with btr_pcur_is_after_last_on_page().
| | | * | | | MDEV-17508 Fix bug for spider when using "not like"willhan2019-11-254-1/+218
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | fix bug for spider where using "not like" (#890) test case: t1 is a spider engine table; CREATE TABLE `t1` ( `id` int(11) NOT NULL DEFAULT '0', `name` char(64) DEFAULT NULL, PRIMARY KEY (`id`) ) ENGINE=SPIDER query: "select * from t1 where name not like 'x%' " would dispatch "select xxx name name like 'x%' " to remote mysqld, is wrong
| | | * | | | cleanup Linux AIOEugene Kosov2019-11-211-31/+52
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Replace all io_context* occurrences with io_context_t Even in release mode die immediately when some io_* functions return EINVAL. This always means some programming bug and it's better to fail fast. LinuxAIOHandler::resubmit(): fix condition. Stop ignoring -1 return code which corresponds to EPERM and io_submit() really can return this one. Use io_destroy() to stop leaking io_context_t. Make m_aio_ctx std::vector instead of C array. I think that internal check for index overflow might be useful. Add debug assertions for EFAULT because for me receiving it looks like a programming bug.
| | | * | | | MDEV-20832 Don't print "row size too large" warnings in error log if ↵Eugene Kosov2019-11-201-6/+9
| | | | |_|/ | | | |/| | | | | | | | | | | | | | | | | | | | | | | | | | innodb_strict_mode=OFF and log_warnings<=2 create_table_info_t::row_size_is_acceptable(): add condition for log writing
| | | * | | MDEV-21082: isnan/isinf compilation errors, isfinite warnings on MacOSVlad Lesin2019-11-197-12/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The fix consists of three commits backported from 10.3: 1) Cleanup isnan() portability checks (cherry picked from commit 7ffd7fe9627d1f750a3712aebb4503e5ae8aea8e) 2) Cleanup isinf() portability checks Original problem reported by Wlad: re-compilation of 10.3 on top of 10.2 build would cache undefined HAVE_ISINF from 10.2, whereas it is expected to be 1 in 10.3. std::isinf() seem to be available on all supported platforms. (cherry picked from commit bc469a0bdf85400f7a63834f5b7af1a513dcdec9) 3) Use std::isfinite in C++ code This is addition to parent revision fixing build failures. (cherry picked from commit 54999f4e75f42baca484ae436b382ca8817df1dd)
| | * | | | Lintian complains on spelling errorFaustin Lammler2019-12-0219-23/+23
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The lintian check complains on spelling error: https://salsa.debian.org/mariadb-team/mariadb-10.3/-/jobs/95739
| * | | | | fix compiler warningsKentoku2019-12-063-5/+7
| | | | | |
* | | | | | MDEV-21174: Remove some mlog_write_initial_log_record_fast()Marko Mäkelä2019-12-139-153/+98
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Pass buf_block_t* to more functions that write redo log. page_zip_write_node_ptr(), page_zip_write_blob_ptr(), page_zip_compress_write_log_no_data(): Take buf_block_t* as parameter, and do not tolerate mtr=NULL. page_zip_compress(): Do not tolerate mtr=NULL. page_zip_dir_insert(): Take page_cur_t* as parameter. mlog_write_initial_log_record(): Remove. This function was unused. RecIterator::remove(): Remove the redundant page_zip parameter. PageConverter::m_page_zip_ptr: Remove.
* | | | | | MDEV-21174: Clean up record insertionMarko Mäkelä2019-12-136-42/+42
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | page_cur_insert_rec_low(): Take page_cur_t* as a parameter, and do not tolerate mtr=NULL. page_cur_insert_rec_zip(): Do not tolerate mtr=NULL.