- 15 Aug, 2023 6 commits
-
-
Sergei Golubchik authored
alter_table_online -> alter_table_locknone gis-alter_table_online -> gis-alter_table
-
Sergei Golubchik authored
-
Sergei Golubchik authored
it was redundant, duplicating vcol_type == VCOL_GENERATED_STORED. Note that VCOL_DEFAULT is not "stored", "stored vcol" means that after rnd_next or index_read/etc the field value is already in the record[0] and does not need to be calculated separately
-
Sergei Golubchik authored
unpack_row() must calculate all stored and indexed vcols (in fill_extra_persistent_columns()). Also Update and Delete row events must mark in read_set all columns needed for calculating all stored and indexed vcols. If it's done properly in do_apply_event(), it no longer needs to be repeated per row.
-
Sergei Golubchik authored
it was created to handle the case of the concurrent inplace add index. So it should only work in that case, otherwise it's doing server's job (marks virtual column dependencies) and hides server's bugs. And it was redundant.
-
Sergei Golubchik authored
-
- 12 Aug, 2023 1 commit
-
-
Sergei Golubchik authored
it checks the version and activates after 11.2.0. Now result files are the same as in 11.1
-
- 11 Aug, 2023 11 commits
-
-
Sergei Golubchik authored
-
Sergei Golubchik authored
create_table_impl() doesn't need to search for a temporary table when the table_name is like #sql-xxx
-
Anel Husakovic authored
MDEV-31618: Server crashes in process_i_s_table_temporary_tables/get_all_tables after alter in rename query Any TMP_TABLE_SHARE must always have at least one TABLE instance. So whenever a temporary TABLE that is marked for reopen is closed, reopen it at once if its TMP_TABLE_SHARE list of tables becomes empty.
-
Anel Husakovic authored
- Fix MSAN uninitialized value error, obtained by calling handlerton's `info()`, and referencing uninitialized `errkey`. - Reviewer: serg@mariadb.com
-
Anel Husakovic authored
- Pre-open temporary table on sequence creation. - Without this patch, if rename alter is done on the temporary sequence, and after that `create replace`, since table is not preopened and alter rename marked the table as reopen, and such table is deleted in the `find_temporary_table()` leaving the share without the table, that causes `show tables` to fail - Closes PR #2685 - Reviewer: <serg@mariadb.com>
-
Sergei Golubchik authored
* IS_USER_TEMP_TABLE() was misleading, name didn't match the code * list of temp tables was rescanned number_of_databases times * some temporary tables were not shown (from nonexistent databases) * some temporary tables were shown more than once (e.g. after self-joins) * sys.table_exists() - avoid querying I_S twice * fix handling of temporary MERGE tables - it's pointless to fully open them, they're not in thd->temporary_tables, so they simply fail to open and are skipped. Relax the assertion instead.
-
Anel Husakovic authored
MDEV-28343: sys.create_synonym_db fails with ER_VIEW_SELECT_TMPTABLE when schema contains temporary tables - MDEV-28342 raised the error in case temporary table shadows base table - Now we are allowed to shadow base tables with temporary tables and `sys.create_synonym_db()` can easily check for existance of temporary table and ignore view creation, since it is not supported to create view from temporary table. Reviewed-by: <monty@mariadb.org>, <vicentiu@mariadb.org>
-
Monty authored
Reviewed-by: <vicentiu@mariadb.org>
-
Anel Husakovic authored
This commit updates sysschema to work with the new behaviour of show tables and information_schema.tables table showing temporary tables for current connection. Co-authored-by: Monty <monty@mariadb.org> Reviewer: <vicentiu@mariadb.org>
-
Anel Husakovic authored
Additionally fixes the bugs uncovered in: - `MDEV-28332: Alter on temporary table causes ER_TABLE_EXISTS_ERROR note` Since there is no `warning` issued by shadowing of base table, this MDEV is irrelevant. Keeping for review purposes and for future development in case shadowing is going to be implemented - `MDEV-28334: SHOW TABLE STATUS shows all temporary tables ignoring database and conditions` - `MDEV-28453: SHOW commands are inconsistent for temporary tables` Reviewed by: <monty@mariadb.org>, <vicentiu@mariadb.org>
-
Anel Husakovic authored
Reviewer: <vicentiu@mariadb.org>
-
- 10 Aug, 2023 1 commit
-
-
Dmitry Shulga authored
This bug report was caused by implementation of the task MDEV-5816 (Stored programs: validation of stored program statements). Changing metadata of a table that has a trigger on AFTER UPDATE or AFTER DELETE resulted in unexpected output of the error ER_TRG_NO_SUCH_ROW_IN_TR. It was caused by the fact that characteristics of the trigger dependent on changed table's metadata wasn't set in a new lex object created on re-parsing of a failing trigger statement. To fix the bug the data member lex->trg_chistics.action_time and lex->trg_chistics.event must be set into real values of the trigger whose statement being re-parsed.
-
- 02 Aug, 2023 5 commits
-
-
Sergei Golubchik authored
-
Sergei Golubchik authored
AES_ENCRYPT(str, key, [, iv [, mode ]]) AES_DECRYPT(str, key, [, iv [, mode ]]) mode is aes-{128,192,256}-{ecb,cbc,ctr} e.g. "aes-128-cbc". and a @@block_encryption_mode variable for the default value of mode change in behavior: AES_ENCRYPT(str, key) can no longer be used in persistent virtual columns (and alike)
-
Sergei Golubchik authored
apparently it works now just fine, tests don't fail anymore
-
Sergei Golubchik authored
-
Sergei Golubchik authored
in particular, this fixes a compiler warning: sql/sql_lex.h:406:19: warning: ‘sp_data_access_name’ defined but not used [-Wunused-variable]
-
- 01 Aug, 2023 1 commit
-
-
Thirunarayanan Balathandayuthapani authored
- Introduce the option :autoshrink attribute to be added to innodb_data_file_path variable to allow the shrinking of system tablespace during startup process. Steps for shrinking the system tablespace: 1) Find the last used extent in system tablespace by iterating through the BITMAP in extent descriptor pages 2) If the last used extent is lesser than user specified size then set desired target size to user specified size. 3) Store the page contents of "to be modified" extent descriptor pages, latches the "to be modified" extent descriptor pages and check for buffer pool memory availability 4) Make checkpoint to flush all pages in buffer pool, so that pages in flush list doesn't have to use doublewrite buffer and disable doublewrite buffer during shrinking process 5) Update the FSP_SIZE and FSP_FREE_LIMIT in header page 6) Remove the "to be truncated" pages from FSP_FREE and FSP_FREE_FRAG list 7) Reset the bitmap in the last descriptor pages for the "to be truncated" pages. 8) In case of multiple files, calculate the truncated last file size and do the truncation in last file 9) Check whether mini-transaction log size doesn't exceed the minimum value of innodb_log_buffer_size which is 2MB. In that case, replace the modified buffer pool pages with the page old content. 11) Commit the mini-transaction for shrinking the tablespace and enable/disable the doublewrite buffer depends on user specified value. recv_sys_t::apply(): Handle the truncation of system tablespace only if the recovered tablespace size is lesser than actual existing size.
-
- 26 Jul, 2023 6 commits
-
-
Marko Mäkelä authored
-
Marko Mäkelä authored
-
Marko Mäkelä authored
-
Marko Mäkelä authored
-
Marko Mäkelä authored
-
Marko Mäkelä authored
-
- 25 Jul, 2023 5 commits
-
-
Ian Gilfillan authored
-
Ian Gilfillan authored
-
Vincent Dufrasnes authored
The error message for user connections using insecure transport when secured transport is required is very uninformative and doesn't mention the requirement of secure transport at all. To make the error message more relevant, introduce a new error 'ER_SECURE_TRANSPORT_REQUIRED', copy of MySQL error message with the error code 08004 (SQL-server rejected establishment SQL-connection). Move the code of 'require_secure_transport' to be executed before authentication verification, as it's not part of authentication but rather verifying if connection should be allowed in the first place. 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.
-
Kristian Nielsen authored
Signed-off-by: Kristian Nielsen <knielsen@knielsen-hq.org>
-
Marko Mäkelä authored
The main problem is that at ever since commit aaef2e1d removed the function buf_wait_for_read(), it is not safe to invoke buf_page_get_low() with RW_NO_LATCH, that is, only buffer-fixing the page. If a page read (or decryption or decompression) is in progress, there would be a race condition when executing consistency checks, and a page would wrongly be flagged as corrupted. Furthermore, if the page is actually corrupted and the initial access to it was with RW_NO_LATCH (only buffer-fixing), the page read handler would likely end up in an infinite loop in buf_pool_t::corrupted_evict(). It is not safe to invoke mtr_t::upgrade_buffer_fix() on a block on which a page latch was not initially acquired in buf_page_get_low(). btr_block_reget(): Remove the constant parameter rw_latch=RW_X_LATCH. btr_block_get(): Assert that RW_NO_LATCH is not being used, and change the parameter type of rw_latch. btr_pcur_move_to_next_page(), innobase_table_is_empty(): Adjust for the parameter type change of btr_block_get(). btr_root_block_get(): If mode==RW_NO_LATCH, do not check the integrity of the page, because it is not safe to do so. btr_page_alloc_low(), btr_page_free(): If the root page latch is not previously held by the mini-transaction, invoke btr_root_block_get() again with the proper latching mode. btr_latch_prev(): Helper function to safely acquire a latch on a preceding sibling page while holding a latch on a B-tree page. To avoid deadlocks, we must not wait for the latch while holding a latch on the current page, because another thread may be waiting for our page latch when moving to the next page from our preceding sibling page. If s_lock_try() or x_lock_try() on the preceding page fails, we must release the current page latch, and wait for the latch on the preceding page as well as the current page, in that order. Page splits or merges will be prevented by the parent page latch that we are holding. btr_cur_t::search_leaf(): Make use of btr_latch_prev(). btr_cur_t::open_leaf(): Make use of btr_latch_prev(). Do not invoke mtr_t::upgrade_buffer_fix() (when latch_mode == BTR_MODIFY_TREE), because we will already have acquired all page latches upfront. btr_cur_t::pessimistic_search_leaf(): Do acquire an exclusive index latch before accessing the page. Make use of btr_latch_prev().
-
- 24 Jul, 2023 4 commits
-
-
Kristian Nielsen authored
Signed-off-by: Kristian Nielsen <knielsen@knielsen-hq.org>
-
Marko Mäkelä authored
row_ins_sec_index_entry_low(): Correct a condition that was inadvertently inverted in commit 89ec4b53 (MDEV-29603). We are not supposed to buffer INSERT operations into unique indexes, because duplicate key values would not be checked for. It is only allowed when using unique_checks=0, and in that case the user is supposed to guarantee that there are no duplicates.
-
Sergei Golubchik authored
* invoke parent's cleanup() * don't reinit memroot, if already inited (causes memory leak) also move free_root() from destructor to cleanup() to not accumulate allocations from prepare and multiple executes
-
tanruixiang authored
The idea is to have simple functions that the user can combine to produce the exact result one wants, whether the user wants JSON object that has common keys with another JSON object, or same key/value pair etc. So making simpler function helps here. We accomplish this by making three separate functions. 1) JSON_OBJECT_FILTER_KEYS(Obj, Arr_keys): Put keys ( which are basically strings ) in hash, go over the object and get key one by one. If the key is present in the hash, add the key-value pair to result. 2) JSON_OBJECT_TO_ARRAY(Obj) : Create a string variable, Go over the json object, and add each key value pair as an array into the result. 3) JSON_ARRAY_INTERSECT(arr1, arr2) : Go over one of the json and add each item of the array in hash (after normalizing each item). Go over the second array, search the normalized item one by one in the hash. If item is found, add it to the result. Implementation Idea: Holyfoot ( Alexey Botchkov) Author: tanruixiang and Rucha Deodhar
-