summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* MDEV-22979 wip improving spider init queriesbb-11.0-mdev-22979-init-spider-lastYuchen Pei2023-04-284-428/+515
| | | | | | | | | | | | | - make spider the last plugin to init (doing it the silly way now, will need refactoring later) - remove procedures in init queries which requires `initialized` to be true which happens later in mysqld_main() during acl_init() - simplification using `if not exists` - move the udf creations to a background thread Result: mdev_27233, mdev_29904, mdev_30370 and their variants pass. mdev-22979 install_db command fails. ALL "NORMAL" tests seem to be hanging...
* MDEV-22979 [do not push] Move spider init query execution from a background ↵bb-11.0-mdev-22979-init-query-in-spider-db-initYuchen Pei2023-04-263-83/+50
| | | | | | | thread to spider_db_init() This is the original fix by nayuta for MDEV-27233, but it fails spider/bugfix.mdev_29904
* MDEV-27233-22979-30370 Add and update tests for spider init bugsYuchen Pei2023-04-2618-1/+43
| | | | | | | | | | | | | | | | | | | | | For development only - will squash this into another commit later - do not push. mdev_27233_v2: a variant of mdev-27233 where the spider plugin is loaded in during server startup. mdev_30370: we update this test to use mysqld_cmd instead of the noisy mysqld_bootstrap_cmd. We have to kill the server first to avoid "Can't lock aria control file" With the change in commit c160a115b8b that was pushed to fix mdev-27233 but later reverted because of mdev-29904, mdev_27233 and the updated mdev_30370 would pass, but not mdev_27233_v2 ("[ERROR] SPIDER plugin initialization failed at 'drop procedure if exists mysql.spider_fix_one_table' by 'Unknown storage engine 'Aria''") or mdev_30370 if it uses mysqld_bootstrap_cmd (post-test check will fail when running this case with some other case, e.g. mtr mdev_30370 mdev_29562).
* MDEV-27095 clean up spd_init_query.hYuchen Pei2023-04-201-64/+0
|
* MDEV-27095 spider should be installed with INSTALL SONAME ha_spiderYuchen Pei2023-04-205-161/+11
| | | | | | | | | | | | | | | There are several plugins in ha_spider: spider, spider_alloc_mem, spider_wrapper_protocols, spider_rewrite etc. INSTALL PLUGIN foo SONAME ha_spider causes all the other ones to be installed by the init queries where foo is any of the plugins. This introduces unnecessary complexiy. For example it reads mysql.plugins to find all other plugins, causing the hack of moving spider plugin init to a separate thread. To install all spider related plugins, install soname ha_spider should be used instead.
* MDEV-29676 Some changes in behaviour w.r.t. spider sts crdYuchen Pei2023-04-191-37/+29
| | | | | - assign spider->share early when !new_share - remove locking before spider_share_init_{sts,crd}
* MDEV-29676 refactored and documented spider_get_share() and friendsYuchen Pei2023-04-1915-1962/+1253
| | | | | | | | | | | | | | | | Extracted out common subroutines, gave more meaningful names etc, added comments etc. Also: - Documented active servers load balancing reads, and other fields in SPIDER_SHARE etc. - Removed commented out code - Documented and refactored self-reference check - Removed some unnecessary functions - Renamed unhelpful root_count - Refactored spider_get_{sts,crd}, where we turn get_type into an enum - Cleaned up spider_mbase_handler::show_table_status() and spider_mbase_handler::show_index()
* MDEV-30265 Document some sts related functions in spider.Yuchen Pei2023-04-193-1/+62
|
* MDEV-30542 Add multilength spider self-reference detection testYuchen Pei2023-04-192-0/+50
|
* MDEV-28363 remove #ifdef SPIDER_use_LEX_CSTRING_for_Field_blob_constructorYuchen Pei2023-04-196-74/+0
|
* MDEV-30581 Add a testcase for MDEV-29904Yuchen Pei2023-04-192-0/+10
|
* MDEV-27912 Fixing inconsistency w.r.t. expect files in tests.Yuchen Pei2023-04-1924-50/+42
| | | | | | | | | | | | | | | | | | | | | | | | | | | mtr uses group suffix, but some existing inc and test files use server_id for expect files. This patch aims to fix that. For spider: With this change we will not have to maintain a separate version of restart_mysqld.inc for spider, that duplicates code, just because spider tests use different names for expect files, and shutdown_mysqld requires magical names for them. With this change spider tests will also be able to use other features provided by restart_mysqld.inc without code duplication, like the parameter $restart_parameters (see e.g. the testcase mdev_29904.test in commit ef1161e5d4f). Tests run after this change: default, spider, rocksdb, galera, using the following command mtr --parallel=auto --force --max-test-fail=0 --skip-core-file mtr --suite spider,spider/*,spider/*/* \ --skip-test="spider/oracle.*|.*/t\..*" --parallel=auto --big-test \ --force --max-test-fail=0 --skip-core-file mtr --suite galera --parallel=auto mtr --suite rocksdb --parallel=auto
* MDEV-30920 Remove need_lock and table from spider_close_sys_table()Yuchen Pei2023-04-197-280/+173
|
* Revert "Added mysql-log-rotate to .gitignore"Daniel Black2023-03-311-1/+0
| | | | | | | | | This reverts commit 158a58245813b1959d6ee912d77734620c7cf3ba. In 10.11 the generation of mysql-log-rotate was removed in commit fd0dcad676e7b8665f5363d97849a20cbb712933 There's no need to ignore files that aren't generated.
* All-green GitLab CI in 11.0 branchRobin Newhouse2023-03-303-1/+1024
| | | | | | | | | | | Include cppcheck and FlawFinder for SAST scanning. Ignorelists are present for both, so only new problems will trigger a CI failure. All new code of the whole pull request, including one or several files that are either new files or modified ones, are contributed under the BSD-new license. I am contributing on behalf of my employer Amazon Web Services, Inc.
* Update pull request template to suggest making PRs editable by maintainersVicențiu Ciorbaru2023-03-301-33/+19
| | | | | | | | | | | | | | | | | Often there are small "nitpicky" changes that need to be done to a PR in order to get it merged. To speed up the merge process, we will ask contributors if they are ok with the reviewer making those changes. Other fixups: Improve PR template rendering in browser's textarea field. Line wrapping at 80 characters provides a bad user experience within the browser, which handles word wrapping separately. Thus, prefer long lines in this markdown file. Remove the "backwards compatibility section". While the contributor should ideally care about the impact of their patch on the server's backwards compatibility, this is an advanced topic that is better presented in a separate document.
* [MDEV-30543] New status variable: max_used_connections_timeMikhail Chalov2023-03-303-1/+69
| | | | | | | | | | Add variable max_used_connections_time to show the time at which max_used_connections reached its current value. This is useful for troubleshooting high connection counts. MySQL 8 has this already. All new code of the whole pull request, including one or several files that are either new files or modified ones, are contributed under the BSD-new license. I am contributing on behalf of my employer Amazon Web Services.
* CODING_STANDARDS: Add variable initializations and functions spacingAhmed Ibrahim2023-03-301-1/+35
|
* Merge 10.11 into 11.0Marko Mäkelä2023-03-29134-3080/+3153
|\
| * Merge 10.10 into 10.11Marko Mäkelä2023-03-29114-3032/+3105
| |\
| | * Merge 10.9 into 10.10Marko Mäkelä2023-03-29113-3031/+3104
| | |\
| | | * Merge 10.8 into 10.9Marko Mäkelä2023-03-29113-3031/+3104
| | | |\
| | | | * Merge 10.6 into 10.8Marko Mäkelä2023-03-29113-3031/+3104
| | | | |\
| | | | | * Merge 10.5 into 10.6Marko Mäkelä2023-03-2875-2880/+2834
| | | | | |\
| | | | | | * MDEV-30936 fixupMarko Mäkelä2023-03-282-2/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | fil_space_t::~fil_space_t(): Invoke ut_free(name) because doing so in the callers would trip MSAN_OPTIONS=poison_in_dtor=1
| | | | | | * MDEV-30936 clang 15.0.7 -fsanitize=memory fails massivelyMarko Mäkelä2023-03-2817-63/+32
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | handle_slave_io(), handle_slave_sql(), os_thread_exit(): Remove a redundant pthread_exit(nullptr) call, because it would cause SIGSEGV. mysql_print_status(): Add MEM_MAKE_DEFINED() to work around some missing instrumentation around mallinfo2(). que_graph_free_stat_list(): Invoke que_node_get_next(node) before que_graph_free_recursive(node). That is the logical and MSAN_OPTIONS=poison_in_dtor=1 compatible way of freeing memory. ins_node_t::~ins_node_t(): Invoke mem_heap_free(entry_sys_heap). que_graph_free_recursive(): Rely on ins_node_t::~ins_node_t(). fts_t::~fts_t(): Invoke mem_heap_free(fts_heap). fts_free(): Replace with direct calls to fts_t::~fts_t(). The failures in free_root() due to MSAN_OPTIONS=poison_in_dtor=1 will be covered in MDEV-30942.
| | | | | | * MDEV-30421 rpl_parallel_*.test cleanupbb-10.5-midenokAleksey Midenkov2023-03-2363-2818/+2797
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Moved rpl_parallel_*.inc to rpl_parallel_*.test
| | | | | * | MDEV-26071: rpl.rpl_perfschema_applier_status_by_worker failed in bb …Andrei2023-03-243-29/+27
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | …with: Test assertion failed Problem: ======= Assertion text: 'Value returned by SSS and PS table for Last_Error_Number should be same.' Assertion condition: '"1146" = "0"' Assertion condition, interpolated: '"1146" = "0"' Assertion result: '0' Analysis: ======== In parallel replication when slave is started the worker pool gets activated and it gets cleared when slave stops. Each time the worker pool gets activated a backup worker pool also gets created to store worker specific perforance schema information in case of errors. On error, all relevant information is copied from rpl_parallel_thread to rli and it gets cleared from thread. Then server waits for all workers to complete their work, during this stage performance schema table specific worker info is stored into the backup pool and finally the actual pool gets cleared. If users query the performance schema table to know the status of workers the information from backup pool will be used. The test simulates ER_NO_SUCH_TABLE error and verifies the worker information in pfs table. Test works fine if execution occurs in following order. Step 1. Error occurred 'worker information is copied to backup pool'. Step 2. handle_slave_sql invokes 'rpl_parallel_resize_pool_if_no_slaves' to deactivate worker pool, it marks the pool->count=0 Step 3. PFS table is queried, since actual pool is deactivated backup pool information is read. If the Step 3 happens prior to Step2 the pool is yet to be deactivated and the actual pool is read, which doesn't have any error details as they were cleared. Hence test ocasionally fails. Fix: === Upon error mark the back pool as being active so that if PFS table is quried since the backup pool is flagged as valid its information will be read, in case it is not flagged regular pool will be read. This work is one of the last pieces created by the late Sujatha Sivakumar.
| | | | | * | MDEV-29545 InnoDB: Can't find record during replace stmtThirunarayanan Balathandayuthapani2023-03-243-1/+49
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Problem: ======== - InnoDB replace statement returns can't find record as result during bulk insert operation. InnoDB returns DB_END_OF_INDEX blindly when bulk transaction is visible to current transaction even though the search tuple is inserted as a part of current replace statement. Solution: ========= row_search_mvcc(): InnoDB should allow the transaction to read all the rows when innodb intends to do any locking on the record even though bulk insert transaction changes are visible to the current transaction
| | | | | * | MDEV-30900 Crash on macOS due to zero-initialized buf_dblwr.write_condMarko Mäkelä2023-03-241-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | buf_dblwr_t::init(), buf_dblwr_t::close(): Cover also write_cond, which was added in commit a55b951e6082a4ce9a1f2ed5ee176ea7dbbaf1f2 without explicit initialization. On GNU/Linux, PTHREAD_COND_INITIALIZER is a zero-initializer. That is why the default zero initialization happened to work on that platform.
| | | | | * | rpl_reporting: sprintf -> snprintfDaniel Black2023-03-241-7/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This was failing to compile with AppleClang 14.0.0.14000029. Thanks to Arunesh Choudhary for noticing.
| | | | | * | Merge 10.5 into 10.6Marko Mäkelä2023-03-2229-111/+182
| | | | | |\ \ | | | | | | |/
| | | | | | * MDEV-30882 Crash on ROLLBACK in a ROW_FORMAT=COMPRESSED tableMarko Mäkelä2023-03-222-17/+89
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | btr_cur_upd_rec_in_place(): Avoid calling page_zip_write_rec() if we are not modifying any fields that are stored in compressed format. btr_cur_update_in_place_zip_check(): New function to check if a ROW_FORMAT=COMPRESSED record can actually be updated in place. btr_cur_pessimistic_update(): If the BTR_KEEP_POS_FLAG is not set (we are in a ROLLBACK and cannot write any BLOBs), ignore the potential overflow and let page_zip_reorganize() or page_zip_compress() handle it. This avoids a failure when an attempted UPDATE of an NULL column to 0 is rolled back. During the ROLLBACK, we would try to move a non-updated long column to off-page storage in order to avoid a compression failure of the ROW_FORMAT=COMPRESSED page. page_zip_write_trx_id_and_roll_ptr(): Remove an assertion that would fail in row_upd_rec_in_place() because the uncompressed page would already have been modified there. This is a 10.5 version of commit ff3d4395d808b6421d2e0714e10d48c7aa2f3c3a (different because of commit 08ba388713946c03aa591899cd3a446a6202f882).
| | | | | | * [MDEV-30824] Fix binlog to use 'String' for setting 'character_set_client'Tingyao Nian2023-03-2127-94/+94
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Commit a923d6f49c1ad6fd3f4d6ec02e444c26e4d1dfa8 disabled numeric setting of character_set_* variables with non-default values: MariaDB [(none)]> set character_set_client=224; ERROR 1115 (42000): Unknown character set: '224' However the corresponding binlog functionality still write numeric values for log event, and this will break binlog replay if the value is not default. Now make the server use 'String' type for 'character_set_client' when generating binlog events Before: /*!\C utf8mb4 *//*!*/; SET @@session.character_set_client=224,@@session.collation_connection=224,@@session.collation_server=33/*!*/; After: /*!\C utf8mb4 *//*!*/; SET @@session.character_set_client=utf8mb4,@@session.collation_connection=33,@@session.collation_server=8/*!*/; Note: prior to the previous commit, setting with '224' or '45' or 'utf8mb4' have the same effect, as they all set the parameter to 'utf8mb4'. All new code of the whole pull request, including one or several files that are either new files or modified ones, are contributed under the BSD-new license. I am contributing on behalf of my employer Amazon Web Services, Inc.
| | | | | * | MDEV-30400 fixup: Fix the UNIV_ZIP_DEBUG buildMarko Mäkelä2023-03-202-3/+3
| | | | | | |
| * | | | | | Fix trivial spelling errorsOtto Kekalainen2023-03-2421-47/+47
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - agressively -> aggressively - exising -> existing - occured -> occurred - releated -> related - seperated -> separated - sucess -> success - use use -> use All new code of the whole pull request, including one or several files that are either new files or modified ones, are contributed under the BSD-new license. I am contributing on behalf of my employer Amazon Web Services, Inc.
* | | | | | | Fixed some typos in optimizer_costs.txtShivam Choudhary2023-03-281-8/+8
| | | | | | |
* | | | | | | MDEV-19629 post-merge fixesbb-11.0-sergSergei Golubchik2023-03-2786-430/+347
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * it isn't "pfs" function, don't call it Item_func_pfs, don't use item_pfsfunc.* * tests don't depend on performance schema, put in the main suite * inherit from Item_str_ascii_func * use connection collation, not utf8mb3_general_ci * set result length in fix_length_and_dec * do not set maybe_null * use my_snprintf() where possible * don't set m_value.ptr on every invocation * update sys schema to use the format_pico_time() * len must be size_t (compilation error on Windows) * the correct function name for double->double is fabs() * drop volatile hack
* | | | | | | MDEV-19629: format_pico_time implementationAhmed Ibrahim2023-03-278-2/+548
| | | | | | |
* | | | | | | MDEV-30837: Remove usage of AWK in autobake-debs.shTuukka Pasanen2023-03-271-1/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | AWK is used in autobake-debs.sh for printing information about created DEB packages. This can be rewrite with bash inner commands read and echo.
* | | | | | | MDEV-30837: Remove usage of AWK from Debian init and postinst scriptsTuukka Pasanen2023-03-272-3/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | AWK in used in Debian SysV-init and postinst scripts to determine is there enough space starting MariaDB database or create new database to target destination. These AWK scripts can be rewrited to use pure SH or help using Coreutils which is mandatory for usage of MariaDB currently. Reasoning behind this is to get rid of one very less used dependency
* | | | | | | MDEV-30778: Remove Awk from mysql_install_dbTuukka Pasanen2023-03-241-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Commit reduces need of AWK-command at least for Debian mariadb-server-compat package. Commit removes need of AWK-command from scripts/mysql_install_db.sh script. AWK command is replace by purely Posix sh compiliant version.
* | | | | | | MDEV-30911 Multi-batch recovery of ROW_FORMAT=COMPRESSED table hangsMarko Mäkelä2023-03-231-8/+43
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In commit d6aed21621e438e6135415c0c09fc6adfc0be368 a condition at the start of buf_read_ahead_random() was refactored. Only the caller buf_read_recv_pages() was adjusted for this. We must in fact adjust every caller and make sure that spare blocks will be allocated while crash recovery is in progress. This is the simplest fix; ideally recovery would operate on the compressed page frame. The observed recovery hang occurred because pages 0 and 3 of a tablespace were being read due to buf_page_get_gen() calls by trx_resurrect_table_locks() before the log records for these pages had been applied. In buf_page_t::read_complete() we would skip the call to recv_recover_page() because no uncompressed page frame had been allocated for the block.
* | | | | | | Fix the testcase for MDEV-30693Sergei Petrunia2023-03-202-2/+2
| | | | | | |
* | | | | | | Merge 10.11 into 11.0Marko Mäkelä2023-03-202-6/+12
|\ \ \ \ \ \ \ | |/ / / / / /
| * | | | | | Merge 10.10 into 10.11Marko Mäkelä2023-03-201-1/+0
| |\ \ \ \ \ \ | | |/ / / / /
| | * | | | | Merge 10.9 into 10.10Marko Mäkelä2023-03-201-1/+0
| | |\ \ \ \ \ | | | |/ / / /
| | | * | | | Merge 10.8 into 10.9Marko Mäkelä2023-03-201-1/+0
| | | |\ \ \ \ | | | | |/ / /
| | | | * | | Merge 10.6 into 10.8Marko Mäkelä2023-03-201-1/+0
| | | | |\ \ \ | | | | | |/ /
| | | | | * | MDEV-26827 fixup: Remove a bogus assertionMarko Mäkelä2023-03-201-1/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We can have dirty_blocks=0 when buf_flush_page_cleaner() is being woken up to write out or evict pages from the buf_pool.LRU list.