summaryrefslogtreecommitdiff
path: root/storage/federatedx
Commit message (Collapse)AuthorAgeFilesLines
* Merge 10.6 into 10.8Marko Mäkelä2023-02-104-7/+5
|\
| * Merge 10.5 into 10.6Marko Mäkelä2023-02-104-7/+5
| |\
| | * Merge 10.4 into 10.5Marko Mäkelä2023-02-104-7/+5
| | |\
| | | * Apply clang-tidy to remove empty constructors / destructorsVicențiu Ciorbaru2023-02-094-7/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch is the result of running run-clang-tidy -fix -header-filter=.* -checks='-*,modernize-use-equals-default' . Code style changes have been done on top. The result of this change leads to the following improvements: 1. Binary size reduction. * For a -DBUILD_CONFIG=mysql_release build, the binary size is reduced by ~400kb. * A raw -DCMAKE_BUILD_TYPE=Release reduces the binary size by ~1.4kb. 2. Compiler can better understand the intent of the code, thus it leads to more optimization possibilities. Additionally it enabled detecting unused variables that had an empty default constructor but not marked so explicitly. Particular change required following this patch in sql/opt_range.cc result_keys, an unused template class Bitmap now correctly issues unused variable warnings. Setting Bitmap template class constructor to default allows the compiler to identify that there are no side-effects when instantiating the class. Previously the compiler could not issue the warning as it assumed Bitmap class (being a template) would not be performing a NO-OP for its default constructor. This prevented the "unused variable warning".
* | | | Merge branch '10.7' into 10.8Oleksandr Byelkin2022-11-025-10/+85
|\ \ \ \
| * \ \ \ Merge branch '10.6' into 10.7Oleksandr Byelkin2022-11-025-10/+85
| |\ \ \ \ | | |/ / /
| | * | | Merge branch '10.5' into 10.6Oleksandr Byelkin2022-11-025-10/+85
| | |\ \ \ | | | |/ /
| | | * | Merge branch '10.4' into 10.5Oleksandr Byelkin2022-10-265-10/+85
| | | |\ \ | | | | |/
| | | | * Merge branch '10.3' into 10.4Oleksandr Byelkin2022-10-263-1/+4
| | | | |\
| | | | | * MDEV-29490 Renaming internally used client API to avoid name conflictsLawrin Novitsky2022-10-253-1/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | with C/C. The patch introduces mariadb_capi_rename.h which is included into mysql.h. The hew header contains macro definitions for the names being renamed. In versions 10.6+(i.e. where sql service exists) the renaming condition in the mariadb_capi_rename.h should be added with && !defined(MYSQL_DYNAMIC_PLUGIN) and look like The patch also contains removal of mysql.h from the api check. Disabling false_duper-6543 test for embedded. ha_federated.so uses C API. C API functions are being renamed in the server, but not renamed in embedded, since embedded server library should have proper C API, as expected by programs using it. Thus the same ha_federated.so cannot work both for server and embedded server library. As all federated tests are already disabled for embedded, federated isn't supposed to work for embedded anyway, and thus the test is being disabled.
| | | | * | MDEV-29640 FederatedX does not properly handle pushdown in case of ↵Oleg Smirnov2022-10-263-9/+81
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | difference in local and remote table names FederatedX table may refer to a table with a different name on the remote server: test> CREATE TABLE t2 (...) ENGINE="FEDERATEDX" CONNECTION="mysql://user:pass@192.168.1.111:9308/federatedx/t1"; test> select * from t2 where ...; This could cause an issue with federated_pushdown=1, because FederatedX pushes the query (or derived table's) text to the remote server. The remote server will try to read from table t2 (while it should read from t1). Solution: do not allow pushing down queries with tables that have different db_name.table name on the local and remote server. This patch also fixes: MDEV-29863 Server crashes in federatedx_txn::acquire after select from the FederatedX table with partitions Solution: disallow pushdown when partitioned FederatedX tables are used.
* | | | | | Merge branch '10.7' into 10.8Oleksandr Byelkin2022-10-042-6/+17
|\ \ \ \ \ \ | |/ / / / /
| * | | | | Merge branch '10.6' into 10.7Oleksandr Byelkin2022-10-042-6/+17
| |\ \ \ \ \ | | |/ / / /
| | * | | | Merge branch '10.5' into 10.6Sergei Golubchik2022-10-022-6/+17
| | |\ \ \ \ | | | |/ / /
| | | * | | Merge branch '10.4' into 10.5Sergei Golubchik2022-10-022-6/+17
| | | |\ \ \ | | | | |/ /
| | | | * | Merge branch '10.3' into 10.4Sergei Golubchik2022-10-011-2/+2
| | | | |\ \ | | | | | |/
| | | | | * Use memory safe snprintf() in Connect Engine and elsewhere (#2210)Mikhail Chalov2022-09-281-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Continue with similar changes as done in 19af1890 to replace sprintf(buf, ...) with snprintf(buf, sizeof(buf), ...), specifically in the "easy" cases where buf is allocated with a size known at compile time. 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-29613 fixup: clang -Wunused-but-set-variableMarko Mäkelä2022-09-261-4/+15
| | | | | |
* | | | | | Merge 10.7 into 10.8Marko Mäkelä2022-04-061-1/+1
|\ \ \ \ \ \ | |/ / / / /
| * | | | | Merge 10.6 into 10.7Marko Mäkelä2022-04-061-1/+1
| |\ \ \ \ \ | | |/ / / /
| | * | | | Merge 10.5 into 10.6Marko Mäkelä2022-04-061-1/+1
| | |\ \ \ \ | | | |/ / /
| | | * | | Merge 10.4 into 10.5Marko Mäkelä2022-04-061-1/+1
| | | |\ \ \ | | | | |/ /
| | | | * | Merge 10.3 into 10.4Marko Mäkelä2022-04-061-1/+1
| | | | |\ \ | | | | | |/
| | | | | * Merge 10.2 into 10.3Marko Mäkelä2022-04-061-1/+1
| | | | | |\
| | | | | | * Cleanup: Remove some unused functionsMarko Mäkelä2022-03-301-1/+1
| | | | | | |
| | | | | | * MDEV-17556 Assertion `bitmap_is_set_all(&table->s->all_set)' failedNikita Malyavin2021-01-081-10/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The assertion failed in handler::ha_reset upon SELECT under READ UNCOMMITTED from table with index on virtual column. This was the debug-only failure, though the problem is mush wider: * MY_BITMAP is a structure containing my_bitmap_map, the latter is a raw bitmap. * read_set, write_set and vcol_set of TABLE are the pointers to MY_BITMAP * The rest of MY_BITMAPs are stored in TABLE and TABLE_SHARE * The pointers to the stored MY_BITMAPs, like orig_read_set etc, and sometimes all_set and tmp_set, are assigned to the pointers. * Sometimes tmp_use_all_columns is used to substitute the raw bitmap directly with all_set.bitmap * Sometimes even bitmaps are directly modified, like in TABLE::update_virtual_field(): bitmap_clear_all(&tmp_set) is called. The last three bullets in the list, when used together (which is mostly always) make the program flow cumbersome and impossible to follow, notwithstanding the errors they cause, like this MDEV-17556, where tmp_set pointer was assigned to read_set, write_set and vcol_set, then its bitmap was substituted with all_set.bitmap by dbug_tmp_use_all_columns() call, and then bitmap_clear_all(&tmp_set) was applied to all this. To untangle this knot, the rule should be applied: * Never substitute bitmaps! This patch is about this. orig_*, all_set bitmaps are never substituted already. This patch changes the following function prototypes: * tmp_use_all_columns, dbug_tmp_use_all_columns to accept MY_BITMAP** and to return MY_BITMAP * instead of my_bitmap_map* * tmp_restore_column_map, dbug_tmp_restore_column_maps to accept MY_BITMAP* instead of my_bitmap_map* These functions now will substitute read_set/write_set/vcol_set directly, and won't touch underlying bitmaps.
* | | | | | | Merge branch '10.7' into 10.8Oleksandr Byelkin2022-02-041-1/+14
|\ \ \ \ \ \ \ | |/ / / / / /
| * | | | | | Merge branch '10.6' into 10.7Oleksandr Byelkin2022-02-041-1/+14
| |\ \ \ \ \ \ | | |/ / / / /
| | * | | | | Merge branch '10.5' into 10.6Oleksandr Byelkin2022-02-031-1/+14
| | |\ \ \ \ \ | | | |/ / / /
| | | * | | | Merge branch '10.4' into 10.5Oleksandr Byelkin2022-02-011-1/+14
| | | |\ \ \ \ | | | | |/ / /
| | | | * | | MDEV-14907 FEDERATEDX doesn't respect DISTINCTMonty2022-01-051-1/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Federated and Federatex cannot be used with ROR scans Federated::position() and Federatex::position() is storing in 'ref' a pointer into a local result set buffer. This means that one cannot compare 'ref' from different handler instances to see if they point to the same physical record. This bug caused federated.federatedx to return wrong results when the optimizer tried to use index_merge to resolve some queries. Fixed by introducing table flag HA_NON_COMPARABLE_ROWID and using this with the above handlers. Todo: - Fix multi_delete(), multi_update and read_records() to use primary key instead of 'ref' if case HA_NON_COMPARABLE_ROWID is set. The current code only works if we have only one range (like table scan) for the tables that will be updated in the second pass. - Enable DBUG_ASSERT() in ha_federated::cmp_ref() and ha_federatedx::cmp_ref().
* | | | | | | MDEV-27398 DESC index causes wrong (empty) result on Federated tablesSergei Golubchik2022-01-261-5/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | take descending indexes into account when generating a query
* | | | | | | cleanup: FederatedXSergei Golubchik2022-01-262-27/+16
|/ / / / / /
* | | | | | MDEV-26221: DYNAMIC_ARRAY use size_t for sizesEric Herman2021-10-191-4/+4
|/ / / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | https://jira.mariadb.org/browse/MDEV-26221 my_sys DYNAMIC_ARRAY and DYNAMIC_STRING inconsistancy The DYNAMIC_STRING uses size_t for sizes, but DYNAMIC_ARRAY used uint. This patch adjusts DYNAMIC_ARRAY to use size_t like DYNAMIC_STRING. As the MY_DIR member number_of_files is copied from a DYNAMIC_ARRAY, this is changed to be size_t. As MY_TMPDIR members 'cur' and 'max' are copied from a DYNAMIC_ARRAY, these are also changed to be size_t. The lists of plugins and stored procedures use DYNAMIC_ARRAY, but their APIs assume a size of 'uint'; these are unchanged.
* | | | | federatedx: ha_federatedx::get_txn -> staticSergei Golubchik2021-06-112-6/+2
| | | | |
* | | | | MDEV-25602 get rid of __WIN__ in favor of standard _WIN32Vladislav Vaintroub2021-06-061-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This fixed the MySQL bug# 20338 about misuse of double underscore prefix __WIN__, which was old MySQL's idea of identifying Windows Replace it by _WIN32 standard symbol for targeting Windows OS (both 32 and 64 bit) Not that connect storage engine is not fixed in this patch (must be fixed in "upstream" branch)
* | | | | Change CHARSET_INFO character set and collaction names to LEX_CSTRINGMonty2021-05-191-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This change removed 68 explict strlen() calls from the code. The following renames was done to ensure we don't use the old names when merging code from earlier releases, as using the new variables for print function could result in crashes: - charset->csname renamed to charset->cs_name - charset->name renamed to charset->coll_name Almost everything where mechanical changes except: - Changed to use the new Protocol::store(LEX_CSTRING..) when possible - Changed to use field->store(LEX_CSTRING*, CHARSET_INFO*) when possible - Changed to use String->append(LEX_CSTRING&) when possible Other things: - There where compiler issues with ensuring that all character set names points to the same string: gcc doesn't allow one to use integer constants when defining global structures (constant char * pointers works fine). To get around this, I declared defines for each character set name length.
* | | | | Reduce usage of strlen()Monty2021-05-192-27/+35
|/ / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Changes: - To detect automatic strlen() I removed the methods in String that uses 'const char *' without a length: - String::append(const char*) - Binary_string(const char *str) - String(const char *str, CHARSET_INFO *cs) - append_for_single_quote(const char *) All usage of append(const char*) is changed to either use String::append(char), String::append(const char*, size_t length) or String::append(LEX_CSTRING) - Added STRING_WITH_LEN() around constant string arguments to String::append() - Added overflow argument to escape_string_for_mysql() and escape_quotes_for_mysql() instead of returning (size_t) -1 on overflow. This was needed as most usage of the above functions never tested the result for -1 and would have given wrong results or crashes in case of overflows. - Added Item_func_or_sum::func_name_cstring(), which returns LEX_CSTRING. Changed all Item_func::func_name()'s to func_name_cstring()'s. The old Item_func_or_sum::func_name() is now an inline function that returns func_name_cstring().str. - Changed Item::mode_name() and Item::func_name_ext() to return LEX_CSTRING. - Changed for some functions the name argument from const char * to to const LEX_CSTRING &: - Item::Item_func_fix_attributes() - Item::check_type_...() - Type_std_attributes::agg_item_collations() - Type_std_attributes::agg_item_set_converter() - Type_std_attributes::agg_arg_charsets...() - Type_handler_hybrid_field_type::aggregate_for_result() - Type_handler_geometry::check_type_geom_or_binary() - Type_handler::Item_func_or_sum_illegal_param() - Predicant_to_list_comparator::add_value_skip_null() - Predicant_to_list_comparator::add_value() - cmp_item_row::prepare_comparators() - cmp_item_row::aggregate_row_elements_for_comparison() - Cursor_ref::print_func() - Removes String_space() as it was only used in one cases and that could be simplified to not use String_space(), thanks to the fixed my_vsnprintf(). - Added some const LEX_CSTRING's for common strings: - NULL_clex_str, DATA_clex_str, INDEX_clex_str. - Changed primary_key_name to a LEX_CSTRING - Renamed String::set_quick() to String::set_buffer_if_not_allocated() to clarify what the function really does. - Rename of protocol function: bool store(const char *from, CHARSET_INFO *cs) to bool store_string_or_null(const char *from, CHARSET_INFO *cs). This was done to both clarify the difference between this 'store' function and also to make it easier to find unoptimal usage of store() calls. - Added Protocol::store(const LEX_CSTRING*, CHARSET_INFO*) - Changed some 'const char*' arrays to instead be of type LEX_CSTRING. - class Item_func_units now used LEX_CSTRING for name. Other things: - Fixed a bug in mysql.cc:construct_prompt() where a wrong escape character in the prompt would cause some part of the prompt to be duplicated. - Fixed a lot of instances where the length of the argument to append is known or easily obtain but was not used. - Removed some not needed 'virtual' definition for functions that was inherited from the parent. I added override to these. - Fixed Ordered_key::print() to preallocate needed buffer. Old code could case memory overruns. - Simplified some loops when adding char * to a String with delimiters.
* | | | MDEV-22775: Merge 10.4 into 10.5Marko Mäkelä2021-04-081-1/+3
|\ \ \ \ | |/ / /
| * | | MDEV-22775 [HY000][1553] Changing name of primary key column with foreign ↵Alexander Barkov2021-04-071-1/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | key constraint fails. Problem: The problem happened because of a conceptual flaw in the server code: a. The table level CHARSET/COLLATE clause affected all data types, including numeric and temporal ones: CREATE TABLE t1 (a INT) CHARACTER SET utf8 [COLLATE utf8_general_ci]; In the above example, the Column_definition_attributes (and then the FRM record) for the column "a" erroneously inherited "utf8" as its character set. b. The "ALTER TABLE t1 CONVERT TO CHARACTER SET csname" statement also erroneously affected Column_definition_attributes::charset for numeric and temporal data types and wrote "csname" as their character set into FRM files. So now we have arbitrary non-relevant charset ID values for numeric and temporal data types in all FRM files in the world :) The code in the server and the other engines did not seem to be affected by this flaw. Only InnoDB inplace ALTER was affected. Solution: Fixing the code in the way that only character string data types (CHAR,VARCHAR,TEXT,ENUM,SET): - inherit the table level CHARSET/COLLATE clause - get the charset value according to "CONVERT TO CHARACTER SET csname". Numeric and temporal data types now always get &my_charset_numeric in Column_definition_attributes::charset and always write its ID into FRM files: - no matter what the table level CHARSET/COLLATE clause is, and - no matter what "CONVERT TO CHARACTER SET" says. Details: 1. Adding helper classes to pass small parts of HA_CREATE_INFO into Type_handler methods: - Column_derived_attributes - to pass table level CHARSET/COLLATE, so columns that do not have explicit CHARSET/COLLATE clauses can derive them from the table level, e.g. CREATE TABLE t1 (a VARCHAR(1), b CHAR(1)) CHARACTER SET utf8; - Column_bulk_alter_attributes - to pass bulk attribute changes generated by the ALTER related code. These bulk changes affect multiple columns at the same time: ALTER TABLE ... CONVERT TO CHARACTER SET csname; Note, passing the whole HA_CREATE_INFO directly to Type_handler would not be good: HA_CREATE_INFO is huge and would need not desired dependencies in sql_type.h and sql_type.cc. The Type_handler API should use smallest possible data types! 2. Type_handler::Column_definition_prepare_stage1() is now responsible to set Column_definition::charset properly, according to the data type, for example: - For string data types, Column_definition_attributes::charset is set from the table level CHARSET/COLLATE clause (if not specified explicitly in the column definition). - For numeric and temporal fields, Column_definition_attributes::charset is set to &my_charset_numeric, no matter what the table level CHARSET/COLLATE says. - For GEOMETRY, Column_definition_attributes::charset is set to &my_charset_bin, no matter what the table level CHARSET/COLLATE says. Previously this code (setting `charset`) was outside of of Column_definition_prepare_stage1(), namely in mysql_prepare_create_table(), and was erroneously called for all data types. 3. Adding Type_handler::Column_definition_bulk_alter(), to handle "ALTER TABLE .. CONVERT TO". Previously this code was inside get_sql_field_charset() and was erroneously called for all data types. 4. Removing the Schema_specification_st parameter from Type_handler::Column_definition_redefine_stage1(). Column_definition_attributes::charset is now fully properly initialized by Column_definition_prepare_stage1(). So we don't need access to the table level CHARSET/COLLATE clause in Column_definition_redefine_stage1() any more. 5. Other changes: - Removing global function get_sql_field_charset() - Moving the part of the former get_sql_field_charset(), which was responsible to inherit the table level CHARSET/COLLATE clause to new methods: -- Column_definition_attributes::explicit_or_derived_charset() and -- Column_definition::prepare_charset_for_string(). This code is only needed for string data types. Previously it was erroneously called for all data types. - Moving another part, which was responsible to apply the "CONVERT TO" clause, to Type_handler_general_purpose_string::Column_definition_bulk_alter(). - Replacing the call for get_sql_field_charset() in sql_partition.cc to sql_field->explicit_or_derived_charset() - it is perfectly enough. The old code was redundant: get_sql_field_charset() was called from sql_partition.cc only when there were no a "CONVERT TO CHARACTER SET" clause involved, so its purpose was only to inherit the table level CHARSET/COLLATE clause. - Moving the code handling the BINCMP_FLAG flag from mysql_prepare_create_table() to Column_definition::prepare_charset_for_string(): This code is responsible to resolve the BINARY comparison style into the corresponding _bin collation, to do the following transparent rewrite: CREATE TABLE t1 (a VARCHAR(10) BINARY) CHARSET utf8; -> CREATE TABLE t1 (a VARCHAR(10) CHARACTER SET utf8 COLLATE utf8_bin); This code is only needed for string data types. Previously it was erroneously called for all data types. 6. Renaming Table_scope_and_contents_source_pod_st::table_charset to alter_table_convert_to_charset, because the only purpose it's used for is handlering "ALTER .. CONVERT". The new name is much more self-descriptive.
* | | | Fix various spelling errors still found in codeOtto Kekäläinen2021-03-221-2/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Reseting -> Resetting Unknow -> Unknown capabilites -> capabilities choosen -> chosen direcory -> directory informations -> information openned -> opened refered -> referred to access -> one to access missmatch -> mismatch succesfully -> successfully dont -> don't
* | | | Merge branch 'bb-10.4-release' into bb-10.5-releaseSergei Golubchik2021-02-151-10/+9
|\ \ \ \ | |/ / /
| * | | Merge branch 'bb-10.3-release' into bb-10.4-releaseSergei Golubchik2021-02-121-10/+9
| |\ \ \ | | |/ / | | | | | | | | | | | | Note, the fix for "MDEV-23328 Server hang due to Galera lock conflict resolution" was null-merged. 10.4 version of the fix is coming up separately
| | * | MDEV-17556 Assertion `bitmap_is_set_all(&table->s->all_set)' failedNikita Malyavin2021-01-271-10/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The assertion failed in handler::ha_reset upon SELECT under READ UNCOMMITTED from table with index on virtual column. This was the debug-only failure, though the problem is mush wider: * MY_BITMAP is a structure containing my_bitmap_map, the latter is a raw bitmap. * read_set, write_set and vcol_set of TABLE are the pointers to MY_BITMAP * The rest of MY_BITMAPs are stored in TABLE and TABLE_SHARE * The pointers to the stored MY_BITMAPs, like orig_read_set etc, and sometimes all_set and tmp_set, are assigned to the pointers. * Sometimes tmp_use_all_columns is used to substitute the raw bitmap directly with all_set.bitmap * Sometimes even bitmaps are directly modified, like in TABLE::update_virtual_field(): bitmap_clear_all(&tmp_set) is called. The last three bullets in the list, when used together (which is mostly always) make the program flow cumbersome and impossible to follow, notwithstanding the errors they cause, like this MDEV-17556, where tmp_set pointer was assigned to read_set, write_set and vcol_set, then its bitmap was substituted with all_set.bitmap by dbug_tmp_use_all_columns() call, and then bitmap_clear_all(&tmp_set) was applied to all this. To untangle this knot, the rule should be applied: * Never substitute bitmaps! This patch is about this. orig_*, all_set bitmaps are never substituted already. This patch changes the following function prototypes: * tmp_use_all_columns, dbug_tmp_use_all_columns to accept MY_BITMAP** and to return MY_BITMAP * instead of my_bitmap_map* * tmp_restore_column_map, dbug_tmp_restore_column_maps to accept MY_BITMAP* instead of my_bitmap_map* These functions now will substitute read_set/write_set/vcol_set directly, and won't touch underlying bitmaps.
* | | | Merge commit '10.4' into 10.5Oleksandr Byelkin2021-01-064-15/+22
|\ \ \ \ | |/ / /
| * | | Merge branch '10.3' into 10.4bb-10.4-MDEV-23468Oleksandr Byelkin2020-12-254-15/+22
| |\ \ \ | | |/ /
| | * | Merge branch '10.2' into 10.3Oleksandr Byelkin2020-12-234-15/+22
| | |\ \ | | | |/
| | | * MDEV-17573 Assertion in federatedx on multi-updateAleksey Midenkov2020-12-094-15/+22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Cause: shared federatedx_io cannot store table-specific data. Fix: move current row reference `federatedx_io_mysql::current` to ha_federatedx. FederatedX connection (represented by federatedx_io) is stored into federatedx_txn::txn_list of per-server connections (see federatedx_txn::acquire()). federatedx_txn object is stored into THD (see ha_federatedx::external_lock()). When multiple handlers acquire FederatedX connection they get single federatedx_io instance. Multiple handlers do their operation via federatedx_io_mysql::mark_position() and federatedx_io_mysql::fetch_row() in arbitrarty manner. They access the same federatedx_io_mysql instance and same MYSQL_ROWS *current pointer, so one handler disrupts the work of the other. Related to "MDEV-14551 Can't find record in table on multi-table update with ORDER BY".
| | * | MDEV-16937 Strict SQL with system versioned tables causes issuesAleksey Midenkov2020-05-281-0/+17
| | | | | | | | | | | | | | | | | | | | | | | | Respect system fields in NO_ZERO_DATE mode. This is the subject for refactoring in MDEV-19597
* | | | Added 'final' to some classes to improve generated codeMichael Widenius2020-08-041-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Final added to: - All reasonable classes inhereted from Field - All classes inhereted from Protocol - Almost all Handler classes - Some important Item classes The stripped size of mariadbd is just 4K smaller, but several object files showed notable improvements in common execution paths. - Checked field.o and item_sum.o Other things: - Added 'override' to a few class functions touched by this patch. - Removed 'virtual' from a new class functions that had/got 'override' - Changed Protocol_discard to inherit from Protocol instad of Protocol_text