- 20 Apr, 2018 7 commits
-
-
Alexander Barkov authored
Adding tests with IN/EXISTS subqueries in various rarely unexpected places: - non-SELECT statements - SP control - cursors etc.
-
Sergey Vojtovich authored
-
Alexander Barkov authored
Problem: The logic in store_column_type() with a switch on field type was hard to follow. The part for MEDIUMINT (MYSQL_TYPE_INT24) was not correct. It erroneously calculated the precision of MEDIUMINT UNSIGNED as 7 instead of 8. A similar hard-to-follow switch doing some type specific calculations resided in adjust_max_effective_column_length(). It was also wrong for MEDIUMINT (reported as a separate issue in MDEV-15946). Solution: 1. Introducing a new class Information_schema_numeric_attributes 2. Adding a new virtual method Field::information_schema_numeric_attributes() 3. Splitting the logic in store_column_type() into virtual implementations of information_schema_numeric_attributes(). 4. In order to avoid adding duplicate code for the integer data types, adding a new virtual method Field_int::numeric_precision(), which returns the number of digits. Additional changes: 1. Adding the "const" qualifier to Field::max_display_length() 2. Moving the code from adjust_max_effective_column_length() directly to Field::max_display_length(). There was no any sense to have two implementations: - a set of wrong virtual implementations for Field_xxx::max_display_length() - additional code in adjust_max_effective_column_length() fixing bad results of Field_xxx::max_display_length() This change is safe: - The code using Field::max_display_length() in field.cc, sql_show.cc, sql_type.cc is not affected. - The code in rpl_utility.cc is also not affected. See a new DBUG_ASSSERT and new comments explaining why. In the new reduction, Field_xxx::max_display_length() returns correct results for all integer types (except MEDIUMINT, see below). Putting implementations of numeric_precision() and max_display_length() near each other in field.h made the logic much clearer and thus helped to reveal bad results for Field_medium::max_display_length(), which returns 9 instead of 8 for signed MEDIUMINT fields. This problem will be addressed separately (MDEV-15946). Note, this change is also useful for pluggable data types (see MDEV-4912), as now a user defined Field_xxx has a way to control what's returned in INFORMATION_SCHEMA.COLUMNS.NUMERIC_PRECISION and INFORMATION_SCHEMA.COLUMNS.NUMERIC_SCALE by implementing a desired behavior in Field_xxx::information_schema_numeric_attributes().
-
Sergey Vojtovich authored
Storing 1 byte long string in VARCHAR() COMPRESSED column may trigger integer overflow when calculating available space for zlib output.
-
Sergey Vojtovich authored
Character set safe truncation is done when storing non-empty string in VARCHAR(0) COMPRESSED column, so that string becomes empty. The code didn't expect empty string after truncation. Fixed by moving empty string check after truncation.
-
Sachin Setiya authored
1 Added typecast 2 Included have_debug.inc
-
Igor Babaev authored
Element_type& Bounds_checked_array<Element_type>::operator[] (size_t) [with Element_type = Item*; size_t = long unsigned int] In sql_yacc.yy the semantic actions for the MEDIAN window function lacked a call of st_select_lex::prepare_add_window_spec(). This function saves the head of the thd->lex->order_list into lex->save_order_list in order this head to be restored in st_select_lex::add_window_spec after the specification of the window function has been parsed. Without a call of prepare_add_window_spec() when add_window_spec() was called the head of an empty list was copied into thd->lex->order_list (instead of assumed saved head this list). This made the list thd->lex->order_list invalid and potentially could cause many different problems. Corrected the result set in the test case for MDEV-15899 that used the MEDIAN window function and could not be correct without this fix.
-
- 19 Apr, 2018 5 commits
-
-
Sachin Setiya authored
after rebuilding under test_pseudo_invisible If we are doing alter related to partitioning then simple alter stmt like adding column(or any alter stmt) can't be combined with partition alter, this will generate a syntax error. But IF we add SET debug_dbug="+d,test_pseudo_invisible"; or test_completely_invisible this will add a column to table with have an already partitioning related alter. This execution of wrong stmt will crash the server on later stages. (like on repair partition). So we will simply return 1 (and ER_INTERNAL_ERROR) if we any of these debug_dbug flags turned on.
-
Marko Mäkelä authored
Temporarily disable main.cte_recursive due to hang in an added test related to MDEV-15575.
-
Sachin Setiya authored
In this commit we are adding three more status variable to SHOW SLAVE STATUS. Slave_DDL_Events and Slave_Non_Transactional_Events. Slave_DDL_Groups:- This status variable counts the occurrence of DDL statements Slave_Non_Transactional_Groups:- This variable count the occurrence of non-transnational event group. Slave_Transactional_Groups:- This variable count the occurrence of transnational event group. Patch Credit:- Kristian Nielsen
-
Sachin Setiya authored
It changes the cmake WITH_NUMA option to have 3 values Auto:- If libnuma present compile with numa (Default value) OFF:- Compile without libnuma On:- Compile with numa , throw error if libnuma not present Patch Contributer:- Vesa Patch Reviewer:- serg
-
Sachin Setiya authored
insert into table with TIMESTAMP INVISIBLE Problem:- The segfault occurs because value is null but since timestamp field is VISIBLE it expects a value , and it tries to call value->save_in_field(.. Timestamp field should not be visible this is the problem. Solution:- While we clone field for record0_field we don't honor the field _visibility , this patch changes that.
-
- 18 Apr, 2018 4 commits
-
-
Thirunarayanan Balathandayuthapani authored
- If select query chooses the index 'b' over clustered index then the issue can happen. Changed the test case to use primary index for the select query.
-
Thirunarayanan Balathandayuthapani authored
MDEV-15828 Server crash or assertion `num_fts_index <= 1' failure up on ALTER TABLE adding two fulltext indexes - Inplace alter shouldn't support if the number of newly added fts index exceeds 1 even though the table undergoes rebuild. It is a regression of MDEV-14016
-
Thirunarayanan Balathandayuthapani authored
- During rollback, redo segments priorities over no-redo rollback segments and it leads to failure of redo rollback segment undo logs truncation.
-
Igor Babaev authored
The crash happened because JOIN::check_for_splittable_materialized() called by mistake the function JOIN_TAB::is_inner_table_of_outer_join() instead of the function TABLE_LIST::is_inner_table_of_outer_join(). The former cannot be called before the call of make_outerjoin_info().
-
- 17 Apr, 2018 4 commits
-
-
Igor Babaev authored
Usage of aggregate/window functions in non-recursive parts of recursive CTEs is allowed. Error messages complaining about this were reported by mistake.
-
Alexey Botchkov authored
MDEV-13584 Assertion `!part_elem->tablespace_name && !table_create_info->tablespace' failed during EXCHANGE PARTITION with different TABLESPACE. Wrong DBUG_ASSERT just removed.
-
Andrei Elkin authored
MDEV-13073 effectively made the master semisync component depending on the plugin one through instantiation of THD by its Ack thread. The thread therefore must be closing its resources prior to plugin_shutdown(), which was not the case. Fixed with implementing the requirement.
-
Vladislav Vaintroub authored
file IO, rather than int. On Windows, it is suboptimal to depend on C runtime, as it has limited number of file descriptors. This change eliminates os_file_read_no_error_handling_int_fd(), os_file_write_int_fd(), OS_FILE_FROM_FD() macro.
-
- 16 Apr, 2018 14 commits
-
-
Michael Widenius authored
Test was missing a FLUSH TABLES
-
Igor Babaev authored
This bug manifested itself when the optimizer chose an execution plan with an access of the recursive CTE in a recursive query by key and ARIA/MYISAM temporary tables were used to store recursive tables. The problem appeared due to passing an incorrect parameter to the call of instantiate_tmp_table() in the function With_element::instantiate_tmp_tables().
-
Michael Widenius authored
This is to align the naming to compile-pentium64 and to avoid mistakes of accidently compiling a 32 bit binary on a 64 bit system Removed also a few very old not usable BUILD scripts
-
Michael Widenius authored
-
Michael Widenius authored
-
Michael Widenius authored
- Remove unused variables - Mark variables unused - Fix wrong types - Add no-strict-aliasing to BUILD scripts
-
Igor Babaev authored
The cause of this bug was the same as for the bug mdev-15575. Fixed by the patch for the latter.
-
Daniel Bartholomew authored
-
Igor Babaev authored
This bug happened due to a defect of the implementation of the handler function ha_delete_all_rows() for the ARIA engine. The function maria_delete_all_rows() truncated the table, but it didn't touch the write cache, so the cache's write offset was not reset. In the scenario like in the function st_select_lex_unit::exec_recursive when first all records were deleted from the table and then several new records were added some metadata became inconsistent with the state of the cache. As a result the table scan function could not read records at the end of the table. The same defect could be found in the implementation of ha_delete_all_rows() for the MYISAM engine mi_delete_all_rows(). Additionally made late instantiation for the temporary table used to store rows that were used for each new iteration when executing a recursive CTE.
-
Sergei Golubchik authored
revert incorrect change
-
Mohd Shakir Zakaria authored
-
Jan Lindström authored
Fix mtr to be able to wait for >1 exited mysqld
-
Daniel Black authored
-
Hartmut Holzgraefe authored
Allow to exclude certain databases from an --all-databases dump, e.g. to be able to do mysqldump --all-databases --ignore-database=mysql to dump everything but the system tables.
-
- 15 Apr, 2018 2 commits
-
-
Marko Mäkelä authored
When skipping the MDEV-11369 'default row' record, check again for an empty page.
-
Marko Mäkelä authored
The rollback of the modification of a pre-existing record should involve a purge-like operation. Before MDEV-12288 the only purge-like operation was the removal of a delete-marked record. After MDEV-12288, any rollback of updating an existing record must reset the DB_TRX_ID column when it is no longer visible in the purge read view. row_vers_must_preserve_del_marked(): Remove. It is cleaner to perform the check directly in row0umod.cc. row_trx_id_offset(): Auxiliary function to retrieve the byte offset of DB_TRX_ID in a clustered index leaf page record. row_undo_mod_must_purge(): Determine if a record should be purged. row_undo_mod_clust(): For temporary tables, skip the purge checks. When rolling back an update so that the original record was not delete-marked, reset DB_TRX_ID if the history is no longer visible.
-
- 14 Apr, 2018 2 commits
-
-
Vladislav Vaintroub authored
-
Vladislav Vaintroub authored
if volume can't be opened due to permissions, or IOCTL_STORAGE_QUERY_PROPERTY fails with not implemented, do not report it. Those errors happen, there is nothing user can do. This patch amends fix for MDEV-12948.
-
- 13 Apr, 2018 2 commits
-
-
Sergei Golubchik authored
-
Andrei Elkin authored
Recent changes in semisync initialization via MDEV-13073 introduced instantiation of THD too early from the server components pov which led to segfault. Fixed with relocating the semisync component initialization to later time when thread specific memory can be used.
-