- 13 May, 2015 6 commits
-
-
Sergey Vojtovich authored
Removed yet more mysql_reset_thd_for_next_command(). Call THD::reset_for_next_command() directly instead.
-
Sergey Vojtovich authored
sql_alloc() has additional costs compared to direct mem_root allocation: - function call: it is defined in a separate translation unit and can't be inlined - it needs to call pthread_getspecific() to get THD::mem_root It is called dozens of times implicitely at least by: - List<>::push_back() - List<>::push_front() - new (for Sql_alloc derived classes) - sql_memdup() Replaced lots of implicit sql_alloc() calls with direct mem_root allocation, passing through THD pointer whenever it is needed. Number of sql_alloc() calls reduced 345 -> 41 per OLTP RO transaction. pthread_getspecific() overhead dropped 0.76 -> 0.59 sql_alloc() overhed dropped 0.25 -> 0.06
-
Sergey Vojtovich authored
delete_dynamic() was called 9-11x per OLTP RO query + 3x per BEGIN/COMMIT. 3 calls were performed by LEX_MASTER_INFO. Added condition to call those only for CHANGE MASTER. 1 call was performed by lock_table_names()/Hash_set/my_hash_free(). Hash_set was supposed to be used for DDL and LOCK TABLES to gather database names, while it was initialized/freed for DML too. In fact Hash_set didn't do any useful job here. Hash_set was removed and MDL requests are now added directly to the list. The rest 5-7 calls are done by optimizer, mostly by Explain_query and friends. Since dynamic arrays are used in most cases, they can hardly be optimized. my_hash_free() overhead dropped 0.02 -> out of radar. delete_dynamic() overhead dropped 0.12 -> 0.04.
-
Sergey Vojtovich authored
Removed mysql_reset_thd_for_next_command(). Call THD::reset_for_next_command() directly instead. mysql_reset_thd_for_next_command() overhead dropped 0.04% -> out of radar. THD::reset_for_next_command() overhead didn't increase.
-
Sergey Vojtovich authored
PROFILING::start_new_query() optimizations: - no need to check "current": added assertion instead - "enabled" now means "is enabled currently" instead of "was enabled at query start". Old meaning was useless, new meaning echoes OPTION_PROFILING so that start_new_query() can be defined in sql_profile.h. - remnants of start_new_query() moved to sql_profile.h so it can be inlined PROFILING::start_new_query() overhead dropped 0.08% -> out of radar. PROFILING::set_query_source() optimizations: - no need to check "enabled": !enabled && current is impossible - remnants of set_query_source() moved to sql_profile.h so it can be inlined PROFILING::set_query_source() overhead dropped 0.02% -> out of radar. PROFILING::finish_current_query() optimizations: - moved "current" check out to sql_profile.h so it can be inlined PROFILING::finish_current_query() overhead dropped 0.10% -> out of radar.
-
Sergey Vojtovich authored
THD::enter_stage() optimizations: - stage backup code moved to THD::backup_stage(), saves one condition - moved check for "new_stage" out to callers that actually need it - remnants of enter_stage() moved to sql_class.h so it can be inlined THD::enter_stage() overhead dropped 0.48% -> 0.07%. PROFILING::status_change() optimizations: - "status_arg" is now checked by QUERY_PROFILE::new_status() - no need to check "enabled": !enabled && current is impossible - remnants of status_change() moved to sql_profile.h so it can be inlined PROFILING::status_change() overhead dropped 0.1% -> out of radar.
-
- 12 May, 2015 2 commits
-
-
Nirbhay Choubey authored
.. wsrep.binlog_format, wsrep.mdev_6832 fail in buildbot Galera-3.9 logs an additional warning in the error log if it fails to find gvwstate.dat file. Update wsrep/suite.pm.
-
Alexey Botchkov authored
MDEV-7926 Server crashes in get_geometry_column_record on concurrent SELECT FROM I_S.GEOMETRY_COLUMNS with join and DDL. The bug was that open_tables() returned error in case of thd->killed() without properly calling thd->send_kill_message() to set the correct error. This was fixed already in get_schema_column_record, so the code was just copied to get_geometry_column_record.
-
- 11 May, 2015 4 commits
-
-
Jan Lindström authored
UNIV_LIKELY()/UNIV_UNLIKELY() hints are supposed to improve branch prediction. Currently, they're expected to work only if cond evaluates to TRUE or FALSE. However there're a few conditions that may evaluate to different values, e.g.: page/page0zip.cc: if (UNIV_LIKELY(c_stream->avail_in)) { page/page0zip.cc: if (UNIV_LIKELY(c_stream->avail_in)) { dict/dict0mem.cc: if (UNIV_LIKELY(i) && UNIV_UNLIKELY(!table->col_names)) { Fixed these conditions so that they evaluate TRUE/FALSE.
-
Kristian Nielsen authored
-
Kristian Nielsen authored
MDEV-8113: Parallel slave: slave hangs on ALTER TABLE (or other DDL) as the first event after slave start In optimistic parallel replication, it is not safe to try to run a following transaction in parallel with a DDL statement, and there is code to prevent this. However, the code was missing the case where the DDL is the very first event after slave start. In this case, following transactions could run in parallel with the DDL, which can cause the slave to hang or even corrupt slave in unlucky cases.
-
Jan Lindström authored
Fix incorrect types and compiler warnings.
-
- 09 May, 2015 2 commits
-
-
Sergei Golubchik authored
MDEV-8021 "InnoDB: Tablespace id 4 encrypted but encryption service not available. Can't continue opening tablespace" on server restart when there are encrypted tables key id was written in the wrong place on the tablespace first page (thus its value could not be read back later)
-
Jan Lindström authored
Merged new version of InnoDB/XtraDB redo log encryption from Google provided by Jonas Oreland.
-
- 08 May, 2015 2 commits
-
-
Vicentiu Ciorbaru authored
On Windows, the files get checked out with CRLF thanks to .gitattributes.
-
Vicentiu Ciorbaru authored
-
- 07 May, 2015 4 commits
-
-
Alexander Barkov authored
Adding a new column INFORMATION_SCHEMA.PROCESSLIST.INFO_BINARY.
-
Sergey Vojtovich authored
table Performance schema discovery fails if connection has no active database set. This happened due to restriction in SQL parser: table name with no database name is ambiguous in such case. Fixed by temporary substitution of default database with being discovered table database.
-
Jan Lindström authored
initializers.
-
Sergey Vojtovich authored
XA COMMIT/ROLLBACK of XA transaction owned by different thread may access freed memory if that thread disconnects at the same time. Also concurrent XA COMMIT/ROLLBACK of recovered XA transaction were not serialized properly.
-
- 06 May, 2015 5 commits
-
-
Jan Lindström authored
c99 style for assigning structure members
-
Jan Lindström authored
MDEV-8046: Server crashes in pfs_mutex_enter_func on select from I_S.INNODB_TABLESPACES_ENCRYPTION if InnoDB is disabled Problem was that information schema tables innodb_tablespaces_encryption and innodb_tablespaces_scrubbing where missing required check is InnoDB enabled or not.
-
Jan Lindström authored
Problem was that e.g. on crash recovery fil_space_crypt_close_tablespace and fil_space_crypt_mark_space_closing access mutex that is not yet initialized. Mutex is naturally initialized only if encryption is configured.
-
Kristian Nielsen authored
-
Kristian Nielsen authored
-
- 05 May, 2015 1 commit
-
-
Alexander Barkov authored
as Item_func_spatial_mbr_rel needs nothing from Item_bool_func2. - Renaming Item_func_spacial_rel (the class that implements precise spacial relations) to Item_func_spatial_precise_rel - Adding a new abstract class Item_func_spatial_rel as a common parent for Item_func_spatial_precise_rel and Item_func_spatial_mbr_rel.
-
- 04 May, 2015 3 commits
-
-
Alexander Barkov authored
Step #3: Splitting the function check_equality() into a method in Item. Implementing Item::check_equality() and Item_func_eq::check_equality(). Implement Item_func_eq::build_equal_items() in addition to Item_func::build_equal_items() and moving the call for check_equality() from Item_func::build_equal_items() to Item_func_eq::build_equal_items().
-
Alexander Barkov authored
WHERE DEFAULT(col) It seems this was not covered yet.
-
Alexander Barkov authored
Step 2c: After discussion with Igor, it appeared that Item_field and Item_ref could not appear in this context in the old function build_equal_item_for_cond: else if (cond->type() == Item::FUNC_ITEM || cond->real_item()->type() == Item::FIELD_ITEM) The part of the condition checking for Item_field::FIELD_ITEM was a dead code. - Moving implementation of Item_ident_or_func_or_sum::build_equal_items() to Item_func::build_equal_items() - Restoring deriving of Item_ident and Item_sum_or_func from Item_result_field. Removing Item_ident_or_func_or_sum.
-
- 01 May, 2015 1 commit
-
-
Jan Lindström authored
Problem was that std::vector was allocated using calloc instead of new, this caused vector constructor not being called and vector metadata not initialized.
-
- 30 Apr, 2015 1 commit
-
-
Sergey Vojtovich authored
C++03 seem to require default constructor for const objects even though they're fully initialized. There is defect report for this: http://www.open-std.org/jtc1/sc22/wg21/docs/cwg_active.html#253 Apparently some compilers (e.g. gcc) addressed this defect report, while some (e.g. clang) did not. Added empty default constructor to MDL_scoped_lock and MDL_object_lock classes. Also replaced lf_hash_search_using_hash_value() with lf_hash_search(). The latter will call mdl_key->hash_value() anyway.
-
- 29 Apr, 2015 3 commits
-
-
Alexander Barkov authored
MDEV-7950 Item_func::type() takes 0.26% in OLTP RO (Step#2) - Item_ref was doing unnecessary extra job after the "MDEV-7950 Step#2" patch. Fallback to Item::build_equal_items() if real_type() is not FIELD_ITEM. Note, Item_ref::build_equal_items() will most likely be further simplified. Waiting for Sanja and Igor to check a possibly dead code. - Safety: Adding Item_sum::build_equal_items() with ASSERT, as Item_sum should never appear in build_equal_items() context.
-
Kristian Nielsen authored
-
Kristian Nielsen authored
Backport into 10.0
-
- 28 Apr, 2015 2 commits
-
-
Alexander Barkov authored
Step#2: 1. Removes the function build_equal_items_for_cond() and introduces a new method Item::build_equal_items() instead, with specific implementations in the following Items: Item (the default implementation) Item_ident_or_func_or_sum Item_cond Item_cond_and 2. Adds a new abstract class Item_ident_or_func_or_sum, a common parent for Item_ident and Item_func_or_sum, as they have exactly the same build_equal_items(). 3. Renames Item_cond_and::cond_equal to Item_cond_and::m_cond_equal, to avoid confusion between the member and local variables named "cond_equal".
-
Kristian Nielsen authored
The slave SQL thread was clearing serial_rgi->thd before deleting serial_rgi, which could cause access to NULL THD. The clearing was introduced in commit 2e100cc5 and is just plain wrong. So revert that part (single line) of that commit. Thanks to Daniel Black for bug analysis and test case.
-
- 27 Apr, 2015 1 commit
-
-
Daniel Black authored
-
- 25 Apr, 2015 1 commit
-
-
Alexander Barkov authored
to constructor Create_field::Create_field().
-
- 24 Apr, 2015 2 commits
-
-
Alexander Barkov authored
TODO: move some methods from Item to Type_std_attributes.
-
f4rnham authored
MDEV-7130: MASTER_POS_WAIT(log_name,log_pos,timeout,"connection_name") hangs, does not respect the timeout Changed also arg_count check for connection_name to prevent same bug if fifth argument is introduced in future
-