- 30 Jun, 2018 2 commits
-
-
Sergei Golubchik authored
RBR not versioned -> versioned do it for all write_row events, not only for WRITE_ROWS_EVENT_V1
-
Sergei Golubchik authored
-
- 28 Jun, 2018 1 commit
-
-
Alexander Barkov authored
Problem: push_handler() created sp_handler_entry instances on THD::main_mem_root, which is freed only after the SP instructions execution. So in case of a CONTINUE HANDLER inside a loop (e.g. WHILE) this approach leaked thread memory on every loop iteration. Changes: - Removing sp_handler_entry declaration, it's not really needed. - Fixing the data type of sp_rcontext::m_handlers from Dynamic_array<sp_handler_entry*> to Dynamic_array<sp_instr_hpush_jump*> - Fixing sp_rcontext::push_handler() to push the pointer to an sp_instr_hpush_jump instance to the handler stack. This instance contains everything we need. There is no a need to allocate anything else.
-
- 27 Jun, 2018 2 commits
-
-
Sergei Golubchik authored
-
Alexander Barkov authored
Problem: push_cursor() created sp_cursor instances on THD::main_mem_root, which is freed only after the SP instructions loop. Changes: - Moving sp_cursor declaration from sp_rcontext.h to sql_class.h - Deriving sp_instr_cpush from sp_cursor. So now sp_cursor is created only once (at the SP parse time) and then reused on all loop iterations - Adding a new method reset() into sp_cursor (and its parent classes) to reset an sp_cursor instance before reuse. - Moving former sp_cursor members m_fetch_count, m_row_count, m_found into a separate class sp_cursor_statistics. This helps to reuse the code in sp_cursor constructors, and in sp_cursor::reset() - Adding a helper method sp_rcontext::pop_cursor(). - Adding "THD*" parameter to so_rcontext::pop_cursors() and pop_all_cursors() - Removing "new" and "delete" from sp_rcontext::push_cursor() and sp_rconext::pop_cursor(). - Fixing sp_cursor not to derive from Sql_alloc, as it's now allocated only as a part of sp_instr_cpush (and not allocated separately). - Moving lex_keeper->disable_query_cache() from sp_cursor::sp_cursor() to sp_instr_cpush::execute(). - Adding tests
-
- 26 Jun, 2018 2 commits
-
-
Alexander Barkov authored
-
Thirunarayanan Balathandayuthapani authored
NULL values when there is no DEFAULT - Fixed the test failure, assigned number of rows read to new table.
-
- 25 Jun, 2018 6 commits
-
-
Alexander Barkov authored
MDEV-10581 sql_mode=ORACLE: Explicit cursor FOR LOOP MDEV-12098 sql_mode=ORACLE: Implicit cursor FOR loop Cleanup changes: - Removing sp_lex_cursor::m_cursor_name - Adding sp_instr_cursor_copy_struct::m_cursor (the cursor global index) - Fixing sp_instr_cursor_copy_struct::print() to access to the cursor name using m_ctx and m_cursor (like other cursor related instructions do) instead of m_cursor_name. This change is needed to unify sp_assignment_lex and sp_cursor_lex later, to fix this problem easier: MDEV-16558 Parenthesized expression does not work as a lower FOR loop bound
-
Thirunarayanan Balathandayuthapani authored
NULL values when there is no DEFAULT - Fixed typecasting failure for log->n_rows in row0log.cc
-
Oleksandr Byelkin authored
-
Thirunarayanan Balathandayuthapani authored
NULL values when there is no DEFAULT - Post push fix for adding n_rows in row_log_t.
-
Oleksandr Byelkin authored
Returned accidentally removed undefinition of MYSQL_SERVER in net_serv.cc inside embedded server (embedded server uses real_net_read/write only as a client) Prevented attempt to clean up embedded server if it was not initialized
-
Thirunarayanan Balathandayuthapani authored
NULL values when there is no DEFAULT Copy and inplace algorithm works similarly for NULL to NOT NULL conversion for the following cases: (1) strict sql mode - Should give error. (2) non-strict sql mode - Should give warnings alone (3) alter ignore table command. - Should give warnings alone.
-
- 22 Jun, 2018 1 commit
-
-
Alexander Barkov authored
-
- 21 Jun, 2018 1 commit
-
-
Alexander Barkov authored
-
- 20 Jun, 2018 4 commits
-
-
Eugene Kosov authored
Changing columns WITH/WITHOUT SYSTEM VERSIONING doens't require to read data at all. Thus it should be an instant operation. Patch also fixes a bug when ALTER_COLUMN_UNVERSIONED wasn't passed to InnoDB to change its internal structures. change_field_versioning_try(): apply WITH/WITHOUT SYSTEM VERSIONING change in SYS_COLUMNS for one field. change_fields_versioning_try(): apply WITH/WITHOUT SYSTEM VERSIONING change in SYS_COLUMNS for every changed field in a table. change_fields_versioning_cache(): update cache for versioning property of columns.
-
Alexander Barkov authored
MDEV-16489 when lead() returns null on a datetime field, the result is treated as the literal string '[NULL]'
-
Alexander Barkov authored
-
Oleksandr Byelkin authored
-
- 19 Jun, 2018 2 commits
-
-
Oleksandr Byelkin authored
-
Igor Babaev authored
This bug happened for queries that used a materialized view that renamed columns of the specifying query in an inner table of an outer join. For such a query name resolution for a column belonging the view could fail if the underlying column was non-nullable. When creating the defintion of the the temporary table for the materialized view used in the inner part of an outer join the definition of the non-nullable columns are created by the function create_tmp_field_from_item() that names the columns according to the names of the underlying columns. So these names should be changed for the view column names. This bug cannot be reproduced in 10.2 because there setup_fields() called when preparing joins in the view specification effectively renames the underlying columns in the function find_field_in_view(). In 10.3 this renaming was removed as improper (see Monty's commit b478276b).
-
- 18 Jun, 2018 2 commits
-
-
Jacob Mathew authored
Add a Spider test to ensure that a bug similar to MDEV-11084 is not re-introduced. Spider would crash if the first partition was not used first. Author: Eric Herman. First Reviewer: Jacob Mathew. Second Reviewer: Kentoku Shiba.
-
Marko Mäkelä authored
-
- 16 Jun, 2018 1 commit
-
-
Sergei Golubchik authored
after 4461b0f9
-
- 15 Jun, 2018 4 commits
-
-
Sergei Petrunia authored
cpk_scan should not be used if using it increases the cost of the query plan.
-
Oleksandr Byelkin authored
MDEV-11071: Assertion `thd->transaction.stmt.is_empty()' failed in Locked_tables_list::unlock_locked_table fix_length_and_dec now return result (error/OK)
-
Alexander Barkov authored
When altering from DECIMAL to *INT UNIGNED or to BIT, go through val_decimal(), to avoid truncation to the biggest possible signed integer (0x7FFFFFFFFFFFFFFF / 9223372036854775807).
-
Alexander Barkov authored
This problem was earlier fixed by the patch cb16d753 for MDEV-11337 Split Item::save_in_field() into virtual methods in Type_handler. Adding tests only.
-
- 14 Jun, 2018 4 commits
-
-
Galina Shalygina authored
materialized derived table/view that uses aliases is done The problem appears when a column alias inside the materialized derived table/view t1 definition coincides with the column name used in the GROUP BY clause of t1. If the condition that can be pushed into t1 uses that ambiguous column name this column is determined as a column that is used in the GROUP BY clause instead of the alias used in the projection list of t1. That causes wrong result. To prevent it resolve_ref_in_select_and_group() was changed.
-
Marko Mäkelä authored
Since MariaDB Server 10.2.2 (and MySQL 5.7), the default value of innodb_checksum_algorithm is crc32 (CRC-32C), not the inefficient "innodb" checksum. Change Mariabackup to use the same default, so that checksum validation (when using the default algorithm on the server) will take less time during mariabackup --backup. Also, mariabackup --prepare should be a little faster, and the server should read backups faster, because the page checksums would only be validated against CRC-32C.
-
Marko Mäkelä authored
fil_page_decompress(): Replaces fil_decompress_page(). Allow the caller detect errors. Remove duplicated code. Use the "safe" instead of "fast" variants of decompression routines. fil_page_compress(): Replaces fil_compress_page(). The length of the input buffer always was srv_page_size (innodb_page_size). Remove printouts, and remove the fil_space_t* parameter. buf_tmp_buffer_t::reserved: Make private; the accessors acquire() and release() will use atomic memory access. buf_pool_reserve_tmp_slot(): Make static. Remove the second parameter. Do not acquire any mutex. Remove the allocation of the buffers. buf_tmp_reserve_crypt_buf(), buf_tmp_reserve_compression_buf(): Refactored away from buf_pool_reserve_tmp_slot(). buf_page_decrypt_after_read(): Make static, and simplify the logic. Use the encryption buffer also for decompressing. buf_page_io_complete(), buf_dblwr_process(): Check more failures. fil_space_encrypt(): Simplify the debug checks. fil_space_t::printed_compression_failure: Remove. fil_get_compression_alg_name(): Remove. fil_iterate(): Allocate a buffer for compression and decompression only once, instead of allocating and freeing it for every page that uses compression, during IMPORT TABLESPACE. Also, validate the page checksum before decryption, and reduce the scope of some variables. fil_page_is_index_page(), fil_page_is_lzo_compressed(): Remove (unused). AbstractCallback::operator()(): Remove the parameter 'offset'. The check for it in FetchIndexRootPages::operator() was basically redundant and dead code since the previous refactoring.
-
Alexander Barkov authored
-
- 13 Jun, 2018 5 commits
-
-
Alexander Barkov authored
Problem: The problem was most likely introduced by a fix for MDEV-11597 (commit 5f0c31f9) which removed the assignment "killed= KILL_BAD_DATA" from THD::raise_condition(). Before MDEV-11597, sp_head::execute() tested thd->killed after looping through the SP instructions and exited with an error if thd->killed is set. After MDEV-11597, sp_head::execute() stopped to notice errors and set the OK status on top of the error status, which crashed on assert. Fix: Making sp_cursor::fetch() return -1 if server_side_cursor->fetch(1) left an error in the diagnostics area. This makes the statement "err_status= i->execute(thd, &ip)" in sp_head::execute() set the error code and correctly break the SP instruction loop and return on error without setting the OK status.
-
Sergei Petrunia authored
Adjust the patch to match the variant accepted into the upstream: undo the changes in ha_rocksdb::load_hidden_pk_value().
-
Sergei Petrunia authored
Added a testcase
-
Alexander Barkov authored
-
Alexander Barkov authored
-
- 12 Jun, 2018 3 commits
-
-
Alexander Barkov authored
This problem was earlier fixed by MDEV-14603. Only adding 10.2 specific tests.
-
Marko Mäkelä authored
When type of the settable global variable innodb_change_buffering was changed from string to ENUM in MDEV-12218, the "shadow" variable ibuf_use stopped being updated as a result of SET GLOBAL innodb_change_buffering. Only on InnoDB startup, the parameter innodb_change_buffering would take effect. ibuf_use: Remove, and use the global variable innodb_change_buffering.
-
Marko Mäkelä authored
When attempting to rename a table to a non-existing database, InnoDB would misleadingly report "OS error 71" when in fact the error code is InnoDB's own (OS_FILE_NOT_FOUND), and not report both pathnames. Errors on rename could occur due to reasons connected to either pathname. os_file_handle_rename_error(): New function, to report errors in renaming files.
-